import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { ConnectorDoc } from "./connectordoc.js";
import { ConnectorEvent } from "./connectorevent.js";
import { ConnectorSetting } from "./connectorsetting.js";
import { ConnectorStatus } from "./connectorstatus.js";
import { LinkedConnectorResource } from "./linkedconnectorresource.js";
import { SchemaSupport } from "./schemasupport.js";
import { UnifiedApiId } from "./unifiedapiid.js";
import { WebhookSupport } from "./webhooksupport.js";
/**
 * Type of authorization used by the connector
 */
export declare const ConnectorAuthType: {
    readonly Oauth2: "oauth2";
    readonly ApiKey: "apiKey";
    readonly Basic: "basic";
    readonly Custom: "custom";
    readonly None: "none";
};
/**
 * Type of authorization used by the connector
 */
export type ConnectorAuthType = ClosedEnum<typeof ConnectorAuthType>;
/**
 * OAuth grant type used by the connector. More info: https://oauth.net/2/grant-types
 */
export declare const ConnectorOauthGrantType: {
    readonly AuthorizationCode: "authorization_code";
    readonly ClientCredentials: "client_credentials";
    readonly Password: "password";
};
/**
 * OAuth grant type used by the connector. More info: https://oauth.net/2/grant-types
 */
export type ConnectorOauthGrantType = ClosedEnum<typeof ConnectorOauthGrantType>;
/**
 * Location of the OAuth client credentials. For most connectors the OAuth client credentials are stored on integration and managed by the application owner. For others they are stored on connection and managed by the consumer in Vault.
 */
export declare const OauthCredentialsSource: {
    readonly Integration: "integration";
    readonly Connection: "connection";
};
/**
 * Location of the OAuth client credentials. For most connectors the OAuth client credentials are stored on integration and managed by the application owner. For others they are stored on connection and managed by the consumer in Vault.
 */
export type OauthCredentialsSource = ClosedEnum<typeof OauthCredentialsSource>;
export type OauthScopes = {
    /**
     * ID of the OAuth scope.
     */
    id?: string | undefined;
    /**
     * Label of the OAuth scope.
     */
    label?: string | undefined;
    /**
     * List of Unified APIs that request this OAuth Scope by default. Application owners can customize the requested scopes.
     */
    defaultApis?: Array<string> | undefined;
};
/**
 * OAuth scopes required for the connector. Add these scopes to your OAuth app.
 */
export type ConnectorOauthScopes = {
    /**
     * ID of the OAuth scope.
     */
    id?: string | undefined;
    /**
     * Label of the OAuth scope.
     */
    label?: string | undefined;
};
export type UnifiedApis = {
    /**
     * Name of Apideck Unified API
     */
    id?: UnifiedApiId | undefined;
    /**
     * Name of the API.
     */
    name?: string | undefined;
    /**
     * Indicates whether a connector only supports authentication. In this case the connector is not mapped to a Unified API, but can be used with the Proxy API
     */
    authOnly?: boolean | undefined;
    oauthScopes?: Array<ConnectorOauthScopes> | undefined;
    /**
     * List of resources that are supported on the connector.
     */
    supportedResources?: Array<LinkedConnectorResource> | undefined;
    /**
     * List of resources that are not supported on the downstream.
     */
    downstreamUnsupportedResources?: Array<string> | undefined;
    /**
     * List of events that are supported on the connector for this Unified API.
     */
    supportedEvents?: Array<ConnectorEvent> | undefined;
};
export type TlsSupport = {
    type?: string | undefined;
    /**
     * Description of the TLS support
     */
    description?: string | undefined;
};
export type Connector = {
    /**
     * ID of the connector.
     */
    id?: string | undefined;
    /**
     * Name of the connector.
     */
    name?: string | undefined;
    /**
     * Status of the connector. Connectors with status live or beta are callable.
     */
    status?: ConnectorStatus | undefined;
    /**
     * A description of the object.
     */
    description?: string | null | undefined;
    /**
     * Link to a small square icon for the connector.
     */
    iconUrl?: string | undefined;
    /**
     * Link to the full logo for the connector.
     */
    logoUrl?: string | undefined;
    /**
     * Link to the connector's website.
     */
    websiteUrl?: string | undefined;
    /**
     * Link to the connector's signup page.
     */
    signupUrl?: string | undefined;
    /**
     * Link to the connector's partner program signup page.
     */
    partnerSignupUrl?: string | undefined;
    /**
     * Set to `true` when the connector offers a free trial. Use `signup_url` to sign up for a free trial
     */
    freeTrialAvailable?: boolean | undefined;
    /**
     * Type of authorization used by the connector
     */
    authType?: ConnectorAuthType | undefined;
    /**
     * Indicates whether a connector only supports authentication. In this case the connector is not mapped to a Unified API, but can be used with the Proxy API
     */
    authOnly?: boolean | undefined;
    /**
     * Set to `true` when connector was implemented from downstream docs only and without API access. This state indicates that integration will require Apideck support, and access to downstream API to validate mapping quality.
     */
    blindMapped?: boolean | undefined;
    /**
     * OAuth grant type used by the connector. More info: https://oauth.net/2/grant-types
     */
    oauthGrantType?: ConnectorOauthGrantType | undefined;
    /**
     * Location of the OAuth client credentials. For most connectors the OAuth client credentials are stored on integration and managed by the application owner. For others they are stored on connection and managed by the consumer in Vault.
     */
    oauthCredentialsSource?: OauthCredentialsSource | undefined;
    /**
     * List of OAuth Scopes available for this connector.
     */
    oauthScopes?: Array<OauthScopes> | undefined;
    /**
     * Set to `true` when connector allows the definition of custom scopes.
     */
    customScopes?: boolean | undefined;
    /**
     * Indicates whether Apideck Sandbox OAuth credentials are available.
     */
    hasSandboxCredentials?: boolean | undefined;
    settings?: Array<ConnectorSetting> | undefined;
    /**
     * Service provider identifier
     */
    serviceId?: string | undefined;
    /**
     * List of Unified APIs that feature this connector.
     */
    unifiedApis?: Array<UnifiedApis> | undefined;
    /**
     * List of resources that are supported on the connector.
     */
    supportedResources?: Array<LinkedConnectorResource> | undefined;
    /**
     * List of resources that have settings that can be configured.
     */
    configurableResources?: Array<string> | undefined;
    /**
     * List of events that are supported on the connector across all Unified APIs.
     */
    supportedEvents?: Array<ConnectorEvent> | undefined;
    /**
     * How webhooks are supported for the connector. Sometimes the connector natively supports webhooks, other times Apideck virtualizes them based on polling.
     */
    webhookSupport?: WebhookSupport | undefined;
    /**
     * When a connector has schema_support, a call can be made to retrieve a json schema that describes a downstream resource.
     */
    schemaSupport?: SchemaSupport | undefined;
    docs?: Array<ConnectorDoc> | undefined;
    tlsSupport?: TlsSupport | undefined;
};
/** @internal */
export declare const ConnectorAuthType$inboundSchema: z.ZodNativeEnum<typeof ConnectorAuthType>;
/** @internal */
export declare const ConnectorOauthGrantType$inboundSchema: z.ZodNativeEnum<typeof ConnectorOauthGrantType>;
/** @internal */
export declare const OauthCredentialsSource$inboundSchema: z.ZodNativeEnum<typeof OauthCredentialsSource>;
/** @internal */
export declare const OauthScopes$inboundSchema: z.ZodType<OauthScopes, z.ZodTypeDef, unknown>;
export declare function oauthScopesFromJSON(jsonString: string): SafeParseResult<OauthScopes, SDKValidationError>;
/** @internal */
export declare const ConnectorOauthScopes$inboundSchema: z.ZodType<ConnectorOauthScopes, z.ZodTypeDef, unknown>;
export declare function connectorOauthScopesFromJSON(jsonString: string): SafeParseResult<ConnectorOauthScopes, SDKValidationError>;
/** @internal */
export declare const UnifiedApis$inboundSchema: z.ZodType<UnifiedApis, z.ZodTypeDef, unknown>;
export declare function unifiedApisFromJSON(jsonString: string): SafeParseResult<UnifiedApis, SDKValidationError>;
/** @internal */
export declare const TlsSupport$inboundSchema: z.ZodType<TlsSupport, z.ZodTypeDef, unknown>;
export declare function tlsSupportFromJSON(jsonString: string): SafeParseResult<TlsSupport, SDKValidationError>;
/** @internal */
export declare const Connector$inboundSchema: z.ZodType<Connector, z.ZodTypeDef, unknown>;
export declare function connectorFromJSON(jsonString: string): SafeParseResult<Connector, SDKValidationError>;
//# sourceMappingURL=connector.d.ts.map