import { Schema } from "effect";
import { type ConfiguredCredentialValue, type CredentialBindingValue, type ScopedSecretCredentialInput } from "./shared";
export declare const HttpCredentialInput: Schema.Union<readonly [Schema.String, Schema.Struct<{
    readonly kind: Schema.Literal<"text">;
    readonly text: Schema.String;
    readonly prefix: Schema.optional<Schema.String>;
}>, Schema.Struct<{
    readonly kind: Schema.Literal<"secret">;
    readonly secretId: Schema.String;
    readonly secretScope: Schema.optional<Schema.String>;
    readonly prefix: Schema.optional<Schema.String>;
}>, Schema.Struct<{
    readonly kind: Schema.Literal<"connection">;
    readonly connectionId: Schema.String;
}>]>;
export type HttpCredentialInput = typeof HttpCredentialInput.Type;
export type HttpCredentialInputType = HttpCredentialInput;
export declare const HttpConfiguredValueInput: Schema.Union<readonly [Schema.String, Schema.Struct<{
    readonly kind: Schema.Literal<"secret">;
    readonly prefix: Schema.optional<Schema.String>;
}>]>;
export type HttpConfiguredValueInput = typeof HttpConfiguredValueInput.Type;
export type HttpConfiguredValueInputType = HttpConfiguredValueInput;
export declare const OAuth2Flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
export type OAuth2Flow = typeof OAuth2Flow.Type;
export type OAuth2FlowType = OAuth2Flow;
export declare const OAuth2SourceConfig: Schema.Struct<{
    readonly kind: Schema.Literal<"oauth2">;
    readonly securitySchemeName: Schema.String;
    readonly flow: Schema.Literals<readonly ["authorizationCode", "clientCredentials"]>;
    readonly tokenUrl: Schema.String;
    readonly authorizationUrl: Schema.withDecodingDefault<Schema.optional<Schema.NullOr<Schema.String>>>;
    readonly issuerUrl: Schema.optional<Schema.NullOr<Schema.String>>;
    readonly clientIdSlot: Schema.String;
    readonly clientSecretSlot: Schema.NullOr<Schema.String>;
    readonly connectionSlot: Schema.String;
    readonly scopes: Schema.$Array<Schema.String>;
}>;
export type OAuth2SourceConfig = typeof OAuth2SourceConfig.Type;
export type OAuth2SourceConfigType = OAuth2SourceConfig;
export declare const HttpOAuthConfigureInput: Schema.Struct<{
    readonly clientId: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
        readonly kind: Schema.Literal<"text">;
        readonly text: Schema.String;
        readonly prefix: Schema.optional<Schema.String>;
    }>, Schema.Struct<{
        readonly kind: Schema.Literal<"secret">;
        readonly secretId: Schema.String;
        readonly secretScope: Schema.optional<Schema.String>;
        readonly prefix: Schema.optional<Schema.String>;
    }>, Schema.Struct<{
        readonly kind: Schema.Literal<"connection">;
        readonly connectionId: Schema.String;
    }>]>>;
    readonly clientSecret: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.String, Schema.Struct<{
        readonly kind: Schema.Literal<"text">;
        readonly text: Schema.String;
        readonly prefix: Schema.optional<Schema.String>;
    }>, Schema.Struct<{
        readonly kind: Schema.Literal<"secret">;
        readonly secretId: Schema.String;
        readonly secretScope: Schema.optional<Schema.String>;
        readonly prefix: Schema.optional<Schema.String>;
    }>, Schema.Struct<{
        readonly kind: Schema.Literal<"connection">;
        readonly connectionId: Schema.String;
    }>]>>>;
    readonly connection: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
        readonly kind: Schema.Literal<"text">;
        readonly text: Schema.String;
        readonly prefix: Schema.optional<Schema.String>;
    }>, Schema.Struct<{
        readonly kind: Schema.Literal<"secret">;
        readonly secretId: Schema.String;
        readonly secretScope: Schema.optional<Schema.String>;
        readonly prefix: Schema.optional<Schema.String>;
    }>, Schema.Struct<{
        readonly kind: Schema.Literal<"connection">;
        readonly connectionId: Schema.String;
    }>]>>;
}>;
export type HttpOAuthConfigureInput = typeof HttpOAuthConfigureInput.Type;
export type HttpOAuthConfigureInputType = HttpOAuthConfigureInput;
export type HttpCredentialSection = "request" | "specFetch" | "introspection";
export type HttpCredentialPlacement = "headers" | "query";
export declare const httpCredentialSlotKey: (section: HttpCredentialSection, placement: HttpCredentialPlacement, name: string) => string;
export declare const httpHeaderSlotKey: (section: HttpCredentialSection, name: string) => string;
export declare const httpQuerySlotKey: (section: HttpCredentialSection, name: string) => string;
export declare const httpOAuthConnectionSlotKey: (section: HttpCredentialSection) => string;
export declare const httpOAuthClientIdSlotKey: (section: HttpCredentialSection) => string;
export declare const httpOAuthClientSecretSlotKey: (section: HttpCredentialSection) => string;
export declare const httpSectionSlotPrefix: (section: HttpCredentialSection) => string;
export type HttpNamedCredentialInput = ConfiguredCredentialValue | ScopedSecretCredentialInput | {
    readonly secretId: string;
    readonly prefix?: string;
    readonly targetScope?: string;
    readonly secretScopeId?: string;
};
export interface CompiledHttpNamedCredentialBinding {
    readonly slot: string;
    readonly value: CredentialBindingValue;
    readonly targetScope?: string;
}
export declare const compileHttpNamedCredentialMap: (values: Record<string, HttpNamedCredentialInput | HttpCredentialInput> | undefined, slotForName: (name: string) => string) => {
    readonly values: Record<string, ConfiguredCredentialValue>;
    readonly bindings: readonly CompiledHttpNamedCredentialBinding[];
};
export declare const httpCredentialInputToBindingValue: (input: HttpCredentialInput) => CredentialBindingValue;
//# sourceMappingURL=http-source.d.ts.map