@inploi/plugin-job-search 0.0.1 → 0.0.2

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.
@@ -0,0 +1,8 @@
1
+ import { jobSearchPlugin } from './job-search';
2
+ declare global {
3
+ interface Window {
4
+ inploi?: {
5
+ jobSearchPlugin?: typeof jobSearchPlugin;
6
+ };
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from './job-search';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,203 @@
1
+ import { ApiClient, Logger } from '@inploi/sdk';
2
+ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
3
+ data: import("valibot").ObjectSchema<{
4
+ results: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
5
+ id: import("valibot").NumberSchema<number>;
6
+ company_name: import("valibot").StringSchema<string>;
7
+ company_logo: import("valibot").StringSchema<string>;
8
+ employment_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"FULL_TIME", "FULL_TIME">, import("valibot").LiteralSchema<"PART_TIME", "PART_TIME">, import("valibot").LiteralSchema<"TEMPORARY", "TEMPORARY">, import("valibot").LiteralSchema<"CONTRACTOR", "CONTRACTOR">, import("valibot").LiteralSchema<"INTERN", "INTERN">, import("valibot").LiteralSchema<"VOLUNTEER", "VOLUNTEER">, import("valibot").LiteralSchema<"OTHER", "OTHER">], "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER">;
9
+ location_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"LOCATION", "LOCATION">, import("valibot").LiteralSchema<"REMOTE", "REMOTE">, import("valibot").LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
10
+ pay_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ANNUALY", "ANNUALY">, import("valibot").LiteralSchema<"HOURLY", "HOURLY">, import("valibot").LiteralSchema<"MONTHLY", "MONTHLY">, import("valibot").LiteralSchema<"WEEKLY", "WEEKLY">, import("valibot").LiteralSchema<"DAILY", "DAILY">], "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY">;
11
+ pay_currency: import("valibot").StringSchema<string>;
12
+ pay_mask: import("valibot").BooleanSchema<boolean>;
13
+ pay_display: import("valibot").BooleanSchema<boolean>;
14
+ pay: import("valibot").StringSchema<string>;
15
+ pay_min: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
16
+ pay_max: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
17
+ description: import("valibot").StringSchema<string>;
18
+ title: import("valibot").StringSchema<string>;
19
+ coordinates: import("valibot").ObjectSchema<{
20
+ lat: import("valibot").NumberSchema<number>;
21
+ lng: import("valibot").NumberSchema<number>;
22
+ }, undefined, {
23
+ lat: number;
24
+ lng: number;
25
+ }>;
26
+ contract_type: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
27
+ created_at: import("valibot").StringSchema<string>;
28
+ custom_data: import("valibot").RecordSchema<import("valibot").StringSchema<string>, import("valibot").AnySchema<any>, {
29
+ [x: string]: any;
30
+ }>;
31
+ }, undefined, {
32
+ id: number;
33
+ company_name: string;
34
+ company_logo: string;
35
+ employment_type: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
36
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
37
+ pay_type: "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
38
+ pay_currency: string;
39
+ pay_mask: boolean;
40
+ pay_display: boolean;
41
+ pay: string;
42
+ pay_min: string | null;
43
+ pay_max: string | null;
44
+ description: string;
45
+ title: string;
46
+ coordinates: {
47
+ lat: number;
48
+ lng: number;
49
+ };
50
+ contract_type: string | null;
51
+ created_at: string;
52
+ custom_data: {
53
+ [x: string]: any;
54
+ };
55
+ }>, {
56
+ id: number;
57
+ company_name: string;
58
+ company_logo: string;
59
+ employment_type: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
60
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
61
+ pay_type: "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
62
+ pay_currency: string;
63
+ pay_mask: boolean;
64
+ pay_display: boolean;
65
+ pay: string;
66
+ pay_min: string | null;
67
+ pay_max: string | null;
68
+ description: string;
69
+ title: string;
70
+ coordinates: {
71
+ lat: number;
72
+ lng: number;
73
+ };
74
+ contract_type: string | null;
75
+ created_at: string;
76
+ custom_data: {
77
+ [x: string]: any;
78
+ };
79
+ }[]>;
80
+ available_properties: import("valibot").RecordSchema<import("valibot").StringSchema<string>, import("valibot").ArraySchema<import("valibot").StringSchema<string>, string[]>, {
81
+ [x: string]: string[];
82
+ }>;
83
+ }, undefined, {
84
+ results: {
85
+ id: number;
86
+ company_name: string;
87
+ company_logo: string;
88
+ employment_type: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
89
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
90
+ pay_type: "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
91
+ pay_currency: string;
92
+ pay_mask: boolean;
93
+ pay_display: boolean;
94
+ pay: string;
95
+ pay_min: string | null;
96
+ pay_max: string | null;
97
+ description: string;
98
+ title: string;
99
+ coordinates: {
100
+ lat: number;
101
+ lng: number;
102
+ };
103
+ contract_type: string | null;
104
+ created_at: string;
105
+ custom_data: {
106
+ [x: string]: any;
107
+ };
108
+ }[];
109
+ available_properties: {
110
+ [x: string]: string[];
111
+ };
112
+ }>;
113
+ pagination: import("valibot").ObjectSchema<{
114
+ total: import("valibot").NumberSchema<number>;
115
+ current_page: import("valibot").NumberSchema<number>;
116
+ per_page: import("valibot").NumberSchema<number>;
117
+ last_page: import("valibot").NumberSchema<number>;
118
+ }, undefined, {
119
+ total: number;
120
+ current_page: number;
121
+ per_page: number;
122
+ last_page: number;
123
+ }>;
124
+ }, undefined, {
125
+ data: {
126
+ results: {
127
+ id: number;
128
+ company_name: string;
129
+ company_logo: string;
130
+ employment_type: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
131
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
132
+ pay_type: "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
133
+ pay_currency: string;
134
+ pay_mask: boolean;
135
+ pay_display: boolean;
136
+ pay: string;
137
+ pay_min: string | null;
138
+ pay_max: string | null;
139
+ description: string;
140
+ title: string;
141
+ coordinates: {
142
+ lat: number;
143
+ lng: number;
144
+ };
145
+ contract_type: string | null;
146
+ created_at: string;
147
+ custom_data: {
148
+ [x: string]: any;
149
+ };
150
+ }[];
151
+ available_properties: {
152
+ [x: string]: string[];
153
+ };
154
+ };
155
+ pagination: {
156
+ total: number;
157
+ current_page: number;
158
+ per_page: number;
159
+ last_page: number;
160
+ };
161
+ }>;
162
+ export declare const getJobSearchResults: ({ apiClient, logger, signal, }: {
163
+ apiClient: ApiClient;
164
+ logger: Logger;
165
+ signal?: AbortSignal | undefined;
166
+ }) => Promise<{
167
+ data: {
168
+ results: {
169
+ id: number;
170
+ company_name: string;
171
+ company_logo: string;
172
+ employment_type: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
173
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
174
+ pay_type: "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
175
+ pay_currency: string;
176
+ pay_mask: boolean;
177
+ pay_display: boolean;
178
+ pay: string;
179
+ pay_min: string | null;
180
+ pay_max: string | null;
181
+ description: string;
182
+ title: string;
183
+ coordinates: {
184
+ lat: number;
185
+ lng: number;
186
+ };
187
+ contract_type: string | null;
188
+ created_at: string;
189
+ custom_data: {
190
+ [x: string]: any;
191
+ };
192
+ }[];
193
+ available_properties: {
194
+ [x: string]: string[];
195
+ };
196
+ };
197
+ pagination: {
198
+ total: number;
199
+ current_page: number;
200
+ per_page: number;
201
+ last_page: number;
202
+ };
203
+ }>;
@@ -0,0 +1,2 @@
1
+ export declare const JOB_SEARCH_ELEMENT_ID = "inploi-job-search";
2
+ export declare const JOB_SEARCH_SCOPE_ELEMENT_ID = "ijs";
@@ -0,0 +1,50 @@
1
+ type FontSettings = {
2
+ font_family: string;
3
+ weight: 'normal' | 'bold' | 'lighter' | 'bolder' | number;
4
+ style: 'normal' | 'italic';
5
+ };
6
+ declare const textStyles: {
7
+ readonly filter: "filter";
8
+ readonly tag: "tag";
9
+ readonly input: "input";
10
+ readonly job_heading: "job_heading";
11
+ };
12
+ type TextStyle = keyof typeof textStyles;
13
+ export type FilterProperty = {
14
+ key: string;
15
+ label: string;
16
+ hidden?: boolean;
17
+ value?: string;
18
+ searchable?: boolean;
19
+ select: 'one' | 'many';
20
+ };
21
+ export type JobSearchPluginParams = {
22
+ theme: {
23
+ mode: 'light' | 'dark';
24
+ corners: 'rounded' | 'soft' | 'sharp';
25
+ highlights: 'stroke' | 'fill';
26
+ highcontrast: boolean;
27
+ typography: Partial<FontSettings> & Partial<Record<TextStyle, Partial<FontSettings>>>;
28
+ accent: {
29
+ /** Number between 0 and 360. Number above or below range will loop. */
30
+ hue: number;
31
+ /** Float between 0 and 2. Acts as a multiplier to the original generated palette. */
32
+ chroma: number;
33
+ };
34
+ };
35
+ /** Array of properties because _order matters_ to display them. */
36
+ properties: FilterProperty[];
37
+ };
38
+ export declare const createJobSearchDomManager: () => {
39
+ addStyle: (css: string, id: string) => void;
40
+ getRenderTargetElement: () => Element;
41
+ };
42
+ export type ChatbotDomManager = ReturnType<typeof createJobSearchDomManager>;
43
+ export declare const jobSearchPlugin: () => ({ apiClient, logger, analytics }: {
44
+ apiClient: import("@inploi/sdk").ApiClient;
45
+ logger: import("@inploi/sdk").Logger;
46
+ analytics: import("@inploi/sdk").AnalyticsService;
47
+ }) => {
48
+ render: (params: JobSearchPluginParams) => Promise<void>;
49
+ };
50
+ export {};
@@ -0,0 +1,70 @@
1
+ import { Output } from 'valibot';
2
+ export declare const AvailablePropertiesSchema: import("valibot").RecordSchema<import("valibot").StringSchema<string>, import("valibot").ArraySchema<import("valibot").StringSchema<string>, string[]>, {
3
+ [x: string]: string[];
4
+ }>;
5
+ export type AvailablePropertiesSchema = Output<typeof AvailablePropertiesSchema>;
6
+ export declare const PaginationSchema: import("valibot").ObjectSchema<{
7
+ total: import("valibot").NumberSchema<number>;
8
+ current_page: import("valibot").NumberSchema<number>;
9
+ per_page: import("valibot").NumberSchema<number>;
10
+ last_page: import("valibot").NumberSchema<number>;
11
+ }, undefined, {
12
+ total: number;
13
+ current_page: number;
14
+ per_page: number;
15
+ last_page: number;
16
+ }>;
17
+ export type PaginationSchema = Output<typeof PaginationSchema>;
18
+ export declare const JobSchema: import("valibot").ObjectSchema<{
19
+ id: import("valibot").NumberSchema<number>;
20
+ company_name: import("valibot").StringSchema<string>;
21
+ company_logo: import("valibot").StringSchema<string>;
22
+ employment_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"FULL_TIME", "FULL_TIME">, import("valibot").LiteralSchema<"PART_TIME", "PART_TIME">, import("valibot").LiteralSchema<"TEMPORARY", "TEMPORARY">, import("valibot").LiteralSchema<"CONTRACTOR", "CONTRACTOR">, import("valibot").LiteralSchema<"INTERN", "INTERN">, import("valibot").LiteralSchema<"VOLUNTEER", "VOLUNTEER">, import("valibot").LiteralSchema<"OTHER", "OTHER">], "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER">;
23
+ location_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"LOCATION", "LOCATION">, import("valibot").LiteralSchema<"REMOTE", "REMOTE">, import("valibot").LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
24
+ pay_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ANNUALY", "ANNUALY">, import("valibot").LiteralSchema<"HOURLY", "HOURLY">, import("valibot").LiteralSchema<"MONTHLY", "MONTHLY">, import("valibot").LiteralSchema<"WEEKLY", "WEEKLY">, import("valibot").LiteralSchema<"DAILY", "DAILY">], "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY">;
25
+ pay_currency: import("valibot").StringSchema<string>;
26
+ pay_mask: import("valibot").BooleanSchema<boolean>;
27
+ pay_display: import("valibot").BooleanSchema<boolean>;
28
+ pay: import("valibot").StringSchema<string>;
29
+ pay_min: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
30
+ pay_max: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
31
+ description: import("valibot").StringSchema<string>;
32
+ title: import("valibot").StringSchema<string>;
33
+ coordinates: import("valibot").ObjectSchema<{
34
+ lat: import("valibot").NumberSchema<number>;
35
+ lng: import("valibot").NumberSchema<number>;
36
+ }, undefined, {
37
+ lat: number;
38
+ lng: number;
39
+ }>;
40
+ contract_type: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
41
+ created_at: import("valibot").StringSchema<string>;
42
+ custom_data: import("valibot").RecordSchema<import("valibot").StringSchema<string>, import("valibot").AnySchema<any>, {
43
+ [x: string]: any;
44
+ }>;
45
+ }, undefined, {
46
+ id: number;
47
+ company_name: string;
48
+ company_logo: string;
49
+ employment_type: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
50
+ location_type: "LOCATION" | "REMOTE" | "HYBRID";
51
+ pay_type: "ANNUALY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
52
+ pay_currency: string;
53
+ pay_mask: boolean;
54
+ pay_display: boolean;
55
+ pay: string;
56
+ pay_min: string | null;
57
+ pay_max: string | null;
58
+ description: string;
59
+ title: string;
60
+ coordinates: {
61
+ lat: number;
62
+ lng: number;
63
+ };
64
+ contract_type: string | null;
65
+ created_at: string;
66
+ custom_data: {
67
+ [x: string]: any;
68
+ };
69
+ }>;
70
+ export type JobSchema = Output<typeof JobSchema>;