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 { AuthType } from "./authtype.js"; import { ConnectionState } from "./connectionstate.js"; import { CustomMapping, CustomMapping$Outbound } from "./custommapping.js"; import { CustomMappingInput, CustomMappingInput$Outbound } from "./custommappinginput.js"; import { FormField, FormField$Outbound } from "./formfield.js"; import { FormFieldOption, FormFieldOption$Outbound } from "./formfieldoption.js"; import { IntegrationState } from "./integrationstate.js"; import { OAuthGrantType } from "./oauthgranttype.js"; import { WebhookSubscription, WebhookSubscription$Outbound } from "./webhooksubscription.js"; /** * Status of the connection. */ export declare const ConnectionStatus: { readonly Live: "live"; readonly Upcoming: "upcoming"; readonly Requested: "requested"; }; /** * Status of the connection. */ export type ConnectionStatus = ClosedEnum; export declare const Target: { readonly CustomFields: "custom_fields"; readonly Resource: "resource"; }; export type Target = ClosedEnum; export type Value5 = string | number | number; export type ConnectionValue = string | number | number | boolean | Array; export type Defaults = { target?: Target | undefined; id?: string | undefined; options?: Array | undefined; value?: string | number | number | boolean | Array | undefined; }; export type Configuration = { resource?: string | undefined; defaults?: Array | undefined; }; export type Connection = { /** * The unique identifier of the connection. */ id?: string | undefined; /** * The ID of the service this connection belongs to. */ serviceId?: string | undefined; /** * The name of the connection */ name?: string | undefined; tagLine?: string | undefined; /** * The unified API category where the connection belongs to. */ unifiedApi?: string | undefined; /** * [Connection state flow](#section/Connection-state) */ state?: ConnectionState | undefined; /** * The current state of the Integration. */ integrationState?: IntegrationState | undefined; /** * Type of authorization used by the connector */ authType?: AuthType | undefined; /** * OAuth grant type used by the connector. More info: https://oauth.net/2/grant-types */ oauthGrantType?: OAuthGrantType | undefined; /** * Status of the connection. */ status?: ConnectionStatus | undefined; /** * Whether the connection is enabled or not. You can enable or disable a connection using the Update Connection API. */ enabled?: boolean | undefined; /** * The website URL of the connection */ website?: string | undefined; /** * A visual icon of the connection, that will be shown in the Vault */ icon?: string | undefined; /** * The logo of the connection, that will be shown in the Vault */ logo?: string | undefined; /** * The OAuth redirect URI. Redirect your users to this URI to let them authorize your app in the connector's UI. Before you can use this URI, you must add `redirect_uri` as a query parameter to the `authorize_url`. Be sure to URL encode the `redirect_uri` part. Your users will be redirected to this `redirect_uri` after they granted access to your app in the connector's UI. */ authorizeUrl?: string | null | undefined; /** * The OAuth revoke URI. Redirect your users to this URI to revoke this connection. Before you can use this URI, you must add `redirect_uri` as a query parameter. Your users will be redirected to this `redirect_uri` after they granted access to your app in the connector's UI. */ revokeUrl?: string | null | undefined; /** * Connection settings. Values will persist to `form_fields` with corresponding id */ settings?: { [k: string]: any; } | null | undefined; /** * Attach your own consumer specific metadata */ metadata?: { [k: string]: any; } | null | undefined; /** * The settings that are wanted to create a connection. */ formFields?: Array | undefined; configuration?: Array | undefined; configurableResources?: Array | undefined; resourceSchemaSupport?: Array | undefined; resourceSettingsSupport?: Array | undefined; validationSupport?: boolean | undefined; schemaSupport?: boolean | undefined; /** * List of settings that are required to be configured on integration before authorization can occur */ settingsRequiredForAuthorization?: Array | undefined; subscriptions?: Array | undefined; /** * Whether the connector has a guide available in the developer docs or not (https://docs.apideck.com/connectors/{service_id}/docs/consumer+connection). */ hasGuide?: boolean | undefined; createdAt?: number | undefined; /** * List of custom mappings configured for this connection */ customMappings?: Array | undefined; updatedAt?: number | null | undefined; }; export type ConnectionDefaults = { id?: string | undefined; options?: Array | undefined; value?: string | number | number | boolean | Array | undefined; }; export type ConnectionConfiguration = { resource?: string | undefined; defaults?: Array | undefined; }; export type ConnectionInput = { /** * Whether the connection is enabled or not. You can enable or disable a connection using the Update Connection API. */ enabled?: boolean | undefined; /** * Connection settings. Values will persist to `form_fields` with corresponding id */ settings?: { [k: string]: any; } | null | undefined; /** * Attach your own consumer specific metadata */ metadata?: { [k: string]: any; } | null | undefined; configuration?: Array | undefined; /** * List of custom mappings configured for this connection */ customMappings?: Array | undefined; }; /** @internal */ export declare const ConnectionStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ConnectionStatus$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 ConnectionStatus$ { /** @deprecated use `ConnectionStatus$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Live: "live"; readonly Upcoming: "upcoming"; readonly Requested: "requested"; }>; /** @deprecated use `ConnectionStatus$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Live: "live"; readonly Upcoming: "upcoming"; readonly Requested: "requested"; }>; } /** @internal */ export declare const Target$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Target$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 Target$ { /** @deprecated use `Target$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly CustomFields: "custom_fields"; readonly Resource: "resource"; }>; /** @deprecated use `Target$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly CustomFields: "custom_fields"; readonly Resource: "resource"; }>; } /** @internal */ export declare const Value5$inboundSchema: z.ZodType; /** @internal */ export type Value5$Outbound = string | number | number; /** @internal */ export declare const Value5$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 Value5$ { /** @deprecated use `Value5$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Value5$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Value5$Outbound` instead. */ type Outbound = Value5$Outbound; } export declare function value5ToJSON(value5: Value5): string; export declare function value5FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ConnectionValue$inboundSchema: z.ZodType; /** @internal */ export type ConnectionValue$Outbound = string | number | number | boolean | Array; /** @internal */ export declare const ConnectionValue$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 ConnectionValue$ { /** @deprecated use `ConnectionValue$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ConnectionValue$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ConnectionValue$Outbound` instead. */ type Outbound = ConnectionValue$Outbound; } export declare function connectionValueToJSON(connectionValue: ConnectionValue): string; export declare function connectionValueFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Defaults$inboundSchema: z.ZodType; /** @internal */ export type Defaults$Outbound = { target?: string | undefined; id?: string | undefined; options?: Array | undefined; value?: string | number | number | boolean | Array | undefined; }; /** @internal */ export declare const Defaults$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 Defaults$ { /** @deprecated use `Defaults$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Defaults$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Defaults$Outbound` instead. */ type Outbound = Defaults$Outbound; } export declare function defaultsToJSON(defaults: Defaults): string; export declare function defaultsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Configuration$inboundSchema: z.ZodType; /** @internal */ export type Configuration$Outbound = { resource?: string | undefined; defaults?: Array | undefined; }; /** @internal */ export declare const Configuration$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 Configuration$ { /** @deprecated use `Configuration$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Configuration$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Configuration$Outbound` instead. */ type Outbound = Configuration$Outbound; } export declare function configurationToJSON(configuration: Configuration): string; export declare function configurationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Connection$inboundSchema: z.ZodType; /** @internal */ export type Connection$Outbound = { id?: string | undefined; service_id?: string | undefined; name?: string | undefined; tag_line?: string | undefined; unified_api?: string | undefined; state?: string | undefined; integration_state?: string | undefined; auth_type?: string | undefined; oauth_grant_type?: string | undefined; status?: string | undefined; enabled?: boolean | undefined; website?: string | undefined; icon?: string | undefined; logo?: string | undefined; authorize_url?: string | null | undefined; revoke_url?: string | null | undefined; settings?: { [k: string]: any; } | null | undefined; metadata?: { [k: string]: any; } | null | undefined; form_fields?: Array | undefined; configuration?: Array | undefined; configurable_resources?: Array | undefined; resource_schema_support?: Array | undefined; resource_settings_support?: Array | undefined; validation_support?: boolean | undefined; schema_support?: boolean | undefined; settings_required_for_authorization?: Array | undefined; subscriptions?: Array | undefined; has_guide?: boolean | undefined; created_at?: number | undefined; custom_mappings?: Array | undefined; updated_at?: number | null | undefined; }; /** @internal */ export declare const Connection$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 Connection$ { /** @deprecated use `Connection$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Connection$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Connection$Outbound` instead. */ type Outbound = Connection$Outbound; } export declare function connectionToJSON(connection: Connection): string; export declare function connectionFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ConnectionDefaults$inboundSchema: z.ZodType; /** @internal */ export type ConnectionDefaults$Outbound = { id?: string | undefined; options?: Array | undefined; value?: string | number | number | boolean | Array | undefined; }; /** @internal */ export declare const ConnectionDefaults$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 ConnectionDefaults$ { /** @deprecated use `ConnectionDefaults$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ConnectionDefaults$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ConnectionDefaults$Outbound` instead. */ type Outbound = ConnectionDefaults$Outbound; } export declare function connectionDefaultsToJSON(connectionDefaults: ConnectionDefaults): string; export declare function connectionDefaultsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ConnectionConfiguration$inboundSchema: z.ZodType; /** @internal */ export type ConnectionConfiguration$Outbound = { resource?: string | undefined; defaults?: Array | undefined; }; /** @internal */ export declare const ConnectionConfiguration$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 ConnectionConfiguration$ { /** @deprecated use `ConnectionConfiguration$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ConnectionConfiguration$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ConnectionConfiguration$Outbound` instead. */ type Outbound = ConnectionConfiguration$Outbound; } export declare function connectionConfigurationToJSON(connectionConfiguration: ConnectionConfiguration): string; export declare function connectionConfigurationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ConnectionInput$inboundSchema: z.ZodType; /** @internal */ export type ConnectionInput$Outbound = { enabled?: boolean | undefined; settings?: { [k: string]: any; } | null | undefined; metadata?: { [k: string]: any; } | null | undefined; configuration?: Array | undefined; custom_mappings?: Array | undefined; }; /** @internal */ export declare const ConnectionInput$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 ConnectionInput$ { /** @deprecated use `ConnectionInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ConnectionInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ConnectionInput$Outbound` instead. */ type Outbound = ConnectionInput$Outbound; } export declare function connectionInputToJSON(connectionInput: ConnectionInput): string; export declare function connectionInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=connection.d.ts.map