@bigfootai/bigfoot-types 2.11.1 → 2.11.2

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 +10 -1
  2. package/model.ts +19 -2
  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.Website = exports.Thread = exports.ExternalTask = exports.Event = exports.Calendar = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.Task = exports.Note = exports.BusinessObject = 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;
3
+ exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.ExternalTask = 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
@@ -258,6 +258,15 @@ class Block extends Primitive {
258
258
  }
259
259
  }
260
260
  exports.Block = Block;
261
+ class BusinessObjectArticle extends Article {
262
+ constructor(referenceBlock) {
263
+ super(referenceBlock);
264
+ this.processingStage = ProcessingStage.NotProcessed;
265
+ this.processingAttempts = 0;
266
+ this.dateProcessed = 0;
267
+ }
268
+ }
269
+ exports.BusinessObjectArticle = BusinessObjectArticle;
261
270
  class BusinessObject extends Block {
262
271
  constructor(tenantIdCreated, editors, sharingTags, version, blockType, provider, application, uri) {
263
272
  super(tenantIdCreated, editors, sharingTags, version, blockType);
package/model.ts CHANGED
@@ -515,6 +515,24 @@ export class Block extends Primitive {
515
515
  }
516
516
  }
517
517
 
518
+ export class BusinessObjectArticle extends Article {
519
+ processingStage: ProcessingStage; // Indicates if the business object has been processed yet
520
+ processingAttempts: number; // Indicates the number of attempts made to process this business object
521
+ dateProcessed: number; // The date this document was last processed
522
+ processingReason?: string; // The reason the processing is at this stage
523
+ externalResponse?: any; // The full response from the external system that created this object
524
+ iconUrl?: string | null; // The url of an icon that represents the business object
525
+ parentId?: string | null; // The business object that is the parent of this business object
526
+
527
+ constructor(referenceBlock: ReferenceBlock) {
528
+ super(referenceBlock);
529
+
530
+ this.processingStage = ProcessingStage.NotProcessed;
531
+ this.processingAttempts = 0;
532
+ this.dateProcessed = 0;
533
+ }
534
+ }
535
+
518
536
  export class BusinessObject extends Block {
519
537
  provider: string; // A unique string representing the provider e.g. "salesforce", "atlassian", etc
520
538
  application: string; // A unique string representing the provider application e.g. "service", "jira", etc
@@ -522,12 +540,11 @@ export class BusinessObject extends Block {
522
540
  processingStage: ProcessingStage; // Indicates if the business object has been processed yet
523
541
  processingAttempts: number; // Indicates the number of attempts made to process this business object
524
542
  dateProcessed: number; // The date this document was last processed
525
- processingReason: string; // The reason the processing is at this stage
543
+ processingReason?: string; // The reason the processing is at this stage
526
544
  externalResponse?: any; // The full response from the external system that created this object
527
545
  iconUrl?: string | null; // The url of an icon that represents the business object
528
546
  document?: any | null; // The business object formatted as a document for ML to ingest
529
547
  parentId?: string | null; // The business object that is the parent of this business object
530
- linkUrls?: string[]; // Any links in the business object which can be used to understand relationships between objects
531
548
  credential?: Credential; // Only sent for processing requests
532
549
 
533
550
  constructor(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.11.1",
4
+ "version": "2.11.2",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",