@bigfootai/bigfoot-types 2.3.4 → 2.4.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.
Files changed (2) hide show
  1. package/model.ts +71 -14
  2. package/package.json +1 -1
package/model.ts CHANGED
@@ -82,16 +82,38 @@ export enum RecurrenceRFC {
82
82
  SUNDAY = 'SU',
83
83
  }
84
84
 
85
+ export enum DocumentType {
86
+ BlockQuote = 'blockquote',
87
+ Image = 'image',
88
+ Text = 'text',
89
+ Doc = 'doc',
90
+ Paragraph = 'paragraph',
91
+ HorizontalRule = 'horizontal_rule',
92
+ Heading = 'heading',
93
+ CodeBlock = 'code_block',
94
+ HardBreak = 'hard_break',
95
+ }
96
+
97
+ export enum MarkType {
98
+ Link = 'link',
99
+ }
100
+
85
101
  export interface Mark {
86
102
  type: string;
103
+ attrs?: Map<string, string>;
104
+ }
105
+
106
+ export interface Highlight {
107
+ indexStart: number;
108
+ indexEnd: number;
87
109
  }
88
110
 
89
111
  export interface Document {
90
- attrs: Map<string, string>;
91
- content: Document;
92
- text: string;
112
+ attrs?: Map<string, string>;
113
+ content?: Document[];
114
+ text?: string;
93
115
  type: string;
94
- marks: Mark[];
116
+ marks?: Mark[];
95
117
  }
96
118
 
97
119
  export interface Editor {
@@ -135,6 +157,19 @@ export interface Step {
135
157
  status: StepStatus;
136
158
  }
137
159
 
160
+ export interface DateEntry extends MachineLearningEntry {
161
+ dateStart: number;
162
+ dateEnd: number;
163
+ }
164
+
165
+ export interface EntityEntry extends MachineLearningEntry {
166
+ name: string;
167
+ }
168
+
169
+ export interface MachineLearningEntry {
170
+ highlights: Highlight[];
171
+ }
172
+
138
173
  export class Primitive {
139
174
  _id: string;
140
175
  dateCreated: number;
@@ -181,7 +216,7 @@ export class Tenant extends Primitive {
181
216
 
182
217
  export class Domain extends Primitive {
183
218
  domain: string;
184
- public: boolean;
219
+ isPublic: boolean;
185
220
  }
186
221
 
187
222
  export class Person extends Tag {
@@ -190,6 +225,21 @@ export class Person extends Tag {
190
225
  inviteStatus?: InviteStatus;
191
226
  }
192
227
 
228
+ export interface ReferenceNote {
229
+ id: string;
230
+ version: number;
231
+ text: string;
232
+ }
233
+
234
+ export class Article extends Primitive {
235
+ referenceNote: ReferenceNote;
236
+ dates?: DateEntry[];
237
+ locations?: EntityEntry[];
238
+ organizations?: EntityEntry[];
239
+ names?: EntityEntry[];
240
+ sentiments?: EntityEntry[];
241
+ }
242
+
193
243
  export class Note extends Primitive {
194
244
  tenantIdCreated: string; // The tenant._id that created the note initially
195
245
  document: string; // The note serialized as a JSON string
@@ -207,9 +257,16 @@ export class Block extends Note {
207
257
  export class Task extends Block {
208
258
  status: TaskStatus;
209
259
  steps?: Step[];
210
- dateRemindMe?: Date;
211
- dateDue: Date;
260
+ dateRemindMe?: number;
261
+ dateDue: number;
212
262
  recurrence?: RecurrenceRFC[];
263
+
264
+ constructor() {
265
+ super();
266
+
267
+ this.blockType = BlockType.Task;
268
+ this.status = TaskStatus.NotStarted;
269
+ }
213
270
  }
214
271
  // CORE END
215
272
 
@@ -225,8 +282,8 @@ export interface TranscriptionEntry {
225
282
  person: Person;
226
283
  text: string;
227
284
  language: string;
228
- startDate: Date;
229
- endDate: Date;
285
+ startDate: number;
286
+ endDate: number;
230
287
  }
231
288
 
232
289
  export interface Transcription {
@@ -274,10 +331,10 @@ export interface Event extends BusinessObject {
274
331
  subject?: string;
275
332
  description?: string;
276
333
  location: string;
277
- startDate: Date;
278
- endDate?: Date;
334
+ startDate: number;
335
+ endDate?: number;
279
336
  recurrence: RecurrenceRFC[];
280
- originalStartDate: Date;
337
+ originalStartDate: number;
281
338
  organizedBy: Person;
282
339
  attendees?: PersonAcceptance[];
283
340
  conference?: Conference;
@@ -289,8 +346,8 @@ export interface Event extends BusinessObject {
289
346
  export class ExternalTask extends BusinessObject {
290
347
  status: TaskStatus;
291
348
  steps?: Step[];
292
- dateRemindMe?: Date;
293
- dateDue: Date;
349
+ dateRemindMe?: number;
350
+ dateDue: number;
294
351
  recurrence?: RecurrenceRFC[];
295
352
  }
296
353
  //// EXTERNAL TASK END
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.3.4",
4
+ "version": "2.4.0",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",