Skip to main content

What is Scheduler module

The Scheduler module is part of the Proview SDK, exposed as Proview.scheduler. It provides a candidate-facing interface for managing interview scheduler workflows with integrated authentication. Once initialized, it lets your application:
  • Fetch meetings — retrieve a candidate’s scheduled interviews and their current state.
  • Respond to interviews — accept, decline, propose a new time, or submit availability on behalf of the candidate.
  • Render scheduler UI — mount a prebuilt scheduler interface in inline, sidebar, or modal layout.
  • React to state changes — subscribe to events for phase transitions, route changes, and errors.
Both Promise-based and callback-based async patterns are supported. All UI text is localizable via the locale option.

Quickstart

All async methods support both Promises and an optional callback. This walkthrough uses Promises. See Callback Signature for the callback form.

1. Load the SDK and initialize

Declare Proview.scheduler() in the modules array when calling Proview.init(). The dsn and credential are inherited — no per-module init call needed. The SDK authenticates the user and makes the user object available globally at Proview.user.

2. Fetch meetings

3. Fetch state for a specific meeting

4. Respond to an interview

Accept:
Decline:
Propose a new time (when the candidate wants to reschedule):
Set availability (saves the candidate’s general availability; not scoped to a single meeting):

5. Render the scheduler UI

Mount the scheduler UI into any container element. Three layout modes are supported: inline, sidebar, and modal.

6. Navigate programmatically

Use Proview.scheduler.navigate() to trigger a view change from outside the UI:
Use mounted.setView() to change the view from the mounted instance directly:

7. Listen to events

on() returns an unsubscribe function, useful for cleanup in component lifecycles:

8. Teardown

When done, unmount the UI and destroy the session:

API Reference

Proview.scheduler

The scheduler module is automatically initialized when Proview.scheduler() is included in the modules array passed to Proview.init(). The dsn and credential are inherited from the global init — no separate per-module call is needed.
Proview.scheduler exposes:
The authenticated user is available globally at Proview.user after initialization.

User Object

After initializing the scheduler module, Proview.user provides a Firebase-compatible user object accessible globally. User Interface
Example:

Firebase Authentication

Proview.auth.FirebaseAuthStrategy(config)

Creates a Firebase authentication credential for use with the Proview SDK modules. Input
Returns — FirebaseAuthStrategy A credential object passed to Proview.init(). All modules declared in the modules array inherit it automatically. Example:

fetchMeetings(cb?)

Returns all meetings for the candidate.

fetchMeeting(meetingId, cb?)

Returns the current scheduler state for one meeting.

acceptMeeting(payload, cb?)

Accepts a specific interview within a meeting. Input

declineMeeting(payload, cb?)

Declines a specific interview within a meeting. Input

proposeNewTime(payload, cb?)

Submits a candidate’s preferred alternative time slot. Input

setAvailability(payload, cb?)

Saves the candidate’s general availability for scheduler. Availability is candidate-scoped, not tied to a specific meeting. The meetingId provides session context for the operation. Input

mount(options)

Mounts the scheduler UI into a host element. Input
Returns — MountedSchedulerUi

Navigates the mounted UI to a target view. Equivalent to mounted.setView() but called on the session rather than the mounted instance.

getCurrentView()

Returns the currently active view name.

on(event, handler) / off(event, handler)

Subscribes or unsubscribes from scheduler events. on() returns an unsubscribe function as a convenience alternative to calling off(). Event names and payloads Full type definitions

destroy()

Cleans up the scheduler session and all event listeners. Call mounted.unmount() first if the UI is still mounted.

Callback Signature

All async methods accept an optional callback as the last argument. The callback uses a Node.js-style error-first signature.
Either style works: