@bigfootai/bigfoot-types 3.4.1 → 3.5.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.
package/editor.js CHANGED
@@ -13,26 +13,29 @@ exports.bigfootSchema = new prosemirror_model_1.Schema({
13
13
  marks: orderedmap_1.default.from(prosemirror_schema_basic_1.schema.spec.marks).addToEnd('tag', {
14
14
  attrs: {
15
15
  tagId: { default: null },
16
+ tagType: { default: null },
16
17
  recommendationId: { default: null },
17
18
  },
18
19
  inclusive: false,
19
20
  parseDOM: [
20
21
  {
21
- tag: 'span[data-tag-id]',
22
+ tag: 'span[data-tag-id][data-recommendation-id][data-tag-type]',
22
23
  getAttrs(dom) {
23
24
  return {
24
25
  tagId: dom.getAttribute('data-tag-id'),
26
+ tagType: dom.getAttribute('data-tag-type'),
25
27
  recommendationId: dom.getAttribute('data-recommendation-id'),
26
28
  };
27
29
  },
28
30
  },
29
31
  ],
30
32
  toDOM(node) {
31
- const { tagId, recommendationId } = node.attrs;
33
+ const { tagId, tagType, recommendationId } = node.attrs;
32
34
  return [
33
35
  'span',
34
36
  {
35
37
  'data-tag-id': tagId,
38
+ 'data-tag-type': tagType,
36
39
  'data-recommendation-id': recommendationId,
37
40
  },
38
41
  0,
package/editor.ts CHANGED
@@ -8,15 +8,19 @@ export const bigfootSchema = new Schema({
8
8
  marks: orderedMap.from(schema.spec.marks).addToEnd('tag', {
9
9
  attrs: {
10
10
  tagId: { default: null },
11
+ tagType: { default: null },
11
12
  recommendationId: { default: null },
12
13
  },
13
14
  inclusive: false,
14
15
  parseDOM: [
15
16
  {
16
- tag: 'span[data-tag-id]',
17
+ tag: 'span[data-tag-id][data-recommendation-id][data-tag-type]',
17
18
  getAttrs(dom) {
18
19
  return {
19
20
  tagId: (dom as HTMLElement).getAttribute('data-tag-id'),
21
+ tagType: (dom as HTMLElement).getAttribute(
22
+ 'data-tag-type'
23
+ ),
20
24
  recommendationId: (dom as HTMLElement).getAttribute(
21
25
  'data-recommendation-id'
22
26
  ),
@@ -25,11 +29,12 @@ export const bigfootSchema = new Schema({
25
29
  },
26
30
  ],
27
31
  toDOM(node) {
28
- const { tagId, recommendationId } = node.attrs;
32
+ const { tagId, tagType, recommendationId } = node.attrs;
29
33
  return [
30
34
  'span',
31
35
  {
32
36
  'data-tag-id': tagId,
37
+ 'data-tag-type': tagType,
33
38
  'data-recommendation-id': recommendationId,
34
39
  },
35
40
  0,
package/model.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TagRecommendationQL = exports.Tag = exports.TagQL = exports.Provider = exports.ProviderQL = exports.Sync = exports.SyncQL = exports.Primitive = exports.PrimitiveFields = exports.PersonReferenceQL = exports.PersonReferenceFields = exports.ChangesQL = exports.ChangesInputQL = exports.ReferenceBlockQL = exports.ConnectedProviderQL = exports.CredentialQL = exports.ProviderRequestQL = exports.ProviderInfoQL = exports.DateEntityEntryQL = exports.EntityEntryQL = exports.EntityEntryFields = exports.RelationEntryQL = exports.ArgumentEntryQL = exports.EntityReferenceQL = exports.DocumentSentimentQL = exports.ReactionQL = exports.ReactionSkinToneQL = exports.SharingTenantQL = exports.SharingDomainQL = exports.SharingTagQL = exports.EditorQL = exports.EditorInputQL = exports.HighlightQL = exports.RelationType = exports.EntityType = exports.ProcessingStage = exports.MutationType = exports.MarkType = exports.DocumentType = exports.RecurrenceRFC = exports.TagRecommendationVariation = exports.TagRecommendationType = exports.InviteStatus = exports.SharingApproach = exports.StepStatus = exports.TaskStatus = exports.SharingLevel = exports.ClientType = exports.TagType = exports.BlockType = void 0;
4
- exports.FindTaskInputQL = exports.FindSyncInputQL = exports.FindProviderInputQL = exports.ArchiveNoteOutputQL = exports.ArchiveNoteInputQL = exports.FindNotesInputQL = exports.FindNoteInputQL = exports.UpsertNoteInputQL = exports.InsertNoteInputQL = exports.FindEventInputQL = exports.FindCalendarInputQL = exports.FindArticlesInputQL = exports.FindArticleInputQL = exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.Todo = exports.Calendar = exports.CalendarQL = exports.Event = exports.EventQL = exports.PersonAcceptanceQL = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.ConferenceQL = exports.ConferenceEntrypointQL = exports.TranscriptionQL = exports.TranscriptionEntryQL = exports.Task = exports.TaskQL = exports.Note = exports.NoteQL = exports.BusinessObject = exports.BusinessObjectQL = exports.BusinessObjectFields = exports.BlockProcessingResponse = exports.BlockProcessingRequest = exports.Block = exports.BlockFields = exports.Article = exports.ArticleQL = exports.Person = exports.Organization = exports.Domain = exports.Tenant = exports.TenantQL = void 0;
5
- exports.GraphQLTypes = exports.SearchInputQL = exports.ArchiveTaskOutputQL = exports.ArchiveTaskInputQL = exports.FindTasksInputQL = void 0;
3
+ exports.Tag = exports.TagQL = exports.TagFields = exports.Provider = exports.ProviderQL = exports.Sync = exports.SyncQL = exports.Primitive = exports.PrimitiveFields = exports.PersonReferenceQL = exports.PersonReferenceFields = exports.ChangesQL = exports.ChangesInputQL = exports.ReferenceBlockQL = exports.ConnectedProviderQL = exports.CredentialQL = exports.ProviderRequestQL = exports.ProviderInfoQL = exports.DateEntityEntryQL = exports.EntityEntryQL = exports.EntityEntryFields = exports.RelationEntryQL = exports.ArgumentEntryQL = exports.EntityReferenceQL = exports.DocumentSentimentQL = exports.ReactionQL = exports.ReactionSkinToneQL = exports.SharingTenantQL = exports.SharingDomainQL = exports.SharingTagQL = exports.EditorQL = exports.EditorInputQL = exports.HighlightQL = exports.RelationType = exports.EntityType = exports.ProcessingStage = exports.MutationType = exports.MarkType = exports.DocumentType = exports.RecurrenceRFC = exports.TagRecommendationVariation = exports.TagRecommendationType = exports.InviteStatus = exports.SharingApproach = exports.StepStatus = exports.TaskStatus = exports.SharingLevel = exports.ClientType = exports.TagType = exports.BlockType = void 0;
4
+ exports.UpsertTagInputQL = exports.FindSyncInputQL = exports.FindProviderInputQL = exports.ArchiveNoteOutputQL = exports.ArchiveNoteInputQL = exports.FindNotesInputQL = exports.FindNoteInputQL = exports.FindEventInputQL = exports.FindCalendarInputQL = exports.FindArticlesInputQL = exports.FindArticleInputQL = exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Website = exports.Thread = exports.Todo = exports.Calendar = exports.CalendarQL = exports.Event = exports.EventQL = exports.PersonAcceptanceQL = exports.ResponseStatus = exports.EventStatus = exports.Conference = exports.ConferenceQL = exports.ConferenceEntrypointQL = exports.TranscriptionQL = exports.TranscriptionEntryQL = exports.Task = exports.TaskQL = exports.TaskFields = exports.Note = exports.NoteQL = exports.BusinessObject = exports.BusinessObjectQL = exports.BusinessObjectFields = exports.BlockProcessingResponse = exports.BlockProcessingRequest = exports.Block = exports.BlockFields = exports.Article = exports.ArticleQL = exports.Person = exports.Organization = exports.Domain = exports.Tenant = exports.TenantQL = exports.TagRecommendationQL = void 0;
5
+ exports.GraphQLTypes = exports.SearchInputQL = exports.ArchiveTaskOutputQL = exports.ArchiveTaskInputQL = exports.FindTasksInputQL = exports.FindTaskInputQL = exports.ArchiveTagOutputQL = exports.ArchiveTagInputQL = exports.FindTagsInputQL = exports.FindTagInputQL = void 0;
6
6
  const uuid_1 = require("uuid");
7
7
  /*
8
8
  These are the core primitives of our model. These represent the entities that show
@@ -220,7 +220,7 @@ type SharingTag {
220
220
  exports.SharingDomainQL = `
221
221
  type SharingDomain {
222
222
  domainId: String!
223
- isArchived: Boolean!
223
+ archived: Boolean!
224
224
  sharingLevel: Int!
225
225
  }`;
226
226
  exports.SharingTenantQL = `
@@ -367,13 +367,21 @@ class Provider extends Primitive {
367
367
  }
368
368
  }
369
369
  exports.Provider = Provider;
370
- exports.TagQL = `
371
- type Tag {${exports.PrimitiveFields}
372
- alias: String!
370
+ exports.TagFields = `${exports.PrimitiveFields}
371
+ alias: String!
373
372
  friendlyName: String
374
373
  tagType: String!
375
- sharingDomains: [SharingDomain]
376
- sharingTenants: [SharingTenant]
374
+ sharingDomains: [SharingDomain]
375
+ sharingTenants: [SharingTenant]
376
+ url: String
377
+ favicon: String
378
+ dbpedia: String
379
+ email: String
380
+ avatar: String
381
+ inviteStatus: Int
382
+ tenantIdVerified: String`;
383
+ exports.TagQL = `
384
+ type Tag {${exports.TagFields}
377
385
  }`;
378
386
  class Tag extends Primitive {
379
387
  constructor(tenantIdCreated, alias, tagType) {
@@ -525,8 +533,7 @@ class Note extends Block {
525
533
  }
526
534
  }
527
535
  exports.Note = Note;
528
- exports.TaskQL = `
529
- type Task {${exports.BlockFields}
536
+ exports.TaskFields = `${exports.BlockFields}
530
537
  status: String!
531
538
  dueDate: Int!
532
539
  originNoteId: String!
@@ -535,6 +542,9 @@ type Task {${exports.BlockFields}
535
542
  recurrence: [String]
536
543
  parentId: String
537
544
  groupId: String
545
+ `;
546
+ exports.TaskQL = `
547
+ type Task {${exports.TaskFields}
538
548
  }`;
539
549
  class Task extends Block {
540
550
  constructor(tenantIdCreated, editors, sharingTags, version, originNoteId, dateDue) {
@@ -731,19 +741,6 @@ exports.FindEventInputQL = `
731
741
  input FindEventInput {
732
742
  _id: String!
733
743
  }`;
734
- exports.InsertNoteInputQL = `
735
- input InsertNoteInput {
736
- document: String!
737
- editor: EditorInput!
738
- changes: ChangesInput!
739
- }`;
740
- exports.UpsertNoteInputQL = `
741
- input UpsertNoteInput {
742
- _id: String
743
- document: String!
744
- editor: EditorInput!
745
- version: Float!
746
- }`;
747
744
  exports.FindNoteInputQL = `
748
745
  input FindNoteInput {
749
746
  _id: String!
@@ -771,6 +768,30 @@ exports.FindSyncInputQL = `
771
768
  input FindSyncInput {
772
769
  _id: String!
773
770
  }`;
771
+ exports.UpsertTagInputQL = `
772
+ input UpsertTagInput {${exports.TagFields}
773
+ }`;
774
+ exports.FindTagInputQL = `
775
+ input FindTagInput {
776
+ _id: String!
777
+ archived: Boolean
778
+ }`;
779
+ exports.FindTagsInputQL = `
780
+ input FindTagsInput {
781
+ alias: String
782
+ friendlyName: String
783
+ archived: Boolean
784
+ }`;
785
+ exports.ArchiveTagInputQL = `
786
+ input ArchiveTagInput {
787
+ _id: String!
788
+ archived: Boolean
789
+ }`;
790
+ exports.ArchiveTagOutputQL = `
791
+ type ArchiveTagOutput {
792
+ _id: String!
793
+ archived: Boolean
794
+ }`;
774
795
  exports.FindTaskInputQL = `
775
796
  input FindTaskInput {
776
797
  _id: String!
@@ -841,14 +862,17 @@ ${exports.FindArticleInputQL}
841
862
  ${exports.FindArticlesInputQL}
842
863
  ${exports.FindCalendarInputQL}
843
864
  ${exports.FindEventInputQL}
844
- ${exports.InsertNoteInputQL}
845
- ${exports.UpsertNoteInputQL}
846
865
  ${exports.FindNoteInputQL}
847
866
  ${exports.FindNotesInputQL}
848
867
  ${exports.ArchiveNoteInputQL}
849
868
  ${exports.ArchiveNoteOutputQL}
850
869
  ${exports.FindProviderInputQL}
851
870
  ${exports.FindSyncInputQL}
871
+ ${exports.UpsertTagInputQL}
872
+ ${exports.FindTagInputQL}
873
+ ${exports.FindTagInputQL}
874
+ ${exports.ArchiveTagInputQL}
875
+ ${exports.ArchiveTagOutputQL}
852
876
  ${exports.FindTaskInputQL}
853
877
  ${exports.FindTasksInputQL}
854
878
  ${exports.ArchiveTaskInputQL}
package/model.ts CHANGED
@@ -1389,32 +1389,6 @@ export interface FindEventInput {
1389
1389
  _id: string;
1390
1390
  }
1391
1391
 
1392
- export const InsertNoteInputQL = `
1393
- input InsertNoteInput {
1394
- document: String!
1395
- editor: EditorInput!
1396
- changes: ChangesInput!
1397
- }`;
1398
- export interface InsertNoteInput {
1399
- document: string;
1400
- editor: Editor;
1401
- changes: Changes;
1402
- }
1403
-
1404
- export const UpsertNoteInputQL = `
1405
- input UpsertNoteInput {
1406
- _id: String
1407
- document: String!
1408
- editor: EditorInput!
1409
- version: Float!
1410
- }`;
1411
- export interface UpsertNoteInput {
1412
- _id: string;
1413
- document: string;
1414
- editor: Editor;
1415
- version: number;
1416
- }
1417
-
1418
1392
  export const FindNoteInputQL = `
1419
1393
  input FindNoteInput {
1420
1394
  _id: String!
@@ -1514,11 +1488,6 @@ export interface ArchiveTagOutput {
1514
1488
  archive?: boolean;
1515
1489
  }
1516
1490
 
1517
- export const UpsertTaskInputQL = `
1518
- input UpsertTaskInput {${TaskFields}
1519
- }`;
1520
- export interface UpsertTaskInput extends Task {}
1521
-
1522
1491
  export const FindTaskInputQL = `
1523
1492
  input FindTaskInput {
1524
1493
  _id: String!
@@ -1615,14 +1584,17 @@ ${FindArticleInputQL}
1615
1584
  ${FindArticlesInputQL}
1616
1585
  ${FindCalendarInputQL}
1617
1586
  ${FindEventInputQL}
1618
- ${InsertNoteInputQL}
1619
- ${UpsertNoteInputQL}
1620
1587
  ${FindNoteInputQL}
1621
1588
  ${FindNotesInputQL}
1622
1589
  ${ArchiveNoteInputQL}
1623
1590
  ${ArchiveNoteOutputQL}
1624
1591
  ${FindProviderInputQL}
1625
1592
  ${FindSyncInputQL}
1593
+ ${UpsertTagInputQL}
1594
+ ${FindTagInputQL}
1595
+ ${FindTagInputQL}
1596
+ ${ArchiveTagInputQL}
1597
+ ${ArchiveTagOutputQL}
1626
1598
  ${FindTaskInputQL}
1627
1599
  ${FindTasksInputQL}
1628
1600
  ${ArchiveTaskInputQL}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "3.4.1",
4
+ "version": "3.5.0",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",