diff --git a/web/packages/teleport/src/services/integrations/types.ts b/web/packages/teleport/src/services/integrations/types.ts index d6c273cd4da3..110ca3289687 100644 --- a/web/packages/teleport/src/services/integrations/types.ts +++ b/web/packages/teleport/src/services/integrations/types.ts @@ -35,25 +35,25 @@ import { Node } from '../nodes'; * into one list. * * Generics: - * T is resource type "integration" or "plugin" - * K is the kind of integration (eg: aws-oidc) or plugin (eg: okta) - * SP is the provider-specific spec of integration or plugin - * SD is the provider-specific status containing status details + * ResourceType is resource type "integration" or "plugin" + * Kind is the kind of integration (eg: aws-oidc) or plugin (eg: okta) + * Spec is the provider-specific spec of integration or plugin + * Status is the provider-specific status containing status details * - currently only defined for plugin resource */ export type Integration< - T extends string = 'integration', - K extends string = IntegrationKind, - SP extends Record = IntegrationSpecAwsOidc, - SD extends Record = null, + ResourceType extends string = 'integration', + Kind extends string = IntegrationKind, + Spec extends Record = IntegrationSpecAwsOidc, + Status extends Record = null, > = { - resourceType: T; - kind: K; - spec?: SP; + resourceType: ResourceType; + kind: Kind; + spec?: Spec; name: string; details?: string; statusCode: IntegrationStatusCode; - status?: SD; + status?: Status; }; // IntegrationKind string values should be in sync // with the backend value for defining the integration @@ -127,14 +127,14 @@ export type ExternalAuditStorageIntegration = Integration< ExternalAuditStorage >; -export type Plugin = Integration< +export type Plugin = Integration< 'plugin', PluginKind, - SP, - PluginStatus + Spec, + PluginStatus
>; -export type PluginStatus = { +export type PluginStatus
= { /** * the status code of the plugin */ @@ -150,7 +150,7 @@ export type PluginStatus = { /** * contains provider-specific status information */ - details?: D; + details?: Details; }; export type PluginSpec =