triangle-types 1.0.368 → 1.0.370

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.
@@ -3,6 +3,8 @@ export * from "./types/application/ApplicationStage.js";
3
3
  export * from "./types/ballotpedia/BallotpediaJurisdiction.js";
4
4
  export * from "./types/ballotpedia/BallotpediaOffice.js";
5
5
  export * from "./types/ballotpedia/BallotpediaPerson.js";
6
+ export * from "./types/conversation/UserConversation.js";
7
+ export * from "./types/conversation/UserConversationMessage.js";
6
8
  export * from "./types/twitter/TwitterTweet.js";
7
9
  export * from "./types/twitter/TwitterUser.js";
8
10
  export * from "./types/twitter/TwitterUserTag.js";
@@ -79,9 +81,6 @@ export * from "./types/prism/StateVoter.js";
79
81
  export * from "./types/prism/StateVoterTarget.js";
80
82
  export * from "./types/scout/Scout.js";
81
83
  export * from "./types/scout/ScoutTag.js";
82
- export * from "./types/scout/UserScout.js";
83
- export * from "./types/scout/UserScoutConversation.js";
84
- export * from "./types/scout/UserScoutConversationMessage.js";
85
84
  export * from "./types/state_legislature/StateLegislatureDistrict.js";
86
85
  export * from "./types/state_permits/StatePermitFacility.js";
87
86
  export * from "./types/state_permits/StatePermit.js";
package/dist/src/index.js CHANGED
@@ -3,6 +3,8 @@ export * from "./types/application/ApplicationStage.js";
3
3
  export * from "./types/ballotpedia/BallotpediaJurisdiction.js";
4
4
  export * from "./types/ballotpedia/BallotpediaOffice.js";
5
5
  export * from "./types/ballotpedia/BallotpediaPerson.js";
6
+ export * from "./types/conversation/UserConversation.js";
7
+ export * from "./types/conversation/UserConversationMessage.js";
6
8
  export * from "./types/twitter/TwitterTweet.js";
7
9
  export * from "./types/twitter/TwitterUser.js";
8
10
  export * from "./types/twitter/TwitterUserTag.js";
@@ -79,9 +81,6 @@ export * from "./types/prism/StateVoter.js";
79
81
  export * from "./types/prism/StateVoterTarget.js";
80
82
  export * from "./types/scout/Scout.js";
81
83
  export * from "./types/scout/ScoutTag.js";
82
- export * from "./types/scout/UserScout.js";
83
- export * from "./types/scout/UserScoutConversation.js";
84
- export * from "./types/scout/UserScoutConversationMessage.js";
85
84
  export * from "./types/state_legislature/StateLegislatureDistrict.js";
86
85
  export * from "./types/state_permits/StatePermitFacility.js";
87
86
  export * from "./types/state_permits/StatePermit.js";
@@ -0,0 +1,9 @@
1
+ export declare class UserConversation {
2
+ readonly user_id: string;
3
+ readonly conversation_id: string;
4
+ readonly create_time: string;
5
+ readonly name: string;
6
+ readonly [x: string]: any;
7
+ constructor(user_conversation: any);
8
+ static is(user_conversation: any): user_conversation is UserConversation;
9
+ }
@@ -0,0 +1,22 @@
1
+ export class UserConversation {
2
+ user_id;
3
+ conversation_id;
4
+ create_time;
5
+ name;
6
+ constructor(user_conversation) {
7
+ if (!UserConversation.is(user_conversation)) {
8
+ throw Error("Invalid input.");
9
+ }
10
+ this.user_id = user_conversation.user_id;
11
+ this.conversation_id = user_conversation.conversation_id;
12
+ this.create_time = user_conversation.create_time;
13
+ this.name = user_conversation.name;
14
+ }
15
+ static is(user_conversation) {
16
+ return (user_conversation !== undefined &&
17
+ typeof user_conversation.user_id === "string" &&
18
+ typeof user_conversation.conversation_id === "string" &&
19
+ typeof user_conversation.create_time === "string" &&
20
+ typeof user_conversation.name === "string");
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ declare const user_conversation_role_ids: readonly ["USER", "SCOUT"];
2
+ export type UserConversationRoleID = typeof user_conversation_role_ids[number];
3
+ export declare function is_user_conversation_role_id(user_conversation_role_id: any): user_conversation_role_id is UserConversationRoleID;
4
+ export declare class UserConversationMessage {
5
+ readonly user_id: string;
6
+ readonly conversation_id: string;
7
+ readonly message_id: string;
8
+ readonly time: string;
9
+ readonly role_id: UserConversationRoleID;
10
+ readonly system_prompt?: string;
11
+ readonly text: string;
12
+ readonly [x: string]: any;
13
+ constructor(user_conversation_message: any);
14
+ static is(user_conversation_message: any): user_conversation_message is UserConversationMessage;
15
+ }
16
+ export {};
@@ -0,0 +1,35 @@
1
+ const user_conversation_role_ids = ["USER", "SCOUT"];
2
+ export function is_user_conversation_role_id(user_conversation_role_id) {
3
+ return user_conversation_role_ids.includes(user_conversation_role_id);
4
+ }
5
+ export class UserConversationMessage {
6
+ user_id;
7
+ conversation_id;
8
+ message_id;
9
+ time;
10
+ role_id;
11
+ system_prompt;
12
+ text;
13
+ constructor(user_conversation_message) {
14
+ if (!UserConversationMessage.is(user_conversation_message)) {
15
+ throw Error("Invalid input.");
16
+ }
17
+ this.user_id = user_conversation_message.user_id;
18
+ this.conversation_id = user_conversation_message.conversation_id;
19
+ this.message_id = user_conversation_message.message_id;
20
+ this.time = user_conversation_message.time;
21
+ this.role_id = user_conversation_message.role_id;
22
+ this.system_prompt = user_conversation_message.system_prompt;
23
+ this.text = user_conversation_message.text;
24
+ }
25
+ static is(user_conversation_message) {
26
+ return (user_conversation_message !== undefined &&
27
+ typeof user_conversation_message.user_id === "string" &&
28
+ typeof user_conversation_message.conversation_id === "string" &&
29
+ typeof user_conversation_message.message_id === "string" &&
30
+ typeof user_conversation_message.time === "string" &&
31
+ is_user_conversation_role_id(user_conversation_message.role_id) &&
32
+ (user_conversation_message.system_prompt === undefined || typeof user_conversation_message.system_prompt === "string") &&
33
+ typeof user_conversation_message.text === "string");
34
+ }
35
+ }
@@ -4,6 +4,8 @@ export declare class FederalCongressBillMember {
4
4
  readonly bill_type_id: FederalCongressBillTypeID;
5
5
  readonly bill_id: number;
6
6
  readonly federal_congress_member_id: string;
7
+ readonly is_original: boolean;
8
+ readonly cosponsorship_date: string;
7
9
  readonly [x: string]: any;
8
10
  constructor(federal_congress_bill: FederalCongressBillMember);
9
11
  static is(federal_congress_bill: any): federal_congress_bill is FederalCongressBillMember;
@@ -4,6 +4,8 @@ export class FederalCongressBillMember {
4
4
  bill_type_id;
5
5
  bill_id;
6
6
  federal_congress_member_id;
7
+ is_original;
8
+ cosponsorship_date;
7
9
  constructor(federal_congress_bill) {
8
10
  if (!FederalCongressBillMember.is(federal_congress_bill)) {
9
11
  throw Error("Invalid input.");
@@ -12,12 +14,15 @@ export class FederalCongressBillMember {
12
14
  this.bill_type_id = federal_congress_bill.bill_type_id;
13
15
  this.bill_id = federal_congress_bill.bill_id;
14
16
  this.federal_congress_member_id = federal_congress_bill.federal_congress_member_id;
17
+ this.is_original = federal_congress_bill.is_original;
18
+ this.cosponsorship_date = federal_congress_bill.cosponsorship_date;
15
19
  }
16
20
  static is(federal_congress_bill) {
17
21
  return (federal_congress_bill !== undefined &&
18
22
  typeof federal_congress_bill.federal_congress_id === "number" &&
19
23
  is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
20
24
  typeof federal_congress_bill.bill_id === "number" &&
21
- typeof federal_congress_bill.federal_congress_member_id === "string");
25
+ typeof federal_congress_bill.federal_congress_member_id === "string" &&
26
+ typeof federal_congress_bill.cosponsorship_date === "string");
22
27
  }
23
28
  }
@@ -0,0 +1,53 @@
1
+ // import { is_state_id, StateID } from "../jurisdictions/State.js"
2
+ // import { FederalCongressChamberID } from "./FederalCongressVote.js"
3
+ export {};
4
+ // export class FederalCongressMemberTerm {
5
+ // readonly federal_congress_member_id : string
6
+ // readonly term_id : string
7
+ // readonly federal_congress_id : number
8
+ // readonly chamber_id : FederalCongressChamberID
9
+ // readonly state_id : StateID
10
+ // readonly federal_congress_district_id? : string
11
+ // constructor(federal_congress_member : any) {
12
+ // if (!FederalCongressMember.is(federal_congress_member)) {
13
+ // throw Error("Invalid input.")
14
+ // }
15
+ // this.federal_congress_member_id = federal_congress_member.federal_congress_member_id
16
+ // this.name = federal_congress_member.name
17
+ // this.name_last_first = federal_congress_member.name_last_first
18
+ // this.name_prefix = federal_congress_member.name_prefix
19
+ // this.name_first = federal_congress_member.name_first
20
+ // this.name_middle = federal_congress_member.name_middle
21
+ // this.name_last = federal_congress_member.name_last
22
+ // this.birth_year = federal_congress_member.birth_year
23
+ // this.chamber_id = federal_congress_member.chamber_id
24
+ // this.state_id = federal_congress_member.state_id
25
+ // this.is_incumbent = federal_congress_member.is_incumbent
26
+ // this.district_id = federal_congress_member.district_id
27
+ // this.url = federal_congress_member.url
28
+ // this.url_image = federal_congress_member.url_image
29
+ // this.federal_senate_member_id = federal_congress_member.federal_senate_member_id
30
+ // this.scout_id = federal_congress_member.scout_id
31
+ // }
32
+ // static is(federal_congress_member : any) : federal_congress_member is FederalCongressMember {
33
+ // return (
34
+ // federal_congress_member !== undefined &&
35
+ // typeof federal_congress_member.federal_congress_member_id === "string" &&
36
+ // typeof federal_congress_member.name === "string" &&
37
+ // typeof federal_congress_member.name_last_first === "string" &&
38
+ // (federal_congress_member.name_prefix === undefined || typeof federal_congress_member.name_prefix === "string") &&
39
+ // typeof federal_congress_member.name_first === "string" &&
40
+ // (federal_congress_member.name_middle === undefined || typeof federal_congress_member.name_middle === "string") &&
41
+ // typeof federal_congress_member.name_last === "string" &&
42
+ // (federal_congress_member.birth_year === undefined || typeof federal_congress_member.birth_year === "number" && !isNaN(federal_congress_member.birth_year)) &&
43
+ // is_state_id(federal_congress_member.state_id) &&
44
+ // typeof federal_congress_member.chamber_id === "string" &&
45
+ // (federal_congress_member.district_id === undefined || typeof federal_congress_member.district_id === "number") &&
46
+ // typeof federal_congress_member.is_incumbent === "boolean" &&
47
+ // (federal_congress_member.url === undefined || typeof federal_congress_member.url === "string") &&
48
+ // (federal_congress_member.url_image === undefined || typeof federal_congress_member.url_image === "string") &&
49
+ // (federal_congress_member.federal_senate_member_id === undefined || typeof federal_congress_member.federal_senate_member_id === "string") &&
50
+ // (federal_congress_member.scout_id === undefined || typeof federal_congress_member.scout_id === "string")
51
+ // )
52
+ // }
53
+ // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.368",
3
+ "version": "1.0.370",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -6,6 +6,10 @@ export * from "./types/ballotpedia/BallotpediaJurisdiction"
6
6
  export * from "./types/ballotpedia/BallotpediaOffice"
7
7
  export * from "./types/ballotpedia/BallotpediaPerson"
8
8
 
9
+ export * from "./types/conversation/UserConversation"
10
+ export * from "./types/conversation/UserConversationMessage"
11
+
12
+
9
13
  export * from "./types/twitter/TwitterTweet"
10
14
  export * from "./types/twitter/TwitterUser"
11
15
  export * from "./types/twitter/TwitterUserTag"
@@ -96,9 +100,6 @@ export * from "./types/prism/StateVoterTarget"
96
100
 
97
101
  export * from "./types/scout/Scout"
98
102
  export * from "./types/scout/ScoutTag"
99
- export * from "./types/scout/UserScout"
100
- export * from "./types/scout/UserScoutConversation"
101
- export * from "./types/scout/UserScoutConversationMessage"
102
103
 
103
104
  export * from "./types/state_legislature/StateLegislatureDistrict"
104
105
 
@@ -0,0 +1,27 @@
1
+ export class UserConversation {
2
+ readonly user_id : string
3
+ readonly conversation_id : string
4
+ readonly create_time : string
5
+ readonly name : string
6
+ readonly [x : string] : any
7
+
8
+ constructor(user_conversation : any) {
9
+ if (!UserConversation.is(user_conversation)) {
10
+ throw Error("Invalid input.")
11
+ }
12
+ this.user_id = user_conversation.user_id
13
+ this.conversation_id = user_conversation.conversation_id
14
+ this.create_time = user_conversation.create_time
15
+ this.name = user_conversation.name
16
+ }
17
+
18
+ static is(user_conversation : any) : user_conversation is UserConversation {
19
+ return (
20
+ user_conversation !== undefined &&
21
+ typeof user_conversation.user_id === "string" &&
22
+ typeof user_conversation.conversation_id === "string" &&
23
+ typeof user_conversation.create_time === "string" &&
24
+ typeof user_conversation.name === "string"
25
+ )
26
+ }
27
+ }
@@ -0,0 +1,44 @@
1
+ const user_conversation_role_ids = ["USER", "SCOUT"] as const
2
+
3
+ export type UserConversationRoleID = typeof user_conversation_role_ids[number]
4
+
5
+ export function is_user_conversation_role_id(user_conversation_role_id : any) : user_conversation_role_id is UserConversationRoleID {
6
+ return user_conversation_role_ids.includes(user_conversation_role_id)
7
+ }
8
+
9
+ export class UserConversationMessage {
10
+ readonly user_id : string
11
+ readonly conversation_id : string
12
+ readonly message_id : string
13
+ readonly time : string
14
+ readonly role_id : UserConversationRoleID
15
+ readonly system_prompt? : string
16
+ readonly text : string
17
+ readonly [x : string] : any
18
+
19
+ constructor(user_conversation_message : any) {
20
+ if (!UserConversationMessage.is(user_conversation_message)) {
21
+ throw Error("Invalid input.")
22
+ }
23
+ this.user_id = user_conversation_message.user_id
24
+ this.conversation_id = user_conversation_message.conversation_id
25
+ this.message_id = user_conversation_message.message_id
26
+ this.time = user_conversation_message.time
27
+ this.role_id = user_conversation_message.role_id
28
+ this.system_prompt = user_conversation_message.system_prompt
29
+ this.text = user_conversation_message.text
30
+ }
31
+
32
+ static is(user_conversation_message : any) : user_conversation_message is UserConversationMessage {
33
+ return (
34
+ user_conversation_message !== undefined &&
35
+ typeof user_conversation_message.user_id === "string" &&
36
+ typeof user_conversation_message.conversation_id === "string" &&
37
+ typeof user_conversation_message.message_id === "string" &&
38
+ typeof user_conversation_message.time === "string" &&
39
+ is_user_conversation_role_id(user_conversation_message.role_id) &&
40
+ (user_conversation_message.system_prompt === undefined || typeof user_conversation_message.system_prompt === "string") &&
41
+ typeof user_conversation_message.text === "string"
42
+ )
43
+ }
44
+ }
@@ -5,6 +5,8 @@ export class FederalCongressBillMember {
5
5
  readonly bill_type_id : FederalCongressBillTypeID
6
6
  readonly bill_id : number
7
7
  readonly federal_congress_member_id : string
8
+ readonly is_original : boolean
9
+ readonly cosponsorship_date : string
8
10
  readonly [x : string] : any
9
11
 
10
12
  constructor(federal_congress_bill : FederalCongressBillMember) {
@@ -15,6 +17,8 @@ export class FederalCongressBillMember {
15
17
  this.bill_type_id = federal_congress_bill.bill_type_id
16
18
  this.bill_id = federal_congress_bill.bill_id
17
19
  this.federal_congress_member_id = federal_congress_bill.federal_congress_member_id
20
+ this.is_original = federal_congress_bill.is_original
21
+ this.cosponsorship_date = federal_congress_bill.cosponsorship_date
18
22
  }
19
23
 
20
24
  static is(federal_congress_bill : any) : federal_congress_bill is FederalCongressBillMember {
@@ -23,7 +27,8 @@ export class FederalCongressBillMember {
23
27
  typeof federal_congress_bill.federal_congress_id === "number" &&
24
28
  is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
25
29
  typeof federal_congress_bill.bill_id === "number" &&
26
- typeof federal_congress_bill.federal_congress_member_id === "string"
30
+ typeof federal_congress_bill.federal_congress_member_id === "string" &&
31
+ typeof federal_congress_bill.cosponsorship_date === "string"
27
32
  )
28
33
  }
29
34
  }
@@ -0,0 +1,57 @@
1
+ // import { is_state_id, StateID } from "../jurisdictions/State"
2
+ // import { FederalCongressChamberID } from "./FederalCongressVote"
3
+
4
+ // export class FederalCongressMemberTerm {
5
+ // readonly federal_congress_member_id : string
6
+ // readonly term_id : string
7
+ // readonly federal_congress_id : number
8
+ // readonly chamber_id : FederalCongressChamberID
9
+ // readonly state_id : StateID
10
+ // readonly federal_congress_district_id? : string
11
+
12
+
13
+ // constructor(federal_congress_member : any) {
14
+ // if (!FederalCongressMember.is(federal_congress_member)) {
15
+ // throw Error("Invalid input.")
16
+ // }
17
+ // this.federal_congress_member_id = federal_congress_member.federal_congress_member_id
18
+ // this.name = federal_congress_member.name
19
+ // this.name_last_first = federal_congress_member.name_last_first
20
+ // this.name_prefix = federal_congress_member.name_prefix
21
+ // this.name_first = federal_congress_member.name_first
22
+ // this.name_middle = federal_congress_member.name_middle
23
+ // this.name_last = federal_congress_member.name_last
24
+ // this.birth_year = federal_congress_member.birth_year
25
+ // this.chamber_id = federal_congress_member.chamber_id
26
+ // this.state_id = federal_congress_member.state_id
27
+ // this.is_incumbent = federal_congress_member.is_incumbent
28
+ // this.district_id = federal_congress_member.district_id
29
+ // this.url = federal_congress_member.url
30
+ // this.url_image = federal_congress_member.url_image
31
+ // this.federal_senate_member_id = federal_congress_member.federal_senate_member_id
32
+ // this.scout_id = federal_congress_member.scout_id
33
+ // }
34
+
35
+ // static is(federal_congress_member : any) : federal_congress_member is FederalCongressMember {
36
+ // return (
37
+ // federal_congress_member !== undefined &&
38
+ // typeof federal_congress_member.federal_congress_member_id === "string" &&
39
+ // typeof federal_congress_member.name === "string" &&
40
+ // typeof federal_congress_member.name_last_first === "string" &&
41
+ // (federal_congress_member.name_prefix === undefined || typeof federal_congress_member.name_prefix === "string") &&
42
+ // typeof federal_congress_member.name_first === "string" &&
43
+ // (federal_congress_member.name_middle === undefined || typeof federal_congress_member.name_middle === "string") &&
44
+ // typeof federal_congress_member.name_last === "string" &&
45
+ // (federal_congress_member.birth_year === undefined || typeof federal_congress_member.birth_year === "number" && !isNaN(federal_congress_member.birth_year)) &&
46
+ // is_state_id(federal_congress_member.state_id) &&
47
+ // typeof federal_congress_member.chamber_id === "string" &&
48
+ // (federal_congress_member.district_id === undefined || typeof federal_congress_member.district_id === "number") &&
49
+ // typeof federal_congress_member.is_incumbent === "boolean" &&
50
+ // (federal_congress_member.url === undefined || typeof federal_congress_member.url === "string") &&
51
+ // (federal_congress_member.url_image === undefined || typeof federal_congress_member.url_image === "string") &&
52
+ // (federal_congress_member.federal_senate_member_id === undefined || typeof federal_congress_member.federal_senate_member_id === "string") &&
53
+ // (federal_congress_member.scout_id === undefined || typeof federal_congress_member.scout_id === "string")
54
+ // )
55
+ // }
56
+
57
+ // }
@@ -1,51 +0,0 @@
1
- // import { Scout, ScoutAux } from "./Scout"
2
-
3
- // export class UserScout {
4
- // readonly user_scout_id : string
5
- // readonly user_id : string
6
- // readonly scout_id : string
7
- // readonly is_conversation_allowed : boolean
8
- // readonly is_search_allowed : boolean
9
- // readonly [x : string] : any
10
-
11
- // constructor(user_scout : any) {
12
- // if (!UserScout.is(user_scout)) {
13
- // throw Error("Invalid input.")
14
- // }
15
- // this.user_scout_id = user_scout.user_scout_id
16
- // this.user_id = user_scout.user_id
17
- // this.scout_id = user_scout.scout_id
18
- // this.is_conversation_allowed = user_scout.is_conversation_allowed
19
- // this.is_search_allowed = user_scout.is_search_allowed
20
- // }
21
-
22
- // static is(user_scout : any) : user_scout is UserScout {
23
- // return (
24
- // user_scout !== undefined &&
25
- // typeof user_scout.user_scout_id === "string" &&
26
- // typeof user_scout.user_id === "string" &&
27
- // typeof user_scout.scout_id === "string" &&
28
- // typeof user_scout.is_conversation_allowed === "boolean" &&
29
- // typeof user_scout.is_search_allowed === "boolean"
30
- // )
31
- // }
32
- // }
33
-
34
- // export class UserScoutAux extends UserScout {
35
- // readonly scout : ScoutAux
36
-
37
- // constructor(user_scout : any) {
38
- // if (!UserScoutAux.is(user_scout)) {
39
- // throw Error("Invalid input.")
40
- // }
41
- // super(user_scout)
42
- // this.scout = user_scout.scout
43
- // }
44
-
45
- // static is(user_scout : any) : user_scout is UserScoutAux {
46
- // return (
47
- // UserScout.is(user_scout) &&
48
- // ScoutAux.is(user_scout.scout)
49
- // )
50
- // }
51
- // }
@@ -1,51 +0,0 @@
1
- // import { UserScoutConversationMessage } from "./UserScoutConversationMessage"
2
-
3
- // export class UserScoutConversation {
4
- // readonly user_scout_conversation_id : string
5
- // readonly user_id : string
6
- // readonly scout_id : string
7
- // readonly conversation_id : string
8
- // readonly user_scout_id : string
9
- // readonly [x : string] : any
10
-
11
- // constructor(user_scout_conversation : any) {
12
- // if (!UserScoutConversation.is(user_scout_conversation)) {
13
- // throw Error("Invalid input.")
14
- // }
15
- // this.user_scout_conversation_id = user_scout_conversation.user_scout_conversation_id
16
- // this.user_id = user_scout_conversation.user_id
17
- // this.scout_id = user_scout_conversation.scout_id
18
- // this.conversation_id = user_scout_conversation.conversation_id
19
- // this.user_scout_id = user_scout_conversation.user_scout_id
20
- // }
21
-
22
- // static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversation {
23
- // return (
24
- // user_scout_conversation !== undefined &&
25
- // typeof user_scout_conversation.user_scout_conversation_id === "string" &&
26
- // typeof user_scout_conversation.user_id === "string" &&
27
- // typeof user_scout_conversation.scout_id === "string" &&
28
- // typeof user_scout_conversation.conversation_id === "string" &&
29
- // typeof user_scout_conversation.user_scout_id === "string"
30
- // )
31
- // }
32
- // }
33
-
34
- // export class UserScoutConversationAux extends UserScoutConversation {
35
- // readonly messages : UserScoutConversationMessage[]
36
-
37
- // constructor(user_scout_conversation : any) {
38
- // if (!UserScoutConversationAux.is(user_scout_conversation)) {
39
- // throw Error("Invalid input.")
40
- // }
41
- // super(user_scout_conversation)
42
- // this.messages = user_scout_conversation.messages
43
- // }
44
-
45
- // static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversationAux {
46
- // return (
47
- // UserScoutConversation.is(user_scout_conversation) &&
48
- // Array.isArray(user_scout_conversation.messages) && user_scout_conversation.messages.every(UserScoutConversationMessage.is)
49
- // )
50
- // }
51
- // }
@@ -1,77 +0,0 @@
1
- // import { FragmentAux } from "../fragments/Fragment"
2
-
3
- // const user_scout_conversation_role_ids = ["USER", "SCOUT"] as const
4
-
5
- // export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number]
6
-
7
- // export function is_user_scout_conversation_role_id(user_scout_conversation_role_id : any) : user_scout_conversation_role_id is UserScoutConversationRoleID {
8
- // return user_scout_conversation_role_ids.includes(user_scout_conversation_role_id)
9
- // }
10
-
11
- // export class UserScoutConversationMessage {
12
- // readonly user_scout_conversation_message_id : string
13
- // readonly user_id : string
14
- // readonly scout_id : string
15
- // readonly conversation_id : string
16
- // readonly message_id : string
17
- // readonly user_scout_id : string
18
- // readonly user_scout_conversation_id : string
19
- // readonly role_id : UserScoutConversationRoleID
20
- // readonly system_prompt? : string
21
- // readonly fragment_ids? : string[]
22
- // readonly text : string
23
- // readonly [x : string] : any
24
-
25
- // constructor(user_scout_conversation_message : any) {
26
- // if (!UserScoutConversationMessage.is(user_scout_conversation_message)) {
27
- // throw Error("Invalid input.")
28
- // }
29
- // this.user_scout_conversation_message_id = user_scout_conversation_message.user_scout_conversation_message_id
30
- // this.user_id = user_scout_conversation_message.user_id
31
- // this.scout_id = user_scout_conversation_message.scout_id
32
- // this.conversation_id = user_scout_conversation_message.conversation_id
33
- // this.message_id = user_scout_conversation_message.message_id
34
- // this.user_scout_id = user_scout_conversation_message.user_scout_id
35
- // this.user_scout_conversation_id = user_scout_conversation_message.user_scout_conversation_id
36
- // this.role_id = user_scout_conversation_message.role_id
37
- // this.system_prompt = user_scout_conversation_message.system_prompt
38
- // this.fragment_ids = user_scout_conversation_message.fragment_ids
39
- // this.text = user_scout_conversation_message.text
40
- // }
41
-
42
- // static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessage {
43
- // return (
44
- // user_scout_conversation_message !== undefined &&
45
- // typeof user_scout_conversation_message.user_scout_conversation_message_id === "string" &&
46
- // typeof user_scout_conversation_message.user_id === "string" &&
47
- // typeof user_scout_conversation_message.scout_id === "string" &&
48
- // typeof user_scout_conversation_message.conversation_id === "string" &&
49
- // typeof user_scout_conversation_message.message_id === "string" &&
50
- // typeof user_scout_conversation_message.user_scout_id === "string" &&
51
- // typeof user_scout_conversation_message.user_scout_conversation_id === "string" &&
52
- // is_user_scout_conversation_role_id(user_scout_conversation_message.role_id) &&
53
- // (user_scout_conversation_message.system_prompt === undefined || typeof user_scout_conversation_message.system_prompt === "string") &&
54
- // (user_scout_conversation_message.fragment_ids === undefined || Array.isArray(user_scout_conversation_message.fragment_ids) && user_scout_conversation_message.fragment_ids.every((fragment_id : any) => typeof fragment_id === "string")) &&
55
- // typeof user_scout_conversation_message.text === "string"
56
- // )
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
- // (user_scout_conversation_message.fragments === undefined || Array.isArray(user_scout_conversation_message.fragments) && user_scout_conversation_message.fragments.every(FragmentAux.is))
75
- // )
76
- // }
77
- // }