Skip to content

Commit 51a0b1b

Browse files
committed
added type registry for connectors
1 parent fc64793 commit 51a0b1b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/modules/connectors.types.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
/**
2+
* Registry of connector integration types.
3+
* Augment this interface to enable autocomplete for connector integration types.
4+
*/
5+
export interface ConnectorIntegrationTypeRegistry {}
6+
17
/**
28
* The type of external integration/connector, such as `'googlecalendar'`, `'slack'`, or `'github'`.
9+
* Uses registry keys if augmented, otherwise falls back to string.
310
*/
4-
export type ConnectorIntegrationType = string;
11+
export type ConnectorIntegrationType = keyof ConnectorIntegrationTypeRegistry extends never
12+
? string
13+
: keyof ConnectorIntegrationTypeRegistry;
514

615
/**
716
* Response from the connectors access token endpoint.

0 commit comments

Comments
 (0)