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 { ConsumerMetadata, ConsumerMetadata$Outbound } from "./consumermetadata.js"; import { UnifiedApiId } from "./unifiedapiid.js"; export declare const AllowActions: { readonly Delete: "delete"; readonly Disconnect: "disconnect"; readonly Reauthorize: "reauthorize"; readonly Disable: "disable"; }; export type AllowActions = ClosedEnum; /** * Settings to change the way the Vault is displayed. */ export type SessionSettings = { /** * Provide the IDs of the Unified APIs you want to be visible. Leaving it empty or omitting this field will show all Unified APIs. */ unifiedApis?: Array | undefined; /** * A boolean that controls the display of the configurable resources for an integration. When set to true, the resource configuration options will be hidden and not shown to the user. When set to false, the resource configuration options will be displayed to the user. */ hideResourceSettings?: boolean | undefined; /** * Configure [Vault](/apis/vault/reference#section/Get-Started) to show a banner informing the logged in user is in a test environment. */ sandboxMode?: boolean | undefined; /** * Configure [Vault](/apis/vault/reference#section/Get-Started) to run in isolation mode, meaning it only shows the connection settings and hides the navigation items. */ isolationMode?: boolean | undefined; /** * The duration of time the session is valid for (maximum 1 week). */ sessionLength?: string | undefined; /** * Configure [Vault](/apis/vault/reference#section/Get-Started) to show the logs page. Defaults to `true`. */ showLogs?: boolean | undefined; /** * Configure [Vault](/apis/vault/reference#section/Get-Started) to show the suggestions page. Defaults to `false`. */ showSuggestions?: boolean | undefined; /** * Configure [Vault](/apis/vault/reference#section/Get-Started) to show the sidebar. Defaults to `true`. */ showSidebar?: boolean | undefined; /** * Automatically redirect to redirect uri after the connection has been configured as callable. Defaults to `false`. */ autoRedirect?: boolean | undefined; /** * Hide Apideck connection guides in [Vault](/apis/vault/reference#section/Get-Started). Defaults to `false`. */ hideGuides?: boolean | undefined; /** * Hide actions from your users in [Vault](/apis/vault/reference#section/Get-Started). Actions in `allow_actions` will be shown on a connection in Vault. * * @remarks * Available actions are: `delete`, `disconnect`, `reauthorize` and `disable`. * Empty array will hide all actions. By default all actions are visible. */ allowActions?: Array | undefined; }; /** * Theming options to change the look and feel of Vault. */ export type Theme = { /** * The URL to the favicon to use for Vault. */ favicon?: string | undefined; /** * The URL to the logo to use for Vault. */ logo?: string | undefined; /** * The primary color to use for Vault. */ primaryColor?: string | undefined; /** * The background color to use for the sidebar. */ sidepanelBackgroundColor?: string | undefined; /** * The text color to use for the sidebar. */ sidepanelTextColor?: string | undefined; /** * The name that will be shown in the sidebar. */ vaultName?: string | undefined; /** * The URL to the privacy policy that will be shown in the sidebar. */ privacyUrl?: string | undefined; /** * The URL to the terms and conditions that will be shown in the sidebar. */ termsUrl?: string | undefined; }; export type Session = { /** * The metadata of the consumer. This is used to display the consumer in the sidebar. This is optional, but recommended. */ consumerMetadata?: ConsumerMetadata | undefined; /** * The URL to redirect the user to after the session has been configured. */ redirectUri?: string | undefined; /** * Settings to change the way the Vault is displayed. */ settings?: SessionSettings | undefined; /** * Theming options to change the look and feel of Vault. */ theme?: Theme | undefined; /** * Custom consumer settings that are passed as part of the session. */ customConsumerSettings?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const AllowActions$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AllowActions$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 AllowActions$ { /** @deprecated use `AllowActions$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Delete: "delete"; readonly Disconnect: "disconnect"; readonly Reauthorize: "reauthorize"; readonly Disable: "disable"; }>; /** @deprecated use `AllowActions$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Delete: "delete"; readonly Disconnect: "disconnect"; readonly Reauthorize: "reauthorize"; readonly Disable: "disable"; }>; } /** @internal */ export declare const SessionSettings$inboundSchema: z.ZodType; /** @internal */ export type SessionSettings$Outbound = { unified_apis?: Array | undefined; hide_resource_settings: boolean; sandbox_mode: boolean; isolation_mode: boolean; session_length: string; show_logs: boolean; show_suggestions: boolean; show_sidebar: boolean; auto_redirect: boolean; hide_guides: boolean; allow_actions?: Array | undefined; }; /** @internal */ export declare const SessionSettings$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 SessionSettings$ { /** @deprecated use `SessionSettings$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `SessionSettings$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `SessionSettings$Outbound` instead. */ type Outbound = SessionSettings$Outbound; } export declare function sessionSettingsToJSON(sessionSettings: SessionSettings): string; export declare function sessionSettingsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Theme$inboundSchema: z.ZodType; /** @internal */ export type Theme$Outbound = { favicon?: string | undefined; logo?: string | undefined; primary_color?: string | undefined; sidepanel_background_color?: string | undefined; sidepanel_text_color?: string | undefined; vault_name?: string | undefined; privacy_url?: string | undefined; terms_url?: string | undefined; }; /** @internal */ export declare const Theme$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 Theme$ { /** @deprecated use `Theme$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Theme$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Theme$Outbound` instead. */ type Outbound = Theme$Outbound; } export declare function themeToJSON(theme: Theme): string; export declare function themeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Session$inboundSchema: z.ZodType; /** @internal */ export type Session$Outbound = { consumer_metadata?: ConsumerMetadata$Outbound | undefined; redirect_uri?: string | undefined; settings?: SessionSettings$Outbound | undefined; theme?: Theme$Outbound | undefined; custom_consumer_settings?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const Session$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 Session$ { /** @deprecated use `Session$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Session$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Session$Outbound` instead. */ type Outbound = Session$Outbound; } export declare function sessionToJSON(session: Session): string; export declare function sessionFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=session.d.ts.map