@bigfootai/bigfoot-types 2.11.4 → 2.11.5
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 +59 -1
- package/model.ts +62 -1
- 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.Todo = exports.Event = exports.Calendar = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.Task = exports.Note = exports.BusinessObject = exports.BlockProcessingResponse = exports.BlockProcessingRequest = 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.GraphQLTypes = exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.Todo = exports.Event = exports.Calendar = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.Task = exports.Note = exports.BusinessObject = exports.BlockProcessingResponse = exports.BlockProcessingRequest = exports.Block = exports.Article = exports.Person = exports.Domain = exports.Tenant = exports.TenantFields = exports.Tag = exports.Provider = exports.Sync = exports.Primitive = exports.PrimitiveFields = exports.ConnectedProviderFields = exports.CredentialFields = exports.ProviderRequestFields = exports.ProviderInfoFields = 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
|
|
@@ -176,6 +176,39 @@ var RelationType;
|
|
|
176
176
|
RelationType["SpouseOf"] = "spouseOf";
|
|
177
177
|
RelationType["SubsidiaryOf"] = "subsidiaryOf";
|
|
178
178
|
})(RelationType || (exports.RelationType = RelationType = {}));
|
|
179
|
+
exports.ProviderInfoFields = `
|
|
180
|
+
type ProviderInfo {
|
|
181
|
+
provider: String!
|
|
182
|
+
application: String!
|
|
183
|
+
}`;
|
|
184
|
+
exports.ProviderRequestFields = `
|
|
185
|
+
type ProviderRequest {
|
|
186
|
+
providerInfo: ID!
|
|
187
|
+
connectionId: String!
|
|
188
|
+
}`;
|
|
189
|
+
exports.CredentialFields = `
|
|
190
|
+
type Credential {
|
|
191
|
+
email: String!
|
|
192
|
+
profile: String!
|
|
193
|
+
accessToken: String!
|
|
194
|
+
refreshToken: String
|
|
195
|
+
instanceUrl: String
|
|
196
|
+
dateExpiry: Float
|
|
197
|
+
}`;
|
|
198
|
+
exports.ConnectedProviderFields = `
|
|
199
|
+
type ConnectedProvider {
|
|
200
|
+
providerId: String!
|
|
201
|
+
connectionId: String!
|
|
202
|
+
application: String!
|
|
203
|
+
credential: Credential
|
|
204
|
+
dateCreated: Float
|
|
205
|
+
dateUpdated: Float
|
|
206
|
+
}`;
|
|
207
|
+
exports.PrimitiveFields = `
|
|
208
|
+
_id: ID!
|
|
209
|
+
dateCreated: Float!
|
|
210
|
+
dateUpdated: Float!
|
|
211
|
+
tenantIdCreated: String`;
|
|
179
212
|
class Primitive {
|
|
180
213
|
constructor() {
|
|
181
214
|
this._id = (0, uuid_1.v4)();
|
|
@@ -213,6 +246,19 @@ class Tag extends Primitive {
|
|
|
213
246
|
}
|
|
214
247
|
}
|
|
215
248
|
exports.Tag = Tag;
|
|
249
|
+
exports.TenantFields = `
|
|
250
|
+
type Tenant { ${exports.PrimitiveFields}
|
|
251
|
+
domainMemberships: [String]!
|
|
252
|
+
email: String!
|
|
253
|
+
emailVerified: Boolean!
|
|
254
|
+
domainIdEmail: String!
|
|
255
|
+
tagId: String!
|
|
256
|
+
picture: String
|
|
257
|
+
familyName: String
|
|
258
|
+
givenName: String
|
|
259
|
+
connectedProviders: [ConnectedProvider]
|
|
260
|
+
}
|
|
261
|
+
`;
|
|
216
262
|
class Tenant extends Primitive {
|
|
217
263
|
constructor(domainMemberships, email, emailVerified, domainIdEmail, tagId) {
|
|
218
264
|
super();
|
|
@@ -256,6 +302,7 @@ class Block extends Primitive {
|
|
|
256
302
|
this.version = version;
|
|
257
303
|
this.blockType = blockType;
|
|
258
304
|
this.archived = false;
|
|
305
|
+
this._ignoreUpdate = false;
|
|
259
306
|
}
|
|
260
307
|
}
|
|
261
308
|
exports.Block = Block;
|
|
@@ -278,6 +325,7 @@ class BusinessObject extends Block {
|
|
|
278
325
|
this.processingStage = ProcessingStage.NotProcessed;
|
|
279
326
|
this.processingAttempts = 0;
|
|
280
327
|
this.dateProcessed = 0;
|
|
328
|
+
this.archived = false;
|
|
281
329
|
this.provider = provider;
|
|
282
330
|
this.application = application;
|
|
283
331
|
this.uri = uri;
|
|
@@ -288,6 +336,7 @@ exports.BusinessObject = BusinessObject;
|
|
|
288
336
|
class Note extends Block {
|
|
289
337
|
constructor(tenantIdCreated, editors, sharingTags, version) {
|
|
290
338
|
super(tenantIdCreated, editors, sharingTags, version, BlockType.Note);
|
|
339
|
+
this.archived = false;
|
|
291
340
|
}
|
|
292
341
|
}
|
|
293
342
|
exports.Note = Note;
|
|
@@ -295,6 +344,8 @@ class Task extends Block {
|
|
|
295
344
|
constructor(tenantIdCreated, editors, sharingTags, version, originNoteId, dateDue) {
|
|
296
345
|
super(tenantIdCreated, editors, sharingTags, version, BlockType.Task);
|
|
297
346
|
this.status = TaskStatus.NotStarted;
|
|
347
|
+
this.snoozed = false;
|
|
348
|
+
this.archived = false;
|
|
298
349
|
this.originNoteId = originNoteId;
|
|
299
350
|
this.dateDue = dateDue;
|
|
300
351
|
}
|
|
@@ -403,3 +454,10 @@ class Table extends BusinessObject {
|
|
|
403
454
|
exports.Table = Table;
|
|
404
455
|
//// FOR RECORDS END
|
|
405
456
|
// METADATA OBJECTS END
|
|
457
|
+
exports.GraphQLTypes = `
|
|
458
|
+
${exports.ProviderInfoFields}
|
|
459
|
+
${exports.ProviderRequestFields}
|
|
460
|
+
${exports.CredentialFields}
|
|
461
|
+
${exports.ConnectedProviderFields}
|
|
462
|
+
${exports.TenantFields}
|
|
463
|
+
`;
|
package/model.ts
CHANGED
|
@@ -275,11 +275,21 @@ export interface MachineLearningEntry {
|
|
|
275
275
|
highlights?: Highlight[];
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
export const ProviderInfoFields = `
|
|
279
|
+
type ProviderInfo {
|
|
280
|
+
provider: String!
|
|
281
|
+
application: String!
|
|
282
|
+
}`;
|
|
278
283
|
export interface ProviderInfo {
|
|
279
284
|
provider: string;
|
|
280
285
|
application: string;
|
|
281
286
|
}
|
|
282
287
|
|
|
288
|
+
export const ProviderRequestFields = `
|
|
289
|
+
type ProviderRequest {
|
|
290
|
+
providerInfo: ID!
|
|
291
|
+
connectionId: String!
|
|
292
|
+
}`;
|
|
283
293
|
export interface ProviderRequest {
|
|
284
294
|
providerInfo: ProviderInfo;
|
|
285
295
|
connectionId: string;
|
|
@@ -299,6 +309,15 @@ export interface Subscriptions {
|
|
|
299
309
|
linkDomains: string[];
|
|
300
310
|
}
|
|
301
311
|
|
|
312
|
+
export const CredentialFields = `
|
|
313
|
+
type Credential {
|
|
314
|
+
email: String!
|
|
315
|
+
profile: String!
|
|
316
|
+
accessToken: String!
|
|
317
|
+
refreshToken: String
|
|
318
|
+
instanceUrl: String
|
|
319
|
+
dateExpiry: Float
|
|
320
|
+
}`;
|
|
302
321
|
export interface Credential {
|
|
303
322
|
email: string;
|
|
304
323
|
profile: any;
|
|
@@ -313,6 +332,15 @@ export interface ConnectedProviderRegistration {
|
|
|
313
332
|
credential: Credential;
|
|
314
333
|
}
|
|
315
334
|
|
|
335
|
+
export const ConnectedProviderFields = `
|
|
336
|
+
type ConnectedProvider {
|
|
337
|
+
providerId: String!
|
|
338
|
+
connectionId: String!
|
|
339
|
+
application: String!
|
|
340
|
+
credential: Credential
|
|
341
|
+
dateCreated: Float
|
|
342
|
+
dateUpdated: Float
|
|
343
|
+
}`;
|
|
316
344
|
export interface ConnectedProvider {
|
|
317
345
|
providerId: string;
|
|
318
346
|
connectionId: string;
|
|
@@ -337,6 +365,11 @@ export interface PersonReference {
|
|
|
337
365
|
email: string;
|
|
338
366
|
}
|
|
339
367
|
|
|
368
|
+
export const PrimitiveFields = `
|
|
369
|
+
_id: ID!
|
|
370
|
+
dateCreated: Float!
|
|
371
|
+
dateUpdated: Float!
|
|
372
|
+
tenantIdCreated: String`;
|
|
340
373
|
export class Primitive {
|
|
341
374
|
_id: string;
|
|
342
375
|
dateCreated: number;
|
|
@@ -403,6 +436,19 @@ export class Tag extends Primitive {
|
|
|
403
436
|
}
|
|
404
437
|
}
|
|
405
438
|
|
|
439
|
+
export const TenantFields = `
|
|
440
|
+
type Tenant { ${PrimitiveFields}
|
|
441
|
+
domainMemberships: [String]!
|
|
442
|
+
email: String!
|
|
443
|
+
emailVerified: Boolean!
|
|
444
|
+
domainIdEmail: String!
|
|
445
|
+
tagId: String!
|
|
446
|
+
picture: String
|
|
447
|
+
familyName: String
|
|
448
|
+
givenName: String
|
|
449
|
+
connectedProviders: [ConnectedProvider]
|
|
450
|
+
}
|
|
451
|
+
`;
|
|
406
452
|
export class Tenant extends Primitive {
|
|
407
453
|
domainMemberships: string[]; // The list of all domains this tenant belongs
|
|
408
454
|
email: string;
|
|
@@ -491,6 +537,7 @@ export class Block extends Primitive {
|
|
|
491
537
|
version: number;
|
|
492
538
|
blockType: BlockType;
|
|
493
539
|
archived: boolean;
|
|
540
|
+
_ignoreUpdate: boolean;
|
|
494
541
|
document?: any;
|
|
495
542
|
changes?: Changes;
|
|
496
543
|
_sharedTags?: string[];
|
|
@@ -512,6 +559,7 @@ export class Block extends Primitive {
|
|
|
512
559
|
this.blockType = blockType;
|
|
513
560
|
|
|
514
561
|
this.archived = false;
|
|
562
|
+
this._ignoreUpdate = false;
|
|
515
563
|
}
|
|
516
564
|
}
|
|
517
565
|
|
|
@@ -547,7 +595,6 @@ export class BusinessObject extends Block {
|
|
|
547
595
|
iconUrl?: string | null; // The url of an icon that represents the business object
|
|
548
596
|
document?: any | null; // The business object formatted as a document for ML to ingest
|
|
549
597
|
parentId?: string | null; // The business object that is the parent of this business object
|
|
550
|
-
credential?: Credential; // Only sent for processing requests
|
|
551
598
|
|
|
552
599
|
constructor(
|
|
553
600
|
tenantIdCreated: string,
|
|
@@ -565,6 +612,7 @@ export class BusinessObject extends Block {
|
|
|
565
612
|
this.processingStage = ProcessingStage.NotProcessed;
|
|
566
613
|
this.processingAttempts = 0;
|
|
567
614
|
this.dateProcessed = 0;
|
|
615
|
+
this.archived = false;
|
|
568
616
|
|
|
569
617
|
this.provider = provider;
|
|
570
618
|
this.application = application;
|
|
@@ -581,6 +629,8 @@ export class Note extends Block {
|
|
|
581
629
|
version: number
|
|
582
630
|
) {
|
|
583
631
|
super(tenantIdCreated, editors, sharingTags, version, BlockType.Note);
|
|
632
|
+
|
|
633
|
+
this.archived = false;
|
|
584
634
|
}
|
|
585
635
|
}
|
|
586
636
|
|
|
@@ -588,6 +638,7 @@ export class Task extends Block {
|
|
|
588
638
|
status: TaskStatus;
|
|
589
639
|
dateDue: number;
|
|
590
640
|
originNoteId: string;
|
|
641
|
+
snoozed: boolean;
|
|
591
642
|
steps?: Step[];
|
|
592
643
|
dateRemindMe?: number;
|
|
593
644
|
recurrence?: RecurrenceRFC[];
|
|
@@ -605,6 +656,8 @@ export class Task extends Block {
|
|
|
605
656
|
super(tenantIdCreated, editors, sharingTags, version, BlockType.Task);
|
|
606
657
|
|
|
607
658
|
this.status = TaskStatus.NotStarted;
|
|
659
|
+
this.snoozed = false;
|
|
660
|
+
this.archived = false;
|
|
608
661
|
|
|
609
662
|
this.originNoteId = originNoteId;
|
|
610
663
|
this.dateDue = dateDue;
|
|
@@ -1027,3 +1080,11 @@ export class Table extends BusinessObject {
|
|
|
1027
1080
|
//// FOR RECORDS END
|
|
1028
1081
|
|
|
1029
1082
|
// METADATA OBJECTS END
|
|
1083
|
+
|
|
1084
|
+
export const GraphQLTypes = `
|
|
1085
|
+
${ProviderInfoFields}
|
|
1086
|
+
${ProviderRequestFields}
|
|
1087
|
+
${CredentialFields}
|
|
1088
|
+
${ConnectedProviderFields}
|
|
1089
|
+
${TenantFields}
|
|
1090
|
+
`;
|