Skip to content

Commit

Permalink
[front] - chore(microsoft): add Microsoft workflow check (#6356)
Browse files Browse the repository at this point in the history
* [front] - feature: add support for Microsoft connector active workflows 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

* fix: lint/format

---------

Co-authored-by: Jules <[email protected]>
  • Loading branch information
2 people authored and albandum committed Aug 28, 2024
1 parent 83be7e9 commit 91125fb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ConnectorProvider } from "@dust-tt/types";
import { microsoftIncrementalSyncWorkflowId } from "@dust-tt/types";
import {
getIntercomSyncWorkflowId,
googleDriveIncrementalSyncWorkflowId,
Expand Down Expand Up @@ -37,6 +38,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 91125fb

Please sign in to comment.