@bigfootai/bigfoot-types 2.9.9 → 2.10.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.
- package/model.js +14 -13
- package/model.ts +21 -23
- 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.Thread = exports.ExternalTask = exports.Event = exports.Calendar = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.Task = exports.
|
|
3
|
+
exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Thread = exports.ExternalTask = exports.Event = exports.Calendar = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.Task = exports.Note = exports.Block = exports.Article = exports.Person = exports.Domain = exports.Tenant = exports.BusinessObject = 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 = exports.BusinessObjectType = 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
|
|
@@ -23,6 +23,7 @@ var BusinessObjectType;
|
|
|
23
23
|
})(BusinessObjectType || (exports.BusinessObjectType = BusinessObjectType = {}));
|
|
24
24
|
var BlockType;
|
|
25
25
|
(function (BlockType) {
|
|
26
|
+
BlockType["Note"] = "section";
|
|
26
27
|
BlockType["Section"] = "section";
|
|
27
28
|
BlockType["Task"] = "task";
|
|
28
29
|
BlockType["Data"] = "data";
|
|
@@ -256,34 +257,34 @@ class Person extends Tag {
|
|
|
256
257
|
}
|
|
257
258
|
exports.Person = Person;
|
|
258
259
|
class Article extends Primitive {
|
|
259
|
-
constructor(
|
|
260
|
+
constructor(referenceBlock) {
|
|
260
261
|
super();
|
|
261
|
-
this.
|
|
262
|
+
this.referenceBlock = referenceBlock;
|
|
262
263
|
}
|
|
263
264
|
}
|
|
264
265
|
exports.Article = Article;
|
|
265
|
-
class
|
|
266
|
-
constructor(tenantIdCreated, editors, sharingTags, version) {
|
|
266
|
+
class Block extends Primitive {
|
|
267
|
+
constructor(tenantIdCreated, editors, sharingTags, version, blockType) {
|
|
267
268
|
super();
|
|
268
269
|
this.tenantIdCreated = tenantIdCreated;
|
|
269
270
|
this.editors = editors;
|
|
270
271
|
this.sharingTags = sharingTags;
|
|
271
272
|
this.version = version;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
exports.Note = Note;
|
|
275
|
-
class Block extends Note {
|
|
276
|
-
constructor(tenantIdCreated, editors, sharingTags, version, blockType, originNoteId) {
|
|
277
|
-
super(tenantIdCreated, editors, sharingTags, version);
|
|
278
273
|
this.blockType = blockType;
|
|
279
|
-
this.originNoteId = originNoteId;
|
|
280
274
|
}
|
|
281
275
|
}
|
|
282
276
|
exports.Block = Block;
|
|
277
|
+
class Note extends Block {
|
|
278
|
+
constructor(tenantIdCreated, editors, sharingTags, version) {
|
|
279
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Note);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
exports.Note = Note;
|
|
283
283
|
class Task extends Block {
|
|
284
284
|
constructor(tenantIdCreated, editors, sharingTags, version, originNoteId, dateDue) {
|
|
285
|
-
super(tenantIdCreated, editors, sharingTags, version, BlockType.Task
|
|
285
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Task);
|
|
286
286
|
this.status = TaskStatus.NotStarted;
|
|
287
|
+
this.originNoteId = originNoteId;
|
|
287
288
|
this.dateDue = dateDue;
|
|
288
289
|
}
|
|
289
290
|
}
|
package/model.ts
CHANGED
|
@@ -20,6 +20,7 @@ export enum BusinessObjectType {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export enum BlockType {
|
|
23
|
+
Note = 'section', // It's a full note
|
|
23
24
|
Section = 'section', // It's a fragment of content
|
|
24
25
|
Task = 'task', // It's a task
|
|
25
26
|
Data = 'data', // It's a record or set of records belonging to a specific metadata definition
|
|
@@ -321,6 +322,7 @@ export interface ConnectedProvider {
|
|
|
321
322
|
export interface ReferenceNote {
|
|
322
323
|
id: string;
|
|
323
324
|
version: number;
|
|
325
|
+
type: BlockType;
|
|
324
326
|
}
|
|
325
327
|
|
|
326
328
|
export interface Changes {
|
|
@@ -491,8 +493,7 @@ export class Person extends Tag {
|
|
|
491
493
|
}
|
|
492
494
|
|
|
493
495
|
export class Article extends Primitive {
|
|
494
|
-
referenceBlock
|
|
495
|
-
referenceNote?: ReferenceNote;
|
|
496
|
+
referenceBlock: ReferenceNote;
|
|
496
497
|
text?: string;
|
|
497
498
|
sentiment?: DocumentSentiment;
|
|
498
499
|
dates?: EntityEntry[];
|
|
@@ -505,12 +506,19 @@ export class Article extends Primitive {
|
|
|
505
506
|
relations?: RelationEntry[];
|
|
506
507
|
linkUrls?: string[];
|
|
507
508
|
tasks?: Task[];
|
|
509
|
+
|
|
510
|
+
constructor(referenceBlock: ReferenceNote) {
|
|
511
|
+
super();
|
|
512
|
+
|
|
513
|
+
this.referenceBlock = referenceBlock;
|
|
514
|
+
}
|
|
508
515
|
}
|
|
509
516
|
|
|
510
|
-
export class
|
|
517
|
+
export class Block extends Primitive {
|
|
511
518
|
editors: Editor[];
|
|
512
519
|
sharingTags: SharingTag[];
|
|
513
520
|
version: number;
|
|
521
|
+
blockType: BlockType;
|
|
514
522
|
document?: any;
|
|
515
523
|
changes?: Changes;
|
|
516
524
|
_sharedTags?: string[];
|
|
@@ -520,7 +528,8 @@ export class Note extends Primitive {
|
|
|
520
528
|
tenantIdCreated: string,
|
|
521
529
|
editors: Editor[],
|
|
522
530
|
sharingTags: SharingTag[],
|
|
523
|
-
version: number
|
|
531
|
+
version: number,
|
|
532
|
+
blockType: BlockType
|
|
524
533
|
) {
|
|
525
534
|
super();
|
|
526
535
|
|
|
@@ -528,31 +537,25 @@ export class Note extends Primitive {
|
|
|
528
537
|
this.editors = editors;
|
|
529
538
|
this.sharingTags = sharingTags;
|
|
530
539
|
this.version = version;
|
|
540
|
+
this.blockType = blockType;
|
|
531
541
|
}
|
|
532
542
|
}
|
|
533
543
|
|
|
534
|
-
export class
|
|
535
|
-
blockType: BlockType;
|
|
536
|
-
originNoteId: string;
|
|
537
|
-
|
|
544
|
+
export class Note extends Block {
|
|
538
545
|
constructor(
|
|
539
546
|
tenantIdCreated: string,
|
|
540
547
|
editors: Editor[],
|
|
541
548
|
sharingTags: SharingTag[],
|
|
542
|
-
version: number
|
|
543
|
-
blockType: BlockType,
|
|
544
|
-
originNoteId: string
|
|
549
|
+
version: number
|
|
545
550
|
) {
|
|
546
|
-
super(tenantIdCreated, editors, sharingTags, version);
|
|
547
|
-
|
|
548
|
-
this.blockType = blockType;
|
|
549
|
-
this.originNoteId = originNoteId;
|
|
551
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Note);
|
|
550
552
|
}
|
|
551
553
|
}
|
|
552
554
|
|
|
553
555
|
export class Task extends Block {
|
|
554
556
|
status: TaskStatus;
|
|
555
557
|
dateDue: number;
|
|
558
|
+
originNoteId: string;
|
|
556
559
|
steps?: Step[];
|
|
557
560
|
dateRemindMe?: number;
|
|
558
561
|
recurrence?: RecurrenceRFC[];
|
|
@@ -565,16 +568,11 @@ export class Task extends Block {
|
|
|
565
568
|
originNoteId: string,
|
|
566
569
|
dateDue: number
|
|
567
570
|
) {
|
|
568
|
-
super(
|
|
569
|
-
tenantIdCreated,
|
|
570
|
-
editors,
|
|
571
|
-
sharingTags,
|
|
572
|
-
version,
|
|
573
|
-
BlockType.Task,
|
|
574
|
-
originNoteId
|
|
575
|
-
);
|
|
571
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Task);
|
|
576
572
|
|
|
577
573
|
this.status = TaskStatus.NotStarted;
|
|
574
|
+
|
|
575
|
+
this.originNoteId = originNoteId;
|
|
578
576
|
this.dateDue = dateDue;
|
|
579
577
|
}
|
|
580
578
|
}
|