scout-types 1.0.5 → 1.0.7

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.
@@ -97,7 +97,7 @@ export class ScoutFileDocument extends ScoutDocument {
97
97
  }
98
98
  static is(scout_document) {
99
99
  return (ScoutDocument.is(scout_document) &&
100
- scout_document.type === "PRESS" &&
100
+ scout_document.type === "FILE" &&
101
101
  typeof scout_document.file_type === "string" &&
102
102
  typeof scout_document.filename === "string");
103
103
  }
@@ -21,7 +21,7 @@ export declare class JurisdictionDocumentSource {
21
21
  constructor(jurisdiction_document_source: any);
22
22
  static is(jurisdiction_document_source: any): jurisdiction_document_source is JurisdictionDocumentSource;
23
23
  }
24
- export declare class BillDocumentSource {
24
+ export declare class BillSource {
25
25
  readonly chunk_text: string;
26
26
  readonly description: string;
27
27
  readonly label: string;
@@ -29,7 +29,7 @@ export declare class BillDocumentSource {
29
29
  readonly vector_key: string;
30
30
  readonly bill: Bill;
31
31
  constructor(bill_document_source: any);
32
- static is(bill_document_source: any): bill_document_source is BillDocumentSource;
32
+ static is(bill_document_source: any): bill_document_source is BillSource;
33
33
  }
34
34
  export declare class GrokSource {
35
35
  readonly title: string;
@@ -41,7 +41,7 @@ export declare class GrokSource {
41
41
  static is(grok_source: any): grok_source is GrokSource;
42
42
  }
43
43
  export declare class Sources {
44
- readonly B: BillDocumentSource[];
44
+ readonly B: BillSource[];
45
45
  readonly S: ScoutDocumentSource[];
46
46
  readonly J: JurisdictionDocumentSource[];
47
47
  readonly G: GrokSource[];
@@ -57,7 +57,7 @@ export class JurisdictionDocumentSource {
57
57
  JurisdictionDocument.is(jurisdiction_document_source.document));
58
58
  }
59
59
  }
60
- export class BillDocumentSource {
60
+ export class BillSource {
61
61
  chunk_text;
62
62
  description;
63
63
  label;
@@ -65,7 +65,7 @@ export class BillDocumentSource {
65
65
  vector_key;
66
66
  bill;
67
67
  constructor(bill_document_source) {
68
- if (!BillDocumentSource.is(bill_document_source)) {
68
+ if (!BillSource.is(bill_document_source)) {
69
69
  throw Error("Invalid input.");
70
70
  }
71
71
  this.chunk_text = bill_document_source.chunk_text;
@@ -127,7 +127,7 @@ export class Sources {
127
127
  static is(sources) {
128
128
  return (sources !== undefined &&
129
129
  Array.isArray(sources.B) &&
130
- sources.B.every(BillDocumentSource.is) &&
130
+ sources.B.every(BillSource.is) &&
131
131
  Array.isArray(sources.S) &&
132
132
  sources.S.every(ScoutDocumentSource.is) &&
133
133
  Array.isArray(sources.J) &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scout-types",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -132,7 +132,7 @@ export class ScoutFileDocument extends ScoutDocument {
132
132
  static is(scout_document : any) : scout_document is ScoutFileDocument {
133
133
  return (
134
134
  ScoutDocument.is(scout_document) &&
135
- scout_document.type === "PRESS" &&
135
+ scout_document.type === "FILE" &&
136
136
  typeof scout_document.file_type === "string" &&
137
137
  typeof scout_document.filename === "string"
138
138
  )
@@ -68,7 +68,7 @@ export class JurisdictionDocumentSource {
68
68
  }
69
69
  }
70
70
 
71
- export class BillDocumentSource {
71
+ export class BillSource {
72
72
  readonly chunk_text : string
73
73
  readonly description : string
74
74
  readonly label : string
@@ -77,7 +77,7 @@ export class BillDocumentSource {
77
77
  readonly bill : Bill
78
78
 
79
79
  constructor(bill_document_source : any) {
80
- if (!BillDocumentSource.is(bill_document_source)) {
80
+ if (!BillSource.is(bill_document_source)) {
81
81
  throw Error("Invalid input.")
82
82
  }
83
83
  this.chunk_text = bill_document_source.chunk_text
@@ -88,7 +88,7 @@ export class BillDocumentSource {
88
88
  this.bill = bill_document_source.bill
89
89
  }
90
90
 
91
- static is(bill_document_source : any) : bill_document_source is BillDocumentSource {
91
+ static is(bill_document_source : any) : bill_document_source is BillSource {
92
92
  return (
93
93
  bill_document_source !== undefined &&
94
94
  typeof bill_document_source.chunk_text === "string" &&
@@ -132,7 +132,7 @@ export class GrokSource {
132
132
  }
133
133
 
134
134
  export class Sources {
135
- readonly B : BillDocumentSource[]
135
+ readonly B : BillSource[]
136
136
  readonly S : ScoutDocumentSource[]
137
137
  readonly J : JurisdictionDocumentSource[]
138
138
  readonly G : GrokSource[]
@@ -151,7 +151,7 @@ export class Sources {
151
151
  return (
152
152
  sources !== undefined &&
153
153
  Array.isArray(sources.B) &&
154
- sources.B.every(BillDocumentSource.is) &&
154
+ sources.B.every(BillSource.is) &&
155
155
  Array.isArray(sources.S) &&
156
156
  sources.S.every(ScoutDocumentSource.is) &&
157
157
  Array.isArray(sources.J) &&