scout-types 1.0.20 → 1.0.21

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.
@@ -27,6 +27,7 @@ export declare class ScoutTweetDocument extends ScoutDocument {
27
27
  static is(scout_document: any): scout_document is ScoutTweetDocument;
28
28
  }
29
29
  export declare class ScoutPressDocument extends ScoutDocument {
30
+ readonly url: string;
30
31
  constructor(scout_document: any);
31
32
  static is(scout_document: any): scout_document is ScoutPressDocument;
32
33
  }
@@ -76,15 +76,18 @@ export class ScoutTweetDocument extends ScoutDocument {
76
76
  }
77
77
  }
78
78
  export class ScoutPressDocument extends ScoutDocument {
79
+ url;
79
80
  constructor(scout_document) {
80
81
  if (!ScoutPressDocument.is(scout_document)) {
81
82
  throw Error("Invalid input.");
82
83
  }
83
84
  super(scout_document);
85
+ this.url = scout_document.url;
84
86
  }
85
87
  static is(scout_document) {
86
88
  return (ScoutDocument.is(scout_document) &&
87
- scout_document.type === "PRESS");
89
+ scout_document.type === "PRESS" &&
90
+ typeof scout_document.url === "string");
88
91
  }
89
92
  }
90
93
  export class ScoutFileDocument extends ScoutDocument {
@@ -28,8 +28,8 @@ export declare class BillSource {
28
28
  readonly type: string;
29
29
  readonly vector_key: string;
30
30
  readonly bill: Bill;
31
- constructor(bill_document_source: any);
32
- static is(bill_document_source: any): bill_document_source is BillSource;
31
+ constructor(bill_source: any);
32
+ static is(bill_source: any): bill_source is BillSource;
33
33
  }
34
34
  export declare class GrokSource {
35
35
  readonly title: string;
@@ -64,25 +64,25 @@ export class BillSource {
64
64
  type;
65
65
  vector_key;
66
66
  bill;
67
- constructor(bill_document_source) {
68
- if (!BillSource.is(bill_document_source)) {
67
+ constructor(bill_source) {
68
+ if (!BillSource.is(bill_source)) {
69
69
  throw Error("Invalid input.");
70
70
  }
71
- this.chunk_text = bill_document_source.chunk_text;
72
- this.description = bill_document_source.description;
73
- this.label = bill_document_source.label;
74
- this.type = bill_document_source.type;
75
- this.vector_key = bill_document_source.vector_key;
76
- this.bill = bill_document_source.bill;
71
+ this.chunk_text = bill_source.chunk_text;
72
+ this.description = bill_source.description;
73
+ this.label = bill_source.label;
74
+ this.type = bill_source.type;
75
+ this.vector_key = bill_source.vector_key;
76
+ this.bill = bill_source.bill;
77
77
  }
78
- static is(bill_document_source) {
79
- return (bill_document_source !== undefined &&
80
- typeof bill_document_source.chunk_text === "string" &&
81
- typeof bill_document_source.description === "string" &&
82
- typeof bill_document_source.label === "string" &&
83
- typeof bill_document_source.type === "string" &&
84
- typeof bill_document_source.vector_key === "string" &&
85
- Bill.is(bill_document_source.bill));
78
+ static is(bill_source) {
79
+ return (bill_source !== undefined &&
80
+ typeof bill_source.chunk_text === "string" &&
81
+ typeof bill_source.description === "string" &&
82
+ typeof bill_source.label === "string" &&
83
+ typeof bill_source.type === "string" &&
84
+ typeof bill_source.vector_key === "string" &&
85
+ Bill.is(bill_source.bill));
86
86
  }
87
87
  }
88
88
  export class GrokSource {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scout-types",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -101,19 +101,22 @@ export class ScoutTweetDocument extends ScoutDocument {
101
101
  }
102
102
 
103
103
  export class ScoutPressDocument extends ScoutDocument {
104
+ readonly url : string
104
105
 
105
106
  constructor(scout_document : any) {
106
107
  if (!ScoutPressDocument.is(scout_document)) {
107
108
  throw Error("Invalid input.")
108
109
  }
109
110
  super(scout_document)
111
+ this.url = scout_document.url
110
112
 
111
113
  }
112
114
 
113
115
  static is(scout_document : any) : scout_document is ScoutPressDocument {
114
116
  return (
115
117
  ScoutDocument.is(scout_document) &&
116
- scout_document.type === "PRESS"
118
+ scout_document.type === "PRESS" &&
119
+ typeof scout_document.url === "string"
117
120
  )
118
121
  }
119
122
  }
@@ -76,27 +76,27 @@ export class BillSource {
76
76
  readonly vector_key : string
77
77
  readonly bill : Bill
78
78
 
79
- constructor(bill_document_source : any) {
80
- if (!BillSource.is(bill_document_source)) {
79
+ constructor(bill_source : any) {
80
+ if (!BillSource.is(bill_source)) {
81
81
  throw Error("Invalid input.")
82
82
  }
83
- this.chunk_text = bill_document_source.chunk_text
84
- this.description = bill_document_source.description
85
- this.label = bill_document_source.label
86
- this.type = bill_document_source.type
87
- this.vector_key = bill_document_source.vector_key
88
- this.bill = bill_document_source.bill
83
+ this.chunk_text = bill_source.chunk_text
84
+ this.description = bill_source.description
85
+ this.label = bill_source.label
86
+ this.type = bill_source.type
87
+ this.vector_key = bill_source.vector_key
88
+ this.bill = bill_source.bill
89
89
  }
90
90
 
91
- static is(bill_document_source : any) : bill_document_source is BillSource {
91
+ static is(bill_source : any) : bill_source is BillSource {
92
92
  return (
93
- bill_document_source !== undefined &&
94
- typeof bill_document_source.chunk_text === "string" &&
95
- typeof bill_document_source.description === "string" &&
96
- typeof bill_document_source.label === "string" &&
97
- typeof bill_document_source.type === "string" &&
98
- typeof bill_document_source.vector_key === "string" &&
99
- Bill.is(bill_document_source.bill)
93
+ bill_source !== undefined &&
94
+ typeof bill_source.chunk_text === "string" &&
95
+ typeof bill_source.description === "string" &&
96
+ typeof bill_source.label === "string" &&
97
+ typeof bill_source.type === "string" &&
98
+ typeof bill_source.vector_key === "string" &&
99
+ Bill.is(bill_source.bill)
100
100
  )
101
101
  }
102
102
  }