@inploi/plugin-job-alerts 5.1.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,6 @@
1
+ import { JOB_ALERT_FREQUENCIES as FREQUENCIES } from '@inploi/sdk';
2
+
1
3
  export declare const JOB_ALERTS_ELEMENT_ID = "inploi-job-alerts";
2
4
  export declare const JOB_ALERTS_SCOPE_ELEMENT_ID = "ija";
3
- export declare const FREQUENCIES: readonly ["DAILY", "WEEKLY", "MONTHLY"];
5
+ export { FREQUENCIES };
4
6
  export type Frequency = (typeof FREQUENCIES)[number];
@@ -1,7 +1,9 @@
1
1
  import { JobAlertsTranslationTerms } from './job-alerts.terms';
2
+ import { JobAlertsFilters } from './lib/rpc';
2
3
 
3
4
  export { defaultTerms } from './job-alerts.terms';
4
5
  export type { JobAlertsTranslationTerms } from './job-alerts.terms';
6
+ export type { JobAlertsFilters } from './lib/rpc';
5
7
  export type JobAlertsConfig = {
6
8
  /** Button label */
7
9
  label: string;
@@ -23,7 +25,7 @@ export type JobAlertsPluginParams = {
23
25
  };
24
26
  };
25
27
  config: JobAlertsConfig;
26
- initialFilters: Record<string, string | string[]>;
28
+ initialFilters: JobAlertsFilters;
27
29
  terms?: JobAlertsTranslationTerms;
28
30
  };
29
31
  export declare const createJobAlertsDomManager: () => {
@@ -48,7 +50,16 @@ export declare const jobAlertsPlugin: () => ({ rpcClient, logger, analytics }: {
48
50
  }>;
49
51
  /** Renders the Job Alerts Plugin inside the container element. */
50
52
  render: (params: JobAlertsPluginParams) => Promise<void>;
51
- setFilters: (newFilters: Record<string, string | string[]>) => Record<string, string | string[]>;
53
+ setFilters: (newFilters: JobAlertsFilters) => {
54
+ [x: string]: string | string[] | {
55
+ type: "provided";
56
+ lat: number;
57
+ lng: number;
58
+ radius: number;
59
+ unit?: "miles" | "km" | undefined;
60
+ label?: string | undefined;
61
+ };
62
+ };
52
63
  setConfig: (newConfig: JobAlertsConfig | ((oldConfig: JobAlertsConfig) => JobAlertsConfig)) => JobAlertsConfig;
53
64
  '~brand': "@inploi/plugin-job-alerts";
54
65
  };