import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ConnectorDoc, ConnectorDoc$Outbound } from "./connectordoc.js"; import { ConnectorEvent, ConnectorEvent$Outbound } from "./connectorevent.js"; import { ConnectorSetting, ConnectorSetting$Outbound } from "./connectorsetting.js"; import { ConnectorStatus } from "./connectorstatus.js"; import { LinkedConnectorResource, LinkedConnectorResource$Outbound } from "./linkedconnectorresource.js"; import { SchemaSupport, SchemaSupport$Outbound } from "./schemasupport.js"; import { UnifiedApiId } from "./unifiedapiid.js"; import { WebhookSupport, WebhookSupport$Outbound } 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; /** * 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; /** * 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; 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 | 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 | undefined; /** * List of resources that are supported on the connector. */ supportedResources?: Array | undefined; /** * List of resources that are not supported on the downstream. */ downstreamUnsupportedResources?: Array | undefined; /** * List of events that are supported on the connector for this Unified API. */ supportedEvents?: Array | 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 | 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 | undefined; /** * Service provider identifier */ serviceId?: string | undefined; /** * List of Unified APIs that feature this connector. */ unifiedApis?: Array | undefined; /** * List of resources that are supported on the connector. */ supportedResources?: Array | undefined; /** * List of resources that have settings that can be configured. */ configurableResources?: Array | undefined; /** * List of events that are supported on the connector across all Unified APIs. */ supportedEvents?: Array | 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 | undefined; tlsSupport?: TlsSupport | undefined; }; /** @internal */ export declare const ConnectorAuthType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ConnectorAuthType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ConnectorAuthType$ { /** @deprecated use `ConnectorAuthType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Oauth2: "oauth2"; readonly ApiKey: "apiKey"; readonly Basic: "basic"; readonly Custom: "custom"; readonly None: "none"; }>; /** @deprecated use `ConnectorAuthType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Oauth2: "oauth2"; readonly ApiKey: "apiKey"; readonly Basic: "basic"; readonly Custom: "custom"; readonly None: "none"; }>; } /** @internal */ export declare const ConnectorOauthGrantType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ConnectorOauthGrantType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ConnectorOauthGrantType$ { /** @deprecated use `ConnectorOauthGrantType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly AuthorizationCode: "authorization_code"; readonly ClientCredentials: "client_credentials"; readonly Password: "password"; }>; /** @deprecated use `ConnectorOauthGrantType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly AuthorizationCode: "authorization_code"; readonly ClientCredentials: "client_credentials"; readonly Password: "password"; }>; } /** @internal */ export declare const OauthCredentialsSource$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const OauthCredentialsSource$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace OauthCredentialsSource$ { /** @deprecated use `OauthCredentialsSource$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Integration: "integration"; readonly Connection: "connection"; }>; /** @deprecated use `OauthCredentialsSource$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Integration: "integration"; readonly Connection: "connection"; }>; } /** @internal */ export declare const OauthScopes$inboundSchema: z.ZodType; /** @internal */ export type OauthScopes$Outbound = { id?: string | undefined; label?: string | undefined; default_apis?: Array | undefined; }; /** @internal */ export declare const OauthScopes$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace OauthScopes$ { /** @deprecated use `OauthScopes$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `OauthScopes$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `OauthScopes$Outbound` instead. */ type Outbound = OauthScopes$Outbound; } export declare function oauthScopesToJSON(oauthScopes: OauthScopes): string; export declare function oauthScopesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ConnectorOauthScopes$inboundSchema: z.ZodType; /** @internal */ export type ConnectorOauthScopes$Outbound = { id?: string | undefined; label?: string | undefined; }; /** @internal */ export declare const ConnectorOauthScopes$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace ConnectorOauthScopes$ { /** @deprecated use `ConnectorOauthScopes$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ConnectorOauthScopes$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ConnectorOauthScopes$Outbound` instead. */ type Outbound = ConnectorOauthScopes$Outbound; } export declare function connectorOauthScopesToJSON(connectorOauthScopes: ConnectorOauthScopes): string; export declare function connectorOauthScopesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UnifiedApis$inboundSchema: z.ZodType; /** @internal */ export type UnifiedApis$Outbound = { id?: string | undefined; name?: string | undefined; auth_only?: boolean | undefined; oauth_scopes?: Array | undefined; supported_resources?: Array | undefined; downstream_unsupported_resources?: Array | undefined; supported_events?: Array | undefined; }; /** @internal */ export declare const UnifiedApis$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace UnifiedApis$ { /** @deprecated use `UnifiedApis$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `UnifiedApis$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `UnifiedApis$Outbound` instead. */ type Outbound = UnifiedApis$Outbound; } export declare function unifiedApisToJSON(unifiedApis: UnifiedApis): string; export declare function unifiedApisFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TlsSupport$inboundSchema: z.ZodType; /** @internal */ export type TlsSupport$Outbound = { type?: string | undefined; description?: string | undefined; }; /** @internal */ export declare const TlsSupport$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace TlsSupport$ { /** @deprecated use `TlsSupport$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `TlsSupport$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `TlsSupport$Outbound` instead. */ type Outbound = TlsSupport$Outbound; } export declare function tlsSupportToJSON(tlsSupport: TlsSupport): string; export declare function tlsSupportFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Connector$inboundSchema: z.ZodType; /** @internal */ export type Connector$Outbound = { id?: string | undefined; name?: string | undefined; status?: string | undefined; description?: string | null | undefined; icon_url?: string | undefined; logo_url?: string | undefined; website_url?: string | undefined; signup_url?: string | undefined; partner_signup_url?: string | undefined; free_trial_available?: boolean | undefined; auth_type?: string | undefined; auth_only?: boolean | undefined; blind_mapped?: boolean | undefined; oauth_grant_type?: string | undefined; oauth_credentials_source?: string | undefined; oauth_scopes?: Array | undefined; custom_scopes?: boolean | undefined; has_sandbox_credentials?: boolean | undefined; settings?: Array | undefined; service_id?: string | undefined; unified_apis?: Array | undefined; supported_resources?: Array | undefined; configurable_resources?: Array | undefined; supported_events?: Array | undefined; webhook_support?: WebhookSupport$Outbound | undefined; schema_support?: SchemaSupport$Outbound | undefined; docs?: Array | undefined; tls_support?: TlsSupport$Outbound | undefined; }; /** @internal */ export declare const Connector$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Connector$ { /** @deprecated use `Connector$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Connector$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Connector$Outbound` instead. */ type Outbound = Connector$Outbound; } export declare function connectorToJSON(connector: Connector): string; export declare function connectorFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=connector.d.ts.map