@bigfootai/bigfoot-types 2.13.3 → 3.0.0

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.
Files changed (2) hide show
  1. package/model.ts +28 -31
  2. package/package.json +1 -1
package/model.ts CHANGED
@@ -24,6 +24,7 @@ export enum BlockType {
24
24
 
25
25
  export enum TagType {
26
26
  Person = 'person',
27
+ Organization = 'organization',
27
28
  Topic = 'topic',
28
29
  }
29
30
 
@@ -226,12 +227,16 @@ type SharingTag {
226
227
  isShared: Boolean!
227
228
  sharingApproach: String!
228
229
  sharingLevel: String!
230
+ confidence: Float
231
+ text: String
229
232
  }`;
230
233
  export interface SharingTag {
231
234
  tagId: string;
232
235
  isShared: boolean;
233
236
  sharingApproach: SharingApproach;
234
237
  sharingLevel: SharingLevel;
238
+ confidence?: number;
239
+ text?: string;
235
240
  }
236
241
 
237
242
  export interface SharingDomain {
@@ -295,45 +300,39 @@ export interface EntityReference {
295
300
  export const ArgumentEntryQL = `
296
301
  type ArgumentEntry {
297
302
  text: String!
298
- highlight: Highlight!
299
303
  entities: [EntityReference]!
300
304
  }`;
301
305
  export interface ArgumentEntry {
302
306
  text: string;
303
- highlight: Highlight;
304
307
  entities: EntityReference[];
308
+ _highlight?: Highlight;
305
309
  }
306
310
 
307
311
  export const RelationEntryQL = `
308
312
  type RelationEntry {
309
313
  type: String!
310
- score: Int!
311
- highlight: Highlight!
314
+ confidence: Int!
312
315
  arguments: [ArgumentEntry]!
313
316
  }`;
314
317
  export interface RelationEntry {
315
318
  type: RelationType;
316
- score: number;
317
- highlight: Highlight;
319
+ confidence: number;
318
320
  arguments: ArgumentEntry[];
321
+ _highlight?: Highlight;
319
322
  }
320
323
 
321
- export const MachineLearningEntryFields = `
322
- highlights: [Highlight]`;
323
324
  export interface MachineLearningEntry {
324
- highlights?: Highlight[];
325
+ _highlights?: Highlight[];
325
326
  }
326
327
 
327
328
  export const EntityEntryQL = `
328
- type EntityEntry {${MachineLearningEntryFields}
329
- name: String!
330
- type: String!
331
- score: Int!
329
+ type EntityEntry {
330
+ text: String!
331
+ confidence: Int!
332
332
  }`;
333
333
  export interface EntityEntry extends MachineLearningEntry {
334
- name: string;
335
- type: EntityType;
336
- score: number;
334
+ text: string;
335
+ confidence: number;
337
336
  }
338
337
 
339
338
  export interface DateEntityEntry extends EntityEntry {
@@ -586,21 +585,22 @@ export class Domain extends Primitive {
586
585
  }
587
586
  }
588
587
 
588
+ export class Organization extends Tag {
589
+ url?: string;
590
+ favicon?: string;
591
+
592
+ constructor(tenantIdCreated: string, alias: string) {
593
+ super(tenantIdCreated, alias, TagType.Organization);
594
+ }
595
+ }
596
+
589
597
  export class Person extends Tag {
590
- tenantIdVerified: string; // The tenant._id that claimed/verified this tag as being them
591
- email: string;
598
+ email?: string;
592
599
  inviteStatus?: InviteStatus;
600
+ tenantIdVerified?: string; // The tenant._id that claimed/verified this tag as being them
593
601
 
594
- constructor(
595
- tenantIdCreated: string,
596
- alias: string,
597
- tenantIdVerified: string,
598
- email: string
599
- ) {
602
+ constructor(tenantIdCreated: string, alias: string) {
600
603
  super(tenantIdCreated, alias, TagType.Person);
601
-
602
- this.tenantIdVerified = tenantIdVerified;
603
- this.email = email;
604
604
  }
605
605
  }
606
606
 
@@ -624,17 +624,14 @@ export class Article extends Primitive {
624
624
  sentiment?: DocumentSentiment;
625
625
  dates?: EntityEntry[];
626
626
  locations?: EntityEntry[];
627
- organizations?: EntityEntry[];
628
- names?: EntityEntry[];
629
627
  sentiments?: EntityEntry[];
630
- topics?: EntityEntry[];
631
- mentions?: EntityEntry[];
632
628
  relations?: RelationEntry[];
633
629
  linkUrls?: string[];
634
630
  sharingTags?: SharingTag[];
635
631
  archived: boolean;
636
632
  _changes?: Changes;
637
633
  _tasks?: Task[];
634
+ _entities?: EntityEntry[];
638
635
 
639
636
  constructor(referenceBlock: ReferenceBlock) {
640
637
  super();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.13.3",
4
+ "version": "3.0.0",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",