@bigfootai/bigfoot-types 5.4.290 → 5.4.291

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 (41) hide show
  1. package/dist/metadata/providers/clickhouse.d.ts +4 -0
  2. package/dist/metadata/providers/clickhouse.d.ts.map +1 -0
  3. package/dist/metadata/providers/clickhouse.js +45 -0
  4. package/dist/metadata/providers/clickhouse.js.map +1 -0
  5. package/dist/metadata/providers/freshdesk.d.ts +4 -0
  6. package/dist/metadata/providers/freshdesk.d.ts.map +1 -0
  7. package/dist/metadata/providers/freshdesk.js +133 -0
  8. package/dist/metadata/providers/freshdesk.js.map +1 -0
  9. package/dist/metadata/providers/generate.js +22 -21
  10. package/dist/metadata/providers/generate.js.map +1 -1
  11. package/dist/metadata/providers/hubspot.d.ts.map +1 -1
  12. package/dist/metadata/providers/hubspot.js +77 -8
  13. package/dist/metadata/providers/hubspot.js.map +1 -1
  14. package/dist/metadata/providers/index.d.ts +4 -1
  15. package/dist/metadata/providers/index.d.ts.map +1 -1
  16. package/dist/metadata/providers/index.js +4 -1
  17. package/dist/metadata/providers/index.js.map +1 -1
  18. package/dist/metadata/providers/intercom.d.ts +4 -0
  19. package/dist/metadata/providers/intercom.d.ts.map +1 -0
  20. package/dist/metadata/providers/intercom.js +103 -0
  21. package/dist/metadata/providers/intercom.js.map +1 -0
  22. package/dist/metadata/providers/powerbi.d.ts +4 -0
  23. package/dist/metadata/providers/powerbi.d.ts.map +1 -0
  24. package/dist/metadata/providers/powerbi.js +45 -0
  25. package/dist/metadata/providers/powerbi.js.map +1 -0
  26. package/dist/navigation.d.ts +2 -0
  27. package/dist/navigation.d.ts.map +1 -1
  28. package/dist/types.d.ts +2 -1
  29. package/dist/types.d.ts.map +1 -1
  30. package/dist/types.js +1 -0
  31. package/dist/types.js.map +1 -1
  32. package/package.json +2 -2
  33. package/src/metadata/providers/clickhouse.ts +47 -0
  34. package/src/metadata/providers/freshdesk.ts +136 -0
  35. package/src/metadata/providers/generate.ts +21 -21
  36. package/src/metadata/providers/hubspot.ts +78 -8
  37. package/src/metadata/providers/index.ts +4 -1
  38. package/src/metadata/providers/intercom.ts +106 -0
  39. package/src/metadata/providers/powerbi.ts +47 -0
  40. package/src/navigation.ts +2 -0
  41. package/src/types.ts +2 -0
@@ -1,22 +1,22 @@
1
- // import * as fs from 'node:fs';
2
- // import { G2 } from './g2.js';
3
- // import { Gong } from './gong.js';
4
- // import { Zoom } from './zoom.js';
5
- // import { Google } from './google.js';
6
- // import { HubSpot } from './hubspot.js';
7
- // import { Linear } from './linear.js';
8
- // import { Noded } from './noded.js';
9
- // import { Salesforce } from './salesforce.js';
10
- // import { Slack } from './slack.js';
1
+ /*import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import type { Provider } from '../../provider.js';
4
+ import { ClickHouse } from './clickhouse.js';
5
+ import { Freshdesk } from './freshdesk.js';
6
+ import { HubSpot } from './hubspot.js';
7
+ import { Intercom } from './intercom.js';
8
+ import { PowerBI } from './powerbi.js';
11
9
 
12
- // export const generateProviders = () => {
13
- // fs.writeFileSync('g2.json', JSON.stringify(G2, null, 2));
14
- // fs.writeFileSync('gong.json', JSON.stringify(Gong, null, 2));
15
- // fs.writeFileSync('zoom.json', JSON.stringify(Zoom, null, 2));
16
- // fs.writeFileSync('google.json', JSON.stringify(Google, null, 2));
17
- // fs.writeFileSync('hubspot.json', JSON.stringify(HubSpot, null, 2));
18
- // fs.writeFileSync('linear.json', JSON.stringify(Linear, null, 2));
19
- // fs.writeFileSync('noded.json', JSON.stringify(Noded, null, 2));
20
- // fs.writeFileSync('salesforce.json', JSON.stringify(Salesforce, null, 2));
21
- // fs.writeFileSync('stack.json', JSON.stringify(Slack, null, 2));
22
- // };
10
+ const providers: Provider[] = [ClickHouse, Freshdesk, HubSpot, Intercom, PowerBI];
11
+
12
+ export const generateProviders = (outDir: string = import.meta.dirname) => {
13
+ for (const provider of providers) {
14
+ fs.writeFileSync(path.join(outDir, `${provider.name}.json`), JSON.stringify(provider, null, 2));
15
+ }
16
+ };
17
+
18
+ // Run directly: `tsx generate.ts` to (re)generate the provider JSON files.
19
+ if (process.argv[1] === import.meta.filename) {
20
+ generateProviders();
21
+ }
22
+ */
@@ -1,8 +1,72 @@
1
1
  import { BlockType } from '../../block-type.js';
2
2
  import { ORGANIZATION } from '../../constants.js';
3
+ import { FieldType } from '../../field-type.js';
4
+ import { FieldVariation } from '../../field-variation.js';
3
5
  import type { Provider, ProviderApplication } from '../../provider.js';
6
+ import { type QueryMetadata, SearchOperator } from '../../query-metadata.js';
4
7
  import { TagType } from '../../tag-type.js';
5
8
 
9
+ const CompanyQuery: QueryMetadata = {
10
+ label: 'Company',
11
+ description: 'Search for companies in HubSpot CRM',
12
+ metadataType: 'companies',
13
+ searchFields: [
14
+ {
15
+ field: {
16
+ label: 'Company Name',
17
+ name: 'name',
18
+ description: 'The name of the company',
19
+ fieldType: FieldType.Text,
20
+ fieldVariation: null,
21
+ readOnly: true,
22
+ visible: true,
23
+ source: 'system',
24
+ },
25
+ defaultFor: 'name',
26
+ operators: [SearchOperator.Equals, SearchOperator.Contains, SearchOperator.StartsWith],
27
+ },
28
+ {
29
+ field: {
30
+ label: 'Domain',
31
+ name: 'domain',
32
+ description: 'The primary domain of the company',
33
+ fieldType: FieldType.Text,
34
+ fieldVariation: FieldVariation.Url,
35
+ readOnly: true,
36
+ visible: true,
37
+ source: 'system',
38
+ },
39
+ defaultFor: 'url',
40
+ operators: [SearchOperator.Equals, SearchOperator.Contains, SearchOperator.StartsWith],
41
+ },
42
+ {
43
+ field: {
44
+ label: 'Phone',
45
+ name: 'phone',
46
+ description: 'The primary phone number of the company',
47
+ fieldType: FieldType.Text,
48
+ fieldVariation: FieldVariation.Phone,
49
+ readOnly: true,
50
+ visible: true,
51
+ source: 'system',
52
+ },
53
+ operators: [SearchOperator.Equals, SearchOperator.Contains],
54
+ },
55
+ {
56
+ field: {
57
+ label: 'Industry',
58
+ name: 'industry',
59
+ description: 'The industry the company belongs to',
60
+ fieldType: FieldType.Select,
61
+ readOnly: true,
62
+ visible: true,
63
+ source: 'system',
64
+ },
65
+ operators: [SearchOperator.Equals],
66
+ },
67
+ ],
68
+ };
69
+
6
70
  export const HubSpotCrm: ProviderApplication = {
7
71
  name: 'crm',
8
72
  sobjects: {
@@ -15,35 +79,40 @@ export const HubSpotCrm: ProviderApplication = {
15
79
  },
16
80
  // CRM record pages only (universal /record/ route covers Contacts, Companies, Deals, and custom objects). Reports, settings, marketing surfaces fall through to website ingestion.
17
81
  linkSubscriptions: ['^https://app\\.hubspot\\.com/contacts/\\d+/record/'],
18
- linkToExternalIdRegex: '/(d+)$/',
19
- tableSubscriptions: ['noded.opportunity', 'noded.case'],
82
+ // Record id is the trailing numeric path segment: .../record/{objectTypeId}/{recordId}
83
+ linkToExternalIdRegex: '(?<=/record/[\\w-]+/)\\d+',
84
+ tableSubscriptions: ['noded.opportunity', 'noded.case', 'companies', 'contacts', 'deals', 'tickets'],
85
+ queryTypeSubscriptions: [CompanyQuery.metadataType],
20
86
  description: "Add Ticket and Deal previews and monitor changes over time so you're always up-to-date.",
21
87
  iconUrl: 'https://cdn.icon-icons.com/icons2/2699/PNG/512/hubspot_logo_icon_170009.png',
22
88
  label: 'HubSpot CRM',
23
89
  authentication: true,
24
90
  externalStorage: true,
25
- externalInsights: false,
91
+ externalInsights: true,
26
92
  externalIds: [
27
93
  {
28
- label: 'Account',
94
+ label: 'Company',
29
95
  blockType: BlockType.Record,
30
96
  tagType: TagType.Topic,
31
97
  tagSubType: ORGANIZATION,
32
- metadataType: 'account',
98
+ metadataType: 'companies',
99
+ requireExternalId: true,
33
100
  },
34
101
  {
35
102
  label: 'Contact',
36
103
  blockType: BlockType.Record,
37
104
  tagType: TagType.Person,
38
105
  tagSubType: 'contact',
39
- metadataType: 'contact',
106
+ metadataType: 'contacts',
107
+ requireExternalId: true,
40
108
  },
41
109
  {
42
- label: 'User',
110
+ label: 'Owner',
43
111
  blockType: BlockType.Record,
44
112
  tagType: TagType.Person,
45
113
  tagSubType: 'user',
46
- metadataType: 'user',
114
+ metadataType: 'owners',
115
+ requireExternalId: true,
47
116
  },
48
117
  ],
49
118
  };
@@ -60,4 +129,5 @@ export const HubSpot: Provider = {
60
129
  label: 'HubSpot',
61
130
  iconUrl: 'https://cdn.icon-icons.com/icons2/2699/PNG/512/hubspot_logo_icon_170009.png',
62
131
  promptMetadata: [],
132
+ queryMetadata: [CompanyQuery],
63
133
  };
@@ -1,16 +1,19 @@
1
1
  export * from './atlassian.js';
2
+ export * from './clickhouse.js';
2
3
  export * from './databricks.js';
3
4
  export * from './fathom.js';
5
+ export * from './freshdesk.js';
4
6
  export * from './g2.js';
5
- export * from './generate.js';
6
7
  export * from './gong.js';
7
8
  export * from './google.js';
8
9
  export * from './granola.js';
9
10
  export * from './hubspot.js';
11
+ export * from './intercom.js';
10
12
  export * from './linear.js';
11
13
  export * from './linkedin.js';
12
14
  export * from './microsoft.js';
13
15
  export * from './noded.js';
16
+ export * from './powerbi.js';
14
17
  export * from './salesforce.js';
15
18
  export * from './slack.js';
16
19
  export * from './zendesk.js';
@@ -0,0 +1,106 @@
1
+ import { BlockType } from '../../block-type.js';
2
+ import { FieldType } from '../../field-type.js';
3
+ import { FieldVariation } from '../../field-variation.js';
4
+ import type { Provider, ProviderApplication } from '../../provider.js';
5
+ import { type QueryMetadata, SearchOperator } from '../../query-metadata.js';
6
+ import { TagType } from '../../tag-type.js';
7
+
8
+ const ContactQuery: QueryMetadata = {
9
+ label: 'Contact',
10
+ description: 'Search for contacts (users and leads) in Intercom',
11
+ metadataType: 'contact',
12
+ searchFields: [
13
+ {
14
+ field: {
15
+ label: 'Name',
16
+ name: 'name',
17
+ description: 'The name of the contact',
18
+ fieldType: FieldType.Text,
19
+ readOnly: true,
20
+ visible: true,
21
+ source: 'system',
22
+ },
23
+ operators: [SearchOperator.Equals, SearchOperator.Contains, SearchOperator.StartsWith],
24
+ },
25
+ {
26
+ field: {
27
+ label: 'Email',
28
+ name: 'email',
29
+ description: 'The email address of the contact',
30
+ fieldType: FieldType.Text,
31
+ fieldVariation: FieldVariation.Email,
32
+ readOnly: true,
33
+ visible: true,
34
+ source: 'system',
35
+ },
36
+ operators: [SearchOperator.Equals, SearchOperator.Contains],
37
+ },
38
+ {
39
+ field: {
40
+ label: 'Created At',
41
+ name: 'created_at',
42
+ description: 'When the contact was created',
43
+ fieldType: FieldType.Text,
44
+ fieldVariation: FieldVariation.Date,
45
+ readOnly: true,
46
+ visible: true,
47
+ source: 'system',
48
+ },
49
+ operators: [SearchOperator.Gte, SearchOperator.Lte, SearchOperator.Between],
50
+ },
51
+ ],
52
+ };
53
+
54
+ export const IntercomSupport: ProviderApplication = {
55
+ name: 'support',
56
+ sobjects: {
57
+ calendar: false,
58
+ transcription: false,
59
+ message: false,
60
+ email: false,
61
+ table: true,
62
+ function: false,
63
+ },
64
+ linkSubscriptions: ['*.intercom.com'],
65
+ // App URLs: https://app.intercom.com/a/apps/<workspace>/{inbox/conversation|users|companies}/<id>
66
+ linkToExternalIdRegex: '/(?:conversation|users|companies)/([a-f0-9]+)',
67
+ tableSubscriptions: ['conversation'],
68
+ queryTypeSubscriptions: [ContactQuery.metadataType],
69
+ description: "Add Conversation previews and monitor changes over time so you're always up-to-date.",
70
+ iconUrl: 'https://connect-intercom-dev.getnoded.ai/images/logo.png',
71
+ label: 'Intercom Support',
72
+ authentication: true,
73
+ externalStorage: true,
74
+ externalInsights: false,
75
+ externalIds: [
76
+ {
77
+ label: 'Company',
78
+ blockType: BlockType.Record,
79
+ tagType: TagType.Topic,
80
+ tagSubType: 'organization',
81
+ metadataType: 'company',
82
+ },
83
+ {
84
+ label: 'Contact',
85
+ blockType: BlockType.Record,
86
+ tagType: TagType.Person,
87
+ tagSubType: 'contact',
88
+ metadataType: 'contact',
89
+ },
90
+ ],
91
+ };
92
+
93
+ export const Intercom: Provider = {
94
+ _id: '6a4d13ca7864df33248d993a',
95
+ archived: false,
96
+ dateCreated: 0,
97
+ dateUpdated: 0,
98
+ name: 'intercom',
99
+ description: 'Intercom automation for Noded',
100
+ instanceUrl: 'https://connect-intercom-dev.getnoded.ai',
101
+ applications: [IntercomSupport],
102
+ label: 'Intercom',
103
+ iconUrl: 'https://connect-intercom-dev.getnoded.ai/images/logo.png',
104
+ promptMetadata: [],
105
+ queryMetadata: [ContactQuery],
106
+ };
@@ -0,0 +1,47 @@
1
+ import { BlockType } from '../../block-type.js';
2
+ import { ORGANIZATION } from '../../constants.js';
3
+ import type { Provider, ProviderApplication } from '../../provider.js';
4
+ import { TagType } from '../../tag-type.js';
5
+
6
+ export const PowerBIAnalytics: ProviderApplication = {
7
+ name: 'analytics',
8
+ sobjects: {
9
+ calendar: false,
10
+ transcription: false,
11
+ message: false,
12
+ email: false,
13
+ table: true,
14
+ function: false,
15
+ },
16
+ description: 'Query Power BI semantic models to surface insights directly in Noded.',
17
+ iconUrl: 'https://connect-powerbi-dev.getnoded.ai/images/logo.svg',
18
+ label: 'Power BI Analytics',
19
+ authentication: true,
20
+ externalStorage: false,
21
+ externalInsights: true,
22
+ externalIds: [
23
+ {
24
+ label: 'Account',
25
+ blockType: BlockType.Record,
26
+ tagType: TagType.Topic,
27
+ metadataType: 'account',
28
+ tagSubType: ORGANIZATION,
29
+ requireExternalId: true,
30
+ },
31
+ ],
32
+ };
33
+
34
+ export const PowerBI: Provider = {
35
+ _id: '4b06b68fccd5edd7193f6397',
36
+ archived: false,
37
+ dateCreated: 0,
38
+ dateUpdated: 0,
39
+ name: 'powerbi',
40
+ description: 'Power BI integration for Noded',
41
+ instanceUrl: 'https://connect-powerbi-dev.getnoded.ai',
42
+ applications: [PowerBIAnalytics],
43
+ label: 'Power BI',
44
+ iconUrl: 'https://connect-powerbi-dev.getnoded.ai/images/logo.svg',
45
+ promptMetadata: [],
46
+ tableMetadata: [],
47
+ };
package/src/navigation.ts CHANGED
@@ -59,11 +59,13 @@ union NavigationEntry = NavigationTagEntry | NavigationFolderEntry
59
59
  `;
60
60
 
61
61
  export interface NavigationTagEntry {
62
+ __typename: 'NavigationTagEntry';
62
63
  order: number;
63
64
  tag: Tag;
64
65
  }
65
66
 
66
67
  export interface NavigationFolderEntry {
68
+ __typename: 'NavigationFolderEntry';
67
69
  children: NavigationTagEntry[];
68
70
  folder: Folder;
69
71
  order: number;
package/src/types.ts CHANGED
@@ -2410,9 +2410,11 @@ export interface FindSearchInput {
2410
2410
  export const FindSearchesInputQL = `
2411
2411
  input FindSearchesInput {
2412
2412
  ${PaginatedInputFieldsQL}
2413
+ _ids: [String]
2413
2414
  archived: Boolean! = false
2414
2415
  }`;
2415
2416
  export interface FindSearchesInput extends PaginatedInput {
2417
+ _ids?: string[];
2416
2418
  archived: boolean;
2417
2419
  }
2418
2420