import { AdlsPluginV1 as Adls, AthenaPluginV1 as Athena, CosmosDbPluginV1 as CosmosDb, CouchbasePluginV1 as Couchbase, DatabricksPluginV1 as Databricks, KafkaV1 as Kafka, KinesisPluginV1 as Kinesis, OracleDbPluginV1 as OracleDb, RedisPluginV1 as Redis, SalesforcePluginV1 as Salesforce, SmtpPluginV1 as Smtp } from '@superblocksteam/types';
import { GoogleSheetsActionType, GoogleSheetsDestinationType, GoogleSheetsFormatType } from '../../plugins/index.js';
import { Property } from '../common/property.js';
import { IntegrationAuthType } from '../datasource/index.js';
import { PluginMetadata, RestApiBodyDataType } from '../plugin/index.js';
import { ApiTriggerType, ExecutionParam, ScheduleConfig } from './index.js';
export type ActionConfigParamIn = 'HEADER' | 'QUERY' | 'PATH';
export type ActionConfigParamValue = {
    in: ActionConfigParamIn;
    value: string;
};
export type ActionConfigParam = {
    name: string;
} & ActionConfigParamValue;
export type TestCase = {
    operation: string;
    description: string;
    mediaType: string;
    parameters?: ActionConfigParam[];
    body?: Record<string, unknown>;
};
export type OpenApiSpec = {
    paths: Record<string, Record<string, Record<string, unknown>>>;
};
export type Action = {
    id: ActionId;
    name: string;
    type: ActionType;
    configuration: ActionConfiguration;
    applicationId?: string;
    pluginId: string;
    datasourceId: string;
    settings?: ActionSettings;
    children?: {
        [key: string]: ActionId;
    };
};
export type Actions = {
    name: string;
    triggerActionId: ActionId;
    schedule?: ScheduleConfig;
    actions: Record<string, Action>;
    executeOnPageLoad?: boolean;
    bindings?: string[];
    dynamicBindingPathList?: ExecutionParam[];
    version?: string;
    deactivated?: Date;
    created?: Date;
    updated?: Date;
    supportedMethod?: 'GET' | 'POST';
    workflowParams?: ExecutionParam[];
    workflowQueries?: ExecutionParam[];
    triggerType?: ApiTriggerType;
};
export type GoogleSheetsActionConfiguration = {
    action?: GoogleSheetsActionType;
    spreadsheetId?: string;
    sheetTitle?: string;
    range?: string;
    /** a string containing an integer */
    rowNumber?: string;
    extractFirstRowHeader?: boolean;
    /** a string containing an integer */
    headerRowNumber?: string;
    format?: GoogleSheetsFormatType;
    data?: string;
    preserveHeaderRow?: boolean;
    includeHeaderRow?: boolean;
    writeToDestinationType?: GoogleSheetsDestinationType;
    /** used by metadata to fetch spreadsheets with pagination */
    pageToken?: string;
    /** used by metadata to fetch spreadsheets with keyword */
    keyword?: string;
    addSheet?: {
        sheetTitle: string;
        rowCount?: string;
        columnCount?: string;
    };
};
type DBActionConfiguration = {
    body?: string;
    usePreparedSql?: boolean;
    parameters?: string;
    operation?: string;
    useAdvancedMatching?: 'auto' | 'advanced';
    schema?: string;
    table?: string;
    oldValues?: unknown;
    insertedRows?: unknown;
    newValues?: unknown;
    deletedRows?: unknown;
    filterBy?: unknown;
    mappingMode?: 'auto' | 'manual';
    mappedColumns?: Array<{
        json: string;
        sql: string;
    }>;
};
type BigqueryActionConfiguration = DBActionConfiguration;
type CustomProperties = Record<string, Property>;
type GCSActionConfiguration = {
    resource?: string;
    action?: string;
    path?: string;
    prefix?: string;
    body?: string | Buffer;
    fileObjects?: unknown;
    custom?: CustomProperties;
    responseType?: ActionResponseType;
    resourceType?: ActionResponseType;
};
type DynamoDBActionConfiguration = DBActionConfiguration & {
    action?: string;
};
type EmailActionConfiguration = {
    emailFrom?: string;
    emailTo?: string;
    emailCc?: string;
    emailBcc?: string;
    emailSubject?: string;
    emailBody?: string;
    emailAttachments?: string;
};
type SmtpPlugin = Smtp.Plugin;
type SmtpActionConfiguration = Partial<Omit<SmtpPlugin, 'name' | 'connection' | 'dynamicWorkflowConfiguration'>>;
type AdlsPlugin = Adls.Plugin;
export type AdlsActionConfiguration = Partial<Omit<AdlsPlugin, 'name' | 'connection'>>;
export type GraphQLActionConfiguration = {
    path?: string;
    headers?: Property[];
    body?: string;
    custom?: CustomProperties;
    verboseHttpOutput?: boolean;
    doNotFailOnRequestError?: boolean;
};
type JavascriptActionConfiguration = {
    body?: string;
};
type MariaDBActionConfiguration = DBActionConfiguration;
export type MongoDBActionConfiguration = {
    resource?: string;
    action?: string;
    pipeline?: string;
    projection?: string;
    query?: string;
    field?: string;
    sortby?: string;
    limit?: string;
    skip?: string;
    document?: string;
    replacement?: string;
    filter?: string;
    options?: string;
    update?: string;
    distinctKey?: string;
};
export type MySQLActionConfiguration = DBActionConfiguration;
export type OpenAiActionConfiguration = {
    action?: string;
    generateChatGptResponsePrompt?: string;
    generateChatGptResponseMessageHistory?: string;
    generateChatGptResponseSystemInstruction?: string;
    generateTextType?: string;
    generateTextNewTextPrompt?: string;
    generateTextEditTextTextToEdit?: string;
    generateTextEditTextPrompt?: string;
    generateCodeType?: string;
    generateCodeNewCodePrompt?: string;
    generateCodeEditCodeCodeToEdit?: string;
    generateCodeEditCodePrompt?: string;
    checkModerationText?: string;
    embeddingText?: string;
    generateImageMethod?: string;
    generateImageGenerateFromPromptPrompt?: string;
    generateImageGenerateFromPromptImageImageSize?: string;
    generateImageEditImagePrompt?: string;
    generateImageEditImageImageFileToEdit?: unknown;
    generateImageEditImageImageMask?: string;
    generateImageEditImageImageSizes?: string;
    generateImageVaryImageImageFile?: unknown;
    generateImageVaryImageImageSize?: string;
    transcribeAudioToTextAudioFile?: unknown;
    transcribeAudioToTextInputLanguage?: string;
    transcribeAudioToTextTranslateToEnglish?: string;
    generateChatGPTResponseAiModel?: string;
    generateTextNewTextAiModel?: string;
    generateTextEditTextAiModel?: string;
    generateCodeNewCodeAiModel?: string;
    generateCodeEditCodeAiModel?: string;
    checkModerationAiModel?: string;
    generateTextEmbeddingAiModel?: string;
    transcribeAudioToTextAiModel?: string;
    generateChatGptResponseMaxTokens?: string;
    generateTextNewTextMaxTokens?: string;
    temperature?: string;
};
type SuperblocksOcrActionConfiguration = {
    action?: string;
    file?: unknown;
    fileUrl?: string;
};
export type PostgresActionConfiguration = DBActionConfiguration;
type CockroachDBActionConfiguration = DBActionConfiguration;
type MsSqlActionConfiguration = DBActionConfiguration;
type PythonActionConfiguration = {
    body?: string;
};
type RedshiftActionConfiguration = DBActionConfiguration;
type RestApiCommonActionConfiguration = {
    httpMethod?: HttpMethod;
    responseType?: ActionResponseType;
    headers?: Property[];
    params?: Property[];
    bodyType?: RestApiBodyDataType;
    body?: string;
    formData?: Property[];
    fileFormKey?: string;
    fileName?: string;
    verboseHttpOutput?: boolean;
    doNotFailOnRequestError?: boolean;
};
export type RestApiActionConfiguration = RestApiCommonActionConfiguration & {
    path?: string;
};
export type RestApiIntegrationActionConfiguration = RestApiCommonActionConfiguration & {
    urlBase?: string;
    urlPath?: string;
    authType?: IntegrationAuthType;
    openApiAction?: string;
    openApiSpecRef?: string;
    openApiTenantName?: string;
};
export type S3ActionConfiguration = {
    resource?: string;
    action?: string;
    path?: string;
    body?: string;
    fileObjects?: unknown;
    custom?: {
        /** Enum name for presigned URL method */
        presignedMethod?: 'PRESIGNED_METHOD_UNSPECIFIED' | 'PRESIGNED_METHOD_GET' | 'PRESIGNED_METHOD_PUT';
        presignedExpiration?: Property;
    };
    responseType?: ActionResponseType;
    listFilesConfig?: {
        prefix?: string;
        delimiter?: string;
    };
};
type SnowflakeActionConfiguration = DBActionConfiguration;
export type WorkflowActionConfiguration = {
    workflow?: string;
    custom?: CustomProperties;
    queryParams?: Record<string, {
        value: unknown;
    }>;
};
type KafkaPlugin = Kafka.Plugin;
type KafkaActionConfiguration = Partial<Omit<KafkaPlugin, 'cluster' | 'name' | 'superblocksMetadata'>>;
type KinesisPlugin = Kinesis.Plugin;
type KinesisActionConfiguration = Partial<Omit<KinesisPlugin, 'name' | 'connection'>>;
type AthenaPlugin = Athena.Plugin;
type AthenaActionConfiguration = Partial<Pick<AthenaPlugin, 'runSql'>>;
type CosmosDbPlugin = CosmosDb.Plugin;
export type CosmosDbActionConfiguration = Partial<Pick<CosmosDbPlugin, 'cosmosdbAction'>>;
type CouchbasePlugin = Couchbase.Plugin;
export type CouchbaseActionConfiguration = Partial<Omit<CouchbasePlugin, 'name' | 'connection' | 'tunnel'>>;
type DatabricksPlugin = Databricks.Plugin;
type DatabricksActionConfiguration = Partial<Omit<DatabricksPlugin, 'name' | 'connection'>>;
type OracleDbPlugin = OracleDb.Plugin;
export type OracleDbActionConfiguration = Partial<Omit<OracleDbPlugin, 'name' | 'connection'>>;
type RedisPlugin = Redis.Plugin;
export type RedisActionConfiguration = Partial<Omit<RedisPlugin, 'name' | 'connection'>>;
type SalesforcePlugin = Salesforce.Plugin;
export type SalesforceActionConfiguration = Partial<Omit<SalesforcePlugin, 'name' | 'connection'>>;
export type ActionConfiguration = PluginMetadata & (AthenaActionConfiguration | BigqueryActionConfiguration | CockroachDBActionConfiguration | CosmosDbActionConfiguration | MsSqlActionConfiguration | DynamoDBActionConfiguration | EmailActionConfiguration | GCSActionConfiguration | GraphQLActionConfiguration | JavascriptActionConfiguration | MariaDBActionConfiguration | MongoDBActionConfiguration | MySQLActionConfiguration | OpenAiActionConfiguration | PostgresActionConfiguration | PythonActionConfiguration | RedisActionConfiguration | RedshiftActionConfiguration | RestApiActionConfiguration | RestApiIntegrationActionConfiguration | S3ActionConfiguration | SnowflakeActionConfiguration | SuperblocksOcrActionConfiguration | SalesforceActionConfiguration | WorkflowActionConfiguration | GoogleSheetsActionConfiguration | KafkaActionConfiguration | KinesisActionConfiguration | SmtpActionConfiguration | AdlsActionConfiguration | OracleDbActionConfiguration | DatabricksActionConfiguration | CouchbaseActionConfiguration);
export type ActionId = string;
type ActionSettings = {
    executeOnLoad?: boolean;
    cacheResponse?: string;
    userSetOnLoad?: boolean;
    confirmBeforeExecute?: boolean;
};
export declare enum ActionType {
    Integration = 0,
    Conditional = 1,
    Loop = 2,
    Assignment = 3
}
export declare enum HttpMethod {
    GET = "GET",
    HEAD = "HEAD",
    POST = "POST",
    PUT = "PUT",
    PATCH = "PATCH",
    DELETE = "DELETE",
    OPTIONS = "OPTIONS",
    TRACE = "TRACE"
}
export declare enum ActionResponseType {
    AUTO = "auto",
    JSON = "json",
    TEXT = "text",
    BINARY = "binary",
    RAW = "raw"
}
export declare const GENERIC_HTTP_REQUEST = "genericHttpRequest";
export declare const DB_SQL_INITIAL_TEXT = "-- You can use SQL to query data (ex. SELECT * FROM orders;)\n\n";
export declare function getMethodColor(method: HttpMethod): string;
export {};
//# sourceMappingURL=action.d.ts.map