scout-types 1.0.23 → 1.0.25

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.
@@ -29,7 +29,7 @@ export class Attachment {
29
29
  }
30
30
  static is(attachment) {
31
31
  return (attachment !== undefined &&
32
- typeof attachment.text === "string" &&
32
+ typeof attachment.type === "string" &&
33
33
  typeof attachment.filename === "string" &&
34
34
  typeof attachment.s3_filename === "string");
35
35
  }
@@ -19,6 +19,7 @@ export class ScoutDocument {
19
19
  this.text = scout_document.text;
20
20
  this.vector_keys = scout_document.vector_keys;
21
21
  this.url = scout_document.url;
22
+ this.username = scout_document.username;
22
23
  this.file_type = scout_document.file_type;
23
24
  this.filename = scout_document.filename;
24
25
  this.tweet = scout_document.tweet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scout-types",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -38,7 +38,7 @@ export class Attachment {
38
38
  static is(attachment : any) : attachment is Attachment {
39
39
  return (
40
40
  attachment !== undefined &&
41
- typeof attachment.text === "string" &&
41
+ typeof attachment.type === "string" &&
42
42
  typeof attachment.filename === "string" &&
43
43
  typeof attachment.s3_filename === "string"
44
44
  )
@@ -8,6 +8,11 @@ export class ScoutDocument {
8
8
  readonly s3_text_filename? : string
9
9
  readonly text? : string
10
10
  readonly vector_keys? : string[]
11
+ // readonly url? : string
12
+ // readonly username? : string
13
+ // readonly file_type? : string
14
+ // readonly filename? : string
15
+ // readonly tweet? : Tweet
11
16
  [x : string] : any
12
17
 
13
18
  constructor(scout_document : any) {
@@ -22,6 +27,7 @@ export class ScoutDocument {
22
27
  this.text = scout_document.text
23
28
  this.vector_keys = scout_document.vector_keys
24
29
  this.url = scout_document.url
30
+ this.username = scout_document.username
25
31
  this.file_type = scout_document.file_type
26
32
  this.filename = scout_document.filename
27
33
  this.tweet = scout_document.tweet