import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Sessions extends APIResource { /** * Create a new connect session for an employer */ new(body: SessionNewParams, options?: RequestOptions): APIPromise; /** * Create a new Connect session for reauthenticating an existing connection */ reauthenticate(body: SessionReauthenticateParams, options?: RequestOptions): APIPromise; } export interface SessionNewResponse { /** * The Connect URL to redirect the user to for authentication */ connect_url: string; /** * The unique identifier for the created connect session */ session_id: string; } export interface SessionReauthenticateResponse { /** * The Connect URL to redirect the user to for reauthentication */ connect_url: string; /** * The unique identifier for the created connect session */ session_id: string; } export interface SessionNewParams { /** * Unique identifier for the customer */ customer_id: string; /** * Name of the customer */ customer_name: string; /** * The Finch products to request access to. Use `benefits` to access deductions * endpoints — `deduction` is a deprecated alias that is still accepted but should * not be combined with `benefits`. */ products: Array<'benefits' | 'company' | 'deduction' | 'directory' | 'documents' | 'employment' | 'individual' | 'payment' | 'pay_statement' | 'ssn'>; /** * Email address of the customer */ customer_email?: string | null; /** * Integration configuration for the connect session */ integration?: SessionNewParams.Integration | null; /** * Enable manual authentication mode */ manual?: boolean | null; /** * The number of minutes until the session expires (defaults to 129,600, which is * 90 days) */ minutes_to_expire?: number | null; /** * The URI to redirect to after the Connect flow is completed */ redirect_uri?: string | null; /** * Sandbox mode for testing */ sandbox?: 'finch' | 'provider' | null; } export declare namespace SessionNewParams { /** * Integration configuration for the connect session */ interface Integration { /** * The provider to integrate with */ provider: string; /** * The authentication method to use */ auth_method?: 'assisted' | 'credential' | 'oauth' | 'api_token' | null; } } export interface SessionReauthenticateParams { /** * The ID of the existing connection to reauthenticate */ connection_id: string; /** * The number of minutes until the session expires (defaults to 43,200, which is 30 * days) */ minutes_to_expire?: number; /** * The products to request access to (optional for reauthentication). Use * `benefits` to access deductions endpoints — `deduction` is a deprecated alias * that is still accepted but should not be combined with `benefits`. */ products?: Array<'benefits' | 'company' | 'deduction' | 'directory' | 'documents' | 'employment' | 'individual' | 'payment' | 'pay_statement' | 'ssn'> | null; /** * The URI to redirect to after the Connect flow is completed */ redirect_uri?: string | null; } export declare namespace Sessions { export { type SessionNewResponse as SessionNewResponse, type SessionReauthenticateResponse as SessionReauthenticateResponse, type SessionNewParams as SessionNewParams, type SessionReauthenticateParams as SessionReauthenticateParams, }; } //# sourceMappingURL=sessions.d.ts.map