@bigfootai/bigfoot-types 2.9.8 → 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 +17 -24
- 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,7 +493,7 @@ export class Person extends Tag {
|
|
|
491
493
|
}
|
|
492
494
|
|
|
493
495
|
export class Article extends Primitive {
|
|
494
|
-
|
|
496
|
+
referenceBlock: ReferenceNote;
|
|
495
497
|
text?: string;
|
|
496
498
|
sentiment?: DocumentSentiment;
|
|
497
499
|
dates?: EntityEntry[];
|
|
@@ -505,17 +507,18 @@ export class Article extends Primitive {
|
|
|
505
507
|
linkUrls?: string[];
|
|
506
508
|
tasks?: Task[];
|
|
507
509
|
|
|
508
|
-
constructor(
|
|
510
|
+
constructor(referenceBlock: ReferenceNote) {
|
|
509
511
|
super();
|
|
510
512
|
|
|
511
|
-
this.
|
|
513
|
+
this.referenceBlock = referenceBlock;
|
|
512
514
|
}
|
|
513
515
|
}
|
|
514
516
|
|
|
515
|
-
export class
|
|
517
|
+
export class Block extends Primitive {
|
|
516
518
|
editors: Editor[];
|
|
517
519
|
sharingTags: SharingTag[];
|
|
518
520
|
version: number;
|
|
521
|
+
blockType: BlockType;
|
|
519
522
|
document?: any;
|
|
520
523
|
changes?: Changes;
|
|
521
524
|
_sharedTags?: string[];
|
|
@@ -525,7 +528,8 @@ export class Note extends Primitive {
|
|
|
525
528
|
tenantIdCreated: string,
|
|
526
529
|
editors: Editor[],
|
|
527
530
|
sharingTags: SharingTag[],
|
|
528
|
-
version: number
|
|
531
|
+
version: number,
|
|
532
|
+
blockType: BlockType
|
|
529
533
|
) {
|
|
530
534
|
super();
|
|
531
535
|
|
|
@@ -533,31 +537,25 @@ export class Note extends Primitive {
|
|
|
533
537
|
this.editors = editors;
|
|
534
538
|
this.sharingTags = sharingTags;
|
|
535
539
|
this.version = version;
|
|
540
|
+
this.blockType = blockType;
|
|
536
541
|
}
|
|
537
542
|
}
|
|
538
543
|
|
|
539
|
-
export class
|
|
540
|
-
blockType: BlockType;
|
|
541
|
-
originNoteId: string;
|
|
542
|
-
|
|
544
|
+
export class Note extends Block {
|
|
543
545
|
constructor(
|
|
544
546
|
tenantIdCreated: string,
|
|
545
547
|
editors: Editor[],
|
|
546
548
|
sharingTags: SharingTag[],
|
|
547
|
-
version: number
|
|
548
|
-
blockType: BlockType,
|
|
549
|
-
originNoteId: string
|
|
549
|
+
version: number
|
|
550
550
|
) {
|
|
551
|
-
super(tenantIdCreated, editors, sharingTags, version);
|
|
552
|
-
|
|
553
|
-
this.blockType = blockType;
|
|
554
|
-
this.originNoteId = originNoteId;
|
|
551
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Note);
|
|
555
552
|
}
|
|
556
553
|
}
|
|
557
554
|
|
|
558
555
|
export class Task extends Block {
|
|
559
556
|
status: TaskStatus;
|
|
560
557
|
dateDue: number;
|
|
558
|
+
originNoteId: string;
|
|
561
559
|
steps?: Step[];
|
|
562
560
|
dateRemindMe?: number;
|
|
563
561
|
recurrence?: RecurrenceRFC[];
|
|
@@ -570,16 +568,11 @@ export class Task extends Block {
|
|
|
570
568
|
originNoteId: string,
|
|
571
569
|
dateDue: number
|
|
572
570
|
) {
|
|
573
|
-
super(
|
|
574
|
-
tenantIdCreated,
|
|
575
|
-
editors,
|
|
576
|
-
sharingTags,
|
|
577
|
-
version,
|
|
578
|
-
BlockType.Task,
|
|
579
|
-
originNoteId
|
|
580
|
-
);
|
|
571
|
+
super(tenantIdCreated, editors, sharingTags, version, BlockType.Task);
|
|
581
572
|
|
|
582
573
|
this.status = TaskStatus.NotStarted;
|
|
574
|
+
|
|
575
|
+
this.originNoteId = originNoteId;
|
|
583
576
|
this.dateDue = dateDue;
|
|
584
577
|
}
|
|
585
578
|
}
|