Skip to content

Commit

Permalink
[front] - feature: add support for Microsoft connector active workflo…
Browse files Browse the repository at this point in the history
…ws checks

 - Introduced functionality to verify active workflows for Microsoft connectors
 - Extended `providersToCheck` to include new Microsoft provider with workflow ID generation

[types] - feature: implement Microsoft connector ID generation

 - Created a new utility function to generate incremental sync workflow IDs for Microsoft connectors
 - Exported the new Microsoft connector-related functions through the main index file of the types module
  • Loading branch information
Jules authored and Jules committed Jul 19, 2024
1 parent 97e96d5 commit a6c59c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import type { ConnectorProvider } from "@dust-tt/types";
import type {
ConnectorProvider} from "@dust-tt/types";
import {
microsoftIncrementalSyncWorkflowId,
} from "@dust-tt/types";
import {
getIntercomSyncWorkflowId,
googleDriveIncrementalSyncWorkflowId,
Expand Down Expand Up @@ -37,6 +41,10 @@ const providersToCheck: Partial<Record<ConnectorProvider, ProviderCheck>> = {
makeIdFn: (connector: ConnectorBlob) =>
googleDriveIncrementalSyncWorkflowId(connector.id),
},
microsoft: {
makeIdFn: (connector: ConnectorBlob) =>
microsoftIncrementalSyncWorkflowId(connector.id),
},
};

async function listAllConnectorsForProvider(provider: ConnectorProvider) {
Expand Down
5 changes: 5 additions & 0 deletions types/src/connectors/microsoft.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { ModelId } from "../shared/model_id";

export function microsoftIncrementalSyncWorkflowId(connectorId: ModelId) {
return `microsoft-incrementalSync-${connectorId}`;
}
1 change: 1 addition & 0 deletions types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export * from "./connectors/confluence";
export * from "./connectors/content_nodes";
export * from "./connectors/google_drive";
export * from "./connectors/intercom";
export * from "./connectors/microsoft";
export * from "./connectors/notion";
export * from "./connectors/slack";
export * from "./connectors/webcrawler";
Expand Down

0 comments on commit a6c59c7

Please sign in to comment.