@bigfootai/bigfoot-types 2.12.1 → 2.12.2

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 +110 -20
  2. package/model.ts +121 -40
  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
- exports.NoteQL = exports.BusinessObject = exports.BusinessObjectQL = exports.BlockProcessingResponse = exports.BlockProcessingRequest = exports.Block = exports.BlockFields = exports.Article = exports.ArticleQL = exports.Person = exports.Domain = exports.Tenant = exports.TenantQL = exports.Tag = exports.Provider = exports.Sync = exports.Primitive = exports.PrimitiveFields = exports.ChangesQL = 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.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.ArchiveTaskInputQL = exports.FindTasksInputQL = exports.FindTaskInputQL = exports.FindSyncInputQL = exports.FindProviderInputQL = 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.Event = exports.Calendar = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.Task = exports.TaskQL = exports.Note = void 0;
3
+ exports.BlockProcessingRequest = exports.Block = 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.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.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.ArchiveTaskInputQL = exports.FindTasksInputQL = exports.FindTaskInputQL = exports.FindSyncInputQL = exports.FindProviderInputQL = 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 = 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
@@ -275,6 +275,12 @@ type Changes {
275
275
  steps: [String]!
276
276
  clientIds: [String]!
277
277
  }`;
278
+ exports.PersonReferenceFields = `
279
+ email: String!
280
+ `;
281
+ exports.PersonReferenceQL = `
282
+ type PersonReference {${exports.PersonReferenceFields}
283
+ }`;
278
284
  exports.PrimitiveFields = `
279
285
  _id: ID!
280
286
  dateCreated: Float!
@@ -289,6 +295,10 @@ class Primitive {
289
295
  }
290
296
  }
291
297
  exports.Primitive = Primitive;
298
+ exports.SyncQL = `
299
+ type Sync {${exports.PrimitiveFields}
300
+ providerRequest: ProviderRequest!
301
+ }`;
292
302
  class Sync extends Primitive {
293
303
  constructor(tenantIdCreated, providerRequest) {
294
304
  super();
@@ -297,6 +307,14 @@ class Sync extends Primitive {
297
307
  }
298
308
  }
299
309
  exports.Sync = Sync;
310
+ exports.ProviderQL = `
311
+ type Provider {${exports.PrimitiveFields}
312
+ provider: String!
313
+ name: String!
314
+ description: String!
315
+ instanceUrl: String!
316
+ applications: String!
317
+ }`;
300
318
  class Provider extends Primitive {
301
319
  constructor(provider, name, description, instanceUrl, applications) {
302
320
  super();
@@ -409,18 +427,19 @@ class BlockProcessingResponse {
409
427
  }
410
428
  }
411
429
  exports.BlockProcessingResponse = BlockProcessingResponse;
430
+ exports.BusinessObjectFields = `${exports.PrimitiveFields}
431
+ provider: String!
432
+ application: String!
433
+ uri: String!
434
+ processingStage: String!
435
+ processingAttempts: Int!
436
+ dateProcessed: Float!
437
+ externalId: String!
438
+ processingReason: String
439
+ iconUrl: String
440
+ parentId: String`;
412
441
  exports.BusinessObjectQL = `
413
- type BusinessObject {${exports.BlockFields}
414
- provider: String!
415
- application: String!
416
- uri: String!
417
- processingStage: String!
418
- processingAttempts: Int!
419
- dateProcessed: Float!
420
- externalId: String!
421
- processingReason: String
422
- iconUrl: String
423
- parentId: String
442
+ type BusinessObject {${exports.BlockFields}${exports.BusinessObjectFields}
424
443
  }`;
425
444
  class BusinessObject extends Block {
426
445
  constructor(tenantIdCreated, editors, sharingTags, version, blockType, provider, application, uri, externalId) {
@@ -468,6 +487,42 @@ class Task extends Block {
468
487
  }
469
488
  }
470
489
  exports.Task = Task;
490
+ // CORE END
491
+ /*
492
+ These are the business objects we explicitly support and have a standardized description
493
+ of across all systems. This allows these business objects to interact with each other
494
+ regardless of underpinning system.
495
+ */
496
+ // BUSINESS OBJECTS START
497
+ //// CONFERENCE START
498
+ exports.TranscriptionEntryQL = `
499
+ type TranscriptionEntry {
500
+ person: [Person]!
501
+ text: String!
502
+ language: String!
503
+ startDate: Float!
504
+ endDate: Float!
505
+ }`;
506
+ exports.TranscriptionQL = `
507
+ type Transcription {
508
+ entries: [TranscriptionEntry]!
509
+ }`;
510
+ exports.ConferenceEntrypointQL = `
511
+ type ConferenceEntrypoint {
512
+ entryPointType: String!
513
+ uri: String
514
+ label: String
515
+ pin: String
516
+ accessCode: String
517
+ meetingCode: String
518
+ passcode: String
519
+ password: String
520
+ }`;
521
+ exports.ConferenceQL = `
522
+ type Conference {${exports.BusinessObjectFields}
523
+ entryPoints: [ConferenceEntrypoint]!
524
+ transcription: Transcription
525
+ }`;
471
526
  class Conference extends BusinessObject {
472
527
  constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, entryPoints) {
473
528
  super(tenantIdCreated, editors, sharingTags, version, BlockType.Conference, provider, application, uri, externalId);
@@ -490,13 +545,25 @@ var ResponseStatus;
490
545
  ResponseStatus["Tentative"] = "tentative";
491
546
  ResponseStatus["Accepted"] = "accepted";
492
547
  })(ResponseStatus || (exports.ResponseStatus = ResponseStatus = {}));
493
- class Calendar extends BusinessObject {
494
- constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, timeZone) {
495
- super(tenantIdCreated, editors, sharingTags, version, BlockType.Calendar, provider, application, uri, externalId);
496
- this.timeZone = timeZone;
497
- }
498
- }
499
- exports.Calendar = Calendar;
548
+ exports.PersonAcceptanceQL = `
549
+ type PersonAcceptance {${exports.PersonReferenceFields}
550
+ responseStatus: String!
551
+ }`;
552
+ exports.EventQL = `
553
+ type Event {${exports.BusinessObjectFields}
554
+ calendarId: String!
555
+ status: String!
556
+ dateStart: Float!
557
+ organizedBy: PersonReference!
558
+ location: String
559
+ dateStartOriginal: Float
560
+ recurrence: [String]
561
+ dateEnd: Float
562
+ subject: String
563
+ description: String
564
+ attendees: [PersonAcceptance]
565
+ conference: Conference
566
+ }`;
500
567
  class Event extends BusinessObject {
501
568
  constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, calendarId, status, dateStart, organizedBy) {
502
569
  super(tenantIdCreated, editors, sharingTags, version, BlockType.Event, provider, application, uri, externalId);
@@ -507,6 +574,20 @@ class Event extends BusinessObject {
507
574
  }
508
575
  }
509
576
  exports.Event = Event;
577
+ exports.CalendarQL = `
578
+ type Calendar {${exports.BusinessObjectFields}
579
+ timeZone: String!
580
+ description: String
581
+ location: String
582
+ events: [Event]
583
+ }`;
584
+ class Calendar extends BusinessObject {
585
+ constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, timeZone) {
586
+ super(tenantIdCreated, editors, sharingTags, version, BlockType.Calendar, provider, application, uri, externalId);
587
+ this.timeZone = timeZone;
588
+ }
589
+ }
590
+ exports.Calendar = Calendar;
510
591
  //// EVENT END
511
592
  //// EXTERNAL TASK START
512
593
  class Todo extends BusinessObject {
@@ -658,6 +739,9 @@ ${exports.ProviderInfoQL}
658
739
  ${exports.ProviderRequestQL}
659
740
  ${exports.CredentialQL}
660
741
  ${exports.ChangesQL}
742
+ ${exports.PersonReferenceQL}
743
+ ${exports.SyncQL}
744
+ ${exports.ProviderQL}
661
745
  ${exports.ConnectedProviderQL}
662
746
  ${exports.ReferenceBlockQL}
663
747
  ${exports.ArticleQL}
@@ -665,6 +749,12 @@ ${exports.TenantQL}
665
749
  ${exports.BusinessObjectQL}
666
750
  ${exports.NoteQL}
667
751
  ${exports.TaskQL}
752
+ ${exports.TranscriptionEntryQL}
753
+ ${exports.TranscriptionQL}
754
+ ${exports.ConferenceEntrypointQL}
755
+ ${exports.ConferenceQL}
756
+ ${exports.PersonAcceptanceQL}
757
+ ${exports.EventQL}
668
758
  ${exports.FindArticleInputQL}
669
759
  ${exports.FindArticlesInputQL}
670
760
  ${exports.FindCalendarInputQL}
package/model.ts CHANGED
@@ -431,6 +431,12 @@ export interface Changes {
431
431
  clientIds: string[];
432
432
  }
433
433
 
434
+ export const PersonReferenceFields = `
435
+ email: String!
436
+ `;
437
+ export const PersonReferenceQL = `
438
+ type PersonReference {${PersonReferenceFields}
439
+ }`;
434
440
  export interface PersonReference {
435
441
  email: string;
436
442
  }
@@ -455,6 +461,10 @@ export class Primitive {
455
461
  }
456
462
  }
457
463
 
464
+ export const SyncQL = `
465
+ type Sync {${PrimitiveFields}
466
+ providerRequest: ProviderRequest!
467
+ }`;
458
468
  export class Sync extends Primitive {
459
469
  providerRequest: ProviderRequest;
460
470
 
@@ -466,6 +476,14 @@ export class Sync extends Primitive {
466
476
  }
467
477
  }
468
478
 
479
+ export const ProviderQL = `
480
+ type Provider {${PrimitiveFields}
481
+ provider: String!
482
+ name: String!
483
+ description: String!
484
+ instanceUrl: String!
485
+ applications: String!
486
+ }`;
469
487
  export class Provider extends Primitive {
470
488
  provider: string;
471
489
  name: string;
@@ -671,18 +689,19 @@ export class BlockProcessingResponse {
671
689
  }
672
690
  }
673
691
 
692
+ export const BusinessObjectFields = `${PrimitiveFields}
693
+ provider: String!
694
+ application: String!
695
+ uri: String!
696
+ processingStage: String!
697
+ processingAttempts: Int!
698
+ dateProcessed: Float!
699
+ externalId: String!
700
+ processingReason: String
701
+ iconUrl: String
702
+ parentId: String`;
674
703
  export const BusinessObjectQL = `
675
- type BusinessObject {${BlockFields}
676
- provider: String!
677
- application: String!
678
- uri: String!
679
- processingStage: String!
680
- processingAttempts: Int!
681
- dateProcessed: Float!
682
- externalId: String!
683
- processingReason: String
684
- iconUrl: String
685
- parentId: String
704
+ type BusinessObject {${BlockFields}${BusinessObjectFields}
686
705
  }`;
687
706
  export class BusinessObject extends Block {
688
707
  provider: string; // A unique string representing the provider e.g. "salesforce", "atlassian", etc
@@ -789,6 +808,14 @@ regardless of underpinning system.
789
808
  // BUSINESS OBJECTS START
790
809
 
791
810
  //// CONFERENCE START
811
+ export const TranscriptionEntryQL = `
812
+ type TranscriptionEntry {
813
+ person: [Person]!
814
+ text: String!
815
+ language: String!
816
+ startDate: Float!
817
+ endDate: Float!
818
+ }`;
792
819
  export interface TranscriptionEntry {
793
820
  person: Person;
794
821
  text: string;
@@ -797,10 +824,25 @@ export interface TranscriptionEntry {
797
824
  endDate: number;
798
825
  }
799
826
 
827
+ export const TranscriptionQL = `
828
+ type Transcription {
829
+ entries: [TranscriptionEntry]!
830
+ }`;
800
831
  export interface Transcription {
801
832
  entries: TranscriptionEntry[];
802
833
  }
803
834
 
835
+ export const ConferenceEntrypointQL = `
836
+ type ConferenceEntrypoint {
837
+ entryPointType: String!
838
+ uri: String
839
+ label: String
840
+ pin: String
841
+ accessCode: String
842
+ meetingCode: String
843
+ passcode: String
844
+ password: String
845
+ }`;
804
846
  export interface ConferenceEntrypoint {
805
847
  entryPointType: string;
806
848
  uri?: string | null;
@@ -812,6 +854,11 @@ export interface ConferenceEntrypoint {
812
854
  password?: string | null;
813
855
  }
814
856
 
857
+ export const ConferenceQL = `
858
+ type Conference {${BusinessObjectFields}
859
+ entryPoints: [ConferenceEntrypoint]!
860
+ transcription: Transcription
861
+ }`;
815
862
  export class Conference extends BusinessObject {
816
863
  entryPoints: ConferenceEntrypoint[];
817
864
  transcription?: Transcription | null;
@@ -858,6 +905,10 @@ export enum ResponseStatus {
858
905
  Accepted = 'accepted',
859
906
  }
860
907
 
908
+ export const PersonAcceptanceQL = `
909
+ type PersonAcceptance {${PersonReferenceFields}
910
+ responseStatus: String!
911
+ }`;
861
912
  export interface PersonAcceptance extends PersonReference {
862
913
  responseStatus: ResponseStatus;
863
914
  }
@@ -881,11 +932,34 @@ export interface CalendarProviderRequest {
881
932
  credential: Credential;
882
933
  }
883
934
 
884
- export class Calendar extends BusinessObject {
885
- timeZone: string;
886
- description?: string | null;
935
+ export const EventQL = `
936
+ type Event {${BusinessObjectFields}
937
+ calendarId: String!
938
+ status: String!
939
+ dateStart: Float!
940
+ organizedBy: PersonReference!
941
+ location: String
942
+ dateStartOriginal: Float
943
+ recurrence: [String]
944
+ dateEnd: Float
945
+ subject: String
946
+ description: String
947
+ attendees: [PersonAcceptance]
948
+ conference: Conference
949
+ }`;
950
+ export class Event extends BusinessObject {
951
+ calendarId: string;
952
+ status: EventStatus;
953
+ dateStart: number;
954
+ organizedBy: PersonReference;
887
955
  location?: string | null;
888
- events?: Event[] | null;
956
+ dateStartOriginal?: number | null;
957
+ recurrence?: RecurrenceRFC[] | null;
958
+ dateEnd?: number | null;
959
+ subject?: string | null;
960
+ description?: string | null;
961
+ attendees?: PersonAcceptance[] | null;
962
+ conference?: Conference | null;
889
963
 
890
964
  constructor(
891
965
  tenantIdCreated: string,
@@ -896,38 +970,42 @@ export class Calendar extends BusinessObject {
896
970
  application: string,
897
971
  uri: string,
898
972
  externalId: string,
899
- timeZone: string
973
+ calendarId: string,
974
+ status: EventStatus,
975
+ dateStart: number,
976
+ organizedBy: PersonReference
900
977
  ) {
901
978
  super(
902
979
  tenantIdCreated,
903
980
  editors,
904
981
  sharingTags,
905
982
  version,
906
- BlockType.Calendar,
983
+ BlockType.Event,
907
984
  provider,
908
985
  application,
909
986
  uri,
910
987
  externalId
911
988
  );
912
989
 
913
- this.timeZone = timeZone;
990
+ this.calendarId = calendarId;
991
+ this.status = status;
992
+ this.dateStart = dateStart;
993
+ this.organizedBy = organizedBy;
914
994
  }
915
995
  }
916
996
 
917
- export class Event extends BusinessObject {
918
- calendarId: string;
919
- status: EventStatus;
920
- dateStart: number;
921
- organizedBy: PersonReference;
922
- location?: string | null;
923
- dateStartOriginal?: number | null;
924
- recurrence?: RecurrenceRFC[] | null;
925
- dateEnd?: number | null;
926
- subject?: string | null;
997
+ export const CalendarQL = `
998
+ type Calendar {${BusinessObjectFields}
999
+ timeZone: String!
1000
+ description: String
1001
+ location: String
1002
+ events: [Event]
1003
+ }`;
1004
+ export class Calendar extends BusinessObject {
1005
+ timeZone: string;
927
1006
  description?: string | null;
928
- attendees?: PersonAcceptance[] | null;
929
- conference?: Conference | null;
930
- attachments?: Attachment[] | null;
1007
+ location?: string | null;
1008
+ events?: Event[] | null;
931
1009
 
932
1010
  constructor(
933
1011
  tenantIdCreated: string,
@@ -938,27 +1016,21 @@ export class Event extends BusinessObject {
938
1016
  application: string,
939
1017
  uri: string,
940
1018
  externalId: string,
941
- calendarId: string,
942
- status: EventStatus,
943
- dateStart: number,
944
- organizedBy: PersonReference
1019
+ timeZone: string
945
1020
  ) {
946
1021
  super(
947
1022
  tenantIdCreated,
948
1023
  editors,
949
1024
  sharingTags,
950
1025
  version,
951
- BlockType.Event,
1026
+ BlockType.Calendar,
952
1027
  provider,
953
1028
  application,
954
1029
  uri,
955
1030
  externalId
956
1031
  );
957
1032
 
958
- this.calendarId = calendarId;
959
- this.status = status;
960
- this.dateStart = dateStart;
961
- this.organizedBy = organizedBy;
1033
+ this.timeZone = timeZone;
962
1034
  }
963
1035
  }
964
1036
  //// EVENT END
@@ -1354,6 +1426,9 @@ ${ProviderInfoQL}
1354
1426
  ${ProviderRequestQL}
1355
1427
  ${CredentialQL}
1356
1428
  ${ChangesQL}
1429
+ ${PersonReferenceQL}
1430
+ ${SyncQL}
1431
+ ${ProviderQL}
1357
1432
  ${ConnectedProviderQL}
1358
1433
  ${ReferenceBlockQL}
1359
1434
  ${ArticleQL}
@@ -1361,6 +1436,12 @@ ${TenantQL}
1361
1436
  ${BusinessObjectQL}
1362
1437
  ${NoteQL}
1363
1438
  ${TaskQL}
1439
+ ${TranscriptionEntryQL}
1440
+ ${TranscriptionQL}
1441
+ ${ConferenceEntrypointQL}
1442
+ ${ConferenceQL}
1443
+ ${PersonAcceptanceQL}
1444
+ ${EventQL}
1364
1445
  ${FindArticleInputQL}
1365
1446
  ${FindArticlesInputQL}
1366
1447
  ${FindCalendarInputQL}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.12.1",
4
+ "version": "2.12.2",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",