@inploi/plugin-job-search 0.0.2 → 0.0.4

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,7 +1,8 @@
1
1
  import { ApiClient, Logger } from '@inploi/sdk';
2
+ import { FilterValue } from './components/filter';
2
3
  export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
3
4
  data: import("valibot").ObjectSchema<{
4
- results: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
5
+ results: import("valibot").ArraySchema<import("valibot").SchemaWithTransform<import("valibot").ObjectSchema<{
5
6
  id: import("valibot").NumberSchema<number>;
6
7
  company_name: import("valibot").StringSchema<string>;
7
8
  company_logo: import("valibot").StringSchema<string>;
@@ -29,6 +30,7 @@ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
29
30
  [x: string]: any;
30
31
  }>;
31
32
  }, undefined, {
33
+ title: string;
32
34
  id: number;
33
35
  company_name: string;
34
36
  company_logo: string;
@@ -42,7 +44,6 @@ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
42
44
  pay_min: string | null;
43
45
  pay_max: string | null;
44
46
  description: string;
45
- title: string;
46
47
  coordinates: {
47
48
  lat: number;
48
49
  lng: number;
@@ -54,26 +55,44 @@ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
54
55
  };
55
56
  }>, {
56
57
  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;
58
+ isNew: boolean;
59
+ company: {
60
+ name: string;
61
+ logo: string;
62
+ };
63
+ employmentType: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
64
+ locationType: "LOCATION" | "REMOTE" | "HYBRID";
65
+ pay: string | undefined;
68
66
  description: string;
69
67
  title: string;
70
68
  coordinates: {
71
69
  lat: number;
72
70
  lng: number;
73
71
  };
74
- contract_type: string | null;
75
- created_at: string;
76
- custom_data: {
72
+ contractType: string | null;
73
+ relativePostedDate: string;
74
+ customData: {
75
+ [x: string]: any;
76
+ };
77
+ }>, {
78
+ id: number;
79
+ isNew: boolean;
80
+ company: {
81
+ name: string;
82
+ logo: string;
83
+ };
84
+ employmentType: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
85
+ locationType: "LOCATION" | "REMOTE" | "HYBRID";
86
+ pay: string | undefined;
87
+ description: string;
88
+ title: string;
89
+ coordinates: {
90
+ lat: number;
91
+ lng: number;
92
+ };
93
+ contractType: string | null;
94
+ relativePostedDate: string;
95
+ customData: {
77
96
  [x: string]: any;
78
97
  };
79
98
  }[]>;
@@ -83,26 +102,23 @@ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
83
102
  }, undefined, {
84
103
  results: {
85
104
  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;
105
+ isNew: boolean;
106
+ company: {
107
+ name: string;
108
+ logo: string;
109
+ };
110
+ employmentType: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
111
+ locationType: "LOCATION" | "REMOTE" | "HYBRID";
112
+ pay: string | undefined;
97
113
  description: string;
98
114
  title: string;
99
115
  coordinates: {
100
116
  lat: number;
101
117
  lng: number;
102
118
  };
103
- contract_type: string | null;
104
- created_at: string;
105
- custom_data: {
119
+ contractType: string | null;
120
+ relativePostedDate: string;
121
+ customData: {
106
122
  [x: string]: any;
107
123
  };
108
124
  }[];
@@ -125,26 +141,23 @@ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
125
141
  data: {
126
142
  results: {
127
143
  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;
144
+ isNew: boolean;
145
+ company: {
146
+ name: string;
147
+ logo: string;
148
+ };
149
+ employmentType: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
150
+ locationType: "LOCATION" | "REMOTE" | "HYBRID";
151
+ pay: string | undefined;
139
152
  description: string;
140
153
  title: string;
141
154
  coordinates: {
142
155
  lat: number;
143
156
  lng: number;
144
157
  };
145
- contract_type: string | null;
146
- created_at: string;
147
- custom_data: {
158
+ contractType: string | null;
159
+ relativePostedDate: string;
160
+ customData: {
148
161
  [x: string]: any;
149
162
  };
150
163
  }[];
@@ -159,34 +172,32 @@ export declare const JobSearchResponseSchema: import("valibot").ObjectSchema<{
159
172
  last_page: number;
160
173
  };
161
174
  }>;
162
- export declare const getJobSearchResults: ({ apiClient, logger, signal, }: {
175
+ export declare const getJobSearchResults: ({ apiClient, logger, signal, filters, }: {
163
176
  apiClient: ApiClient;
164
177
  logger: Logger;
165
178
  signal?: AbortSignal | undefined;
179
+ filters: Record<string, FilterValue | undefined>;
166
180
  }) => Promise<{
167
181
  data: {
168
182
  results: {
169
183
  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;
184
+ isNew: boolean;
185
+ company: {
186
+ name: string;
187
+ logo: string;
188
+ };
189
+ employmentType: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
190
+ locationType: "LOCATION" | "REMOTE" | "HYBRID";
191
+ pay: string | undefined;
181
192
  description: string;
182
193
  title: string;
183
194
  coordinates: {
184
195
  lat: number;
185
196
  lng: number;
186
197
  };
187
- contract_type: string | null;
188
- created_at: string;
189
- custom_data: {
198
+ contractType: string | null;
199
+ relativePostedDate: string;
200
+ customData: {
190
201
  [x: string]: any;
191
202
  };
192
203
  }[];
@@ -40,11 +40,16 @@ export declare const createJobSearchDomManager: () => {
40
40
  getRenderTargetElement: () => Element;
41
41
  };
42
42
  export type ChatbotDomManager = ReturnType<typeof createJobSearchDomManager>;
43
- export declare const jobSearchPlugin: () => ({ apiClient, logger, analytics }: {
43
+ export declare const jobSearchPlugin: (params: JobSearchPluginParams) => ({ apiClient, logger, analytics }: {
44
44
  apiClient: import("@inploi/sdk").ApiClient;
45
45
  logger: import("@inploi/sdk").Logger;
46
46
  analytics: import("@inploi/sdk").AnalyticsService;
47
47
  }) => {
48
- render: (params: JobSearchPluginParams) => Promise<void>;
48
+ /** Returns a string with the initial rendering state of the UI.
49
+ * Useful when server-side rendering to avoid CLS.
50
+ */
51
+ renderToString: () => string;
52
+ /** Renders the Job Search Plugin inside the container element. */
53
+ render: () => Promise<void>;
49
54
  };
50
55
  export {};
@@ -15,7 +15,7 @@ export declare const PaginationSchema: import("valibot").ObjectSchema<{
15
15
  last_page: number;
16
16
  }>;
17
17
  export type PaginationSchema = Output<typeof PaginationSchema>;
18
- export declare const JobSchema: import("valibot").ObjectSchema<{
18
+ export declare const JobSchema: import("valibot").SchemaWithTransform<import("valibot").ObjectSchema<{
19
19
  id: import("valibot").NumberSchema<number>;
20
20
  company_name: import("valibot").StringSchema<string>;
21
21
  company_logo: import("valibot").StringSchema<string>;
@@ -43,6 +43,7 @@ export declare const JobSchema: import("valibot").ObjectSchema<{
43
43
  [x: string]: any;
44
44
  }>;
45
45
  }, undefined, {
46
+ title: string;
46
47
  id: number;
47
48
  company_name: string;
48
49
  company_logo: string;
@@ -56,7 +57,6 @@ export declare const JobSchema: import("valibot").ObjectSchema<{
56
57
  pay_min: string | null;
57
58
  pay_max: string | null;
58
59
  description: string;
59
- title: string;
60
60
  coordinates: {
61
61
  lat: number;
62
62
  lng: number;
@@ -66,5 +66,26 @@ export declare const JobSchema: import("valibot").ObjectSchema<{
66
66
  custom_data: {
67
67
  [x: string]: any;
68
68
  };
69
+ }>, {
70
+ id: number;
71
+ isNew: boolean;
72
+ company: {
73
+ name: string;
74
+ logo: string;
75
+ };
76
+ employmentType: "FULL_TIME" | "PART_TIME" | "TEMPORARY" | "CONTRACTOR" | "INTERN" | "VOLUNTEER" | "OTHER";
77
+ locationType: "LOCATION" | "REMOTE" | "HYBRID";
78
+ pay: string | undefined;
79
+ description: string;
80
+ title: string;
81
+ coordinates: {
82
+ lat: number;
83
+ lng: number;
84
+ };
85
+ contractType: string | null;
86
+ relativePostedDate: string;
87
+ customData: {
88
+ [x: string]: any;
89
+ };
69
90
  }>;
70
91
  export type JobSchema = Output<typeof JobSchema>;