UNPKG

@polymindslabs/widget-sdk

Version:

Universal Job Widget SDK for embedding job boards and apply buttons

67 lines (66 loc) 2.31 kB
/** * React Wrapper for Inzif Widget SDK */ import React from 'react'; import { JobWidget } from '../core/widget'; import type { WidgetConfig, WidgetState, WidgetType, Job, Application, WidgetError, ProfileIncompleteData } from '../core/types'; export interface JobWidgetProps { tenantId: string; apiKey: string; clientId: string; redirectUri: string; baseUrl: string; type?: WidgetType; theme?: 'light' | 'dark' | 'auto' | 'custom'; responsive?: boolean; usePopup?: boolean; showLogo?: boolean; showPoweredBy?: boolean; profileCompletionRequired?: number; locale?: string; debug?: boolean; sandbox?: boolean; version?: string; className?: string; style?: React.CSSProperties; onInit?: () => void; onDestroy?: () => void; onApply?: (job: Job) => void; onSuccess?: (application: Application) => void; onError?: (error: WidgetError) => void; onProfileIncomplete?: (data: ProfileIncompleteData) => void; onAuthRequired?: () => void; onAuthSuccess?: (token: string) => void; onDisconnect?: () => void; } export declare function useInzifWidget(config: Omit<WidgetConfig, 'container'>): { widget: JobWidget | null; state: WidgetState | null; loading: boolean; error: WidgetError | null; authenticate: () => Promise<void | null>; applyToJob: (jobId: string, tenantId: string) => Promise<Application | ProfileIncompleteData | null>; }; export declare const JobWidgetComponent: React.FC<JobWidgetProps>; export interface InzifJobListProps { tenantId: string; apiKey: string; baseUrl: string; clientId: string; redirectUri: string; department?: string; location?: string; search?: string; perPage?: number; className?: string; style?: React.CSSProperties; onApply?: (job: Job) => void; onSuccess?: (application: Application) => void; onError?: (error: WidgetError) => void; onProfileIncomplete?: (data: ProfileIncompleteData) => void; onAuthRequired?: () => void; onAuthSuccess?: (token: string) => void; onDisconnect?: () => void; } export declare const JobList: React.FC<InzifJobListProps>; export type { WidgetConfig, WidgetState, Job, Application, User, WidgetError, ProfileIncompleteData } from '../core/types';