import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { ConnectTriggerConfiguration } from "./connecttriggerconfiguration.js";
import { ConnectTriggerDestination } from "./connecttriggerdestination.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export declare const Environment2: {
    readonly Development: "development";
    readonly Preview: "preview";
    readonly Production: "production";
};
export type Environment2 = ClosedEnum<typeof Environment2>;
/**
 * Deployment environment of the project principal.
 */
export type Environment = string | Environment2;
/**
 * Principal that originally created the connector — either a Vercel user (interactive dashboard / CLI flow) or a Vercel deployment (OIDC-authenticated project, used by runtime auto-provisioning). See {@link ConnexPrincipal}. Optional: pre-existing rows from before this shape was introduced may carry no attribution at all.
 */
export type Two = {
    /**
     * Principal kind.
     */
    type: "project";
    /**
     * Vercel project ID.
     */
    id: string;
    /**
     * Deployment environment of the project principal.
     */
    environment: string | Environment2;
};
/**
 * Principal that originally created the connector — either a Vercel user (interactive dashboard / CLI flow) or a Vercel deployment (OIDC-authenticated project, used by runtime auto-provisioning). See {@link ConnexPrincipal}. Optional: pre-existing rows from before this shape was introduced may carry no attribution at all.
 */
export type One = {
    /**
     * Principal kind.
     */
    type: "user";
    /**
     * Vercel user ID.
     */
    id: string;
};
/**
 * Principal that created the connector.
 */
export type CreatedBy = One | Two;
export declare const ConnectConnectorEnvironment2: {
    readonly Development: "development";
    readonly Preview: "preview";
    readonly Production: "production";
};
export type ConnectConnectorEnvironment2 = ClosedEnum<typeof ConnectConnectorEnvironment2>;
/**
 * Deployment environment of the project principal.
 */
export type UpdatedByEnvironment = string | ConnectConnectorEnvironment2;
/**
 * Principal that most recently mutated the connector. Same shape as {@link createdBy} but tracks the most recent updater, not the original creator. At create time the two fields point at the same principal; they diverge on the first subsequent update.
 */
export type UpdatedBy2 = {
    /**
     * Principal kind.
     */
    type: "project";
    /**
     * Vercel project ID.
     */
    id: string;
    /**
     * Deployment environment of the project principal.
     */
    environment: string | ConnectConnectorEnvironment2;
};
/**
 * Principal that most recently mutated the connector. Same shape as {@link createdBy} but tracks the most recent updater, not the original creator. At create time the two fields point at the same principal; they diverge on the first subsequent update.
 */
export type UpdatedBy1 = {
    /**
     * Principal kind.
     */
    type: "user";
    /**
     * Vercel user ID.
     */
    id: string;
};
/**
 * Principal that most recently updated the connector.
 */
export type UpdatedBy = UpdatedBy1 | UpdatedBy2;
/**
 * How the connector row was originally created. New create paths stamp this explicitly; older rows may omit it.
 */
export declare const CreationMode: {
    readonly Managed: "managed";
    readonly Manual: "manual";
};
/**
 * How the connector row was originally created. New create paths stamp this explicitly; older rows may omit it.
 */
export type CreationMode = ClosedEnum<typeof CreationMode>;
/**
 * Managed connector metadata exposed without leaking the manager connector or installation identifiers.
 */
export type Managed = {
    /**
     * Whether Vercel synchronizes provider-side configuration.
     */
    sync?: boolean | undefined;
};
/**
 * Connector implementation type.
 */
export declare const ConnectConnectorType: {
    readonly ApiKey: "api-key";
    readonly AwsAlpha: "aws-alpha";
    readonly Custom: "custom";
    readonly Discord: "discord";
    readonly Github: "github";
    readonly Linear: "linear";
    readonly Linq: "linq";
    readonly MicrosoftEntra: "microsoft-entra";
    readonly MicrosoftTeams: "microsoft-teams";
    readonly Oauth: "oauth";
    readonly Photon: "photon";
    readonly Salesforce: "salesforce";
    readonly Sendblue: "sendblue";
    readonly Slack: "slack";
    readonly Snowflake: "snowflake";
    readonly SnowflakeWif: "snowflake-wif";
};
/**
 * Connector implementation type.
 */
export type ConnectConnectorType = ClosedEnum<typeof ConnectConnectorType>;
/**
 * App-token capabilities and known grants for the connector.
 */
export type AppTokens = {
    /**
     * Whether one app token can be used across installations.
     */
    crossInstallation: boolean;
    /**
     * Whether callers can narrow app-token grants per request.
     */
    supportsRefinement: boolean;
    /**
     * Whether callers can request resource-specific app tokens.
     */
    supportsResources?: boolean | undefined;
    /**
     * True when changing app token grants requires reinstalling the app, so tokens cannot be partitioned independently by requester environment.
     */
    requiresReinstallation?: boolean | undefined;
    /**
     * Known allowed app-level scopes. For Slack this is the bot scope set configured on the app; for OAuth it is the connector's enabled `clientCredentials.scopes` configuration.
     */
    scopes?: Array<string> | undefined;
    /**
     * Supported OAuth authorization-detail type names.
     */
    supportedAuthorizationDetails?: Array<string> | undefined;
    /**
     * Link to the page on the service where this connector's app-level permissions are declared and granted, when the service has one and it differs from `clientUrl`.
     */
    permissionsUrl?: string | undefined;
};
/**
 * User-token capabilities and known grants for the connector.
 */
export type UserTokens = {
    /**
     * Whether one user token can be used across installations.
     */
    crossInstallation: boolean;
    /**
     * Whether callers can narrow user-token grants per request.
     */
    supportsRefinement: boolean;
    /**
     * Whether callers can request resource-specific user tokens.
     */
    supportsResources?: boolean | undefined;
    /**
     * Known allowed user-level scopes. For Slack this is the user scope set configured on the app; for OAuth it is the connector's enabled `userAuthorization.scopes` configuration.
     */
    scopes?: Array<string> | undefined;
    /**
     * Supported OAuth authorization-detail type names.
     */
    supportedAuthorizationDetails?: Array<string> | undefined;
    /**
     * User authorization is completed by the Connect consent screen submitting a credential instead of an OAuth redirect.
     */
    manualCredentialInput?: boolean | undefined;
};
/**
 * Whether the connector icon can propagate to the provider.
 */
export declare const SupportsIcon: {
    readonly False: "false";
    readonly Maybe: "maybe";
    readonly True: "true";
};
/**
 * Whether the connector icon can propagate to the provider.
 */
export type SupportsIcon = ClosedEnum<typeof SupportsIcon>;
/**
 * A connector that defines how Vercel accesses an external service.
 */
export type ConnectConnector = {
    /**
     * Stable `scl_` connector ID. Use this value directly in `{connector}`.
     */
    id: string;
    /**
     * Team-scoped UID. URL-encode this value before using it in `{connector}`.
     */
    uid: string;
    /**
     * Installation used when a token request does not specify an installation.
     */
    defaultInstallationId?: string | undefined;
    /**
     * Creation time in epoch milliseconds.
     */
    createdAt: number;
    /**
     * Last update time in epoch milliseconds.
     */
    updatedAt: number;
    /**
     * Time when this connector started requiring reinstallation because an installation-affecting app-token grant changed.
     */
    reinstallAt?: number | undefined;
    /**
     * Principal that created the connector.
     */
    createdBy?: One | Two | undefined;
    /**
     * Principal that most recently updated the connector.
     */
    updatedBy?: UpdatedBy1 | UpdatedBy2 | undefined;
    /**
     * How the connector row was originally created. New create paths stamp this explicitly; older rows may omit it.
     */
    creationMode?: CreationMode | undefined;
    /**
     * Managed connector metadata exposed without leaking the manager connector or installation identifiers.
     */
    managed?: Managed | undefined;
    /**
     * Connector implementation type.
     */
    type: ConnectConnectorType;
    /**
     * Best-effort identifier of the third-party service this connector represents, independent of `type`. Examples: `'slack'`, `'mcp.linear.app'`, and `'auth.example.com'`. Always present in API responses.
     */
    service: string;
    /**
     * The connection method this connector was created from, when the create request named one.
     */
    connectionMethod?: string | undefined;
    /**
     * Which of the service's products/surfaces this connector points at.
     */
    target?: string | undefined;
    /**
     * Connector name within the owning team.
     */
    name: string;
    /**
     * Human-readable connector name.
     */
    displayName: string;
    /**
     * Provider-side URL for viewing or managing the resource represented by the connector. The destination can be an app, account, phone line, or service instance, depending on the connector type.
     */
    clientUrl?: string | null | undefined;
    /**
     * Redirect URI registered with the third-party service for this connector, if any. Used by `startAuthorization`/`startInstallation` to replay the exact URI back to the provider's token endpoint. Absent on connectors created before this field was introduced; those callers fall back to the `https://connect.vercel.com/callback` default.
     */
    redirectUri?: string | undefined;
    /**
     * Human-readable name of the connector type.
     */
    typeName: string;
    /**
     * Icon identifier supplied by the connector type.
     */
    typeIcon?: string | undefined;
    /**
     * Public website for the connected service.
     */
    website?: string | undefined;
    /**
     * Developer website for the connected service.
     */
    devsite?: string | undefined;
    /**
     * Developer documentation for the connected service.
     */
    docsite?: string | undefined;
    /**
     * Connector branding icon. SHA-1 hash that resolves to the uploaded icon through the Vercel avatar service. Consumers render this with `https://vercel.com/api/www/avatar/{icon}`.
     */
    icon?: string | undefined;
    /**
     * Hex background color (e.g., `#000000`) for branding.
     */
    backgroundColor?: string | undefined;
    /**
     * Hex accent color (e.g., `#000000`) for branding.
     */
    accentColor?: string | undefined;
    /**
     * Token subject types supported by the connector.
     */
    supportedSubjectTypes: Array<string>;
    /**
     * App-token capabilities and known grants for the connector.
     */
    appTokens?: AppTokens | undefined;
    /**
     * User-token capabilities and known grants for the connector.
     */
    userTokens?: UserTokens | undefined;
    /**
     * Whether the connector supports an installation flow.
     */
    supportsInstallation: boolean;
    /**
     * Whether Connect can revoke tokens for this connector.
     */
    supportsRevocation: boolean;
    /**
     * Whether this connector type supports trigger webhooks. Derived from the type definition; indicates that `triggers` and `triggerDestinations` may be meaningful for this connector.
     */
    supportsTriggers: boolean;
    /**
     * Whether the connector icon can propagate to the provider.
     */
    supportsIcon: SupportsIcon;
    /**
     * Incoming trigger configuration. Only present when enabled.
     */
    triggers?: ConnectTriggerConfiguration | undefined;
    /**
     * Known events this connector subscribes to (e.g. Slack bot events, GitHub webhook events). Names are type-specific and validated by the managed-create flow when forwarded to the third-party service.
     */
    events?: Array<string> | undefined;
    /**
     * Destinations that incoming triggers should be forwarded to. Limited to 3 entries. Set the initial destination with `triggerDestination` during creation. Replace the complete set with `PATCH /v1/connect/connectors/{connector}/trigger-destinations`.
     */
    triggerDestinations?: Array<ConnectTriggerDestination> | undefined;
};
/** @internal */
export declare const Environment2$inboundSchema: z.ZodNativeEnum<typeof Environment2>;
/** @internal */
export declare const Environment$inboundSchema: z.ZodType<Environment, z.ZodTypeDef, unknown>;
export declare function environmentFromJSON(jsonString: string): SafeParseResult<Environment, SDKValidationError>;
/** @internal */
export declare const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown>;
export declare function twoFromJSON(jsonString: string): SafeParseResult<Two, SDKValidationError>;
/** @internal */
export declare const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown>;
export declare function oneFromJSON(jsonString: string): SafeParseResult<One, SDKValidationError>;
/** @internal */
export declare const CreatedBy$inboundSchema: z.ZodType<CreatedBy, z.ZodTypeDef, unknown>;
export declare function createdByFromJSON(jsonString: string): SafeParseResult<CreatedBy, SDKValidationError>;
/** @internal */
export declare const ConnectConnectorEnvironment2$inboundSchema: z.ZodNativeEnum<typeof ConnectConnectorEnvironment2>;
/** @internal */
export declare const UpdatedByEnvironment$inboundSchema: z.ZodType<UpdatedByEnvironment, z.ZodTypeDef, unknown>;
export declare function updatedByEnvironmentFromJSON(jsonString: string): SafeParseResult<UpdatedByEnvironment, SDKValidationError>;
/** @internal */
export declare const UpdatedBy2$inboundSchema: z.ZodType<UpdatedBy2, z.ZodTypeDef, unknown>;
export declare function updatedBy2FromJSON(jsonString: string): SafeParseResult<UpdatedBy2, SDKValidationError>;
/** @internal */
export declare const UpdatedBy1$inboundSchema: z.ZodType<UpdatedBy1, z.ZodTypeDef, unknown>;
export declare function updatedBy1FromJSON(jsonString: string): SafeParseResult<UpdatedBy1, SDKValidationError>;
/** @internal */
export declare const UpdatedBy$inboundSchema: z.ZodType<UpdatedBy, z.ZodTypeDef, unknown>;
export declare function updatedByFromJSON(jsonString: string): SafeParseResult<UpdatedBy, SDKValidationError>;
/** @internal */
export declare const CreationMode$inboundSchema: z.ZodNativeEnum<typeof CreationMode>;
/** @internal */
export declare const Managed$inboundSchema: z.ZodType<Managed, z.ZodTypeDef, unknown>;
export declare function managedFromJSON(jsonString: string): SafeParseResult<Managed, SDKValidationError>;
/** @internal */
export declare const ConnectConnectorType$inboundSchema: z.ZodNativeEnum<typeof ConnectConnectorType>;
/** @internal */
export declare const AppTokens$inboundSchema: z.ZodType<AppTokens, z.ZodTypeDef, unknown>;
export declare function appTokensFromJSON(jsonString: string): SafeParseResult<AppTokens, SDKValidationError>;
/** @internal */
export declare const UserTokens$inboundSchema: z.ZodType<UserTokens, z.ZodTypeDef, unknown>;
export declare function userTokensFromJSON(jsonString: string): SafeParseResult<UserTokens, SDKValidationError>;
/** @internal */
export declare const SupportsIcon$inboundSchema: z.ZodNativeEnum<typeof SupportsIcon>;
/** @internal */
export declare const ConnectConnector$inboundSchema: z.ZodType<ConnectConnector, z.ZodTypeDef, unknown>;
export declare function connectConnectorFromJSON(jsonString: string): SafeParseResult<ConnectConnector, SDKValidationError>;
//# sourceMappingURL=connectconnector.d.ts.map