@@ -8,12 +8,14 @@ import { Err, Ok } from "@dust-tt/types";
8
8
import {
9
9
cleanupConfluenceConnector ,
10
10
createConfluenceConnector ,
11
+ pauseConfluenceConnector ,
11
12
resumeConfluenceConnector ,
12
13
retrieveConfluenceConnectorPermissions ,
13
14
retrieveConfluenceContentNodeParents ,
14
15
retrieveConfluenceContentNodes ,
15
16
setConfluenceConnectorPermissions ,
16
17
stopConfluenceConnector ,
18
+ unpauseConfluenceConnector ,
17
19
updateConfluenceConnector ,
18
20
} from "@connectors/connectors/confluence" ;
19
21
import { launchConfluenceSyncWorkflow } from "@connectors/connectors/confluence/temporal/client" ;
@@ -29,6 +31,7 @@ import {
29
31
retrieveGithubReposContentNodes ,
30
32
setGithubConfig ,
31
33
stopGithubConnector ,
34
+ unpauseGithubConnector ,
32
35
updateGithubConnector ,
33
36
} from "@connectors/connectors/github" ;
34
37
import {
@@ -42,6 +45,7 @@ import {
42
45
retrieveGoogleDriveContentNodes ,
43
46
setGoogleDriveConfig ,
44
47
setGoogleDriveConnectorPermissions ,
48
+ unpauseGoogleDriveConnector ,
45
49
updateGoogleDriveConnector ,
46
50
} from "@connectors/connectors/google_drive" ;
47
51
import { launchGoogleDriveFullSyncWorkflow } from "@connectors/connectors/google_drive/temporal/client" ;
@@ -56,6 +60,7 @@ import {
56
60
retrieveIntercomContentNodes ,
57
61
setIntercomConnectorPermissions ,
58
62
stopIntercomConnector ,
63
+ unpauseIntercomConnector ,
59
64
updateIntercomConnector ,
60
65
} from "@connectors/connectors/intercom" ;
61
66
import type {
@@ -71,6 +76,7 @@ import type {
71
76
ConnectorProviderUpdateConfigurationMapping ,
72
77
ConnectorResumer ,
73
78
ConnectorStopper ,
79
+ ConnectorUnpauser ,
74
80
ConnectorUpdater ,
75
81
ContentNodeParentsRetriever ,
76
82
SyncConnector ,
@@ -85,6 +91,7 @@ import {
85
91
retrieveNotionContentNodeParents ,
86
92
retrieveNotionContentNodes ,
87
93
stopNotionConnector ,
94
+ unpauseNotionConnector ,
88
95
updateNotionConnector ,
89
96
} from "@connectors/connectors/notion" ;
90
97
import {
@@ -96,6 +103,7 @@ import {
96
103
retrieveSlackContentNodes ,
97
104
setSlackConfig ,
98
105
setSlackConnectorPermissions ,
106
+ unpauseSlackConnector ,
99
107
updateSlackConnector ,
100
108
} from "@connectors/connectors/slack" ;
101
109
import { launchSlackSyncWorkflow } from "@connectors/connectors/slack/temporal/client" ;
@@ -110,6 +118,7 @@ import {
110
118
retrieveWebCrawlerContentNodes ,
111
119
setWebcrawlerConfiguration ,
112
120
stopWebcrawlerConnector ,
121
+ unpauseWebcrawlerConnector ,
113
122
} from "./webcrawler" ;
114
123
import { launchCrawlWebsiteWorkflow } from "./webcrawler/temporal/client" ;
115
124
@@ -368,11 +377,26 @@ export const PAUSE_CONNECTOR_BY_TYPE: Record<
368
377
ConnectorProvider ,
369
378
ConnectorPauser
370
379
> = {
371
- confluence : stopConfluenceConnector ,
380
+ confluence : pauseConfluenceConnector ,
372
381
slack : pauseSlackConnector ,
373
382
notion : pauseNotionConnector ,
374
383
github : pauseGithubConnector ,
375
384
google_drive : pauseGoogleDriveConnector ,
376
385
intercom : pauseIntercomConnector ,
377
386
webcrawler : pauseWebcrawlerConnector ,
378
387
} ;
388
+
389
+ // If the connector has webhooks: resume processing them, and trigger a full sync.
390
+ // If the connector has long-running workflows: resume them. If they support "partial resync" do that, otherwise trigger a full sync.
391
+ export const UNPAUSE_CONNECTOR_BY_TYPE : Record <
392
+ ConnectorProvider ,
393
+ ConnectorUnpauser
394
+ > = {
395
+ confluence : unpauseConfluenceConnector ,
396
+ slack : unpauseSlackConnector ,
397
+ notion : unpauseNotionConnector ,
398
+ github : unpauseGithubConnector ,
399
+ google_drive : unpauseGoogleDriveConnector ,
400
+ intercom : unpauseIntercomConnector ,
401
+ webcrawler : unpauseWebcrawlerConnector ,
402
+ } ;
0 commit comments