triangle-types 1.0.34 → 1.0.36

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.
@@ -14,6 +14,11 @@ export declare class FederalCongressBillDocumentFragment extends Fragment {
14
14
  constructor(fragment: FederalCongressBillDocumentFragment);
15
15
  static is(fragment: any): fragment is FederalCongressBillDocumentFragment;
16
16
  }
17
+ export declare class LegistarDocumentFragment extends Fragment {
18
+ readonly legistar_document_id: string;
19
+ constructor(fragment: LegistarDocumentFragment);
20
+ static is(fragment: any): fragment is LegistarDocumentFragment;
21
+ }
17
22
  export declare class PressArticleTagFragment extends Fragment {
18
23
  readonly press_article_id: string;
19
24
  readonly tag_id: string;
@@ -40,6 +40,20 @@ export class FederalCongressBillDocumentFragment extends Fragment {
40
40
  typeof fragment.federal_congress_bill_document_id === "string");
41
41
  }
42
42
  }
43
+ export class LegistarDocumentFragment extends Fragment {
44
+ legistar_document_id;
45
+ constructor(fragment) {
46
+ if (!LegistarDocumentFragment.is(fragment)) {
47
+ throw Error("Invalid input.");
48
+ }
49
+ super(fragment);
50
+ this.legistar_document_id = fragment.legistar_document_id;
51
+ }
52
+ static is(fragment) {
53
+ return (Fragment.is(fragment) &&
54
+ typeof fragment.legistar_document_id === "string");
55
+ }
56
+ }
43
57
  export class PressArticleTagFragment extends Fragment {
44
58
  press_article_id;
45
59
  tag_id;
@@ -11,6 +11,7 @@ export declare class UserScoutConversationMessage {
11
11
  readonly user_scout_conversation_id: string;
12
12
  readonly role_id: UserScoutConversationRoleID;
13
13
  readonly system_prompt?: string;
14
+ readonly fragment_ids?: string[];
14
15
  readonly text: string;
15
16
  constructor(user_scout_conversation_message: any);
16
17
  static is(user_scout_conversation_message: any): user_scout_conversation_message is UserScoutConversationMessage;
@@ -12,6 +12,7 @@ export class UserScoutConversationMessage {
12
12
  user_scout_conversation_id;
13
13
  role_id;
14
14
  system_prompt;
15
+ fragment_ids;
15
16
  text;
16
17
  constructor(user_scout_conversation_message) {
17
18
  if (!UserScoutConversationMessage.is(user_scout_conversation_message)) {
@@ -26,6 +27,7 @@ export class UserScoutConversationMessage {
26
27
  this.user_scout_conversation_id = user_scout_conversation_message.user_scout_conversation_id;
27
28
  this.role_id = user_scout_conversation_message.role_id;
28
29
  this.system_prompt = user_scout_conversation_message.system_prompt;
30
+ this.fragment_ids = user_scout_conversation_message.fragment_ids;
29
31
  this.text = user_scout_conversation_message.text;
30
32
  }
31
33
  static is(user_scout_conversation_message) {
@@ -39,6 +41,7 @@ export class UserScoutConversationMessage {
39
41
  typeof user_scout_conversation_message.user_scout_conversation_id === "string" &&
40
42
  is_user_scout_conversation_role_id(user_scout_conversation_message.role_id) &&
41
43
  (user_scout_conversation_message.system_prompt === undefined || typeof user_scout_conversation_message.system_prompt === "string") &&
44
+ (user_scout_conversation_message.fragment_ids === undefined || Array.isArray(user_scout_conversation_message.fragment_ids) && user_scout_conversation_message.fragment_ids.every((fragment_id) => typeof fragment_id === "string")) &&
42
45
  typeof user_scout_conversation_message.text === "string");
43
46
  }
44
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -51,6 +51,25 @@ export class FederalCongressBillDocumentFragment extends Fragment {
51
51
  }
52
52
  }
53
53
 
54
+ export class LegistarDocumentFragment extends Fragment {
55
+ readonly legistar_document_id : string
56
+
57
+ constructor(fragment : LegistarDocumentFragment) {
58
+ if (!LegistarDocumentFragment.is(fragment)) {
59
+ throw Error("Invalid input.")
60
+ }
61
+ super(fragment)
62
+ this.legistar_document_id = fragment.legistar_document_id
63
+ }
64
+
65
+ static is(fragment : any) : fragment is LegistarDocumentFragment {
66
+ return (
67
+ Fragment.is(fragment) &&
68
+ typeof fragment.legistar_document_id === "string"
69
+ )
70
+ }
71
+ }
72
+
54
73
  export class PressArticleTagFragment extends Fragment {
55
74
  readonly press_article_id : string
56
75
  readonly tag_id : string
@@ -16,6 +16,7 @@ export class UserScoutConversationMessage {
16
16
  readonly user_scout_conversation_id : string
17
17
  readonly role_id : UserScoutConversationRoleID
18
18
  readonly system_prompt? : string
19
+ readonly fragment_ids? : string[]
19
20
  readonly text : string
20
21
 
21
22
  constructor(user_scout_conversation_message : any) {
@@ -31,6 +32,7 @@ export class UserScoutConversationMessage {
31
32
  this.user_scout_conversation_id = user_scout_conversation_message.user_scout_conversation_id
32
33
  this.role_id = user_scout_conversation_message.role_id
33
34
  this.system_prompt = user_scout_conversation_message.system_prompt
35
+ this.fragment_ids = user_scout_conversation_message.fragment_ids
34
36
  this.text = user_scout_conversation_message.text
35
37
  }
36
38
 
@@ -46,6 +48,7 @@ export class UserScoutConversationMessage {
46
48
  typeof user_scout_conversation_message.user_scout_conversation_id === "string" &&
47
49
  is_user_scout_conversation_role_id(user_scout_conversation_message.role_id) &&
48
50
  (user_scout_conversation_message.system_prompt === undefined || typeof user_scout_conversation_message.system_prompt === "string") &&
51
+ (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")) &&
49
52
  typeof user_scout_conversation_message.text === "string"
50
53
  )
51
54
  }