Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.inploi.com/llms.txt

Use this file to discover all available pages before exploring further.

Job Alerts Plugin

The Job Alerts plugin lets candidates subscribe to email notifications when new jobs matching their criteria are posted.

Installation

npm install @inploi/plugin-job-alerts

Basic usage

import { initialiseSdk } from '@inploi/sdk';
import { jobAlertsPlugin } from '@inploi/plugin-job-alerts';

const sdk = initialiseSdk({ publishableKey: 'pk_...', env: 'sandbox' });
const alerts = sdk.register(jobAlertsPlugin());

alerts.render({
  theme: { mode: 'light', corners: 'rounded', highlights: 'fill', accent: { hue: 260, chroma: 1 } },
  config: { label: 'Get alerts', headerText: 'Subscribe to job alerts' },
  initialFilters: {},
});

Host element

Add a container element where the widget will render:
<div id="inploi-job-alerts"></div>

Configuration

Theme

OptionValuesDescription
modelight, darkColor scheme
cornersrounded, soft, sharpBorder radius style
highlightsstroke, fillButton/tag style
accent{ hue: number, chroma: number }Accent color. hue: 0–360 color angle, chroma: 0–2 intensity multiplier

Other options

OptionTypeRequiredDescription
config.labelstringYesButton label text
config.headerTextstringYesHeader above the form
initialFiltersRecord<string, string | string[]>YesPre-populated filter values
termsobjectNoOverride default UI text. Keys: email, name, save, save_alert, frequency, create_alert, email_placeholder, name_placeholder, and frequency labels (DAILY, WEEKLY, MONTHLY)

API

render(params)

Mounts the job alerts form in the host element.

setFilters(filters)

Updates the current filters programmatically.
alerts.setFilters({ city: 'London' });

setConfig(config)

Updates the label and header text at runtime. Accepts an object or an updater function.
alerts.setConfig({ label: 'Subscribe', headerText: 'Get notified about new jobs' });

// Or use an updater function
alerts.setConfig(prev => ({ ...prev, label: 'Updated label' }));

prerender(params)

Returns HTML for server-side rendering.
const { html } = await alerts.prerender({ theme, config, initialFilters: {} });

Full configuration reference

type JobAlertsPluginParams = {
  theme: {
    mode: 'light' | 'dark';
    corners: 'rounded' | 'soft' | 'sharp';
    highlights: 'stroke' | 'fill';
    accent: { hue: number; chroma: number };
  };
  config: {
    label: string;
    headerText: string;
  };
  initialFilters: Record<string, string | string[]>;
  terms?: Partial<JobAlertsTranslationTerms>;
};
Job Alerts works well alongside the Job Search plugin, allowing candidates to save their current search as an alert:
import { jobSearchPlugin } from '@inploi/plugin-job-search';
import { jobAlertsPlugin } from '@inploi/plugin-job-alerts';

const jobSearch = sdk.register(jobSearchPlugin());

jobSearch.render({
  // ... other options
  alerts: {
    plugin: jobAlertsPlugin(),
    params: { config: { label: 'Alert me', headerText: 'Subscribe to job alerts' } },
  },
});