"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegisteredSecrets = exports.RegisteredPlugins = exports.PluginRegistry = void 0;
const index_js_1 = require("./templates/index.js");
const index_js_2 = require("./templates/secrets/index.js");
class PluginRegistry {
    plugins;
    constructor(plugins) {
        this.plugins = new Map(Object.entries(plugins));
    }
    get(pluginId) {
        return this.plugins.get(pluginId);
    }
    getAll() {
        const plugins = Array.from(this.plugins.values());
        return plugins;
    }
    getByIDs(ids) {
        const plugins = [];
        for (const plugin of this.plugins.values()) {
            if (ids.includes(plugin.id)) {
                plugins.push(plugin);
            }
        }
        return plugins;
    }
    defaultPlugins() {
        return [index_js_1.EmailPlugin, index_js_1.GraphQLPlugin, index_js_1.JavascriptPlugin, index_js_1.PythonPlugin, index_js_1.RestApiPlugin, index_js_1.SuperblocksOcrPlugin, index_js_1.WorkflowPlugin];
    }
}
exports.PluginRegistry = PluginRegistry;
// TODO(alex): get rid of googleSheetsClientId and googleSheetsRedirectPath,
// read this from a shared config
const RegisteredPlugins = (googleSheetsClientId) => new PluginRegistry({
    // TODO: (joey) enable these when ready to release
    // [AivenPlugin.id]: AivenPlugin,
    [index_js_1.ConfluentPlugin.id]: index_js_1.ConfluentPlugin,
    [index_js_1.RedpandaPlugin.id]: index_js_1.RedpandaPlugin,
    [index_js_1.KafkaPlugin.id]: index_js_1.KafkaPlugin,
    [index_js_1.KinesisPlugin.id]: index_js_1.KinesisPlugin,
    // [MskPlugin.id]: MskPlugin,
    // [AdlsPlugin.id]: AdlsPlugin,
    [index_js_1.RedisPlugin.id]: index_js_1.RedisPlugin,
    [index_js_1.CosmosDbPlugin.id]: index_js_1.CosmosDbPlugin,
    [index_js_1.AthenaPlugin.id]: index_js_1.AthenaPlugin,
    [index_js_1.AirtablePlugin.id]: index_js_1.AirtablePlugin,
    [index_js_1.AsanaPlugin.id]: index_js_1.AsanaPlugin,
    [index_js_1.BigQueryPlugin.id]: index_js_1.BigQueryPlugin,
    [index_js_1.BitbucketPlugin.id]: index_js_1.BitbucketPlugin,
    [index_js_1.BoxPlugin.id]: index_js_1.BoxPlugin,
    [index_js_1.CircleCIPlugin.id]: index_js_1.CircleCIPlugin,
    [index_js_1.CouchbasePlugin.id]: index_js_1.CouchbasePlugin,
    [index_js_1.CockroachDBPlugin.id]: index_js_1.CockroachDBPlugin,
    [index_js_1.ConfluencePlugin.id]: index_js_1.ConfluencePlugin,
    [index_js_1.DatabricksPlugin.id]: index_js_1.DatabricksPlugin,
    [index_js_1.DatadogPlugin.id]: index_js_1.DatadogPlugin,
    [index_js_1.DropboxPlugin.id]: index_js_1.DropboxPlugin,
    [index_js_1.DynamoDBPlugin.id]: index_js_1.DynamoDBPlugin,
    [index_js_1.ElasticSearchPlugin.id]: index_js_1.ElasticSearchPlugin,
    [index_js_1.EmailPlugin.id]: index_js_1.EmailPlugin,
    [index_js_1.FrontPlugin.id]: index_js_1.FrontPlugin,
    [index_js_1.GCSPlugin.id]: index_js_1.GCSPlugin,
    [index_js_1.GitHubPlugin.id]: index_js_1.GitHubPlugin,
    [index_js_1.GoogleAnalyticsPlugin.id]: index_js_1.GoogleAnalyticsPlugin,
    [index_js_1.GoogleDrivePlugin.id]: index_js_1.GoogleDrivePlugin,
    [index_js_1.GraphQLIntegrationPlugin.id]: index_js_1.GraphQLIntegrationPlugin,
    [index_js_1.GraphQLPlugin.id]: index_js_1.GraphQLPlugin,
    [index_js_1.HubSpotPlugin.id]: index_js_1.HubSpotPlugin,
    [index_js_1.IntercomPlugin.id]: index_js_1.IntercomPlugin,
    [index_js_1.JavascriptPlugin.id]: index_js_1.JavascriptPlugin,
    [index_js_1.JiraPlugin.id]: index_js_1.JiraPlugin,
    [index_js_1.LakebasePlugin.id]: index_js_1.LakebasePlugin,
    [index_js_1.LaunchDarklyPlugin.id]: index_js_1.LaunchDarklyPlugin,
    [index_js_1.MariaDBPlugin.id]: index_js_1.MariaDBPlugin,
    [index_js_1.MicrosoftSQLPlugin.id]: index_js_1.MicrosoftSQLPlugin,
    [index_js_1.MongoDBPlugin.id]: index_js_1.MongoDBPlugin,
    [index_js_1.MySQLPlugin.id]: index_js_1.MySQLPlugin,
    [index_js_1.NotionPlugin.id]: index_js_1.NotionPlugin,
    [index_js_1.OpenAiPlugin.id]: index_js_1.OpenAiPlugin,
    [index_js_1.OpenaiV2Plugin.id]: index_js_1.OpenaiV2Plugin,
    [index_js_1.OracleDbPlugin.id]: index_js_1.OracleDbPlugin,
    [index_js_1.PagerDutyPlugin.id]: index_js_1.PagerDutyPlugin,
    [index_js_1.PostgresPlugin.id]: index_js_1.PostgresPlugin,
    [index_js_1.PythonPlugin.id]: index_js_1.PythonPlugin,
    [index_js_1.RedisPlugin.id]: index_js_1.RedisPlugin,
    // TODO: (joey) enable these after discussion around plugin logos
    // [RedisCloudPlugin.id]: RedisCloudPlugin,
    // [AwsElasticachePlugin.id]: AwsElasticachePlugin,
    // [AivenRedisPlugin.id]: AivenRedisPlugin,
    [index_js_1.RedshiftPlugin.id]: index_js_1.RedshiftPlugin,
    [index_js_1.RestApiIntegrationPlugin.id]: index_js_1.RestApiIntegrationPlugin,
    [index_js_1.RestApiPlugin.id]: index_js_1.RestApiPlugin,
    [index_js_1.S3Plugin.id]: index_js_1.S3Plugin,
    [index_js_1.SalesforcePlugin.id]: index_js_1.SalesforcePlugin,
    [index_js_1.SegmentPlugin.id]: index_js_1.SegmentPlugin,
    [index_js_1.SendGridPlugin.id]: index_js_1.SendGridPlugin,
    [index_js_1.SlackPlugin.id]: index_js_1.SlackPlugin,
    [index_js_1.SmtpPlugin.id]: index_js_1.SmtpPlugin,
    [index_js_1.SnowflakePlugin.id]: index_js_1.SnowflakePlugin,
    [index_js_1.SnowflakeCortexPlugin.id]: index_js_1.SnowflakeCortexPlugin,
    [index_js_1.SnowflakePostgresPlugin.id]: index_js_1.SnowflakePostgresPlugin,
    [index_js_1.StripePlugin.id]: index_js_1.StripePlugin,
    [index_js_1.SuperblocksOcrPlugin.id]: index_js_1.SuperblocksOcrPlugin,
    [index_js_1.TwilioPlugin.id]: index_js_1.TwilioPlugin,
    [index_js_1.WorkflowPlugin.id]: index_js_1.WorkflowPlugin,
    [index_js_1.ZendeskPlugin.id]: index_js_1.ZendeskPlugin,
    [index_js_1.ZoomPlugin.id]: index_js_1.ZoomPlugin,
    [index_js_1.AnthropicPlugin.id]: index_js_1.AnthropicPlugin,
    [index_js_1.GroqPlugin.id]: index_js_1.GroqPlugin,
    [index_js_1.MistralPlugin.id]: index_js_1.MistralPlugin,
    [index_js_1.PerplexityPlugin.id]: index_js_1.PerplexityPlugin,
    [index_js_1.FireworksPlugin.id]: index_js_1.FireworksPlugin,
    [index_js_1.StabilityAiPlugin.id]: index_js_1.StabilityAiPlugin,
    [index_js_1.CoherePlugin.id]: index_js_1.CoherePlugin,
    [index_js_1.GeminiPlugin.id]: index_js_1.GeminiPlugin,
    [(0, index_js_1.GoogleSheetsPlugin)(googleSheetsClientId).id]: (0, index_js_1.GoogleSheetsPlugin)(googleSheetsClientId)
});
exports.RegisteredPlugins = RegisteredPlugins;
const RegisteredSecrets = () => {
    return new PluginRegistry({
        [index_js_2.AkeylessSecretsManagerPlugin.id]: index_js_2.AkeylessSecretsManagerPlugin,
        [index_js_2.AWSSecretsManagerPlugin.id]: index_js_2.AWSSecretsManagerPlugin,
        [index_js_2.GCPSecretsManagerPlugin.id]: index_js_2.GCPSecretsManagerPlugin,
        [index_js_2.HashicorpVaultPlugin.id]: index_js_2.HashicorpVaultPlugin
    });
};
exports.RegisteredSecrets = RegisteredSecrets;
//# sourceMappingURL=registry.js.map