@bigfootai/bigfoot-types 2.13.2 → 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 (3) hide show
  1. package/model.js +9 -2
  2. package/model.ts +42 -32
  3. package/package.json +1 -1
package/model.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BlockFields = exports.Article = exports.ArticleQL = exports.Person = exports.Domain = exports.Tenant = exports.TenantQL = exports.Tag = exports.Provider = exports.ProviderQL = exports.Sync = exports.SyncQL = exports.Primitive = exports.PrimitiveFields = exports.PersonReferenceQL = exports.PersonReferenceFields = exports.ChangesQL = exports.ChangesInputQL = exports.ReferenceBlockQL = exports.ConnectedProviderQL = exports.CredentialQL = exports.ProviderRequestQL = exports.ProviderInfoQL = exports.EntityEntryQL = exports.MachineLearningEntryFields = exports.RelationEntryQL = exports.ArgumentEntryQL = exports.EntityReferenceQL = exports.DocumentSentimentQL = exports.ReactionQL = exports.ReactionSkinToneQL = exports.SharingTagQL = exports.EditorQL = exports.EditorInputQL = exports.HighlightQL = exports.RelationType = exports.EntityType = exports.ProcessingStage = exports.MutationType = exports.MarkType = exports.DocumentType = exports.RecurrenceRFC = exports.InviteStatus = exports.SharingApproach = exports.StepStatus = exports.TaskStatus = exports.SharingLevel = exports.ClientType = exports.TagType = exports.BlockType = void 0;
4
- exports.GraphQLTypes = exports.ArchiveTaskOutputQL = exports.ArchiveTaskInputQL = exports.FindTasksInputQL = exports.FindTaskInputQL = exports.FindSyncInputQL = exports.FindProviderInputQL = exports.ArchiveNoteOutputQL = exports.ArchiveNoteInputQL = exports.FindNotesInputQL = exports.FindNoteInputQL = exports.UpsertNoteInputQL = exports.InsertNoteInputQL = exports.FindEventInputQL = exports.FindCalendarInputQL = exports.FindArticlesInputQL = exports.FindArticleInputQL = exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.Todo = exports.Calendar = exports.CalendarQL = exports.Event = exports.EventQL = exports.PersonAcceptanceQL = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.ConferenceQL = exports.ConferenceEntrypointQL = exports.TranscriptionQL = exports.TranscriptionEntryQL = exports.Task = exports.TaskQL = exports.Note = exports.NoteQL = exports.BusinessObject = exports.BusinessObjectQL = exports.BusinessObjectFields = exports.BlockProcessingResponse = exports.BlockProcessingRequest = exports.Block = void 0;
4
+ exports.GraphQLTypes = exports.SearchInputQL = exports.ArchiveTaskOutputQL = exports.ArchiveTaskInputQL = exports.FindTasksInputQL = exports.FindTaskInputQL = exports.FindSyncInputQL = exports.FindProviderInputQL = exports.ArchiveNoteOutputQL = exports.ArchiveNoteInputQL = exports.FindNotesInputQL = exports.FindNoteInputQL = exports.UpsertNoteInputQL = exports.InsertNoteInputQL = exports.FindEventInputQL = exports.FindCalendarInputQL = exports.FindArticlesInputQL = exports.FindArticleInputQL = exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.Todo = exports.Calendar = exports.CalendarQL = exports.Event = exports.EventQL = exports.PersonAcceptanceQL = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.ConferenceQL = exports.ConferenceEntrypointQL = exports.TranscriptionQL = exports.TranscriptionEntryQL = exports.Task = exports.TaskQL = exports.Note = exports.NoteQL = exports.BusinessObject = exports.BusinessObjectQL = exports.BusinessObjectFields = exports.BlockProcessingResponse = exports.BlockProcessingRequest = exports.Block = void 0;
5
5
  const uuid_1 = require("uuid");
6
6
  /*
7
7
  These are the core primitives of our model. These represent the entities that show
@@ -742,6 +742,12 @@ type ArchiveTaskOutput {
742
742
  _id: String!
743
743
  archived: Boolean
744
744
  }`;
745
+ exports.SearchInputQL = `
746
+ input SearchInput {
747
+ search: String
748
+ tagIds: [String]
749
+ sentiment: String
750
+ }`;
745
751
  // THE GRAPH QL DEFINITIONS
746
752
  exports.GraphQLTypes = `
747
753
  ${exports.HighlightQL}
@@ -792,4 +798,5 @@ ${exports.FindSyncInputQL}
792
798
  ${exports.FindTaskInputQL}
793
799
  ${exports.FindTasksInputQL}
794
800
  ${exports.ArchiveTaskInputQL}
795
- ${exports.ArchiveTaskOutputQL}`;
801
+ ${exports.ArchiveTaskOutputQL}
802
+ ${exports.SearchInputQL}`;
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();
@@ -1438,6 +1435,18 @@ export interface ArchiveTaskOutput {
1438
1435
  archive?: boolean;
1439
1436
  }
1440
1437
 
1438
+ export const SearchInputQL = `
1439
+ input SearchInput {
1440
+ search: String
1441
+ tagIds: [String]
1442
+ sentiment: String
1443
+ }`;
1444
+ export interface SearchInput {
1445
+ search?: string;
1446
+ tagIds?: string[];
1447
+ sentiment?: string;
1448
+ }
1449
+
1441
1450
  // THE GRAPH QL DEFINITIONS
1442
1451
  export const GraphQLTypes = `
1443
1452
  ${HighlightQL}
@@ -1488,4 +1497,5 @@ ${FindSyncInputQL}
1488
1497
  ${FindTaskInputQL}
1489
1498
  ${FindTasksInputQL}
1490
1499
  ${ArchiveTaskInputQL}
1491
- ${ArchiveTaskOutputQL}`;
1500
+ ${ArchiveTaskOutputQL}
1501
+ ${SearchInputQL}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.13.2",
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",