scout-types 1.0.16 → 1.0.18
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.
package/dist/src/types/Scout.js
CHANGED
|
@@ -47,7 +47,7 @@ export class Scout {
|
|
|
47
47
|
typeof scout.tone_description_refresh === "boolean" &&
|
|
48
48
|
Array.isArray(scout.jurisdiction_ids) &&
|
|
49
49
|
scout.jurisdiction_ids.every((jurisdiction_id) => typeof jurisdiction_id === "number") &&
|
|
50
|
-
(scout.sub_scout_ids || Array.isArray(scout.sub_scout_ids) && scout.sub_scout_ids.every((sub_scout_id) => typeof sub_scout_id === "string")) &&
|
|
50
|
+
(scout.sub_scout_ids === undefined || Array.isArray(scout.sub_scout_ids) && scout.sub_scout_ids.every((sub_scout_id) => typeof sub_scout_id === "string")) &&
|
|
51
51
|
is_office_class_id(scout.office_class_id) &&
|
|
52
52
|
(scout.office_name === undefined || typeof scout.office_name === "string"));
|
|
53
53
|
}
|
|
@@ -5,6 +5,7 @@ export declare class ScoutDocument {
|
|
|
5
5
|
readonly type: "URL" | "TWEET" | "TWITTER" | "PRESS" | "FILE";
|
|
6
6
|
readonly s3_filename?: string;
|
|
7
7
|
readonly s3_text_filename?: string;
|
|
8
|
+
readonly text?: string;
|
|
8
9
|
readonly vector_keys?: string[];
|
|
9
10
|
readonly [x: string]: any;
|
|
10
11
|
constructor(scout_document: any);
|
|
@@ -5,6 +5,7 @@ export class ScoutDocument {
|
|
|
5
5
|
type;
|
|
6
6
|
s3_filename;
|
|
7
7
|
s3_text_filename;
|
|
8
|
+
text;
|
|
8
9
|
vector_keys;
|
|
9
10
|
constructor(scout_document) {
|
|
10
11
|
if (!ScoutDocument.is(scout_document)) {
|
|
@@ -15,6 +16,7 @@ export class ScoutDocument {
|
|
|
15
16
|
this.type = scout_document.type;
|
|
16
17
|
this.s3_filename = scout_document.s3_filename;
|
|
17
18
|
this.s3_text_filename = scout_document.s3_text_filename;
|
|
19
|
+
this.text = scout_document.text;
|
|
18
20
|
this.vector_keys = scout_document.vector_keys;
|
|
19
21
|
}
|
|
20
22
|
static is(scout_document) {
|
|
@@ -24,6 +26,7 @@ export class ScoutDocument {
|
|
|
24
26
|
typeof scout_document.type === "string" &&
|
|
25
27
|
(scout_document.s3_filename === undefined || typeof scout_document.s3_filename === "string") &&
|
|
26
28
|
(scout_document.s3_text_filename === undefined || typeof scout_document.s3_text_filename === "string") &&
|
|
29
|
+
(scout_document.text === undefined || typeof scout_document.text === "string") &&
|
|
27
30
|
(scout_document.vector_keys === undefined || Array.isArray(scout_document.vector_keys) && scout_document.vector_keys.every((vector_key) => typeof vector_key === "string")));
|
|
28
31
|
}
|
|
29
32
|
}
|
package/package.json
CHANGED
package/src/types/Scout.ts
CHANGED
|
@@ -52,7 +52,7 @@ export class Scout {
|
|
|
52
52
|
typeof scout.tone_description_refresh === "boolean" &&
|
|
53
53
|
Array.isArray(scout.jurisdiction_ids) &&
|
|
54
54
|
scout.jurisdiction_ids.every((jurisdiction_id : any) => typeof jurisdiction_id === "number") &&
|
|
55
|
-
(scout.sub_scout_ids || Array.isArray(scout.sub_scout_ids) && scout.sub_scout_ids.every((sub_scout_id : any) => typeof sub_scout_id === "string")) &&
|
|
55
|
+
(scout.sub_scout_ids === undefined || Array.isArray(scout.sub_scout_ids) && scout.sub_scout_ids.every((sub_scout_id : any) => typeof sub_scout_id === "string")) &&
|
|
56
56
|
is_office_class_id(scout.office_class_id) &&
|
|
57
57
|
(scout.office_name === undefined || typeof scout.office_name === "string")
|
|
58
58
|
)
|
|
@@ -6,6 +6,7 @@ export class ScoutDocument {
|
|
|
6
6
|
readonly type : "URL" | "TWEET" | "TWITTER" | "PRESS" | "FILE"
|
|
7
7
|
readonly s3_filename? : string
|
|
8
8
|
readonly s3_text_filename? : string
|
|
9
|
+
readonly text? : string
|
|
9
10
|
readonly vector_keys? : string[]
|
|
10
11
|
readonly [x : string] : any
|
|
11
12
|
|
|
@@ -18,6 +19,7 @@ export class ScoutDocument {
|
|
|
18
19
|
this.type = scout_document.type
|
|
19
20
|
this.s3_filename = scout_document.s3_filename
|
|
20
21
|
this.s3_text_filename = scout_document.s3_text_filename
|
|
22
|
+
this.text = scout_document.text
|
|
21
23
|
this.vector_keys = scout_document.vector_keys
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -29,6 +31,7 @@ export class ScoutDocument {
|
|
|
29
31
|
typeof scout_document.type === "string" &&
|
|
30
32
|
(scout_document.s3_filename === undefined || typeof scout_document.s3_filename === "string") &&
|
|
31
33
|
(scout_document.s3_text_filename === undefined || typeof scout_document.s3_text_filename === "string") &&
|
|
34
|
+
(scout_document.text === undefined || typeof scout_document.text === "string") &&
|
|
32
35
|
(scout_document.vector_keys === undefined || Array.isArray(scout_document.vector_keys) && scout_document.vector_keys.every((vector_key : any) => typeof vector_key === "string"))
|
|
33
36
|
)
|
|
34
37
|
}
|