triangle-types 1.0.98 → 1.0.99
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FragmentAux } from "../fragments/Fragment.js";
|
|
1
2
|
declare const user_scout_conversation_role_ids: readonly ["USER", "SCOUT"];
|
|
2
3
|
export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number];
|
|
3
4
|
export declare function is_user_scout_conversation_role_id(user_scout_conversation_role_id: any): user_scout_conversation_role_id is UserScoutConversationRoleID;
|
|
@@ -13,7 +14,13 @@ export declare class UserScoutConversationMessage {
|
|
|
13
14
|
readonly system_prompt?: string;
|
|
14
15
|
readonly fragment_ids?: string[];
|
|
15
16
|
readonly text: string;
|
|
17
|
+
readonly [x: string]: any;
|
|
16
18
|
constructor(user_scout_conversation_message: any);
|
|
17
19
|
static is(user_scout_conversation_message: any): user_scout_conversation_message is UserScoutConversationMessage;
|
|
18
20
|
}
|
|
21
|
+
export declare class UserScoutConversationMessageAux extends UserScoutConversationMessage {
|
|
22
|
+
readonly fragments: FragmentAux[];
|
|
23
|
+
constructor(user_scout_conversation_message: any);
|
|
24
|
+
static is(user_scout_conversation_message: any): user_scout_conversation_message is UserScoutConversationMessageAux;
|
|
25
|
+
}
|
|
19
26
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FragmentAux } from "../fragments/Fragment.js";
|
|
1
2
|
const user_scout_conversation_role_ids = ["USER", "SCOUT"];
|
|
2
3
|
export function is_user_scout_conversation_role_id(user_scout_conversation_role_id) {
|
|
3
4
|
return user_scout_conversation_role_ids.includes(user_scout_conversation_role_id);
|
|
@@ -45,3 +46,17 @@ export class UserScoutConversationMessage {
|
|
|
45
46
|
typeof user_scout_conversation_message.text === "string");
|
|
46
47
|
}
|
|
47
48
|
}
|
|
49
|
+
export class UserScoutConversationMessageAux extends UserScoutConversationMessage {
|
|
50
|
+
fragments;
|
|
51
|
+
constructor(user_scout_conversation_message) {
|
|
52
|
+
if (!UserScoutConversationMessageAux.is(user_scout_conversation_message)) {
|
|
53
|
+
throw Error("Invalid input.");
|
|
54
|
+
}
|
|
55
|
+
super(user_scout_conversation_message);
|
|
56
|
+
this.fragments = user_scout_conversation_message.fragments;
|
|
57
|
+
}
|
|
58
|
+
static is(user_scout_conversation_message) {
|
|
59
|
+
return (UserScoutConversationMessage.is(user_scout_conversation_message) &&
|
|
60
|
+
Array.isArray(user_scout_conversation_message.fragments) && user_scout_conversation_message.fragments.every(FragmentAux.is));
|
|
61
|
+
}
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FragmentAux } from "../fragments/Fragment"
|
|
2
|
+
|
|
1
3
|
const user_scout_conversation_role_ids = ["USER", "SCOUT"] as const
|
|
2
4
|
|
|
3
5
|
export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number]
|
|
@@ -18,6 +20,7 @@ export class UserScoutConversationMessage {
|
|
|
18
20
|
readonly system_prompt? : string
|
|
19
21
|
readonly fragment_ids? : string[]
|
|
20
22
|
readonly text : string
|
|
23
|
+
readonly [x : string] : any
|
|
21
24
|
|
|
22
25
|
constructor(user_scout_conversation_message : any) {
|
|
23
26
|
if (!UserScoutConversationMessage.is(user_scout_conversation_message)) {
|
|
@@ -52,4 +55,23 @@ export class UserScoutConversationMessage {
|
|
|
52
55
|
typeof user_scout_conversation_message.text === "string"
|
|
53
56
|
)
|
|
54
57
|
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export class UserScoutConversationMessageAux extends UserScoutConversationMessage {
|
|
61
|
+
readonly fragments : FragmentAux[]
|
|
62
|
+
|
|
63
|
+
constructor(user_scout_conversation_message : any) {
|
|
64
|
+
if (!UserScoutConversationMessageAux.is(user_scout_conversation_message)) {
|
|
65
|
+
throw Error("Invalid input.")
|
|
66
|
+
}
|
|
67
|
+
super(user_scout_conversation_message)
|
|
68
|
+
this.fragments = user_scout_conversation_message.fragments
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessageAux {
|
|
72
|
+
return (
|
|
73
|
+
UserScoutConversationMessage.is(user_scout_conversation_message) &&
|
|
74
|
+
Array.isArray(user_scout_conversation_message.fragments) && user_scout_conversation_message.fragments.every(FragmentAux.is)
|
|
75
|
+
)
|
|
76
|
+
}
|
|
55
77
|
}
|