import { ExtendedIntegrationPluginId, Plugin } from '../../types/index.js';
import { PUBLIC_INTEGRATIONS_CDN_URL, PUBLIC_INTEGRATIONS_LOGO_URL } from './constants.js';
import { getNativeOpenApiPlugin } from './shared/index.js';

export const SnowflakeCortexPlugin: Plugin = getNativeOpenApiPlugin({
  name: 'Snowflake Cortex',
  id: ExtendedIntegrationPluginId.SNOWFLAKE_CORTEX,
  openApiSpecURL: `${PUBLIC_INTEGRATIONS_CDN_URL}/openapi/snowflake-cortex.yaml`,
  logoURL: `${PUBLIC_INTEGRATIONS_LOGO_URL}/snowflake.png`,
  authMethods: {
    apiKeyForm: [{ label: 'API key', header: 'Authorization', key: 'api-key', required: true, valuePrefix: 'Bearer ' }]
  },
  isStreamable: true,
  serverURL: 'https://{SUPERBLOCKS_OPENAPI_TENANT_NAME}.snowflakecomputing.com',
  tenantInput: {
    label: 'Account Identifier',
    placeholder: 'XY12345-AB67890'
  }
});
