@bigfootai/bigfoot-types 5.4.290 → 5.4.292

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 (47) hide show
  1. package/dist/execute-query.d.ts +9 -0
  2. package/dist/execute-query.d.ts.map +1 -1
  3. package/dist/execute-query.js.map +1 -1
  4. package/dist/metadata/providers/clickhouse.d.ts +4 -0
  5. package/dist/metadata/providers/clickhouse.d.ts.map +1 -0
  6. package/dist/metadata/providers/clickhouse.js +45 -0
  7. package/dist/metadata/providers/clickhouse.js.map +1 -0
  8. package/dist/metadata/providers/freshdesk.d.ts +4 -0
  9. package/dist/metadata/providers/freshdesk.d.ts.map +1 -0
  10. package/dist/metadata/providers/freshdesk.js +133 -0
  11. package/dist/metadata/providers/freshdesk.js.map +1 -0
  12. package/dist/metadata/providers/generate.js +22 -21
  13. package/dist/metadata/providers/generate.js.map +1 -1
  14. package/dist/metadata/providers/hubspot.d.ts.map +1 -1
  15. package/dist/metadata/providers/hubspot.js +77 -8
  16. package/dist/metadata/providers/hubspot.js.map +1 -1
  17. package/dist/metadata/providers/index.d.ts +4 -1
  18. package/dist/metadata/providers/index.d.ts.map +1 -1
  19. package/dist/metadata/providers/index.js +4 -1
  20. package/dist/metadata/providers/index.js.map +1 -1
  21. package/dist/metadata/providers/intercom.d.ts +4 -0
  22. package/dist/metadata/providers/intercom.d.ts.map +1 -0
  23. package/dist/metadata/providers/intercom.js +103 -0
  24. package/dist/metadata/providers/intercom.js.map +1 -0
  25. package/dist/metadata/providers/powerbi.d.ts +4 -0
  26. package/dist/metadata/providers/powerbi.d.ts.map +1 -0
  27. package/dist/metadata/providers/powerbi.js +45 -0
  28. package/dist/metadata/providers/powerbi.js.map +1 -0
  29. package/dist/recommendation.d.ts +1 -0
  30. package/dist/recommendation.d.ts.map +1 -1
  31. package/dist/recommendation.js +1 -0
  32. package/dist/recommendation.js.map +1 -1
  33. package/dist/types.d.ts +3 -1
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/types.js +3 -0
  36. package/dist/types.js.map +1 -1
  37. package/package.json +2 -2
  38. package/src/execute-query.ts +9 -0
  39. package/src/metadata/providers/clickhouse.ts +47 -0
  40. package/src/metadata/providers/freshdesk.ts +136 -0
  41. package/src/metadata/providers/generate.ts +21 -21
  42. package/src/metadata/providers/hubspot.ts +78 -8
  43. package/src/metadata/providers/index.ts +4 -1
  44. package/src/metadata/providers/intercom.ts +106 -0
  45. package/src/metadata/providers/powerbi.ts +47 -0
  46. package/src/recommendation.ts +1 -0
  47. package/src/types.ts +4 -0
@@ -0,0 +1,136 @@
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 TicketQuery: QueryMetadata = {
9
+ label: 'Ticket',
10
+ description: 'Search for tickets in Freshdesk',
11
+ metadataType: 'ticket',
12
+ searchFields: [
13
+ {
14
+ field: {
15
+ label: 'Status',
16
+ name: 'status',
17
+ description: 'The status of the ticket',
18
+ fieldType: FieldType.Select,
19
+ readOnly: true,
20
+ visible: true,
21
+ source: 'system',
22
+ options: [
23
+ { label: 'Open', value: '2' },
24
+ { label: 'Pending', value: '3' },
25
+ { label: 'Resolved', value: '4' },
26
+ { label: 'Closed', value: '5' },
27
+ ],
28
+ },
29
+ operators: [SearchOperator.Equals],
30
+ },
31
+ {
32
+ field: {
33
+ label: 'Priority',
34
+ name: 'priority',
35
+ description: 'The priority of the ticket',
36
+ fieldType: FieldType.Select,
37
+ readOnly: true,
38
+ visible: true,
39
+ source: 'system',
40
+ options: [
41
+ { label: 'Low', value: '1' },
42
+ { label: 'Medium', value: '2' },
43
+ { label: 'High', value: '3' },
44
+ { label: 'Urgent', value: '4' },
45
+ ],
46
+ },
47
+ operators: [SearchOperator.Equals],
48
+ },
49
+ {
50
+ field: {
51
+ label: 'Tag',
52
+ name: 'tag',
53
+ description: 'A tag applied to the ticket',
54
+ fieldType: FieldType.Text,
55
+ readOnly: true,
56
+ visible: true,
57
+ source: 'system',
58
+ },
59
+ operators: [SearchOperator.Equals],
60
+ },
61
+ {
62
+ field: {
63
+ label: 'Created At',
64
+ name: 'created_at',
65
+ description: 'When the ticket was created',
66
+ fieldType: FieldType.Text,
67
+ fieldVariation: FieldVariation.Date,
68
+ readOnly: true,
69
+ visible: true,
70
+ source: 'system',
71
+ },
72
+ operators: [SearchOperator.Gte, SearchOperator.Lte, SearchOperator.Between],
73
+ },
74
+ ],
75
+ };
76
+
77
+ export const FreshdeskSupport: ProviderApplication = {
78
+ name: 'support',
79
+ sobjects: {
80
+ calendar: false,
81
+ transcription: false,
82
+ message: false,
83
+ email: false,
84
+ table: true,
85
+ function: false,
86
+ },
87
+ linkSubscriptions: ['*.freshdesk.com'],
88
+ // Agent-portal URLs: https://<sub>.freshdesk.com/a/{tickets|contacts|companies}/{id}
89
+ linkToExternalIdRegex: '/a/(?:tickets|contacts|companies)/(\\d+)',
90
+ tableSubscriptions: ['ticket'],
91
+ queryTypeSubscriptions: [TicketQuery.metadataType],
92
+ description: "Add Ticket previews and monitor changes over time so you're always up-to-date.",
93
+ iconUrl: 'https://connect-freshdesk-dev.getnoded.ai/images/logo.png',
94
+ label: 'Freshdesk Support',
95
+ authentication: true,
96
+ externalStorage: true,
97
+ externalInsights: false,
98
+ externalIds: [
99
+ {
100
+ label: 'Company',
101
+ blockType: BlockType.Record,
102
+ tagType: TagType.Topic,
103
+ tagSubType: 'organization',
104
+ metadataType: 'company',
105
+ },
106
+ {
107
+ label: 'Requester',
108
+ blockType: BlockType.Record,
109
+ tagType: TagType.Person,
110
+ tagSubType: 'contact',
111
+ metadataType: 'contact',
112
+ },
113
+ {
114
+ label: 'Agent',
115
+ blockType: BlockType.Record,
116
+ tagType: TagType.Person,
117
+ tagSubType: 'user',
118
+ metadataType: 'agent',
119
+ },
120
+ ],
121
+ };
122
+
123
+ export const Freshdesk: Provider = {
124
+ _id: 'e248e537ab81831ae8563aa6',
125
+ archived: false,
126
+ dateCreated: 0,
127
+ dateUpdated: 0,
128
+ name: 'freshdesk',
129
+ description: 'Freshdesk automation for Noded',
130
+ instanceUrl: 'https://connect-freshdesk-dev.getnoded.ai',
131
+ applications: [FreshdeskSupport],
132
+ label: 'Freshdesk',
133
+ iconUrl: 'https://connect-freshdesk-dev.getnoded.ai/images/logo.png',
134
+ promptMetadata: [],
135
+ queryMetadata: [TicketQuery],
136
+ };
@@ -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
+ };
@@ -40,6 +40,7 @@ export enum RecommendationType {
40
40
  Message = 'message',
41
41
  Notification = 'notification',
42
42
  OnboardingComplete = 'onboarding_complete',
43
+ OnboardingStarted = 'onboarding_started',
43
44
  PriorityTasks = 'priority_tasks',
44
45
  Reaction = 'reaction',
45
46
  Share = 'share',
package/src/types.ts CHANGED
@@ -322,6 +322,7 @@ export enum RecommendationType {
322
322
  Message = 'message',
323
323
  Notification = 'notification',
324
324
  OnboardingComplete = 'onboarding_complete',
325
+ OnboardingStarted = 'onboarding_started',
325
326
  PriorityTasks = 'priority_tasks',
326
327
  Reaction = 'reaction',
327
328
  Share = 'share',
@@ -2410,9 +2411,11 @@ export interface FindSearchInput {
2410
2411
  export const FindSearchesInputQL = `
2411
2412
  input FindSearchesInput {
2412
2413
  ${PaginatedInputFieldsQL}
2414
+ _ids: [String]
2413
2415
  archived: Boolean! = false
2414
2416
  }`;
2415
2417
  export interface FindSearchesInput extends PaginatedInput {
2418
+ _ids?: string[];
2416
2419
  archived: boolean;
2417
2420
  }
2418
2421
 
@@ -2606,6 +2609,7 @@ enum RecommendationType {
2606
2609
  ${RecommendationType.Share.toUpperCase()}
2607
2610
  ${RecommendationType.Upsert.toUpperCase()}
2608
2611
  ${RecommendationType.Notification.toUpperCase()}
2612
+ ${RecommendationType.OnboardingStarted.toUpperCase()}
2609
2613
  ${RecommendationType.OnboardingComplete.toUpperCase()}
2610
2614
  ${RecommendationType.Ingestion.toUpperCase()}
2611
2615
  ${RecommendationType.SyncPaused.toUpperCase()}