@bigfootai/bigfoot-types 2.11.2 → 2.11.3
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/model.js +22 -20
- package/model.ts +33 -13
- package/package.json +1 -1
package/model.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.
|
|
3
|
+
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.Note = exports.BusinessObject = exports.BusinessObjectArticle = exports.Block = exports.Article = exports.Person = exports.Domain = exports.Tenant = exports.Tag = exports.Provider = exports.Sync = exports.Primitive = 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
4
|
const uuid_1 = require("uuid");
|
|
5
5
|
/*
|
|
6
6
|
These are the core primitives of our model. These represent the entities that show
|
|
@@ -15,6 +15,7 @@ var BlockType;
|
|
|
15
15
|
BlockType["Calendar"] = "calendar";
|
|
16
16
|
BlockType["Event"] = "event";
|
|
17
17
|
BlockType["Task"] = "task";
|
|
18
|
+
BlockType["Todo"] = "todo";
|
|
18
19
|
BlockType["Document"] = "document";
|
|
19
20
|
BlockType["Record"] = "record";
|
|
20
21
|
BlockType["Conference"] = "conference";
|
|
@@ -268,7 +269,7 @@ class BusinessObjectArticle extends Article {
|
|
|
268
269
|
}
|
|
269
270
|
exports.BusinessObjectArticle = BusinessObjectArticle;
|
|
270
271
|
class BusinessObject extends Block {
|
|
271
|
-
constructor(tenantIdCreated, editors, sharingTags, version, blockType, provider, application, uri) {
|
|
272
|
+
constructor(tenantIdCreated, editors, sharingTags, version, blockType, provider, application, uri, externalId) {
|
|
272
273
|
super(tenantIdCreated, editors, sharingTags, version, blockType);
|
|
273
274
|
this.processingStage = ProcessingStage.NotProcessed;
|
|
274
275
|
this.processingAttempts = 0;
|
|
@@ -276,6 +277,7 @@ class BusinessObject extends Block {
|
|
|
276
277
|
this.provider = provider;
|
|
277
278
|
this.application = application;
|
|
278
279
|
this.uri = uri;
|
|
280
|
+
this.externalId = externalId;
|
|
279
281
|
}
|
|
280
282
|
}
|
|
281
283
|
exports.BusinessObject = BusinessObject;
|
|
@@ -295,8 +297,8 @@ class Task extends Block {
|
|
|
295
297
|
}
|
|
296
298
|
exports.Task = Task;
|
|
297
299
|
class Conference extends BusinessObject {
|
|
298
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, entryPoints) {
|
|
299
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Conference, provider, application, uri);
|
|
300
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, entryPoints) {
|
|
301
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Conference, provider, application, uri, externalId);
|
|
300
302
|
this.entryPoints = entryPoints;
|
|
301
303
|
}
|
|
302
304
|
}
|
|
@@ -317,15 +319,15 @@ var ResponseStatus;
|
|
|
317
319
|
ResponseStatus["Accepted"] = "accepted";
|
|
318
320
|
})(ResponseStatus || (exports.ResponseStatus = ResponseStatus = {}));
|
|
319
321
|
class Calendar extends BusinessObject {
|
|
320
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, timeZone) {
|
|
321
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Calendar, provider, application, uri);
|
|
322
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, timeZone) {
|
|
323
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Calendar, provider, application, uri, externalId);
|
|
322
324
|
this.timeZone = timeZone;
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
exports.Calendar = Calendar;
|
|
326
328
|
class Event extends BusinessObject {
|
|
327
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, calendarId, status, dateStart, organizedBy) {
|
|
328
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Event, provider, application, uri);
|
|
329
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, calendarId, status, dateStart, organizedBy) {
|
|
330
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Event, provider, application, uri, externalId);
|
|
329
331
|
this.calendarId = calendarId;
|
|
330
332
|
this.status = status;
|
|
331
333
|
this.dateStart = dateStart;
|
|
@@ -335,33 +337,33 @@ class Event extends BusinessObject {
|
|
|
335
337
|
exports.Event = Event;
|
|
336
338
|
//// EVENT END
|
|
337
339
|
//// EXTERNAL TASK START
|
|
338
|
-
class
|
|
339
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, status, dateDue) {
|
|
340
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.
|
|
340
|
+
class Todo extends BusinessObject {
|
|
341
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, status, dateDue) {
|
|
342
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Todo, provider, application, uri, externalId);
|
|
341
343
|
this.status = status;
|
|
342
344
|
this.dateDue = dateDue;
|
|
343
345
|
}
|
|
344
346
|
}
|
|
345
|
-
exports.
|
|
347
|
+
exports.Todo = Todo;
|
|
346
348
|
//// EXTERNAL TASK END
|
|
347
349
|
//// MESSAGING START
|
|
348
350
|
class Thread extends BusinessObject {
|
|
349
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri) {
|
|
350
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Thread, provider, application, uri);
|
|
351
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId) {
|
|
352
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Thread, provider, application, uri, externalId);
|
|
351
353
|
}
|
|
352
354
|
}
|
|
353
355
|
exports.Thread = Thread;
|
|
354
356
|
//// MESSAGING END
|
|
355
357
|
//// WEBSITE START
|
|
356
358
|
class Website extends BusinessObject {
|
|
357
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri) {
|
|
358
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Website, provider, application, uri);
|
|
359
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId) {
|
|
360
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Website, provider, application, uri, externalId);
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
363
|
exports.Website = Website;
|
|
362
364
|
class Template extends BusinessObject {
|
|
363
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, metadata) {
|
|
364
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Template, provider, application, uri);
|
|
365
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, metadata) {
|
|
366
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Template, provider, application, uri, externalId);
|
|
365
367
|
this.metadata = metadata;
|
|
366
368
|
}
|
|
367
369
|
}
|
|
@@ -387,8 +389,8 @@ var FieldVariation;
|
|
|
387
389
|
FieldVariation["Url"] = "url";
|
|
388
390
|
})(FieldVariation || (exports.FieldVariation = FieldVariation = {}));
|
|
389
391
|
class Table extends BusinessObject {
|
|
390
|
-
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, recordType, metadata, values) {
|
|
391
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Table, provider, application, uri);
|
|
392
|
+
constructor(tenantIdCreated, editors, sharingTags, version, provider, application, uri, externalId, recordType, metadata, values) {
|
|
393
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Table, provider, application, uri, externalId);
|
|
392
394
|
this.recordType = recordType;
|
|
393
395
|
this.metadata = metadata;
|
|
394
396
|
this.values = values;
|
package/model.ts
CHANGED
|
@@ -12,6 +12,7 @@ export enum BlockType {
|
|
|
12
12
|
Calendar = 'calendar',
|
|
13
13
|
Event = 'event',
|
|
14
14
|
Task = 'task',
|
|
15
|
+
Todo = 'todo', // A task from an external application
|
|
15
16
|
Document = 'document',
|
|
16
17
|
Record = 'record',
|
|
17
18
|
Conference = 'conference',
|
|
@@ -540,6 +541,7 @@ export class BusinessObject extends Block {
|
|
|
540
541
|
processingStage: ProcessingStage; // Indicates if the business object has been processed yet
|
|
541
542
|
processingAttempts: number; // Indicates the number of attempts made to process this business object
|
|
542
543
|
dateProcessed: number; // The date this document was last processed
|
|
544
|
+
externalId: string; // An external identifier that can help us match the records
|
|
543
545
|
processingReason?: string; // The reason the processing is at this stage
|
|
544
546
|
externalResponse?: any; // The full response from the external system that created this object
|
|
545
547
|
iconUrl?: string | null; // The url of an icon that represents the business object
|
|
@@ -555,7 +557,8 @@ export class BusinessObject extends Block {
|
|
|
555
557
|
blockType: BlockType,
|
|
556
558
|
provider: string,
|
|
557
559
|
application: string,
|
|
558
|
-
uri: string
|
|
560
|
+
uri: string,
|
|
561
|
+
externalId: string
|
|
559
562
|
) {
|
|
560
563
|
super(tenantIdCreated, editors, sharingTags, version, blockType);
|
|
561
564
|
|
|
@@ -566,6 +569,7 @@ export class BusinessObject extends Block {
|
|
|
566
569
|
this.provider = provider;
|
|
567
570
|
this.application = application;
|
|
568
571
|
this.uri = uri;
|
|
572
|
+
this.externalId = externalId;
|
|
569
573
|
}
|
|
570
574
|
}
|
|
571
575
|
|
|
@@ -651,6 +655,7 @@ export class Conference extends BusinessObject {
|
|
|
651
655
|
provider: string,
|
|
652
656
|
application: string,
|
|
653
657
|
uri: string,
|
|
658
|
+
externalId: string,
|
|
654
659
|
entryPoints: ConferenceEntrypoint[]
|
|
655
660
|
) {
|
|
656
661
|
super(
|
|
@@ -661,7 +666,8 @@ export class Conference extends BusinessObject {
|
|
|
661
666
|
BlockType.Conference,
|
|
662
667
|
provider,
|
|
663
668
|
application,
|
|
664
|
-
uri
|
|
669
|
+
uri,
|
|
670
|
+
externalId
|
|
665
671
|
);
|
|
666
672
|
|
|
667
673
|
this.entryPoints = entryPoints;
|
|
@@ -720,6 +726,7 @@ export class Calendar extends BusinessObject {
|
|
|
720
726
|
provider: string,
|
|
721
727
|
application: string,
|
|
722
728
|
uri: string,
|
|
729
|
+
externalId: string,
|
|
723
730
|
timeZone: string
|
|
724
731
|
) {
|
|
725
732
|
super(
|
|
@@ -730,7 +737,8 @@ export class Calendar extends BusinessObject {
|
|
|
730
737
|
BlockType.Calendar,
|
|
731
738
|
provider,
|
|
732
739
|
application,
|
|
733
|
-
uri
|
|
740
|
+
uri,
|
|
741
|
+
externalId
|
|
734
742
|
);
|
|
735
743
|
|
|
736
744
|
this.timeZone = timeZone;
|
|
@@ -760,6 +768,7 @@ export class Event extends BusinessObject {
|
|
|
760
768
|
provider: string,
|
|
761
769
|
application: string,
|
|
762
770
|
uri: string,
|
|
771
|
+
externalId: string,
|
|
763
772
|
calendarId: string,
|
|
764
773
|
status: EventStatus,
|
|
765
774
|
dateStart: number,
|
|
@@ -773,7 +782,8 @@ export class Event extends BusinessObject {
|
|
|
773
782
|
BlockType.Event,
|
|
774
783
|
provider,
|
|
775
784
|
application,
|
|
776
|
-
uri
|
|
785
|
+
uri,
|
|
786
|
+
externalId
|
|
777
787
|
);
|
|
778
788
|
|
|
779
789
|
this.calendarId = calendarId;
|
|
@@ -785,7 +795,7 @@ export class Event extends BusinessObject {
|
|
|
785
795
|
//// EVENT END
|
|
786
796
|
|
|
787
797
|
//// EXTERNAL TASK START
|
|
788
|
-
export class
|
|
798
|
+
export class Todo extends BusinessObject {
|
|
789
799
|
status: TaskStatus;
|
|
790
800
|
dateDue: number;
|
|
791
801
|
steps?: Step[];
|
|
@@ -800,6 +810,7 @@ export class ExternalTask extends BusinessObject {
|
|
|
800
810
|
provider: string,
|
|
801
811
|
application: string,
|
|
802
812
|
uri: string,
|
|
813
|
+
externalId: string,
|
|
803
814
|
status: TaskStatus,
|
|
804
815
|
dateDue: number
|
|
805
816
|
) {
|
|
@@ -808,10 +819,11 @@ export class ExternalTask extends BusinessObject {
|
|
|
808
819
|
editors,
|
|
809
820
|
sharingTags,
|
|
810
821
|
version,
|
|
811
|
-
BlockType.
|
|
822
|
+
BlockType.Todo,
|
|
812
823
|
provider,
|
|
813
824
|
application,
|
|
814
|
-
uri
|
|
825
|
+
uri,
|
|
826
|
+
externalId
|
|
815
827
|
);
|
|
816
828
|
|
|
817
829
|
this.status = status;
|
|
@@ -829,7 +841,8 @@ export class Thread extends BusinessObject {
|
|
|
829
841
|
version: number,
|
|
830
842
|
provider: string,
|
|
831
843
|
application: string,
|
|
832
|
-
uri: string
|
|
844
|
+
uri: string,
|
|
845
|
+
externalId: string
|
|
833
846
|
) {
|
|
834
847
|
super(
|
|
835
848
|
tenantIdCreated,
|
|
@@ -839,7 +852,8 @@ export class Thread extends BusinessObject {
|
|
|
839
852
|
BlockType.Thread,
|
|
840
853
|
provider,
|
|
841
854
|
application,
|
|
842
|
-
uri
|
|
855
|
+
uri,
|
|
856
|
+
externalId
|
|
843
857
|
);
|
|
844
858
|
}
|
|
845
859
|
}
|
|
@@ -858,7 +872,8 @@ export class Website extends BusinessObject {
|
|
|
858
872
|
version: number,
|
|
859
873
|
provider: string,
|
|
860
874
|
application: string,
|
|
861
|
-
uri: string
|
|
875
|
+
uri: string,
|
|
876
|
+
externalId: string
|
|
862
877
|
) {
|
|
863
878
|
super(
|
|
864
879
|
tenantIdCreated,
|
|
@@ -868,7 +883,8 @@ export class Website extends BusinessObject {
|
|
|
868
883
|
BlockType.Website,
|
|
869
884
|
provider,
|
|
870
885
|
application,
|
|
871
|
-
uri
|
|
886
|
+
uri,
|
|
887
|
+
externalId
|
|
872
888
|
);
|
|
873
889
|
}
|
|
874
890
|
}
|
|
@@ -901,6 +917,7 @@ export class Template extends BusinessObject {
|
|
|
901
917
|
provider: string,
|
|
902
918
|
application: string,
|
|
903
919
|
uri: string,
|
|
920
|
+
externalId: string,
|
|
904
921
|
metadata: DocumentMetadata
|
|
905
922
|
) {
|
|
906
923
|
super(
|
|
@@ -911,7 +928,8 @@ export class Template extends BusinessObject {
|
|
|
911
928
|
BlockType.Template,
|
|
912
929
|
provider,
|
|
913
930
|
application,
|
|
914
|
-
uri
|
|
931
|
+
uri,
|
|
932
|
+
externalId
|
|
915
933
|
);
|
|
916
934
|
|
|
917
935
|
this.metadata = metadata;
|
|
@@ -984,6 +1002,7 @@ export class Table extends BusinessObject {
|
|
|
984
1002
|
provider: string,
|
|
985
1003
|
application: string,
|
|
986
1004
|
uri: string,
|
|
1005
|
+
externalId: string,
|
|
987
1006
|
recordType: string,
|
|
988
1007
|
metadata: TableMetadata,
|
|
989
1008
|
values: FieldValue[]
|
|
@@ -996,7 +1015,8 @@ export class Table extends BusinessObject {
|
|
|
996
1015
|
BlockType.Table,
|
|
997
1016
|
provider,
|
|
998
1017
|
application,
|
|
999
|
-
uri
|
|
1018
|
+
uri,
|
|
1019
|
+
externalId
|
|
1000
1020
|
);
|
|
1001
1021
|
|
|
1002
1022
|
this.recordType = recordType;
|