@inploi/plugin-job-search 0.1.5 → 0.2.0

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.
@@ -25,9 +25,13 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
25
25
  [x: string]: any;
26
26
  } | null>;
27
27
  href: import("valibot").StringSchema<string>;
28
+ industry: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
29
+ category: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
30
+ skills: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
31
+ town: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
32
+ city: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
33
+ country: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
28
34
  }, undefined, {
29
- title: string;
30
- href: string;
31
35
  id: number;
32
36
  company_name: string;
33
37
  employment_type: string;
@@ -40,12 +44,47 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
40
44
  pay_min: string | null;
41
45
  pay_max: string | null;
42
46
  description: string;
47
+ title: string;
43
48
  contract_type: string | null;
44
49
  created_at: string | null;
45
50
  custom_data: {
46
51
  [x: string]: any;
47
52
  } | null;
53
+ href: string;
54
+ industry?: string | undefined;
55
+ category?: string | undefined;
56
+ skills?: string | undefined;
57
+ town?: string | undefined;
58
+ city?: string | undefined;
59
+ country?: string | undefined;
48
60
  }>, {
61
+ raw: {
62
+ id: number;
63
+ company_name: string;
64
+ employment_type: string;
65
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
66
+ pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
67
+ pay_currency: string;
68
+ pay_mask: boolean;
69
+ pay_display: boolean;
70
+ pay: string | null;
71
+ pay_min: string | null;
72
+ pay_max: string | null;
73
+ description: string;
74
+ title: string;
75
+ contract_type: string | null;
76
+ created_at: string | null;
77
+ custom_data: {
78
+ [x: string]: any;
79
+ } | null;
80
+ href: string;
81
+ industry?: string | undefined;
82
+ category?: string | undefined;
83
+ skills?: string | undefined;
84
+ town?: string | undefined;
85
+ city?: string | undefined;
86
+ country?: string | undefined;
87
+ };
49
88
  id: number;
50
89
  isNew: boolean;
51
90
  company: {
@@ -63,6 +102,33 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
63
102
  [x: string]: any;
64
103
  } | null;
65
104
  }>, {
105
+ raw: {
106
+ id: number;
107
+ company_name: string;
108
+ employment_type: string;
109
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
110
+ pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
111
+ pay_currency: string;
112
+ pay_mask: boolean;
113
+ pay_display: boolean;
114
+ pay: string | null;
115
+ pay_min: string | null;
116
+ pay_max: string | null;
117
+ description: string;
118
+ title: string;
119
+ contract_type: string | null;
120
+ created_at: string | null;
121
+ custom_data: {
122
+ [x: string]: any;
123
+ } | null;
124
+ href: string;
125
+ industry?: string | undefined;
126
+ category?: string | undefined;
127
+ skills?: string | undefined;
128
+ town?: string | undefined;
129
+ city?: string | undefined;
130
+ country?: string | undefined;
131
+ };
66
132
  id: number;
67
133
  isNew: boolean;
68
134
  company: {
@@ -93,6 +159,33 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
93
159
  }>;
94
160
  }, undefined, {
95
161
  data: {
162
+ raw: {
163
+ id: number;
164
+ company_name: string;
165
+ employment_type: string;
166
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
167
+ pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
168
+ pay_currency: string;
169
+ pay_mask: boolean;
170
+ pay_display: boolean;
171
+ pay: string | null;
172
+ pay_min: string | null;
173
+ pay_max: string | null;
174
+ description: string;
175
+ title: string;
176
+ contract_type: string | null;
177
+ created_at: string | null;
178
+ custom_data: {
179
+ [x: string]: any;
180
+ } | null;
181
+ href: string;
182
+ industry?: string | undefined;
183
+ category?: string | undefined;
184
+ skills?: string | undefined;
185
+ town?: string | undefined;
186
+ city?: string | undefined;
187
+ country?: string | undefined;
188
+ };
96
189
  id: number;
97
190
  isNew: boolean;
98
191
  company: {
@@ -124,6 +217,33 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
124
217
  last_page: number;
125
218
  };
126
219
  results: {
220
+ raw: {
221
+ id: number;
222
+ company_name: string;
223
+ employment_type: string;
224
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
225
+ pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
226
+ pay_currency: string;
227
+ pay_mask: boolean;
228
+ pay_display: boolean;
229
+ pay: string | null;
230
+ pay_min: string | null;
231
+ pay_max: string | null;
232
+ description: string;
233
+ title: string;
234
+ contract_type: string | null;
235
+ created_at: string | null;
236
+ custom_data: {
237
+ [x: string]: any;
238
+ } | null;
239
+ href: string;
240
+ industry?: string | undefined;
241
+ category?: string | undefined;
242
+ skills?: string | undefined;
243
+ town?: string | undefined;
244
+ city?: string | undefined;
245
+ country?: string | undefined;
246
+ };
127
247
  id: number;
128
248
  isNew: boolean;
129
249
  company: {
@@ -169,6 +289,33 @@ export declare const getJobSearchResults: ({ apiClient, logger, signal, filters,
169
289
  last_page: number;
170
290
  };
171
291
  results: {
292
+ raw: {
293
+ id: number;
294
+ company_name: string;
295
+ employment_type: string;
296
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
297
+ pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
298
+ pay_currency: string;
299
+ pay_mask: boolean;
300
+ pay_display: boolean;
301
+ pay: string | null;
302
+ pay_min: string | null;
303
+ pay_max: string | null;
304
+ description: string;
305
+ title: string;
306
+ contract_type: string | null;
307
+ created_at: string | null;
308
+ custom_data: {
309
+ [x: string]: any;
310
+ } | null;
311
+ href: string;
312
+ industry?: string | undefined;
313
+ category?: string | undefined;
314
+ skills?: string | undefined;
315
+ town?: string | undefined;
316
+ city?: string | undefined;
317
+ country?: string | undefined;
318
+ };
172
319
  id: number;
173
320
  isNew: boolean;
174
321
  company: {
@@ -1,4 +1,5 @@
1
1
  import { IconName } from './components/icon.tsx';
2
+ import { HintedString } from './lib/type-utils.ts';
2
3
  type FontSettings = {
3
4
  fontFamily: string;
4
5
  weight: 'normal' | 'bold' | 'lighter' | 'bolder' | number;
@@ -11,8 +12,8 @@ declare const textStyles: {
11
12
  readonly jobHeading: "jobHeading";
12
13
  };
13
14
  type TextStyle = keyof typeof textStyles;
14
- export declare const FILTER_KEYS: readonly ["company_id", "company_name", "industry", "employment_type", "location_type", "pay_type", "pay_currency", "pay_mask", "pay", "pay_min", "pay_max", "title", "category", "skills", "address_1", "address_2", "town", "city", "postcode", "country", "contract_type", "pay_display"];
15
- export type FilterKey = (typeof FILTER_KEYS)[number] | (string & {});
15
+ export declare const FILTER_KEYS: readonly ["company_name", "employment_type", "location_type", "pay_type", "pay_currency", "pay_mask", "pay", "pay_min", "pay_max", "title", "industry", "category", "skills", "town", "city", "country", "contract_type", "pay_display"];
16
+ export type FilterKey = HintedString<(typeof FILTER_KEYS)[number]>;
16
17
  export type FilterProperty = {
17
18
  key: FilterKey;
18
19
  /** The label to display for the property.
@@ -38,6 +39,10 @@ export type FilterProperty = {
38
39
  */
39
40
  select: 'one' | 'many';
40
41
  };
42
+ export type DisplayableFilterProperty = FilterKey | {
43
+ key: string;
44
+ transform: (value: string | undefined) => string | null;
45
+ };
41
46
  export type JobSearchPluginParams = {
42
47
  theme: {
43
48
  mode: 'light' | 'dark';
@@ -62,6 +67,10 @@ export type JobSearchPluginParams = {
62
67
  };
63
68
  /** Array of properties because _order matters_ to display them. */
64
69
  properties: FilterProperty[];
70
+ jobCard: {
71
+ subheading: DisplayableFilterProperty;
72
+ infoTags: DisplayableFilterProperty[];
73
+ };
65
74
  };
66
75
  export declare const createJobSearchDomManager: () => {
67
76
  getRenderTargetElement: () => Element;
@@ -50,9 +50,13 @@ export declare const JobSchema: import("valibot").SchemaWithTransform<import("va
50
50
  [x: string]: any;
51
51
  } | null>;
52
52
  href: import("valibot").StringSchema<string>;
53
+ industry: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
54
+ category: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
55
+ skills: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
56
+ town: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
57
+ city: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
58
+ country: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
53
59
  }, undefined, {
54
- title: string;
55
- href: string;
56
60
  id: number;
57
61
  company_name: string;
58
62
  employment_type: string;
@@ -65,12 +69,47 @@ export declare const JobSchema: import("valibot").SchemaWithTransform<import("va
65
69
  pay_min: string | null;
66
70
  pay_max: string | null;
67
71
  description: string;
72
+ title: string;
68
73
  contract_type: string | null;
69
74
  created_at: string | null;
70
75
  custom_data: {
71
76
  [x: string]: any;
72
77
  } | null;
78
+ href: string;
79
+ industry?: string | undefined;
80
+ category?: string | undefined;
81
+ skills?: string | undefined;
82
+ town?: string | undefined;
83
+ city?: string | undefined;
84
+ country?: string | undefined;
73
85
  }>, {
86
+ raw: {
87
+ id: number;
88
+ company_name: string;
89
+ employment_type: string;
90
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
91
+ pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
92
+ pay_currency: string;
93
+ pay_mask: boolean;
94
+ pay_display: boolean;
95
+ pay: string | null;
96
+ pay_min: string | null;
97
+ pay_max: string | null;
98
+ description: string;
99
+ title: string;
100
+ contract_type: string | null;
101
+ created_at: string | null;
102
+ custom_data: {
103
+ [x: string]: any;
104
+ } | null;
105
+ href: string;
106
+ industry?: string | undefined;
107
+ category?: string | undefined;
108
+ skills?: string | undefined;
109
+ town?: string | undefined;
110
+ city?: string | undefined;
111
+ country?: string | undefined;
112
+ };
74
113
  id: number;
75
114
  isNew: boolean;
76
115
  company: {