@@ -20,6 +20,16 @@ import {
20
20
updateGoogleDriveConnector ,
21
21
} from "@connectors/connectors/google_drive" ;
22
22
import { launchGoogleDriveFullSyncWorkflow } from "@connectors/connectors/google_drive/temporal/client" ;
23
+ import {
24
+ cleanupIntercomConnector ,
25
+ createIntercomConnector ,
26
+ fullResyncIntercomConnector ,
27
+ resumeIntercomConnector ,
28
+ retrieveIntercomConnectorPermissions ,
29
+ retrieveIntercomResourcesTitles ,
30
+ stopIntercomConnector ,
31
+ updateIntercomConnector ,
32
+ } from "@connectors/connectors/intercom" ;
23
33
import {
24
34
BotEnabledGetter ,
25
35
BotToggler ,
@@ -73,6 +83,7 @@ export const CREATE_CONNECTOR_BY_TYPE: Record<
73
83
notion : createNotionConnector ,
74
84
github : createGithubConnector ,
75
85
google_drive : createGoogleDriveConnector ,
86
+ intercom : createIntercomConnector ,
76
87
} ;
77
88
78
89
export const UPDATE_CONNECTOR_BY_TYPE : Record <
@@ -83,6 +94,7 @@ export const UPDATE_CONNECTOR_BY_TYPE: Record<
83
94
notion : updateNotionConnector ,
84
95
github : updateGithubConnector ,
85
96
google_drive : updateGoogleDriveConnector ,
97
+ intercom : updateIntercomConnector ,
86
98
} ;
87
99
88
100
export const STOP_CONNECTOR_BY_TYPE : Record <
@@ -99,6 +111,7 @@ export const STOP_CONNECTOR_BY_TYPE: Record<
99
111
logger . info ( { connectorId } , `Stopping Google Drive connector is a no-op.` ) ;
100
112
return new Ok ( connectorId ) ;
101
113
} ,
114
+ intercom : stopIntercomConnector ,
102
115
} ;
103
116
104
117
export const DELETE_CONNECTOR_BY_TYPE : Record <
@@ -109,6 +122,7 @@ export const DELETE_CONNECTOR_BY_TYPE: Record<
109
122
notion : cleanupNotionConnector ,
110
123
github : cleanupGithubConnector ,
111
124
google_drive : cleanupGoogleDriveConnector ,
125
+ intercom : cleanupIntercomConnector ,
112
126
} ;
113
127
114
128
export const RESUME_CONNECTOR_BY_TYPE : Record <
@@ -124,6 +138,7 @@ export const RESUME_CONNECTOR_BY_TYPE: Record<
124
138
google_drive : async ( connectorId : string ) => {
125
139
throw new Error ( `Not implemented ${ connectorId } ` ) ;
126
140
} ,
141
+ intercom : resumeIntercomConnector ,
127
142
} ;
128
143
129
144
const toggleBotNotImplemented = async (
@@ -139,6 +154,7 @@ export const TOGGLE_BOT_BY_TYPE: Record<ConnectorProvider, BotToggler> = {
139
154
notion : toggleBotNotImplemented ,
140
155
github : toggleBotNotImplemented ,
141
156
google_drive : toggleBotNotImplemented ,
157
+ intercom : toggleBotNotImplemented ,
142
158
} ;
143
159
144
160
const getBotEnabledNotImplemented = async (
@@ -159,6 +175,7 @@ export const GET_BOT_ENABLED_BY_TYPE: Record<
159
175
notion : getBotEnabledNotImplemented ,
160
176
github : getBotEnabledNotImplemented ,
161
177
google_drive : getBotEnabledNotImplemented ,
178
+ intercom : getBotEnabledNotImplemented ,
162
179
} ;
163
180
164
181
export const SYNC_CONNECTOR_BY_TYPE : Record < ConnectorProvider , SyncConnector > =
@@ -167,6 +184,7 @@ export const SYNC_CONNECTOR_BY_TYPE: Record<ConnectorProvider, SyncConnector> =
167
184
notion : fullResyncNotionConnector ,
168
185
github : fullResyncGithubConnector ,
169
186
google_drive : launchGoogleDriveFullSyncWorkflow ,
187
+ intercom : fullResyncIntercomConnector ,
170
188
} ;
171
189
172
190
export const RETRIEVE_CONNECTOR_PERMISSIONS_BY_TYPE : Record <
@@ -177,6 +195,7 @@ export const RETRIEVE_CONNECTOR_PERMISSIONS_BY_TYPE: Record<
177
195
github : retrieveGithubConnectorPermissions ,
178
196
notion : retrieveNotionConnectorPermissions ,
179
197
google_drive : retrieveGoogleDriveConnectorPermissions ,
198
+ intercom : retrieveIntercomConnectorPermissions ,
180
199
} ;
181
200
182
201
export const SET_CONNECTOR_PERMISSIONS_BY_TYPE : Record <
@@ -195,6 +214,13 @@ export const SET_CONNECTOR_PERMISSIONS_BY_TYPE: Record<
195
214
) ;
196
215
} ,
197
216
google_drive : setGoogleDriveConnectorPermissions ,
217
+ intercom : async ( ) => {
218
+ return new Err (
219
+ new Error (
220
+ `Setting Intercom connector permissions is not implemented yet.`
221
+ )
222
+ ) ;
223
+ } ,
198
224
} ;
199
225
200
226
export const BATCH_RETRIEVE_RESOURCE_TITLE_BY_TYPE : Record <
@@ -205,6 +231,7 @@ export const BATCH_RETRIEVE_RESOURCE_TITLE_BY_TYPE: Record<
205
231
notion : retrieveNotionResourcesTitles ,
206
232
github : retrieveGithubReposTitles ,
207
233
google_drive : retrieveGoogleDriveObjectsTitles ,
234
+ intercom : retrieveIntercomResourcesTitles ,
208
235
} ;
209
236
210
237
export const RETRIEVE_RESOURCE_PARENTS_BY_TYPE : Record <
@@ -215,6 +242,7 @@ export const RETRIEVE_RESOURCE_PARENTS_BY_TYPE: Record<
215
242
google_drive : retrieveGoogleDriveObjectsParents ,
216
243
slack : async ( ) => new Ok ( [ ] ) , // Slack is flat
217
244
github : async ( ) => new Ok ( [ ] ) , // Github is flat,
245
+ intercom : async ( ) => new Ok ( [ ] ) , // Intercom is not truly flat as we can put articles & collections inside collections but will handle this later
218
246
} ;
219
247
220
248
export const SET_CONNECTOR_CONFIG_BY_TYPE : Record <
@@ -231,6 +259,9 @@ export const SET_CONNECTOR_CONFIG_BY_TYPE: Record<
231
259
throw new Error ( "Not implemented" ) ;
232
260
} ,
233
261
google_drive : setGoogleDriveConfig ,
262
+ intercom : async ( ) => {
263
+ throw new Error ( "Not implemented" ) ;
264
+ } ,
234
265
} ;
235
266
236
267
export const GET_CONNECTOR_CONFIG_BY_TYPE : Record <
@@ -247,4 +278,7 @@ export const GET_CONNECTOR_CONFIG_BY_TYPE: Record<
247
278
throw new Error ( "Not implemented" ) ;
248
279
} ,
249
280
google_drive : getGoogleDriveConfig ,
281
+ intercom : async ( ) => {
282
+ throw new Error ( "Not implemented" ) ;
283
+ } ,
250
284
} ;
0 commit comments