@bigfootai/bigfoot-types 2.4.1 → 2.5.1

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 +32 -1
  2. package/model.ts +16 -8
  3. 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.EventStatus = exports.Conference = exports.Task = exports.Block = exports.Note = exports.Person = exports.Domain = exports.Tenant = exports.BusinessObject = exports.Tag = exports.Primitive = exports.RecurrenceRFC = exports.InviteStatus = exports.SharingApproach = exports.StepStatus = exports.TaskStatus = exports.SharingLevel = exports.ClientType = exports.TagType = exports.BlockType = exports.BusinessObjectType = void 0;
3
+ exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Thread = exports.ExternalTask = exports.EventStatus = exports.Conference = exports.Task = exports.Block = exports.Note = exports.Article = exports.Person = exports.Domain = exports.Tenant = exports.BusinessObject = exports.Tag = exports.Primitive = 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
@@ -84,6 +84,29 @@ var RecurrenceRFC;
84
84
  RecurrenceRFC["SATURDAY"] = "SA";
85
85
  RecurrenceRFC["SUNDAY"] = "SU";
86
86
  })(RecurrenceRFC || (exports.RecurrenceRFC = RecurrenceRFC = {}));
87
+ var DocumentType;
88
+ (function (DocumentType) {
89
+ DocumentType["BlockQuote"] = "blockquote";
90
+ DocumentType["Image"] = "image";
91
+ DocumentType["Text"] = "text";
92
+ DocumentType["Doc"] = "doc";
93
+ DocumentType["Paragraph"] = "paragraph";
94
+ DocumentType["HorizontalRule"] = "horizontal_rule";
95
+ DocumentType["Heading"] = "heading";
96
+ DocumentType["CodeBlock"] = "code_block";
97
+ DocumentType["HardBreak"] = "hard_break";
98
+ })(DocumentType || (exports.DocumentType = DocumentType = {}));
99
+ var MarkType;
100
+ (function (MarkType) {
101
+ MarkType["Link"] = "link";
102
+ })(MarkType || (exports.MarkType = MarkType = {}));
103
+ var MutationType;
104
+ (function (MutationType) {
105
+ MutationType["Select"] = "select";
106
+ MutationType["Insert"] = "insert";
107
+ MutationType["Update"] = "update";
108
+ MutationType["Delete"] = "delete";
109
+ })(MutationType || (exports.MutationType = MutationType = {}));
87
110
  class Primitive {
88
111
  constructor() {
89
112
  this._id = (0, uuid_1.v4)();
@@ -108,6 +131,9 @@ exports.Domain = Domain;
108
131
  class Person extends Tag {
109
132
  }
110
133
  exports.Person = Person;
134
+ class Article extends Primitive {
135
+ }
136
+ exports.Article = Article;
111
137
  class Note extends Primitive {
112
138
  }
113
139
  exports.Note = Note;
@@ -115,6 +141,11 @@ class Block extends Note {
115
141
  }
116
142
  exports.Block = Block;
117
143
  class Task extends Block {
144
+ constructor() {
145
+ super();
146
+ this.blockType = BlockType.Task;
147
+ this.status = TaskStatus.NotStarted;
148
+ }
118
149
  }
119
150
  exports.Task = Task;
120
151
  class Conference extends BusinessObject {
package/model.ts CHANGED
@@ -98,6 +98,13 @@ export enum MarkType {
98
98
  Link = 'link',
99
99
  }
100
100
 
101
+ export enum MutationType {
102
+ Select = 'select',
103
+ Insert = 'insert',
104
+ Update = 'update',
105
+ Delete = 'delete',
106
+ }
107
+
101
108
  export interface Mark {
102
109
  type: string;
103
110
  attrs?: Map<string, string>;
@@ -167,7 +174,7 @@ export interface EntityEntry extends MachineLearningEntry {
167
174
  }
168
175
 
169
176
  export interface MachineLearningEntry {
170
- highlights: Highlight[];
177
+ highlights?: Highlight[];
171
178
  }
172
179
 
173
180
  export class Primitive {
@@ -241,13 +248,14 @@ export class Article extends Primitive {
241
248
  }
242
249
 
243
250
  export class Note extends Primitive {
244
- tenantIdCreated: string; // The tenant._id that created the note initially
245
- document: string; // The note serialized as a JSON string
246
- editors: Editor[]; // The list of people/devices that were used in creating this note
247
- sharingTags: SharingTag[]; // The list of tags that this note is shared with
248
- _sharedTags?: string[]; // The list of tags that have sharing equal to true
249
- reactions?: Reaction[]; // Reactions from tenants to this primitive
250
- version: number; // An incrementing version number assigned by the editor
251
+ tenantIdCreated: string;
252
+ document: string;
253
+ editors: Editor[];
254
+ sharingTags: SharingTag[];
255
+ _sharedTags?: string[];
256
+ reactions?: Reaction[];
257
+ linkUrls?: string[];
258
+ version: number;
251
259
  }
252
260
 
253
261
  export class Block extends Note {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.4.1",
4
+ "version": "2.5.1",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",