@bigfootai/bigfoot-types 2.11.0 → 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.
- package/model.js +10 -1
- package/model.ts +20 -10
- 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
|
@@ -289,14 +289,6 @@ export interface ProviderResponse {
|
|
|
289
289
|
providerUrl: string;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
export interface BusinessObjectRequest {
|
|
293
|
-
businessObjectId: string;
|
|
294
|
-
linkUrl: string;
|
|
295
|
-
credential?: Credential;
|
|
296
|
-
application?: string;
|
|
297
|
-
provider?: Provider;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
292
|
export interface StandardObjects {
|
|
301
293
|
task: boolean;
|
|
302
294
|
calendar: boolean;
|
|
@@ -523,6 +515,24 @@ export class Block extends Primitive {
|
|
|
523
515
|
}
|
|
524
516
|
}
|
|
525
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
|
+
|
|
526
536
|
export class BusinessObject extends Block {
|
|
527
537
|
provider: string; // A unique string representing the provider e.g. "salesforce", "atlassian", etc
|
|
528
538
|
application: string; // A unique string representing the provider application e.g. "service", "jira", etc
|
|
@@ -530,12 +540,12 @@ export class BusinessObject extends Block {
|
|
|
530
540
|
processingStage: ProcessingStage; // Indicates if the business object has been processed yet
|
|
531
541
|
processingAttempts: number; // Indicates the number of attempts made to process this business object
|
|
532
542
|
dateProcessed: number; // The date this document was last processed
|
|
533
|
-
processingReason
|
|
543
|
+
processingReason?: string; // The reason the processing is at this stage
|
|
534
544
|
externalResponse?: any; // The full response from the external system that created this object
|
|
535
545
|
iconUrl?: string | null; // The url of an icon that represents the business object
|
|
536
546
|
document?: any | null; // The business object formatted as a document for ML to ingest
|
|
537
547
|
parentId?: string | null; // The business object that is the parent of this business object
|
|
538
|
-
|
|
548
|
+
credential?: Credential; // Only sent for processing requests
|
|
539
549
|
|
|
540
550
|
constructor(
|
|
541
551
|
tenantIdCreated: string,
|