@abcagency/hire-control-sdk 1.1.34 → 1.1.36
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.
- package/.gitattributes +1 -0
- package/controllers/employersController.ts +79 -0
- package/controllers/listingEntitiesController.ts +40 -3
- package/dist/controllers/employersController.d.ts +11 -0
- package/dist/controllers/jobDataAlertsController.d.ts +13 -0
- package/dist/controllers/listingEntitiesController.d.ts +4 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +31 -7
- package/dist/types/employer.d.ts +25 -0
- package/dist/types/jobDataAlert.d.ts +59 -0
- package/dist/types/mongoListingEntity.d.ts +13 -0
- package/index.ts +23 -0
- package/package.json +1 -1
- package/types/employer.ts +34 -0
- package/types/mongoListingEntity.ts +17 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import FetchHandler from "../handlers/fetchHandler";
|
|
2
|
+
import { API_URL } from "../constants/config";
|
|
3
|
+
import Employer, { EmployerDeleteResult } from "../types/employer";
|
|
4
|
+
|
|
5
|
+
const fetchHandler = new FetchHandler(API_URL);
|
|
6
|
+
|
|
7
|
+
class EmployersController {
|
|
8
|
+
// Get all Employers for the current company
|
|
9
|
+
async getAll(authToken: string | null = null): Promise<Employer[]> {
|
|
10
|
+
return fetchHandler.get<Employer[]>(`/employers`, true, authToken);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Get an Employer by id
|
|
14
|
+
async getById(id: string, authToken: string | null = null): Promise<Employer> {
|
|
15
|
+
return fetchHandler.get<Employer>(
|
|
16
|
+
`/employers/${encodeURIComponent(id)}`,
|
|
17
|
+
true,
|
|
18
|
+
authToken
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Get the Employer of the Listing Entity with this EntityKey
|
|
23
|
+
async getByEntityKey(
|
|
24
|
+
entityKey: string,
|
|
25
|
+
authToken: string | null = null
|
|
26
|
+
): Promise<Employer> {
|
|
27
|
+
return fetchHandler.get<Employer>(
|
|
28
|
+
`/employers/byEntityKey/${encodeURIComponent(entityKey)}`,
|
|
29
|
+
true,
|
|
30
|
+
authToken
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Create Employer
|
|
35
|
+
async create(
|
|
36
|
+
employer: Employer,
|
|
37
|
+
authToken: string | null = null
|
|
38
|
+
): Promise<Employer> {
|
|
39
|
+
return fetchHandler.post<Employer, Employer>(
|
|
40
|
+
`/employers`,
|
|
41
|
+
employer,
|
|
42
|
+
true,
|
|
43
|
+
authToken
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Update Employer. applyLogoIds: edited logos to also push to the entities using them.
|
|
48
|
+
async update(
|
|
49
|
+
id: string,
|
|
50
|
+
employer: Employer,
|
|
51
|
+
applyLogoIds: string[] = [],
|
|
52
|
+
authToken: string | null = null
|
|
53
|
+
): Promise<Employer> {
|
|
54
|
+
const params = new URLSearchParams();
|
|
55
|
+
if (applyLogoIds.length) params.append("applyLogoIds", applyLogoIds.join(","));
|
|
56
|
+
const query = params.toString() ? `?${params.toString()}` : "";
|
|
57
|
+
return fetchHandler.put<Employer, Employer>(
|
|
58
|
+
`/employers/${encodeURIComponent(id)}${query}`,
|
|
59
|
+
employer,
|
|
60
|
+
true,
|
|
61
|
+
authToken
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Delete Employer and its entities. Rejects with statusCode 409 (errorMessage explains)
|
|
66
|
+
// when jobs are assigned to any of its entities.
|
|
67
|
+
async delete(
|
|
68
|
+
id: string,
|
|
69
|
+
authToken: string | null = null
|
|
70
|
+
): Promise<EmployerDeleteResult> {
|
|
71
|
+
return fetchHandler.delete<EmployerDeleteResult>(
|
|
72
|
+
`/employers/${encodeURIComponent(id)}`,
|
|
73
|
+
true,
|
|
74
|
+
authToken
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default new EmployersController();
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import FetchHandler from "../handlers/fetchHandler";
|
|
2
2
|
import { API_URL } from "../constants/config";
|
|
3
3
|
import ListingEntityDto from "../types/listingEntity";
|
|
4
|
-
import mongoListingEntity
|
|
4
|
+
import mongoListingEntity, {
|
|
5
|
+
ListingEntitySummary,
|
|
6
|
+
} from "../types/mongoListingEntity";
|
|
5
7
|
|
|
6
8
|
const fetchHandler = new FetchHandler(API_URL);
|
|
7
9
|
|
|
@@ -31,6 +33,41 @@ class ListingEntitiesController {
|
|
|
31
33
|
);
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
// Lean rows (id, key, name, employer, active, city/state) for entity pickers
|
|
37
|
+
async getSummaries(
|
|
38
|
+
authToken: string | null = null
|
|
39
|
+
): Promise<ListingEntitySummary[]> {
|
|
40
|
+
return fetchHandler.get<ListingEntitySummary[]>(
|
|
41
|
+
`/listingEntities/summaries`,
|
|
42
|
+
true,
|
|
43
|
+
authToken
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Get one Mongo Listing Entity by id
|
|
48
|
+
async getById(
|
|
49
|
+
id: string,
|
|
50
|
+
authToken: string | null = null
|
|
51
|
+
): Promise<mongoListingEntity> {
|
|
52
|
+
return fetchHandler.get<mongoListingEntity>(
|
|
53
|
+
`/listingEntities/${encodeURIComponent(id)}`,
|
|
54
|
+
true,
|
|
55
|
+
authToken
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Get Mongo Listing Entities belonging to an Employer
|
|
60
|
+
async getByEmployer(
|
|
61
|
+
employerId: string,
|
|
62
|
+
authToken: string | null = null
|
|
63
|
+
): Promise<mongoListingEntity[]> {
|
|
64
|
+
return fetchHandler.get<mongoListingEntity[]>(
|
|
65
|
+
`/listingEntities/byEmployer/${encodeURIComponent(employerId)}`,
|
|
66
|
+
true,
|
|
67
|
+
authToken
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
34
71
|
// Create Mongo Listing Entity
|
|
35
72
|
async create(
|
|
36
73
|
entity: mongoListingEntity,
|
|
@@ -58,10 +95,10 @@ class ListingEntitiesController {
|
|
|
58
95
|
);
|
|
59
96
|
}
|
|
60
97
|
|
|
61
|
-
// Delete Mongo Listing Entity
|
|
98
|
+
// Delete Mongo Listing Entity (rejects with statusCode 409 when jobs are assigned to it)
|
|
62
99
|
async delete(id: string, authToken: string | null = null): Promise<void> {
|
|
63
100
|
await fetchHandler.delete<void>(
|
|
64
|
-
`/listingEntities
|
|
101
|
+
`/listingEntities/${encodeURIComponent(id)}`,
|
|
65
102
|
true,
|
|
66
103
|
authToken
|
|
67
104
|
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Employer, { EmployerDeleteResult } from "../types/employer";
|
|
2
|
+
declare class EmployersController {
|
|
3
|
+
getAll(authToken?: string | null): Promise<Employer[]>;
|
|
4
|
+
getById(id: string, authToken?: string | null): Promise<Employer>;
|
|
5
|
+
getByEntityKey(entityKey: string, authToken?: string | null): Promise<Employer>;
|
|
6
|
+
create(employer: Employer, authToken?: string | null): Promise<Employer>;
|
|
7
|
+
update(id: string, employer: Employer, applyLogoIds?: string[], authToken?: string | null): Promise<Employer>;
|
|
8
|
+
delete(id: string, authToken?: string | null): Promise<EmployerDeleteResult>;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: EmployersController;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JobDataAlert, JobDataAlertCounts, JobDataAlertQuery } from "../types/jobDataAlert";
|
|
2
|
+
declare class JobDataAlertsController {
|
|
3
|
+
getAll(query?: JobDataAlertQuery, authToken?: string | null): Promise<JobDataAlert[]>;
|
|
4
|
+
counts(authToken?: string | null): Promise<JobDataAlertCounts>;
|
|
5
|
+
acknowledge(id: string, authToken?: string | null): Promise<JobDataAlert>;
|
|
6
|
+
mute(id: string, muted: boolean, authToken?: string | null): Promise<JobDataAlert>;
|
|
7
|
+
resolve(id: string, authToken?: string | null): Promise<JobDataAlert>;
|
|
8
|
+
sendPendingEmail(feedId?: string | null, authToken?: string | null): Promise<{
|
|
9
|
+
sentCount: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: JobDataAlertsController;
|
|
13
|
+
export default _default;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import ListingEntityDto from "../types/listingEntity";
|
|
2
|
-
import mongoListingEntity from "../types/mongoListingEntity";
|
|
2
|
+
import mongoListingEntity, { ListingEntitySummary } from "../types/mongoListingEntity";
|
|
3
3
|
declare class ListingEntitiesController {
|
|
4
4
|
getAllSql(ids: number[], origin?: string | null, authToken?: string | null): Promise<Record<string, ListingEntityDto>>;
|
|
5
5
|
getAll(authToken?: string | null): Promise<mongoListingEntity[]>;
|
|
6
|
+
getSummaries(authToken?: string | null): Promise<ListingEntitySummary[]>;
|
|
7
|
+
getById(id: string, authToken?: string | null): Promise<mongoListingEntity>;
|
|
8
|
+
getByEmployer(employerId: string, authToken?: string | null): Promise<mongoListingEntity[]>;
|
|
6
9
|
create(entity: mongoListingEntity, authToken?: string | null): Promise<mongoListingEntity>;
|
|
7
10
|
update(id: string, entity: mongoListingEntity, authToken?: string | null): Promise<void>;
|
|
8
11
|
delete(id: string, authToken?: string | null): Promise<void>;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib");class e{constructor(t){this.apiUrl=t,this.isLocalhost=!1}getAuthToken(){return this.isLocalhost?sessionStorage.getItem("token"):null}get(e){return t.__awaiter(this,arguments,void 0,function*(t,e=!1,n=null){this.isLocalhost&&e&&!n&&(n=this.getAuthToken());const r={method:"GET",credentials:n?"omit":"include"};return e?this.fetchWithAuth(t,r,n):this.fetchWithoutAuth(t,r)})}post(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=!1,r=null,i=!1){this.isLocalhost&&n&&!r&&(r=this.getAuthToken());const o=i,s={method:"POST",credentials:r?"omit":"include",headers:Object.assign(Object.assign({},r?{Authorization:`Bearer ${r}`}:{}),o?{}:{"Content-Type":"application/json"}),body:o?this.convertToFormData(e):JSON.stringify(e)};return n?this.fetchWithAuth(t,s,r):this.fetchWithoutAuth(t,s)})}put(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=!1,r=null,i=!1){this.isLocalhost&&n&&!r&&(r=this.getAuthToken());const o=i,s={method:"PUT",credentials:r?"omit":"include",headers:Object.assign(Object.assign({},r?{Authorization:`Bearer ${r}`}:{}),o?{}:{"Content-Type":"application/json"}),body:o?this.convertToFormData(e):JSON.stringify(e)};return n?this.fetchWithAuth(t,s,r):this.fetchWithoutAuth(t,s)})}patch(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=!1,r=null,i=!1){this.isLocalhost&&n&&!r&&(r=this.getAuthToken());const o=i,s={method:"PATCH",credentials:r?"omit":"include",headers:Object.assign(Object.assign({},r?{Authorization:`Bearer ${r}`}:{}),o?{}:{"Content-Type":"application/json"}),body:o?this.convertToFormData(e):JSON.stringify(e)};return n?this.fetchWithAuth(t,s,r):this.fetchWithoutAuth(t,s)})}delete(e){return t.__awaiter(this,arguments,void 0,function*(t,e=!1,n=null){this.isLocalhost&&e&&!n&&(n=this.getAuthToken());const r={method:"DELETE",credentials:n?"omit":"include"};return e?this.fetchWithAuth(t,r,n):this.fetchWithoutAuth(t,r)})}getFile(e){return t.__awaiter(this,arguments,void 0,function*(t,e=!1,n=null){this.isLocalhost&&e&&!n&&(n=this.getAuthToken());const r={method:"GET",credentials:n?"omit":"include",headers:e&&n?{Authorization:`Bearer ${n}`}:{}},i=yield fetch(`${this.apiUrl}${t}`,r);if(!i.ok)throw new Error(`Failed to fetch file: ${i.statusText}`);return i.blob()})}convertToFormData(t,e=new FormData,n=""){return t instanceof File?e.append(n||"file",t):"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.append(n,t.toString()):Array.isArray(t)?t.forEach((t,r)=>{this.convertToFormData(t,e,`${n}[${r}]`)}):"object"==typeof t&&null!==t&&Object.keys(t).forEach(r=>{const i=t[r],o=n?`${n}.${r}`:r;this.convertToFormData(i,e,o)}),e}fetchWithoutAuth(e,n){return t.__awaiter(this,void 0,void 0,function*(){const t=yield fetch(`${this.apiUrl}${e}`,n);return this.handleResponse(t)})}fetchWithAuth(e,n,r){return t.__awaiter(this,void 0,void 0,function*(){r?(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:`Bearer ${r}`}),n.credentials="omit"):n.credentials="include";let t=yield fetch(`${this.apiUrl}${e}`,n);if(401===t.status){if(!(yield this.refreshToken()))throw{statusCode:t.status};this.isLocalhost&&(r=this.getAuthToken())&&(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:`Bearer ${r}`})),t=yield fetch(`${this.apiUrl}${e}`,n)}return this.handleResponse(t)})}handleResponse(e){return t.__awaiter(this,void 0,void 0,function*(){if(!e.ok||!e.status.toString().startsWith("2")){let t=`Error: ${e.status} ${e.statusText}`;try{const n=yield e.text();if(n)try{const e=JSON.parse(n);console.log(e),e&&"string"==typeof e.message&&e.message.trim()?t=e.message:e&&"string"==typeof e.error&&e.error.trim()?t=e.error:e&&"string"==typeof e.title&&e.title.trim()&&(t=e.title)}catch(e){const r=n.trim();r&&!r.startsWith("<")&&(t=r)}}catch(t){console.error("Failed to parse error response:",t)}throw{statusCode:e.status,errorMessage:t}}if(204===e.status||205===e.status)return null;const t=yield e.text();if(!t)return null;try{return JSON.parse(t)}catch(e){return t}})}refreshToken(){return t.__awaiter(this,void 0,void 0,function*(){if(!this.isLocalhost){return!!(yield fetch(`${this.apiUrl}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"})).ok||(console.error("Failed to refresh token"),!1)}{const t=sessionStorage.getItem("refreshToken");if(!t)return!1;const e=yield fetch(`${this.apiUrl}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:t})});if(!e.ok)return console.error("Failed to refresh token"),!1;try{const t=yield e.json();return t.token&&sessionStorage.setItem("token",t.token),t.refreshToken&&sessionStorage.setItem("refreshToken",t.refreshToken),!0}catch(t){return console.error("Failed to parse refresh token response:",t),!1}}})}}const n=process.env.NEXT_PUBLIC_API_URL||process.env.VITE_API_URL||process.env.REACT_APP_API_URL||"https://api.myhirecontrol.com",r=new e(n),i="undefined"!=typeof window&&"localhost"===window.location.hostname;var o=new class{login(e){return t.__awaiter(this,void 0,void 0,function*(){return r.post("/auth/login",e,!1)})}nextLogin(e){return t.__awaiter(this,void 0,void 0,function*(){const t="/auth/nextLogin"+(i?"?localhost=true":""),n=yield r.post(t,e,!1);return n&&(sessionStorage.setItem("token",n.token),sessionStorage.setItem("refreshToken",n.refreshToken),sessionStorage.setItem("expiration",n.expiration)),n})}refreshToken(){return t.__awaiter(this,void 0,void 0,function*(){const t="/auth/refresh"+(i?"?localhost=true":""),e=yield r.post(t,{},!0);return e&&i&&(sessionStorage.setItem("token",e.token),sessionStorage.setItem("refreshToken",e.refreshToken),sessionStorage.setItem("expiration",e.expiration)),e})}changeCompany(e){return t.__awaiter(this,void 0,void 0,function*(){const t="/auth/changeCompany"+(i?"?localhost=true":"");var n=yield r.post(t,e,!0);return n&&(sessionStorage.setItem("token",n.token),sessionStorage.setItem("refreshToken",n.refreshToken),sessionStorage.setItem("expiration",n.expiration)),n})}register(e){return t.__awaiter(this,void 0,void 0,function*(){return r.post("/auth/register",e,!1)})}getCompanies(){return t.__awaiter(this,void 0,void 0,function*(){return r.get("/auth/companies",!0)})}getCompany(){return t.__awaiter(this,void 0,void 0,function*(){return r.get("/auth/company",!0)})}getRoles(){return t.__awaiter(this,void 0,void 0,function*(){return r.get("/auth/roles",!0)})}isAuthenticated(){return t.__awaiter(this,void 0,void 0,function*(){try{const t=yield r.get("/auth/authenticated",!0);return t||(yield this.tryRefreshAndCheckAuth())}catch(t){return yield this.tryRefreshAndCheckAuth()}})}tryRefreshAndCheckAuth(){return t.__awaiter(this,void 0,void 0,function*(){try{yield this.refreshToken();return yield r.get("/auth/authenticated",!0)}catch(t){return!1}})}getUser(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield r.get("/auth/user",!0,t)}catch(t){throw t}})}logout(){return t.__awaiter(this,void 0,void 0,function*(){try{const t=yield r.post("/auth/logout",{},!0);return sessionStorage.removeItem("token"),sessionStorage.removeItem("refreshToken"),sessionStorage.removeItem("expiration"),t}catch(t){throw t}})}getPermissions(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield r.get("/auth/permissions",!0,t)}catch(t){throw t}})}};const s=new e(n);var a=new class{getEvents(){return t.__awaiter(this,arguments,void 0,function*(t=null){return s.get("/events",!0,t)})}getEvent(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return s.get(`/events/${t}`,!0,e)})}getEventBySlug(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return s.get(`/events/details/${t}`,!0,e)})}getListingEvents(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return s.get(`/listingEvents/${t}`,!0,e)})}createEvent(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return s.post("/events",t,!0,e)})}updateEvent(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return s.put(`/events/${t}`,e,!0,n)})}deleteEvent(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return s.delete(`/events/${t}`,!0,e)})}};const u=new e(n);var l=new class{getAllRolesWithClaims(){return t.__awaiter(this,arguments,void 0,function*(t=null){return u.get("/roles",!0,t)})}addRole(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return u.post("/roles",t,!0,e)})}updateRole(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return u.put(`/roles/${t}`,e,!0,n)})}deleteRole(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return u.delete(`/roles/${t}`,!0,e)})}};const c=new e(n);var d=new class{getAllUsers(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield c.get("/users",!0,t)}catch(t){throw t}})}getUser(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{return yield c.get(`/users/${t}`,!0,e)}catch(t){throw t}})}getUserCompanyAccess(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return c.get(`/users/${t}/company-access`,!0,e)})}getUserCompanyAccessOptions(){return t.__awaiter(this,arguments,void 0,function*(t=null){return c.get("/users/company-access-options",!0,t)})}createUser(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{return yield c.post("/users",t,!0,e)}catch(t){throw t}})}updateUser(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){try{yield c.put(`/users/${t}`,e,!0,n)}catch(t){throw t}})}updateLoggedInUser(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{yield c.put("/users",t,!0,e)}catch(t){throw t}})}deleteUser(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{yield c.delete(`/users/${t}`,!0,e)}catch(t){throw t}})}};const g=new e(n);var p=new class{forgotPassword(e){return t.__awaiter(this,void 0,void 0,function*(){try{return yield g.post("/account/forgotPassword",e,!1)}catch(t){throw t}})}resetPasswordWithToken(e){return t.__awaiter(this,void 0,void 0,function*(){try{return yield g.post("/account/resetPasswordWithToken",e,!1)}catch(t){throw t}})}resetPassword(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{return yield g.post("/account/resetPassword",t,!0,e)}catch(t){throw t}})}};const h=new e(n);var _=new class{getMapConfig(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield h.get("/mapconfig",!0,t)}catch(t){throw t}})}getThemeSystem(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield h.get("/mapconfig/theme-system",!0,t)}catch(t){throw t}})}updateMapConfig(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return h.put("/mapconfig",t,!0,e)})}createMapConfig(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return h.post("/mapconfig",t,!0,e)})}};const f=new e(n);var v=new class{getAllPermissions(){return t.__awaiter(this,arguments,void 0,function*(t=null){return f.get("/permissions",!0,t)})}};const w=new e(n);var m=new class{getClientAuthConfigById(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{return yield w.get(`/clientAuthConfig/${t}`,!0,e)}catch(t){throw t}})}getAllClientAuthConfigs(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield w.get("/clientAuthConfig",!0,t)}catch(t){throw t}})}createClientAuthConfig(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return w.post("/clientAuthConfig",t,!0,e)})}updateClientAuthConfig(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return w.put(`/clientAuthConfig/${t}`,e,!0,n)})}deleteClientAuthConfig(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return w.delete(`/clientAuthConfig/${t}`,!0,e)})}};const y=new e(n);var C=new class{getAll(){return t.__awaiter(this,arguments,void 0,function*(t=null){return y.get("/integrationconfig",!0,t)})}create(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return y.post("/integrationconfig",t,!0,e)})}update(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return y.put(`/integrationconfig/${t}`,e,!0,n)})}delete(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return y.delete(`/integrationconfig/${t}`,!0,e)})}getSearchReadConfig(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield y.get("/integrationconfig/search-read",!0,t)}catch(t){if(404===(null==t?void 0:t.statusCode)||204===(null==t?void 0:t.statusCode))return null;throw t}})}getFormQuestionsPreview(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield y.get("/integrationconfig/form-questions/preview",!0,t)}catch(t){if(404===(null==t?void 0:t.statusCode)||204===(null==t?void 0:t.statusCode))return null;throw t}})}getFormQuestionsConfigStatus(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return y.get(`/integrationconfig/form-questions/${t}`,!0,e)})}saveFormQuestionsConfig(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return y.put(`/integrationconfig/form-questions/${t}`,e,!0,n)})}};const S=new e(n);var b=new class{getListings(){return t.__awaiter(this,arguments,void 0,function*(t=null,e=null){try{const n=e?`?filterId=${encodeURIComponent(e)}`:"";return yield S.get(`/listings${n}`,!0,t)}catch(t){throw t}})}getListingDetails(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){try{return yield S.get(`/listings/${t}`,!0,e)}catch(t){throw t}})}};const A=new e(n);var L=new class{uploadMedia(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return A.post("/media/upload",t,!0,e,!0)})}uploadProfileImage(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return A.post("/media/upload-profile-image",t,!0,e,!0)})}listMedia(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){const n=new URLSearchParams({folderKey:t});return A.get(`/media/list?${n.toString()}`,!0,e)})}deleteMedia(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){const n=new URLSearchParams({key:t});return A.delete(`/media/delete?${n.toString()}`,!0,e)})}};const T=new e(n);var $=new class{getFilters(){return t.__awaiter(this,arguments,void 0,function*(t=null){return T.get("/filters",!0,t)})}getFilter(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return T.get(`/filters/${t}`,!0,e)})}createFilter(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return T.post("/filters",t,!0,e)})}updateFilter(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return T.put(`/filters/${t}`,e,!0,n)})}deleteFilter(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return T.delete(`/filters/${t}`,!0,e)})}};const E=new e(n);var F=new class{getAppendListings(){return t.__awaiter(this,arguments,void 0,function*(t=null){return E.get("/appendListings",!0,t)})}getAppendListing(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return E.get(`/appendListings/${t}`,!0,e)})}createAppendListing(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return E.post("/appendListings",t,!0,e)})}updateAppendListing(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return E.put(`/appendListings/${t}`,e,!0,n)})}deleteAppendListing(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return E.delete(`/appendListings/${t}`,!0,e)})}};const I=new e(n);var R=new class{getForms(){return t.__awaiter(this,arguments,void 0,function*(t=null){return I.get("/forms",!0,t)})}getForm(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return I.get(`/forms/${t}`,!0,e)})}createForm(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return I.post("/forms",t,!0,e)})}updateForm(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return I.put(`/forms/${t}`,e,!0,n)})}updateFormWithFieldRenames(e,n,r){return t.__awaiter(this,arguments,void 0,function*(t,e,n,r=null){return I.put(`/forms/${t}`,Object.assign(Object.assign({},e),n),!0,r)})}getFormSubmissionCount(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return I.get(`/forms/${t}/submission-count`,!0,e)})}getFormSubmissionFieldUsage(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return I.get(`/forms/${t}/submission-fields`,!0,e)})}migrateSubmissionFields(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return I.post(`/forms/${t}/migrate-submission-fields`,e,!0,n)})}deleteForm(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return I.delete(`/forms/${t}`,!0,e)})}processFormRequest(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return I.post("/forms/jsonSchema",t,!0,e)})}getEasyApplySelection(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){const r=new URLSearchParams({jobId:t});return e&&r.set("fallbackFormId",e),I.get(`/forms/easy-apply/selection?${r.toString()}`,!0,n)})}executeGuidedAction(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return I.post(`/forms/${t}/guided-actions/execute`,e,!0,n)})}};const k=new e(n);var B=new class{submitContactForm(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return k.post("/contactForm",t,!0,e,!0)})}submitFormSubmission(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return k.post("/formsubmission",t,!0,e)})}saveProgress(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return k.put(`/formsubmission/${t}/progress`,e,!0,n)})}completeSubmission(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return k.post(`/formsubmission/${t}/complete`,e,!0,n)})}getFormSubmissions(){return t.__awaiter(this,arguments,void 0,function*(t=20,e=1,n=null,r=null,i=null,o=null,s=null){const a=new URLSearchParams({pageSize:t.toString(),pageNumber:e.toString()});return r&&a.append("status",r.toString()),n&&a.append("type",n),i&&a.append("from",i.toISOString()),o&&a.append("to",o.toISOString()),k.get(`/formsubmission?${a.toString()}`,!0,s)})}exportFormSubmissionsCsv(){return t.__awaiter(this,arguments,void 0,function*(t=20,e=1,n=null,r=null,i=null,o=null,s=null,a=null){const u=new URLSearchParams({pageSize:t.toString(),pageNumber:e.toString()});r&&u.append("status",r.toString()),n&&u.append("type",n),i&&u.append("from",i.toISOString()),o&&u.append("to",o.toISOString()),s&&s.length>0&&s.forEach(t=>u.append("columns",t));const l=yield k.getFile(`/formsubmission/export-csv?${u.toString()}`,!0,a),c=window.URL.createObjectURL(l),d=document.createElement("a");d.href=c,d.download="HireControl_Form_Submissions.csv",document.body.appendChild(d),d.click(),window.URL.revokeObjectURL(c),document.body.removeChild(d)})}getFormSubmissionTypes(){return t.__awaiter(this,arguments,void 0,function*(t=null){return k.get("/formsubmission/types",!0,t)})}deleteFormSubmission(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return k.delete(`/formsubmission/${t}`,!0,e)})}reviewSubmissionApproval(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return k.post(`/formsubmission/${t}/approval`,e,!0,n)})}};const x=new e(n);var O=new class{get(){return t.__awaiter(this,arguments,void 0,function*(t=null){return x.get("/formSettings",!0,t)})}save(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return x.post("/formSettings",t,!0,e)})}};const M=new e(n);var j=new class{getCompanies(){return t.__awaiter(this,arguments,void 0,function*(t=null){return M.get("/companies",!0,t)})}getCompany(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return M.get(`/companies/${t}`,!0,e)})}createCompany(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return M.post("/companies",t,!0,e)})}updateCompany(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return M.put(`/companies/${t}`,e,!0,n)})}deleteCompany(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return M.delete(`/companies/${t}`,!0,e)})}syncAllCompanies(){return t.__awaiter(this,arguments,void 0,function*(t=null){return M.get("/companies/syncall",!0,t)})}cloneCompany(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return M.post(`/companies/${t}/clone`,e,!0,n)})}};const P=new e(n);var U=new class{updateFieldVersionApproval(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return P.patch(`/joblistings/${t}/field-version-approval`,e,!0,n)})}updateDescriptionVersionApproval(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return P.patch(`/joblistings/${t}/description-version-approval`,e,!0,n)})}getJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,function*(t=null){return P.get("/joblistings",!0,t)})}getMapJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,function*(t=null,e=null,n=null){const r=new URLSearchParams;e&&r.set("filterId",e),null!=n&&r.set("status",n.toString());const i=r.toString();return P.get("/joblistings/MapListings"+(i?`?${i}`:""),!0,t)})}previewMapJobListingsByCompany(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return P.post("/joblistings/MapListings/preview",t,!0,e)})}getJobListingById(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return P.get(`/joblistings/${t}`,!0,e)})}getMapListingById(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null,n=null){const r=new URLSearchParams;null!=n&&r.set("status",n.toString());const i=r.toString();return P.get(`/joblistings/MapListings/${t}${i?`?${i}`:""}`,!0,e)})}createJobListing(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return P.post("/joblistings",t,!0,e)})}updateJobListing(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return P.put(`/joblistings/${t}`,e,!0,n)})}exportJobListingsCsv(){return t.__awaiter(this,arguments,void 0,function*(t=10,e=1,n=null,r=null,i=null,o=null){const s=new URLSearchParams({pageSize:t.toString(),pageNumber:e.toString()});null!=n&&s.append("status",n.toString()),r&&s.append("from",r.toISOString()),i&&s.append("to",i.toISOString());const a=yield P.getFile(`/joblistings/Export-csv?${s.toString()}`,!0,o),u=window.URL.createObjectURL(a),l=document.createElement("a");l.href=u,l.download="job_listings.csv",document.body.appendChild(l),l.click(),window.URL.revokeObjectURL(u),document.body.removeChild(l)})}deleteJobListing(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return P.delete(`/joblistings/${t}`,!0,e)})}};const N=new e(n);var D=new class{getBlogs(){return t.__awaiter(this,arguments,void 0,function*(t=null){return N.get("/blog",!0,t)})}getBlog(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return N.get(`/blog/${t}`,!0,e)})}createBlog(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return N.post("/blog",t,!0,e)})}updateBlog(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return N.put(`/blog/${t}`,e,!0,n)})}deleteBlog(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return N.delete(`/blog/${t}`,!0,e)})}};const V=new e(n);var W=new class{getCategories(){return t.__awaiter(this,arguments,void 0,function*(t=null,e=null){const n=new URLSearchParams;null!=t&&n.append("type",String(t));const r=n.toString()?`?${n.toString()}`:"";return V.get(`/categories${r}`,!0,e)})}getCategoriesByCompany(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null,n=null){const r=new URLSearchParams;null!=e&&r.append("type",String(e));const i=r.toString()?`?${r.toString()}`:"";return V.get(`/categories/${t}${i}`,!0,n)})}};const J=new e(n);var H=new class{getAllCategoryLists(){return t.__awaiter(this,arguments,void 0,function*(t=null){return J.get("/categorylist",!0,t)})}getCategoryListById(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return J.get(`/categorylist/${t}`,!0,e)})}getCategoryListsByType(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return J.get(`/categorylist/type/${t}`,!0,e)})}getActiveCategoryLists(){return t.__awaiter(this,arguments,void 0,function*(t=null){return J.get("/categorylist/active",!0,t)})}getCategoryListByTypeAndName(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return J.get(`/categorylist/type/${t}/name/${e}`,!0,n)})}createCategoryList(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return J.post("/categorylist",t,!0,e)})}updateCategoryList(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return J.put(`/categorylist/${t}`,e,!0,n)})}deleteCategoryList(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return J.delete(`/categorylist/${t}`,!0,e)})}addValue(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return J.post(`/categorylist/${t}/values`,e,!0,n)})}removeValue(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return J.delete(`/categorylist/${t}/values/${e}`,!0,n)})}updateValues(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return J.put(`/categorylist/${t}/values`,e,!0,n)})}updateValue(e,n,r){return t.__awaiter(this,arguments,void 0,function*(t,e,n,r=null){return J.put(`/categorylist/${t}/values/${encodeURIComponent(e)}`,n,!0,r)})}};const G=new e(n);var z=new class{getByFeed(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/feed/${t}`,!0,e)})}get(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/${t}`,!0,e)})}create(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.post("/jobFeedFieldMappings",t,!0,e)})}update(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return G.put(`/jobFeedFieldMappings/${t}`,e,!0,n)})}delete(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.delete(`/jobFeedFieldMappings/${t}`,!0,e)})}toggleActive(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.post("/jobFeedFieldMappings/toggle-active",t,!0,e)})}discoverFields(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/discover-fields/${t}`,!0,e)})}validate(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/validate/${t}`,!0,e)})}};const Q=new e(n);var K=new class{getAll(){return t.__awaiter(this,arguments,void 0,function*(t=null){return Q.get("/jobfeeds",!0,t)})}get(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return Q.get(`/jobfeeds/${t}`,!0,e)})}create(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return Q.post("/jobfeeds",t,!0,e)})}update(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return Q.put(`/jobfeeds/${t}`,e,!0,n)})}delete(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return Q.delete(`/jobfeeds/${t}`,!0,e)})}sync(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return Q.post(`/jobfeeds/${t}/sync`,{},!0,e)})}toggleActive(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return Q.patch(`/jobfeeds/${t}/toggle-active`,e,!0,n)})}};const q=new e(n),X=(t,e)=>"object"==typeof t&&null!==t&&"statusCode"in t&&t.statusCode===e;var Y=new class{get(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield q.get("/jobListingSettings",!0,t)}catch(t){if(X(t,404)||X(t,204))return null;throw t}})}create(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return q.post("/jobListingSettings",t,!0,e)})}delete(){return t.__awaiter(this,arguments,void 0,function*(t=null){return q.delete("/jobListingSettings",!0,t)})}};const Z=new e(n);var tt=new class{getAllSql(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null,n=null){const r=new URLSearchParams;return e&&r.append("origin",e),Z.post("/listingEntities"+(r.toString()?"?"+r.toString():""),t,!0,n)})}getAll(){return t.__awaiter(this,arguments,void 0,function*(t=null){return Z.get("/listingEntities",!0,t)})}create(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return Z.post("/listingEntities/create",t,!0,e)})}update(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){yield Z.put(`/listingEntities/update/${t}`,e,!0,n)})}delete(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){yield Z.delete(`/listingEntities/delete/${t}`,!0,e)})}};const et=new e(n);var nt=new class{get(){return t.__awaiter(this,arguments,void 0,function*(t=null,e=null){const n=new URLSearchParams;t&&t.forEach(t=>n.append("recruiterIds",t.toString()));const r=n.toString()?`?${n.toString()}`:"";return et.get(`/recruiters${r}`,!0,e)})}getAll(){return t.__awaiter(this,arguments,void 0,function*(t=null){return et.get("/recruiters/all",!0,t)})}sync(){return t.__awaiter(this,arguments,void 0,function*(t=null,e=!1){return et.post(`/recruiters/sync?updateExisting=${e}`,{},!0,t)})}};const rt=new e(n);var it=new class{getFieldTypes(){return t.__awaiter(this,arguments,void 0,function*(t=null){return rt.get("/field/types",!0,t)})}};const ot=new e(n);var st=new class{getValidatorTypes(){return t.__awaiter(this,arguments,void 0,function*(t=null){return ot.get("/validator/types",!0,t)})}};const at=t=>t?/^[a-z][a-zA-Z0-9]*$/.test(t)?t:t.replace(/[^a-zA-Z0-9]+/g," ").trim().toLowerCase().replace(/\s+(.)/g,(t,e)=>e.toUpperCase()).replace(/\s/g,"").replace(/^(.)/,(t,e)=>e.toLowerCase()):t,ut=t=>{if(Array.isArray(t))return t.map(t=>ut(t));if(!(t=>null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype)(t))return t;const e={};for(const[n,r]of Object.entries(t))e[at(n)]=ut(r);return e},lt=new e(n);var ct=new class{getContentEntries(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null,n=null){let r=`/contententry?contentId=${t}`;null!==e&&(r+=`&statusFilter=${e}`);const i=yield lt.get(r,!0,n);return ut(i)})}getContentEntry(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null,n=null){let r=`/contententry/${t}`;null!==e&&(r+=`?statusFilter=${e}`);const i=yield lt.get(r,!0,n);return ut(i)})}getContentEntryBySlug(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null,r=null){let i=`/contententry/by-slug?contentId=${encodeURIComponent(t)}&slug=${encodeURIComponent(e)}`;null!==n&&(i+=`&statusFilter=${n}`);const o=yield lt.get(i,!0,r);return ut(o)})}createContentEntry(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){const n=yield lt.post("/contententry",t,!0,e);return ut(n)})}updateContentEntry(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return lt.put(`/contententry/${t}`,e,!0,n)})}deleteContentEntry(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return lt.delete(`/contententry/${t}`,!0,e)})}getVersions(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){const n=yield lt.get(`/contententry/${t}/versions`,!0,e);return ut(n)})}unpublishAll(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return lt.post(`/contententry/${t}/unpublish`,void 0,!0,e)})}};const dt=new e(n);var gt=new class{getBlocks(){return t.__awaiter(this,arguments,void 0,function*(t=null){const e=yield dt.get("/block",!0,t);return ut(e)})}getBlock(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){const n=yield dt.get(`/block/${t}`,!0,e);return ut(n)})}createBlock(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){const n=yield dt.post("/block",t,!0,e);return ut(n)})}updateBlock(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return dt.put(`/block/${t}`,e,!0,n)})}updateBlockWithMigrations(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=[],r=null){const i=n.length>0?{block:e,fieldMigrations:n}:e;return dt.put(`/block/${t}`,i,!0,r)})}previewBlockUpdate(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){const r=yield dt.post(`/block/${t}/preview-update`,e,!0,n);return ut(r)})}deleteBlock(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return dt.delete(`/block/${t}`,!0,e)})}getTemplateBlocks(){return t.__awaiter(this,arguments,void 0,function*(t=null){const e=yield dt.get("/block/template-blocks",!0,t);return ut(e)})}};const pt=new e(n);var ht=new class{getModels(){return t.__awaiter(this,arguments,void 0,function*(t=null){return pt.get("/model",!0,t)})}getModel(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return pt.get(`/model/${t}`,!0,e)})}createModel(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return pt.post("/model",t,!0,e)})}updateModel(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return pt.put(`/model/${t}`,e,!0,n)})}deleteModel(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return pt.delete(`/model/${t}`,!0,e)})}previewSync(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return pt.get(`/model/${t}/sync/preview`,!0,e)})}executeSync(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return pt.post(`/model/${t}/sync`,e,!0,n)})}};const _t=new e(n);var ft,vt,wt,mt,yt,Ct,St=new class{getCompletion(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return _t.post("/openai/completion",t,!0,e)})}};exports.EventType=void 0,(ft=exports.EventType||(exports.EventType={}))[ft.Virtual=0]="Virtual",ft[ft.InPerson=1]="InPerson",ft[ft.Hybrid=2]="Hybrid",exports.CallToActionType=void 0,(vt=exports.CallToActionType||(exports.CallToActionType={}))[vt.Button=0]="Button",vt[vt.Link=1]="Link",vt[vt.Download=2]="Download",vt[vt.HireControlRegistration=3]="HireControlRegistration",exports.FormSubmissionStatus=void 0,(wt=exports.FormSubmissionStatus||(exports.FormSubmissionStatus={}))[wt.Submitted=1]="Submitted",wt[wt.Hold=2]="Hold",wt[wt.Rejected=3]="Rejected",wt[wt.Sent=4]="Sent",wt[wt.Failed=5]="Failed",wt[wt.Blacklisted=6]="Blacklisted",wt[wt.PendingApproval=7]="PendingApproval",wt[wt.Partial=8]="Partial",exports.JobStatus=void 0,(mt=exports.JobStatus||(exports.JobStatus={}))[mt.Hold=0]="Hold",mt[mt.Published=1]="Published",mt[mt.Archived=2]="Archived",exports.FeedHandlingOption=void 0,(yt=exports.FeedHandlingOption||(exports.FeedHandlingOption={}))[yt.Replace=0]="Replace",yt[yt.Append=1]="Append",yt[yt.Custom=2]="Custom",exports.IntegrationType=void 0,(Ct=exports.IntegrationType||(exports.IntegrationType={}))[Ct.Custom=0]="Custom",Ct[Ct.SearchWrite=1]="SearchWrite",Ct[Ct.SearchRead=2]="SearchRead",Ct[Ct.ExternalSync=3]="ExternalSync",Ct[Ct.FormQuestionsRead=4]="FormQuestionsRead";const bt={HERO:"hero",VIDEO_BLOCK:"videoBlock",CONTENT_CARD:"contentCard",ICON_CARD:"iconCard",LIST:"list",CONTAINER:"container",ACCORDION:"accordion",TESTIMONIAL:"testimonial",LARGE_TITLE_BLOCK:"largeTitleBlock",BUTTON:"button",RECRUITER:"recruiter",BLOBS:"blobs",TITLE_MODULAR_CONTENT_COPY:"titleModularContentCopy",INTRO_WITH_CONTENT_CARD:"introWithContentCard",CALLOUT_CARD:"calloutCard"},At={"testimonial-block":bt.TESTIMONIAL,"button-block":bt.BUTTON,"recruiter-block":bt.RECRUITER},Lt={login:o.login,nextLogin:o.nextLogin,refreshToken:o.refreshToken,changeCompany:o.changeCompany,register:o.register,isAuthenticated:o.isAuthenticated,getCompany:o.getCompany,getCompanies:o.getCompanies,getRoles:o.getRoles,getPermissions:o.getPermissions,logout:o.logout,getUser:o.getUser},Tt={getAll:a.getEvents,get:a.getEvent,getBySlug:a.getEventBySlug,create:a.createEvent,update:a.updateEvent,delete:a.deleteEvent},$t={get:l.getAllRolesWithClaims,create:l.addRole,update:l.updateRole,delete:l.deleteRole},Et=d,Ft=b,It={resetPassword:p.resetPassword,resetPasswordWithToken:p.resetPasswordWithToken,forgotPassword:p.forgotPassword},Rt={get:_.getMapConfig,getThemeSystem:_.getThemeSystem,update:_.updateMapConfig,create:_.createMapConfig},kt={get:m.getClientAuthConfigById,getAll:m.getAllClientAuthConfigs,update:m.updateClientAuthConfig,create:m.createClientAuthConfig,delete:m.deleteClientAuthConfig},Bt={getAll:C.getAll,create:C.create,update:C.update,delete:C.delete,getSearchRead:C.getSearchReadConfig,getFormQuestionsPreview:C.getFormQuestionsPreview,getFormQuestionsConfigStatus:C.getFormQuestionsConfigStatus,saveFormQuestionsConfig:C.saveFormQuestionsConfig},xt={upload:L.uploadMedia,uploadProfileImage:L.uploadProfileImage,get:L.listMedia,delete:L.deleteMedia},Ot={getList:$.getFilters,get:$.getFilter,update:$.updateFilter,create:$.createFilter,delete:$.deleteFilter},Mt={get:F.getAppendListings,getAppendListing:F.getAppendListing,create:F.createAppendListing,update:F.updateAppendListing,delete:F.deleteAppendListing},jt={getAll:D.getBlogs,getById:D.getBlog,create:D.createBlog,update:D.updateBlog,delete:D.deleteBlog},Pt={get:W.getCategories,getByCompany:W.getCategoriesByCompany},Ut={getAll:H.getAllCategoryLists,getById:H.getCategoryListById,getByType:H.getCategoryListsByType,getActive:H.getActiveCategoryLists,getByTypeAndName:H.getCategoryListByTypeAndName,create:H.createCategoryList,update:H.updateCategoryList,delete:H.deleteCategoryList,addValue:H.addValue,removeValue:H.removeValue,updateValue:H.updateValue,updateValues:H.updateValues},Nt={getByFeed:z.getByFeed,get:z.get,create:z.create,update:z.update,delete:z.delete,toggleActive:z.toggleActive,discoverFields:z.discoverFields,validate:z.validate},Dt={getAll:K.getAll,getById:K.get,create:K.create,update:K.update,delete:K.delete,sync:K.sync,toggleActive:K.toggleActive},Vt={get:Y.get,create:Y.create,delete:Y.delete},Wt={create:tt.create,get:tt.getAll,update:tt.update,delete:tt.delete,getAllSql:tt.getAllSql},Jt={get:nt.get,getAll:nt.getAll,sync:nt.sync},Ht={get:v.getAllPermissions},Gt={getAll:j.getCompanies,getById:j.getCompany,create:j.createCompany,update:j.updateCompany,delete:j.deleteCompany,sync:j.syncAllCompanies,clone:j.cloneCompany},zt={getAll:U.getJobListingsByCompany,getMapListings:U.getMapJobListingsByCompany,previewMapListings:U.previewMapJobListingsByCompany,getMapListing:U.getMapListingById,getById:U.getJobListingById,updateFieldVersionApproval:U.updateFieldVersionApproval,updateDescriptionVersionApproval:U.updateDescriptionVersionApproval,create:U.createJobListing,update:U.updateJobListing,delete:U.deleteJobListing},Qt={getTypes:it.getFieldTypes},Kt={getTypes:st.getValidatorTypes},qt={getAll:ct.getContentEntries,getById:ct.getContentEntry,getBySlug:ct.getContentEntryBySlug,create:ct.createContentEntry,update:ct.updateContentEntry,delete:ct.deleteContentEntry,unpublish:ct.unpublishAll},Xt={getAll:gt.getBlocks,getById:gt.getBlock,create:gt.createBlock,update:gt.updateBlock,updateWithMigrations:gt.updateBlockWithMigrations,previewUpdate:gt.previewBlockUpdate,delete:gt.deleteBlock,getTemplateBlocks:gt.getTemplateBlocks},Yt={getAll:ht.getModels,getById:ht.getModel,create:ht.createModel,update:ht.updateModel,delete:ht.deleteModel,previewSync:ht.previewSync,executeSync:ht.executeSync},Zt={getCompletion:St.getCompletion},te=R,ee={get:O.get,save:O.save},ne={submitContactForm:B.submitContactForm,submitFormSubmission:B.submitFormSubmission,saveProgress:B.saveProgress,completeSubmission:B.completeSubmission,getFormSubmissions:B.getFormSubmissions,exportFormSubmissionsCsv:B.exportFormSubmissionsCsv,getFormSubmissionTypes:B.getFormSubmissionTypes,deleteFormSubmission:B.deleteFormSubmission,reviewSubmissionApproval:B.reviewSubmissionApproval},re={auth:Lt,events:Tt,roles:$t,users:Et,account:It,mapConfig:Rt,permissions:Ht,clientAuthConfig:kt,integrationConfig:Bt,filters:Ot,listings:Ft,media:xt,appendListings:Mt,blogs:jt,categories:Pt,categoryLists:Ut,jobFeedFieldMappings:Nt,jobFeeds:Dt,jobListingSettings:Vt,listingEntities:Wt,recruiters:Jt,forms:te,formSettings:ee,formSubmissions:ne,openAI:Zt,companies:Gt,jobListings:zt};exports.BLOCK_KEYS=bt,exports.BLOCK_KEY_ALIASES=At,exports.FIELD_TYPES={SINGLE_LINE_STRING:"SingleLineString",MULTI_LINE_TEXT:"MultiLineText",MULTIPLE_PARAGRAPH_TEXT:"MultipleParagraphText",SLUG:"Slug",STRUCTURED_TEXT:"StructuredText",RICH_TEXT:"RichText",INTEGER_NUMBER:"IntegerNumber",FLOATING_POINT_NUMBER:"FloatingPointNumber",BOOLEAN:"Boolean",DATE:"Date",DATE_TIME:"DateTime",SINGLE_MEDIA:"SingleMedia",MEDIA_GALLERY:"MediaGallery",EXTERNAL_VIDEO:"ExternalVideo",COLOR:"Color",TAILWIND_COLOR_SELECTOR:"TailwindColorSelector",SINGLE_LINK:"SingleLink",MULTIPLE_LINKS:"MultipleLinks",LOCATION:"Location",JSON:"Json",SEO:"Seo",MODULAR_CONTENT:"ModularContent",SINGLE_BLOCK:"SingleBlock",JOB_FILTER:"JobFilter",FORM:"Form",SINGLE_CONTENT_REFERENCE:"SingleContentReference",MULTIPLE_CONTENT_REFERENCE:"MultipleContentReference",HIRE_CONTROL_MAP:"HireControlMap",RECRUITER_SELECTOR:"RecruiterSelector",TAGS:"Tags",VARIANT_SELECTOR:"VariantSelector"},exports.account=It,exports.appendListings=Mt,exports.auth=Lt,exports.blogs=jt,exports.categories=Pt,exports.categoryLists=Ut,exports.clientAuthConfig=kt,exports.companies=Gt,exports.contentBlocks=Xt,exports.contentEntries=qt,exports.contentField=Qt,exports.contentValidator=Kt,exports.default=re,exports.events=Tt,exports.filters=Ot,exports.formSettings=ee,exports.formSubmissions=ne,exports.forms=te,exports.integrationConfig=Bt,exports.jobFeedFieldMappings=Nt,exports.jobFeeds=Dt,exports.jobListingSettings=Vt,exports.jobListings=zt,exports.listingEntities=Wt,exports.listings=Ft,exports.mapConfig=Rt,exports.media=xt,exports.model=Yt,exports.openAI=Zt,exports.permissions=Ht,exports.recruiters=Jt,exports.roles=$t,exports.users=Et;
|
|
1
|
+
"use strict";function t(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{l(r.next(t))}catch(t){i(t)}}function u(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,u)}l((r=r.apply(t,e||[])).next())})}Object.defineProperty(exports,"__esModule",{value:!0}),"function"==typeof SuppressedError&&SuppressedError;class e{constructor(t){this.apiUrl=t,this.isLocalhost=!1}getAuthToken(){return this.isLocalhost?sessionStorage.getItem("token"):null}get(e){return t(this,arguments,void 0,function*(t,e=!1,n=null){this.isLocalhost&&e&&!n&&(n=this.getAuthToken());const r={method:"GET",credentials:n?"omit":"include"};return e?this.fetchWithAuth(t,r,n):this.fetchWithoutAuth(t,r)})}post(e,n){return t(this,arguments,void 0,function*(t,e,n=!1,r=null,o=!1){this.isLocalhost&&n&&!r&&(r=this.getAuthToken());const i=o,s={method:"POST",credentials:r?"omit":"include",headers:Object.assign(Object.assign({},r?{Authorization:`Bearer ${r}`}:{}),i?{}:{"Content-Type":"application/json"}),body:i?this.convertToFormData(e):JSON.stringify(e)};return n?this.fetchWithAuth(t,s,r):this.fetchWithoutAuth(t,s)})}put(e,n){return t(this,arguments,void 0,function*(t,e,n=!1,r=null,o=!1){this.isLocalhost&&n&&!r&&(r=this.getAuthToken());const i=o,s={method:"PUT",credentials:r?"omit":"include",headers:Object.assign(Object.assign({},r?{Authorization:`Bearer ${r}`}:{}),i?{}:{"Content-Type":"application/json"}),body:i?this.convertToFormData(e):JSON.stringify(e)};return n?this.fetchWithAuth(t,s,r):this.fetchWithoutAuth(t,s)})}patch(e,n){return t(this,arguments,void 0,function*(t,e,n=!1,r=null,o=!1){this.isLocalhost&&n&&!r&&(r=this.getAuthToken());const i=o,s={method:"PATCH",credentials:r?"omit":"include",headers:Object.assign(Object.assign({},r?{Authorization:`Bearer ${r}`}:{}),i?{}:{"Content-Type":"application/json"}),body:i?this.convertToFormData(e):JSON.stringify(e)};return n?this.fetchWithAuth(t,s,r):this.fetchWithoutAuth(t,s)})}delete(e){return t(this,arguments,void 0,function*(t,e=!1,n=null){this.isLocalhost&&e&&!n&&(n=this.getAuthToken());const r={method:"DELETE",credentials:n?"omit":"include"};return e?this.fetchWithAuth(t,r,n):this.fetchWithoutAuth(t,r)})}getFile(e){return t(this,arguments,void 0,function*(t,e=!1,n=null){this.isLocalhost&&e&&!n&&(n=this.getAuthToken());const r={method:"GET",credentials:n?"omit":"include",headers:e&&n?{Authorization:`Bearer ${n}`}:{}},o=yield fetch(`${this.apiUrl}${t}`,r);if(!o.ok)throw new Error(`Failed to fetch file: ${o.statusText}`);return o.blob()})}convertToFormData(t,e=new FormData,n=""){return t instanceof File?e.append(n||"file",t):"string"==typeof t||"number"==typeof t||"boolean"==typeof t?e.append(n,t.toString()):Array.isArray(t)?t.forEach((t,r)=>{this.convertToFormData(t,e,`${n}[${r}]`)}):"object"==typeof t&&null!==t&&Object.keys(t).forEach(r=>{const o=t[r],i=n?`${n}.${r}`:r;this.convertToFormData(o,e,i)}),e}fetchWithoutAuth(e,n){return t(this,void 0,void 0,function*(){const t=yield fetch(`${this.apiUrl}${e}`,n);return this.handleResponse(t)})}fetchWithAuth(e,n,r){return t(this,void 0,void 0,function*(){r?(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:`Bearer ${r}`}),n.credentials="omit"):n.credentials="include";let t=yield fetch(`${this.apiUrl}${e}`,n);if(401===t.status){if(!(yield this.refreshToken()))throw{statusCode:t.status};this.isLocalhost&&(r=this.getAuthToken())&&(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:`Bearer ${r}`})),t=yield fetch(`${this.apiUrl}${e}`,n)}return this.handleResponse(t)})}handleResponse(e){return t(this,void 0,void 0,function*(){if(!e.ok||!e.status.toString().startsWith("2")){let t=`Error: ${e.status} ${e.statusText}`;try{const n=yield e.text();if(n)try{const e=JSON.parse(n);console.log(e),e&&"string"==typeof e.message&&e.message.trim()?t=e.message:e&&"string"==typeof e.error&&e.error.trim()?t=e.error:e&&"string"==typeof e.title&&e.title.trim()&&(t=e.title)}catch(e){const r=n.trim();r&&!r.startsWith("<")&&(t=r)}}catch(t){console.error("Failed to parse error response:",t)}throw{statusCode:e.status,errorMessage:t}}if(204===e.status||205===e.status)return null;const t=yield e.text();if(!t)return null;try{return JSON.parse(t)}catch(e){return t}})}refreshToken(){return t(this,void 0,void 0,function*(){if(!this.isLocalhost){return!!(yield fetch(`${this.apiUrl}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"})).ok||(console.error("Failed to refresh token"),!1)}{const t=sessionStorage.getItem("refreshToken");if(!t)return!1;const e=yield fetch(`${this.apiUrl}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:t})});if(!e.ok)return console.error("Failed to refresh token"),!1;try{const t=yield e.json();return t.token&&sessionStorage.setItem("token",t.token),t.refreshToken&&sessionStorage.setItem("refreshToken",t.refreshToken),!0}catch(t){return console.error("Failed to parse refresh token response:",t),!1}}})}}const n=process.env.NEXT_PUBLIC_API_URL||process.env.VITE_API_URL||process.env.REACT_APP_API_URL||"https://api.myhirecontrol.com",r=new e(n),o="undefined"!=typeof window&&"localhost"===window.location.hostname;var i=new class{login(e){return t(this,void 0,void 0,function*(){return r.post("/auth/login",e,!1)})}nextLogin(e){return t(this,void 0,void 0,function*(){const t="/auth/nextLogin"+(o?"?localhost=true":""),n=yield r.post(t,e,!1);return n&&(sessionStorage.setItem("token",n.token),sessionStorage.setItem("refreshToken",n.refreshToken),sessionStorage.setItem("expiration",n.expiration)),n})}refreshToken(){return t(this,void 0,void 0,function*(){const t="/auth/refresh"+(o?"?localhost=true":""),e=yield r.post(t,{},!0);return e&&o&&(sessionStorage.setItem("token",e.token),sessionStorage.setItem("refreshToken",e.refreshToken),sessionStorage.setItem("expiration",e.expiration)),e})}changeCompany(e){return t(this,void 0,void 0,function*(){const t="/auth/changeCompany"+(o?"?localhost=true":"");var n=yield r.post(t,e,!0);return n&&(sessionStorage.setItem("token",n.token),sessionStorage.setItem("refreshToken",n.refreshToken),sessionStorage.setItem("expiration",n.expiration)),n})}register(e){return t(this,void 0,void 0,function*(){return r.post("/auth/register",e,!1)})}getCompanies(){return t(this,void 0,void 0,function*(){return r.get("/auth/companies",!0)})}getCompany(){return t(this,void 0,void 0,function*(){return r.get("/auth/company",!0)})}getRoles(){return t(this,void 0,void 0,function*(){return r.get("/auth/roles",!0)})}isAuthenticated(){return t(this,void 0,void 0,function*(){try{const t=yield r.get("/auth/authenticated",!0);return t||(yield this.tryRefreshAndCheckAuth())}catch(t){return yield this.tryRefreshAndCheckAuth()}})}tryRefreshAndCheckAuth(){return t(this,void 0,void 0,function*(){try{yield this.refreshToken();return yield r.get("/auth/authenticated",!0)}catch(t){return!1}})}getUser(){return t(this,arguments,void 0,function*(t=null){try{return yield r.get("/auth/user",!0,t)}catch(t){throw t}})}logout(){return t(this,void 0,void 0,function*(){try{const t=yield r.post("/auth/logout",{},!0);return sessionStorage.removeItem("token"),sessionStorage.removeItem("refreshToken"),sessionStorage.removeItem("expiration"),t}catch(t){throw t}})}getPermissions(){return t(this,arguments,void 0,function*(t=null){try{return yield r.get("/auth/permissions",!0,t)}catch(t){throw t}})}};const s=new e(n);var u=new class{getEvents(){return t(this,arguments,void 0,function*(t=null){return s.get("/events",!0,t)})}getEvent(e){return t(this,arguments,void 0,function*(t,e=null){return s.get(`/events/${t}`,!0,e)})}getEventBySlug(e){return t(this,arguments,void 0,function*(t,e=null){return s.get(`/events/details/${t}`,!0,e)})}getListingEvents(e){return t(this,arguments,void 0,function*(t,e=null){return s.get(`/listingEvents/${t}`,!0,e)})}createEvent(e){return t(this,arguments,void 0,function*(t,e=null){return s.post("/events",t,!0,e)})}updateEvent(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return s.put(`/events/${t}`,e,!0,n)})}deleteEvent(e){return t(this,arguments,void 0,function*(t,e=null){return s.delete(`/events/${t}`,!0,e)})}};const l=new e(n);var a=new class{getAllRolesWithClaims(){return t(this,arguments,void 0,function*(t=null){return l.get("/roles",!0,t)})}addRole(e){return t(this,arguments,void 0,function*(t,e=null){return l.post("/roles",t,!0,e)})}updateRole(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return l.put(`/roles/${t}`,e,!0,n)})}deleteRole(e){return t(this,arguments,void 0,function*(t,e=null){return l.delete(`/roles/${t}`,!0,e)})}};const c=new e(n);var d=new class{getAllUsers(){return t(this,arguments,void 0,function*(t=null){try{return yield c.get("/users",!0,t)}catch(t){throw t}})}getUser(e){return t(this,arguments,void 0,function*(t,e=null){try{return yield c.get(`/users/${t}`,!0,e)}catch(t){throw t}})}getUserCompanyAccess(e){return t(this,arguments,void 0,function*(t,e=null){return c.get(`/users/${t}/company-access`,!0,e)})}getUserCompanyAccessOptions(){return t(this,arguments,void 0,function*(t=null){return c.get("/users/company-access-options",!0,t)})}createUser(e){return t(this,arguments,void 0,function*(t,e=null){try{return yield c.post("/users",t,!0,e)}catch(t){throw t}})}updateUser(e,n){return t(this,arguments,void 0,function*(t,e,n=null){try{yield c.put(`/users/${t}`,e,!0,n)}catch(t){throw t}})}updateLoggedInUser(e){return t(this,arguments,void 0,function*(t,e=null){try{yield c.put("/users",t,!0,e)}catch(t){throw t}})}deleteUser(e){return t(this,arguments,void 0,function*(t,e=null){try{yield c.delete(`/users/${t}`,!0,e)}catch(t){throw t}})}};const g=new e(n);var p=new class{forgotPassword(e){return t(this,void 0,void 0,function*(){try{return yield g.post("/account/forgotPassword",e,!1)}catch(t){throw t}})}resetPasswordWithToken(e){return t(this,void 0,void 0,function*(){try{return yield g.post("/account/resetPasswordWithToken",e,!1)}catch(t){throw t}})}resetPassword(e){return t(this,arguments,void 0,function*(t,e=null){try{return yield g.post("/account/resetPassword",t,!0,e)}catch(t){throw t}})}};const h=new e(n);var f=new class{getMapConfig(){return t(this,arguments,void 0,function*(t=null){try{return yield h.get("/mapconfig",!0,t)}catch(t){throw t}})}getThemeSystem(){return t(this,arguments,void 0,function*(t=null){try{return yield h.get("/mapconfig/theme-system",!0,t)}catch(t){throw t}})}updateMapConfig(e){return t(this,arguments,void 0,function*(t,e=null){return h.put("/mapconfig",t,!0,e)})}createMapConfig(e){return t(this,arguments,void 0,function*(t,e=null){return h.post("/mapconfig",t,!0,e)})}};const v=new e(n);var m=new class{getAllPermissions(){return t(this,arguments,void 0,function*(t=null){return v.get("/permissions",!0,t)})}};const y=new e(n);var C=new class{getClientAuthConfigById(e){return t(this,arguments,void 0,function*(t,e=null){try{return yield y.get(`/clientAuthConfig/${t}`,!0,e)}catch(t){throw t}})}getAllClientAuthConfigs(){return t(this,arguments,void 0,function*(t=null){try{return yield y.get("/clientAuthConfig",!0,t)}catch(t){throw t}})}createClientAuthConfig(e){return t(this,arguments,void 0,function*(t,e=null){return y.post("/clientAuthConfig",t,!0,e)})}updateClientAuthConfig(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return y.put(`/clientAuthConfig/${t}`,e,!0,n)})}deleteClientAuthConfig(e){return t(this,arguments,void 0,function*(t,e=null){return y.delete(`/clientAuthConfig/${t}`,!0,e)})}};const S=new e(n);var b=new class{getAll(){return t(this,arguments,void 0,function*(t=null){return S.get("/integrationconfig",!0,t)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return S.post("/integrationconfig",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return S.put(`/integrationconfig/${t}`,e,!0,n)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){return S.delete(`/integrationconfig/${t}`,!0,e)})}getSearchReadConfig(){return t(this,arguments,void 0,function*(t=null){try{return yield S.get("/integrationconfig/search-read",!0,t)}catch(t){if(404===(null==t?void 0:t.statusCode)||204===(null==t?void 0:t.statusCode))return null;throw t}})}getFormQuestionsPreview(){return t(this,arguments,void 0,function*(t=null){try{return yield S.get("/integrationconfig/form-questions/preview",!0,t)}catch(t){if(404===(null==t?void 0:t.statusCode)||204===(null==t?void 0:t.statusCode))return null;throw t}})}getFormQuestionsConfigStatus(e){return t(this,arguments,void 0,function*(t,e=null){return S.get(`/integrationconfig/form-questions/${t}`,!0,e)})}saveFormQuestionsConfig(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return S.put(`/integrationconfig/form-questions/${t}`,e,!0,n)})}};const A=new e(n);var L=new class{getListings(){return t(this,arguments,void 0,function*(t=null,e=null){try{const n=e?`?filterId=${encodeURIComponent(e)}`:"";return yield A.get(`/listings${n}`,!0,t)}catch(t){throw t}})}getListingDetails(e){return t(this,arguments,void 0,function*(t,e=null){try{return yield A.get(`/listings/${t}`,!0,e)}catch(t){throw t}})}};const T=new e(n);var w=new class{uploadMedia(e){return t(this,arguments,void 0,function*(t,e=null){return T.post("/media/upload",t,!0,e,!0)})}uploadProfileImage(e){return t(this,arguments,void 0,function*(t,e=null){return T.post("/media/upload-profile-image",t,!0,e,!0)})}listMedia(e){return t(this,arguments,void 0,function*(t,e=null){const n=new URLSearchParams({folderKey:t});return T.get(`/media/list?${n.toString()}`,!0,e)})}deleteMedia(e){return t(this,arguments,void 0,function*(t,e=null){const n=new URLSearchParams({key:t});return T.delete(`/media/delete?${n.toString()}`,!0,e)})}};const $=new e(n);var E=new class{getFilters(){return t(this,arguments,void 0,function*(t=null){return $.get("/filters",!0,t)})}getFilter(e){return t(this,arguments,void 0,function*(t,e=null){return $.get(`/filters/${t}`,!0,e)})}createFilter(e){return t(this,arguments,void 0,function*(t,e=null){return $.post("/filters",t,!0,e)})}updateFilter(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return $.put(`/filters/${t}`,e,!0,n)})}deleteFilter(e){return t(this,arguments,void 0,function*(t,e=null){return $.delete(`/filters/${t}`,!0,e)})}};const I=new e(n);var F=new class{getAppendListings(){return t(this,arguments,void 0,function*(t=null){return I.get("/appendListings",!0,t)})}getAppendListing(e){return t(this,arguments,void 0,function*(t,e=null){return I.get(`/appendListings/${t}`,!0,e)})}createAppendListing(e){return t(this,arguments,void 0,function*(t,e=null){return I.post("/appendListings",t,!0,e)})}updateAppendListing(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return I.put(`/appendListings/${t}`,e,!0,n)})}deleteAppendListing(e){return t(this,arguments,void 0,function*(t,e=null){return I.delete(`/appendListings/${t}`,!0,e)})}};const R=new e(n);var B=new class{getForms(){return t(this,arguments,void 0,function*(t=null){return R.get("/forms",!0,t)})}getForm(e){return t(this,arguments,void 0,function*(t,e=null){return R.get(`/forms/${t}`,!0,e)})}createForm(e){return t(this,arguments,void 0,function*(t,e=null){return R.post("/forms",t,!0,e)})}updateForm(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return R.put(`/forms/${t}`,e,!0,n)})}updateFormWithFieldRenames(e,n,r){return t(this,arguments,void 0,function*(t,e,n,r=null){return R.put(`/forms/${t}`,Object.assign(Object.assign({},e),n),!0,r)})}getFormSubmissionCount(e){return t(this,arguments,void 0,function*(t,e=null){return R.get(`/forms/${t}/submission-count`,!0,e)})}getFormSubmissionFieldUsage(e){return t(this,arguments,void 0,function*(t,e=null){return R.get(`/forms/${t}/submission-fields`,!0,e)})}migrateSubmissionFields(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return R.post(`/forms/${t}/migrate-submission-fields`,e,!0,n)})}deleteForm(e){return t(this,arguments,void 0,function*(t,e=null){return R.delete(`/forms/${t}`,!0,e)})}processFormRequest(e){return t(this,arguments,void 0,function*(t,e=null){return R.post("/forms/jsonSchema",t,!0,e)})}getEasyApplySelection(e,n){return t(this,arguments,void 0,function*(t,e,n=null){const r=new URLSearchParams({jobId:t});return e&&r.set("fallbackFormId",e),R.get(`/forms/easy-apply/selection?${r.toString()}`,!0,n)})}executeGuidedAction(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return R.post(`/forms/${t}/guided-actions/execute`,e,!0,n)})}};const k=new e(n);var x=new class{submitContactForm(e){return t(this,arguments,void 0,function*(t,e=null){return k.post("/contactForm",t,!0,e,!0)})}submitFormSubmission(e){return t(this,arguments,void 0,function*(t,e=null){return k.post("/formsubmission",t,!0,e)})}saveProgress(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return k.put(`/formsubmission/${t}/progress`,e,!0,n)})}completeSubmission(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return k.post(`/formsubmission/${t}/complete`,e,!0,n)})}getFormSubmissions(){return t(this,arguments,void 0,function*(t=20,e=1,n=null,r=null,o=null,i=null,s=null){const u=new URLSearchParams({pageSize:t.toString(),pageNumber:e.toString()});return r&&u.append("status",r.toString()),n&&u.append("type",n),o&&u.append("from",o.toISOString()),i&&u.append("to",i.toISOString()),k.get(`/formsubmission?${u.toString()}`,!0,s)})}exportFormSubmissionsCsv(){return t(this,arguments,void 0,function*(t=20,e=1,n=null,r=null,o=null,i=null,s=null,u=null){const l=new URLSearchParams({pageSize:t.toString(),pageNumber:e.toString()});r&&l.append("status",r.toString()),n&&l.append("type",n),o&&l.append("from",o.toISOString()),i&&l.append("to",i.toISOString()),s&&s.length>0&&s.forEach(t=>l.append("columns",t));const a=yield k.getFile(`/formsubmission/export-csv?${l.toString()}`,!0,u),c=window.URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download="HireControl_Form_Submissions.csv",document.body.appendChild(d),d.click(),window.URL.revokeObjectURL(c),document.body.removeChild(d)})}getFormSubmissionTypes(){return t(this,arguments,void 0,function*(t=null){return k.get("/formsubmission/types",!0,t)})}deleteFormSubmission(e){return t(this,arguments,void 0,function*(t,e=null){return k.delete(`/formsubmission/${t}`,!0,e)})}reviewSubmissionApproval(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return k.post(`/formsubmission/${t}/approval`,e,!0,n)})}};const O=new e(n);var U=new class{get(){return t(this,arguments,void 0,function*(t=null){return O.get("/formSettings",!0,t)})}save(e){return t(this,arguments,void 0,function*(t,e=null){return O.post("/formSettings",t,!0,e)})}};const M=new e(n);var j=new class{getCompanies(){return t(this,arguments,void 0,function*(t=null){return M.get("/companies",!0,t)})}getCompany(e){return t(this,arguments,void 0,function*(t,e=null){return M.get(`/companies/${t}`,!0,e)})}createCompany(e){return t(this,arguments,void 0,function*(t,e=null){return M.post("/companies",t,!0,e)})}updateCompany(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return M.put(`/companies/${t}`,e,!0,n)})}deleteCompany(e){return t(this,arguments,void 0,function*(t,e=null){return M.delete(`/companies/${t}`,!0,e)})}syncAllCompanies(){return t(this,arguments,void 0,function*(t=null){return M.get("/companies/syncall",!0,t)})}cloneCompany(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return M.post(`/companies/${t}/clone`,e,!0,n)})}};const P=new e(n);var N=new class{updateFieldVersionApproval(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return P.patch(`/joblistings/${t}/field-version-approval`,e,!0,n)})}updateDescriptionVersionApproval(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return P.patch(`/joblistings/${t}/description-version-approval`,e,!0,n)})}getJobListingsByCompany(){return t(this,arguments,void 0,function*(t=null){return P.get("/joblistings",!0,t)})}getMapJobListingsByCompany(){return t(this,arguments,void 0,function*(t=null,e=null,n=null){const r=new URLSearchParams;e&&r.set("filterId",e),null!=n&&r.set("status",n.toString());const o=r.toString();return P.get("/joblistings/MapListings"+(o?`?${o}`:""),!0,t)})}previewMapJobListingsByCompany(e){return t(this,arguments,void 0,function*(t,e=null){return P.post("/joblistings/MapListings/preview",t,!0,e)})}getJobListingById(e){return t(this,arguments,void 0,function*(t,e=null){return P.get(`/joblistings/${t}`,!0,e)})}getMapListingById(e){return t(this,arguments,void 0,function*(t,e=null,n=null){const r=new URLSearchParams;null!=n&&r.set("status",n.toString());const o=r.toString();return P.get(`/joblistings/MapListings/${t}${o?`?${o}`:""}`,!0,e)})}createJobListing(e){return t(this,arguments,void 0,function*(t,e=null){return P.post("/joblistings",t,!0,e)})}updateJobListing(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return P.put(`/joblistings/${t}`,e,!0,n)})}exportJobListingsCsv(){return t(this,arguments,void 0,function*(t=10,e=1,n=null,r=null,o=null,i=null){const s=new URLSearchParams({pageSize:t.toString(),pageNumber:e.toString()});null!=n&&s.append("status",n.toString()),r&&s.append("from",r.toISOString()),o&&s.append("to",o.toISOString());const u=yield P.getFile(`/joblistings/Export-csv?${s.toString()}`,!0,i),l=window.URL.createObjectURL(u),a=document.createElement("a");a.href=l,a.download="job_listings.csv",document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(l),document.body.removeChild(a)})}deleteJobListing(e){return t(this,arguments,void 0,function*(t,e=null){return P.delete(`/joblistings/${t}`,!0,e)})}};const _=new e(n);var D=new class{getBlogs(){return t(this,arguments,void 0,function*(t=null){return _.get("/blog",!0,t)})}getBlog(e){return t(this,arguments,void 0,function*(t,e=null){return _.get(`/blog/${t}`,!0,e)})}createBlog(e){return t(this,arguments,void 0,function*(t,e=null){return _.post("/blog",t,!0,e)})}updateBlog(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return _.put(`/blog/${t}`,e,!0,n)})}deleteBlog(e){return t(this,arguments,void 0,function*(t,e=null){return _.delete(`/blog/${t}`,!0,e)})}};const V=new e(n);var W=new class{getCategories(){return t(this,arguments,void 0,function*(t=null,e=null){const n=new URLSearchParams;null!=t&&n.append("type",String(t));const r=n.toString()?`?${n.toString()}`:"";return V.get(`/categories${r}`,!0,e)})}getCategoriesByCompany(e){return t(this,arguments,void 0,function*(t,e=null,n=null){const r=new URLSearchParams;null!=e&&r.append("type",String(e));const o=r.toString()?`?${r.toString()}`:"";return V.get(`/categories/${t}${o}`,!0,n)})}};const J=new e(n);var H=new class{getAllCategoryLists(){return t(this,arguments,void 0,function*(t=null){return J.get("/categorylist",!0,t)})}getCategoryListById(e){return t(this,arguments,void 0,function*(t,e=null){return J.get(`/categorylist/${t}`,!0,e)})}getCategoryListsByType(e){return t(this,arguments,void 0,function*(t,e=null){return J.get(`/categorylist/type/${t}`,!0,e)})}getActiveCategoryLists(){return t(this,arguments,void 0,function*(t=null){return J.get("/categorylist/active",!0,t)})}getCategoryListByTypeAndName(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return J.get(`/categorylist/type/${t}/name/${e}`,!0,n)})}createCategoryList(e){return t(this,arguments,void 0,function*(t,e=null){return J.post("/categorylist",t,!0,e)})}updateCategoryList(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return J.put(`/categorylist/${t}`,e,!0,n)})}deleteCategoryList(e){return t(this,arguments,void 0,function*(t,e=null){return J.delete(`/categorylist/${t}`,!0,e)})}addValue(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return J.post(`/categorylist/${t}/values`,e,!0,n)})}removeValue(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return J.delete(`/categorylist/${t}/values/${e}`,!0,n)})}updateValues(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return J.put(`/categorylist/${t}/values`,e,!0,n)})}updateValue(e,n,r){return t(this,arguments,void 0,function*(t,e,n,r=null){return J.put(`/categorylist/${t}/values/${encodeURIComponent(e)}`,n,!0,r)})}};const G=new e(n);var K=new class{getByFeed(e){return t(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/feed/${t}`,!0,e)})}get(e){return t(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/${t}`,!0,e)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return G.post("/jobFeedFieldMappings",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return G.put(`/jobFeedFieldMappings/${t}`,e,!0,n)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){return G.delete(`/jobFeedFieldMappings/${t}`,!0,e)})}toggleActive(e){return t(this,arguments,void 0,function*(t,e=null){return G.post("/jobFeedFieldMappings/toggle-active",t,!0,e)})}discoverFields(e){return t(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/discover-fields/${t}`,!0,e)})}validate(e){return t(this,arguments,void 0,function*(t,e=null){return G.get(`/jobFeedFieldMappings/validate/${t}`,!0,e)})}};const z=new e(n);var Q=new class{getAll(){return t(this,arguments,void 0,function*(t=null){return z.get("/jobfeeds",!0,t)})}get(e){return t(this,arguments,void 0,function*(t,e=null){return z.get(`/jobfeeds/${t}`,!0,e)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return z.post("/jobfeeds",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return z.put(`/jobfeeds/${t}`,e,!0,n)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){return z.delete(`/jobfeeds/${t}`,!0,e)})}sync(e){return t(this,arguments,void 0,function*(t,e=null){return z.post(`/jobfeeds/${t}/sync`,{},!0,e)})}toggleActive(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return z.patch(`/jobfeeds/${t}/toggle-active`,e,!0,n)})}};const q=new e(n),X=(t,e)=>"object"==typeof t&&null!==t&&"statusCode"in t&&t.statusCode===e;var Y=new class{get(){return t(this,arguments,void 0,function*(t=null){try{return yield q.get("/jobListingSettings",!0,t)}catch(t){if(X(t,404)||X(t,204))return null;throw t}})}create(e){return t(this,arguments,void 0,function*(t,e=null){return q.post("/jobListingSettings",t,!0,e)})}delete(){return t(this,arguments,void 0,function*(t=null){return q.delete("/jobListingSettings",!0,t)})}};const Z=new e(n);var tt=new class{getAllSql(e){return t(this,arguments,void 0,function*(t,e=null,n=null){const r=new URLSearchParams;return e&&r.append("origin",e),Z.post("/listingEntities"+(r.toString()?"?"+r.toString():""),t,!0,n)})}getAll(){return t(this,arguments,void 0,function*(t=null){return Z.get("/listingEntities",!0,t)})}getSummaries(){return t(this,arguments,void 0,function*(t=null){return Z.get("/listingEntities/summaries",!0,t)})}getById(e){return t(this,arguments,void 0,function*(t,e=null){return Z.get(`/listingEntities/${encodeURIComponent(t)}`,!0,e)})}getByEmployer(e){return t(this,arguments,void 0,function*(t,e=null){return Z.get(`/listingEntities/byEmployer/${encodeURIComponent(t)}`,!0,e)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return Z.post("/listingEntities/create",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=null){yield Z.put(`/listingEntities/update/${t}`,e,!0,n)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){yield Z.delete(`/listingEntities/${encodeURIComponent(t)}`,!0,e)})}};const et=new e(n);var nt=new class{get(){return t(this,arguments,void 0,function*(t=null,e=null){const n=new URLSearchParams;t&&t.forEach(t=>n.append("recruiterIds",t.toString()));const r=n.toString()?`?${n.toString()}`:"";return et.get(`/recruiters${r}`,!0,e)})}getAll(){return t(this,arguments,void 0,function*(t=null){return et.get("/recruiters/all",!0,t)})}sync(){return t(this,arguments,void 0,function*(t=null,e=!1){return et.post(`/recruiters/sync?updateExisting=${e}`,{},!0,t)})}};const rt=new e(n);var ot=new class{getAll(){return t(this,arguments,void 0,function*(t=null){return rt.get("/employers",!0,t)})}getById(e){return t(this,arguments,void 0,function*(t,e=null){return rt.get(`/employers/${encodeURIComponent(t)}`,!0,e)})}getByEntityKey(e){return t(this,arguments,void 0,function*(t,e=null){return rt.get(`/employers/byEntityKey/${encodeURIComponent(t)}`,!0,e)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return rt.post("/employers",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=[],r=null){const o=new URLSearchParams;n.length&&o.append("applyLogoIds",n.join(","));const i=o.toString()?`?${o.toString()}`:"";return rt.put(`/employers/${encodeURIComponent(t)}${i}`,e,!0,r)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){return rt.delete(`/employers/${encodeURIComponent(t)}`,!0,e)})}};const it=new e(n);var st=new class{getFieldTypes(){return t(this,arguments,void 0,function*(t=null){return it.get("/field/types",!0,t)})}};const ut=new e(n);var lt=new class{getValidatorTypes(){return t(this,arguments,void 0,function*(t=null){return ut.get("/validator/types",!0,t)})}};const at=t=>t?/^[a-z][a-zA-Z0-9]*$/.test(t)?t:t.replace(/[^a-zA-Z0-9]+/g," ").trim().toLowerCase().replace(/\s+(.)/g,(t,e)=>e.toUpperCase()).replace(/\s/g,"").replace(/^(.)/,(t,e)=>e.toLowerCase()):t,ct=t=>{if(Array.isArray(t))return t.map(t=>ct(t));if(!(t=>null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype)(t))return t;const e={};for(const[n,r]of Object.entries(t))e[at(n)]=ct(r);return e},dt=new e(n);var gt=new class{getContentEntries(e){return t(this,arguments,void 0,function*(t,e=null,n=null){let r=`/contententry?contentId=${t}`;null!==e&&(r+=`&statusFilter=${e}`);const o=yield dt.get(r,!0,n);return ct(o)})}getContentEntry(e){return t(this,arguments,void 0,function*(t,e=null,n=null){let r=`/contententry/${t}`;null!==e&&(r+=`?statusFilter=${e}`);const o=yield dt.get(r,!0,n);return ct(o)})}getContentEntryBySlug(e,n){return t(this,arguments,void 0,function*(t,e,n=null,r=null){let o=`/contententry/by-slug?contentId=${encodeURIComponent(t)}&slug=${encodeURIComponent(e)}`;null!==n&&(o+=`&statusFilter=${n}`);const i=yield dt.get(o,!0,r);return ct(i)})}createContentEntry(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield dt.post("/contententry",t,!0,e);return ct(n)})}updateContentEntry(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return dt.put(`/contententry/${t}`,e,!0,n)})}deleteContentEntry(e){return t(this,arguments,void 0,function*(t,e=null){return dt.delete(`/contententry/${t}`,!0,e)})}getVersions(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield dt.get(`/contententry/${t}/versions`,!0,e);return ct(n)})}unpublishAll(e){return t(this,arguments,void 0,function*(t,e=null){return dt.post(`/contententry/${t}/unpublish`,void 0,!0,e)})}};const pt=new e(n);var ht=new class{getBlocks(){return t(this,arguments,void 0,function*(t=null){const e=yield pt.get("/block",!0,t);return ct(e)})}getBlock(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield pt.get(`/block/${t}`,!0,e);return ct(n)})}createBlock(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield pt.post("/block",t,!0,e);return ct(n)})}updateBlock(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return pt.put(`/block/${t}`,e,!0,n)})}updateBlockWithMigrations(e,n){return t(this,arguments,void 0,function*(t,e,n=[],r=null){const o=n.length>0?{block:e,fieldMigrations:n}:e;return pt.put(`/block/${t}`,o,!0,r)})}previewBlockUpdate(e,n){return t(this,arguments,void 0,function*(t,e,n=null){const r=yield pt.post(`/block/${t}/preview-update`,e,!0,n);return ct(r)})}deleteBlock(e){return t(this,arguments,void 0,function*(t,e=null){return pt.delete(`/block/${t}`,!0,e)})}getTemplateBlocks(){return t(this,arguments,void 0,function*(t=null){const e=yield pt.get("/block/template-blocks",!0,t);return ct(e)})}};const ft=new e(n);var vt=new class{getModels(){return t(this,arguments,void 0,function*(t=null){return ft.get("/model",!0,t)})}getModel(e){return t(this,arguments,void 0,function*(t,e=null){return ft.get(`/model/${t}`,!0,e)})}createModel(e){return t(this,arguments,void 0,function*(t,e=null){return ft.post("/model",t,!0,e)})}updateModel(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return ft.put(`/model/${t}`,e,!0,n)})}deleteModel(e){return t(this,arguments,void 0,function*(t,e=null){return ft.delete(`/model/${t}`,!0,e)})}previewSync(e){return t(this,arguments,void 0,function*(t,e=null){return ft.get(`/model/${t}/sync/preview`,!0,e)})}executeSync(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return ft.post(`/model/${t}/sync`,e,!0,n)})}};const mt=new e(n);var yt,Ct,St,bt,At,Lt,Tt=new class{getCompletion(e){return t(this,arguments,void 0,function*(t,e=null){return mt.post("/openai/completion",t,!0,e)})}};exports.EventType=void 0,(yt=exports.EventType||(exports.EventType={}))[yt.Virtual=0]="Virtual",yt[yt.InPerson=1]="InPerson",yt[yt.Hybrid=2]="Hybrid",exports.CallToActionType=void 0,(Ct=exports.CallToActionType||(exports.CallToActionType={}))[Ct.Button=0]="Button",Ct[Ct.Link=1]="Link",Ct[Ct.Download=2]="Download",Ct[Ct.HireControlRegistration=3]="HireControlRegistration",exports.FormSubmissionStatus=void 0,(St=exports.FormSubmissionStatus||(exports.FormSubmissionStatus={}))[St.Submitted=1]="Submitted",St[St.Hold=2]="Hold",St[St.Rejected=3]="Rejected",St[St.Sent=4]="Sent",St[St.Failed=5]="Failed",St[St.Blacklisted=6]="Blacklisted",St[St.PendingApproval=7]="PendingApproval",St[St.Partial=8]="Partial",exports.JobStatus=void 0,(bt=exports.JobStatus||(exports.JobStatus={}))[bt.Hold=0]="Hold",bt[bt.Published=1]="Published",bt[bt.Archived=2]="Archived",exports.FeedHandlingOption=void 0,(At=exports.FeedHandlingOption||(exports.FeedHandlingOption={}))[At.Replace=0]="Replace",At[At.Append=1]="Append",At[At.Custom=2]="Custom",exports.IntegrationType=void 0,(Lt=exports.IntegrationType||(exports.IntegrationType={}))[Lt.Custom=0]="Custom",Lt[Lt.SearchWrite=1]="SearchWrite",Lt[Lt.SearchRead=2]="SearchRead",Lt[Lt.ExternalSync=3]="ExternalSync",Lt[Lt.FormQuestionsRead=4]="FormQuestionsRead";const wt={HERO:"hero",VIDEO_BLOCK:"videoBlock",CONTENT_CARD:"contentCard",ICON_CARD:"iconCard",LIST:"list",CONTAINER:"container",ACCORDION:"accordion",TESTIMONIAL:"testimonial",LARGE_TITLE_BLOCK:"largeTitleBlock",BUTTON:"button",RECRUITER:"recruiter",BLOBS:"blobs",TITLE_MODULAR_CONTENT_COPY:"titleModularContentCopy",INTRO_WITH_CONTENT_CARD:"introWithContentCard",CALLOUT_CARD:"calloutCard"},$t={"testimonial-block":wt.TESTIMONIAL,"button-block":wt.BUTTON,"recruiter-block":wt.RECRUITER},Et={login:i.login,nextLogin:i.nextLogin,refreshToken:i.refreshToken,changeCompany:i.changeCompany,register:i.register,isAuthenticated:i.isAuthenticated,getCompany:i.getCompany,getCompanies:i.getCompanies,getRoles:i.getRoles,getPermissions:i.getPermissions,logout:i.logout,getUser:i.getUser},It={getAll:u.getEvents,get:u.getEvent,getBySlug:u.getEventBySlug,create:u.createEvent,update:u.updateEvent,delete:u.deleteEvent},Ft={get:a.getAllRolesWithClaims,create:a.addRole,update:a.updateRole,delete:a.deleteRole},Rt=d,Bt=L,kt={resetPassword:p.resetPassword,resetPasswordWithToken:p.resetPasswordWithToken,forgotPassword:p.forgotPassword},xt={get:f.getMapConfig,getThemeSystem:f.getThemeSystem,update:f.updateMapConfig,create:f.createMapConfig},Ot={get:C.getClientAuthConfigById,getAll:C.getAllClientAuthConfigs,update:C.updateClientAuthConfig,create:C.createClientAuthConfig,delete:C.deleteClientAuthConfig},Ut={getAll:b.getAll,create:b.create,update:b.update,delete:b.delete,getSearchRead:b.getSearchReadConfig,getFormQuestionsPreview:b.getFormQuestionsPreview,getFormQuestionsConfigStatus:b.getFormQuestionsConfigStatus,saveFormQuestionsConfig:b.saveFormQuestionsConfig},Mt={upload:w.uploadMedia,uploadProfileImage:w.uploadProfileImage,get:w.listMedia,delete:w.deleteMedia},jt={getList:E.getFilters,get:E.getFilter,update:E.updateFilter,create:E.createFilter,delete:E.deleteFilter},Pt={get:F.getAppendListings,getAppendListing:F.getAppendListing,create:F.createAppendListing,update:F.updateAppendListing,delete:F.deleteAppendListing},Nt={getAll:D.getBlogs,getById:D.getBlog,create:D.createBlog,update:D.updateBlog,delete:D.deleteBlog},_t={get:W.getCategories,getByCompany:W.getCategoriesByCompany},Dt={getAll:H.getAllCategoryLists,getById:H.getCategoryListById,getByType:H.getCategoryListsByType,getActive:H.getActiveCategoryLists,getByTypeAndName:H.getCategoryListByTypeAndName,create:H.createCategoryList,update:H.updateCategoryList,delete:H.deleteCategoryList,addValue:H.addValue,removeValue:H.removeValue,updateValue:H.updateValue,updateValues:H.updateValues},Vt={getByFeed:K.getByFeed,get:K.get,create:K.create,update:K.update,delete:K.delete,toggleActive:K.toggleActive,discoverFields:K.discoverFields,validate:K.validate},Wt={getAll:Q.getAll,getById:Q.get,create:Q.create,update:Q.update,delete:Q.delete,sync:Q.sync,toggleActive:Q.toggleActive},Jt={get:Y.get,create:Y.create,delete:Y.delete},Ht={create:tt.create,get:tt.getAll,update:tt.update,delete:tt.delete,getAllSql:tt.getAllSql,getByEmployer:tt.getByEmployer,getSummaries:tt.getSummaries,getById:tt.getById},Gt={getAll:ot.getAll,getById:ot.getById,getByEntityKey:ot.getByEntityKey,create:ot.create,update:ot.update,delete:ot.delete},Kt={get:nt.get,getAll:nt.getAll,sync:nt.sync},zt={get:m.getAllPermissions},Qt={getAll:j.getCompanies,getById:j.getCompany,create:j.createCompany,update:j.updateCompany,delete:j.deleteCompany,sync:j.syncAllCompanies,clone:j.cloneCompany},qt={getAll:N.getJobListingsByCompany,getMapListings:N.getMapJobListingsByCompany,previewMapListings:N.previewMapJobListingsByCompany,getMapListing:N.getMapListingById,getById:N.getJobListingById,updateFieldVersionApproval:N.updateFieldVersionApproval,updateDescriptionVersionApproval:N.updateDescriptionVersionApproval,create:N.createJobListing,update:N.updateJobListing,delete:N.deleteJobListing},Xt={getTypes:st.getFieldTypes},Yt={getTypes:lt.getValidatorTypes},Zt={getAll:gt.getContentEntries,getById:gt.getContentEntry,getBySlug:gt.getContentEntryBySlug,create:gt.createContentEntry,update:gt.updateContentEntry,delete:gt.deleteContentEntry,unpublish:gt.unpublishAll},te={getAll:ht.getBlocks,getById:ht.getBlock,create:ht.createBlock,update:ht.updateBlock,updateWithMigrations:ht.updateBlockWithMigrations,previewUpdate:ht.previewBlockUpdate,delete:ht.deleteBlock,getTemplateBlocks:ht.getTemplateBlocks},ee={getAll:vt.getModels,getById:vt.getModel,create:vt.createModel,update:vt.updateModel,delete:vt.deleteModel,previewSync:vt.previewSync,executeSync:vt.executeSync},ne={getCompletion:Tt.getCompletion},re=B,oe={get:U.get,save:U.save},ie={submitContactForm:x.submitContactForm,submitFormSubmission:x.submitFormSubmission,saveProgress:x.saveProgress,completeSubmission:x.completeSubmission,getFormSubmissions:x.getFormSubmissions,exportFormSubmissionsCsv:x.exportFormSubmissionsCsv,getFormSubmissionTypes:x.getFormSubmissionTypes,deleteFormSubmission:x.deleteFormSubmission,reviewSubmissionApproval:x.reviewSubmissionApproval},se={auth:Et,events:It,roles:Ft,users:Rt,account:kt,mapConfig:xt,permissions:zt,clientAuthConfig:Ot,integrationConfig:Ut,filters:jt,listings:Bt,media:Mt,appendListings:Pt,blogs:Nt,categories:_t,categoryLists:Dt,jobFeedFieldMappings:Vt,jobFeeds:Wt,jobListingSettings:Jt,listingEntities:Ht,recruiters:Kt,employers:Gt,forms:re,formSettings:oe,formSubmissions:ie,openAI:ne,companies:Qt,jobListings:qt};exports.BLOCK_KEYS=wt,exports.BLOCK_KEY_ALIASES=$t,exports.FIELD_TYPES={SINGLE_LINE_STRING:"SingleLineString",MULTI_LINE_TEXT:"MultiLineText",MULTIPLE_PARAGRAPH_TEXT:"MultipleParagraphText",SLUG:"Slug",STRUCTURED_TEXT:"StructuredText",RICH_TEXT:"RichText",INTEGER_NUMBER:"IntegerNumber",FLOATING_POINT_NUMBER:"FloatingPointNumber",BOOLEAN:"Boolean",DATE:"Date",DATE_TIME:"DateTime",SINGLE_MEDIA:"SingleMedia",MEDIA_GALLERY:"MediaGallery",EXTERNAL_VIDEO:"ExternalVideo",COLOR:"Color",TAILWIND_COLOR_SELECTOR:"TailwindColorSelector",SINGLE_LINK:"SingleLink",MULTIPLE_LINKS:"MultipleLinks",LOCATION:"Location",JSON:"Json",SEO:"Seo",MODULAR_CONTENT:"ModularContent",SINGLE_BLOCK:"SingleBlock",JOB_FILTER:"JobFilter",FORM:"Form",SINGLE_CONTENT_REFERENCE:"SingleContentReference",MULTIPLE_CONTENT_REFERENCE:"MultipleContentReference",HIRE_CONTROL_MAP:"HireControlMap",RECRUITER_SELECTOR:"RecruiterSelector",TAGS:"Tags",VARIANT_SELECTOR:"VariantSelector"},exports.account=kt,exports.appendListings=Pt,exports.auth=Et,exports.blogs=Nt,exports.categories=_t,exports.categoryLists=Dt,exports.clientAuthConfig=Ot,exports.companies=Qt,exports.contentBlocks=te,exports.contentEntries=Zt,exports.contentField=Xt,exports.contentValidator=Yt,exports.default=se,exports.employers=Gt,exports.events=It,exports.filters=jt,exports.formSettings=oe,exports.formSubmissions=ie,exports.forms=re,exports.integrationConfig=Ut,exports.jobFeedFieldMappings=Vt,exports.jobFeeds=Wt,exports.jobListingSettings=Jt,exports.jobListings=qt,exports.listingEntities=Ht,exports.listings=Bt,exports.mapConfig=xt,exports.media=Mt,exports.model=ee,exports.openAI=ne,exports.permissions=zt,exports.recruiters=Kt,exports.roles=Ft,exports.users=Rt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ import JobFeedFieldMapping, { MultipleFieldConfig, ConditionalConfig, Conditiona
|
|
|
31
31
|
import JobListingSettings, { FeedHandlingOption, JobListingSettingsSaveRequest, EntityCmsSyncSettings, ListingEntityCustomFieldDefinition, ListingEntityCustomFieldType, ListingEntityFieldCollection } from "./types/jobListingSettings";
|
|
32
32
|
import ListingEntityDto from "./types/listingEntity";
|
|
33
33
|
import RecruiterDto from "./types/recruiter";
|
|
34
|
+
import Employer, { EmployerLogo, EmployerDeleteResult } from "./types/employer";
|
|
35
|
+
import mongoListingEntity, { ListingEntitySummary } from "./types/mongoListingEntity";
|
|
34
36
|
import FocalPoint from "./types/focalPoint";
|
|
35
37
|
import ListingEntityMedia from "./types/listingEntityMedia";
|
|
36
38
|
import CompletionRequest, { CompletionResponse } from "./types/completionRequest";
|
|
@@ -167,11 +169,22 @@ export declare const jobListingSettings: {
|
|
|
167
169
|
delete: (authToken?: string | null) => Promise<void>;
|
|
168
170
|
};
|
|
169
171
|
export declare const listingEntities: {
|
|
170
|
-
create: (entity:
|
|
171
|
-
get: (authToken?: string | null) => Promise<
|
|
172
|
-
update: (id: string, entity:
|
|
172
|
+
create: (entity: mongoListingEntity, authToken?: string | null) => Promise<mongoListingEntity>;
|
|
173
|
+
get: (authToken?: string | null) => Promise<mongoListingEntity[]>;
|
|
174
|
+
update: (id: string, entity: mongoListingEntity, authToken?: string | null) => Promise<void>;
|
|
173
175
|
delete: (id: string, authToken?: string | null) => Promise<void>;
|
|
174
176
|
getAllSql: (ids: number[], origin?: string | null, authToken?: string | null) => Promise<Record<string, ListingEntityDto>>;
|
|
177
|
+
getByEmployer: (employerId: string, authToken?: string | null) => Promise<mongoListingEntity[]>;
|
|
178
|
+
getSummaries: (authToken?: string | null) => Promise<ListingEntitySummary[]>;
|
|
179
|
+
getById: (id: string, authToken?: string | null) => Promise<mongoListingEntity>;
|
|
180
|
+
};
|
|
181
|
+
export declare const employers: {
|
|
182
|
+
getAll: (authToken?: string | null) => Promise<Employer[]>;
|
|
183
|
+
getById: (id: string, authToken?: string | null) => Promise<Employer>;
|
|
184
|
+
getByEntityKey: (entityKey: string, authToken?: string | null) => Promise<Employer>;
|
|
185
|
+
create: (employer: Employer, authToken?: string | null) => Promise<Employer>;
|
|
186
|
+
update: (id: string, employer: Employer, applyLogoIds?: string[], authToken?: string | null) => Promise<Employer>;
|
|
187
|
+
delete: (id: string, authToken?: string | null) => Promise<EmployerDeleteResult>;
|
|
175
188
|
};
|
|
176
189
|
export declare const recruiters: {
|
|
177
190
|
get: (recruiterIds?: number[] | null, authToken?: string | null) => Promise<Record<string, RecruiterDto>>;
|
|
@@ -279,7 +292,7 @@ export declare const formSubmissions: {
|
|
|
279
292
|
reviewSubmissionApproval: (id: string, request: SubmissionApprovalReviewRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
280
293
|
};
|
|
281
294
|
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
282
|
-
export type { Register, User, UserAccessRole, UserCompanyAccessItem, UserCompanyAccessResponse, UserCompanyAccessUpdate, Role, HireControlConfig, JobListingEditorConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, EasyApplyForm, FormExperienceType, FormFieldMigrationRequest, FormUpdateOptions, GuidedActionExecutionRequest, GuidedActionExecutionResult, GuidedBranchAction, GuidedBranchDestination, GuidedBranchTrigger, GuidedFormSettings, JobTargetedFormSelection, JobTargetingSettings, SubmissionAutomationRule, SubmissionAutomationSettings, SubmissionConditionOperator, FormSubmission, SubmissionApproval, SubmissionApprovalReviewRequest, FormSettings, FormSettingsSaveRequest, ResultsWrapper, Company, JobListing, JobListingSaveResult, MapJobListingPreview, MapJobListingsPreviewRequest, FieldTypeDefinition, ValidatorDefinition, ContentModel, ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult, ContentBlock, BlockUpdateImpact, BlockFieldChange, BlockFieldMigration, ContentEntry, Blog, CategoryListDto, AddValueRequest, CategoryListValueDto, JobFeed, JobFeedFieldMapping, MultipleFieldConfig, ConditionalConfig, ConditionalRule, JobListingSettings, JobListingSettingsSaveRequest, EntityCmsSyncSettings, ListingEntityCustomFieldDefinition, ListingEntityCustomFieldType, ListingEntityFieldCollection, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, FormSubmissionWriteRequest, PartialDelivery, GuidedEarlySubmitRule, };
|
|
295
|
+
export type { Register, User, UserAccessRole, UserCompanyAccessItem, UserCompanyAccessResponse, UserCompanyAccessUpdate, Role, HireControlConfig, JobListingEditorConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, EasyApplyForm, FormExperienceType, FormFieldMigrationRequest, FormUpdateOptions, GuidedActionExecutionRequest, GuidedActionExecutionResult, GuidedBranchAction, GuidedBranchDestination, GuidedBranchTrigger, GuidedFormSettings, JobTargetedFormSelection, JobTargetingSettings, SubmissionAutomationRule, SubmissionAutomationSettings, SubmissionConditionOperator, FormSubmission, SubmissionApproval, SubmissionApprovalReviewRequest, FormSettings, FormSettingsSaveRequest, ResultsWrapper, Company, JobListing, JobListingSaveResult, MapJobListingPreview, MapJobListingsPreviewRequest, FieldTypeDefinition, ValidatorDefinition, ContentModel, ModuleConfig, ModuleFieldMapping, ModuleIdentityMapping, WebPageTemplate, WebPageTemplateSection, WebPageTemplateBlock, ContentModuleSyncPreview, ContentModuleSyncExecuteRequest, ContentModuleSyncExecuteResult, ContentBlock, BlockUpdateImpact, BlockFieldChange, BlockFieldMigration, ContentEntry, Blog, CategoryListDto, AddValueRequest, CategoryListValueDto, JobFeed, JobFeedFieldMapping, MultipleFieldConfig, ConditionalConfig, ConditionalRule, JobListingSettings, JobListingSettingsSaveRequest, EntityCmsSyncSettings, ListingEntityCustomFieldDefinition, ListingEntityCustomFieldType, ListingEntityFieldCollection, ListingEntityDto, RecruiterDto, Employer, EmployerLogo, EmployerDeleteResult, mongoListingEntity, ListingEntitySummary, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, FormSubmissionWriteRequest, PartialDelivery, GuidedEarlySubmitRule, };
|
|
283
296
|
export type { BlockKey, FieldType, SearchReadConfig, IntegrationConfig, FormQuestionsConfigRequest, FormQuestionsConfigStatus, FormQuestionsPreview };
|
|
284
297
|
export { EventType, CallToActionType, FormSubmissionStatus, FeedHandlingOption, JobStatus, IntegrationType, };
|
|
285
298
|
declare const hcApi: {
|
|
@@ -414,17 +427,28 @@ declare const hcApi: {
|
|
|
414
427
|
delete: (authToken?: string | null) => Promise<void>;
|
|
415
428
|
};
|
|
416
429
|
listingEntities: {
|
|
417
|
-
create: (entity:
|
|
418
|
-
get: (authToken?: string | null) => Promise<
|
|
419
|
-
update: (id: string, entity:
|
|
430
|
+
create: (entity: mongoListingEntity, authToken?: string | null) => Promise<mongoListingEntity>;
|
|
431
|
+
get: (authToken?: string | null) => Promise<mongoListingEntity[]>;
|
|
432
|
+
update: (id: string, entity: mongoListingEntity, authToken?: string | null) => Promise<void>;
|
|
420
433
|
delete: (id: string, authToken?: string | null) => Promise<void>;
|
|
421
434
|
getAllSql: (ids: number[], origin?: string | null, authToken?: string | null) => Promise<Record<string, ListingEntityDto>>;
|
|
435
|
+
getByEmployer: (employerId: string, authToken?: string | null) => Promise<mongoListingEntity[]>;
|
|
436
|
+
getSummaries: (authToken?: string | null) => Promise<ListingEntitySummary[]>;
|
|
437
|
+
getById: (id: string, authToken?: string | null) => Promise<mongoListingEntity>;
|
|
422
438
|
};
|
|
423
439
|
recruiters: {
|
|
424
440
|
get: (recruiterIds?: number[] | null, authToken?: string | null) => Promise<Record<string, RecruiterDto>>;
|
|
425
441
|
getAll: (authToken?: string | null) => Promise<RecruiterDto>;
|
|
426
442
|
sync: (authToken?: string | null, updateExisting?: boolean) => Promise<void>;
|
|
427
443
|
};
|
|
444
|
+
employers: {
|
|
445
|
+
getAll: (authToken?: string | null) => Promise<Employer[]>;
|
|
446
|
+
getById: (id: string, authToken?: string | null) => Promise<Employer>;
|
|
447
|
+
getByEntityKey: (entityKey: string, authToken?: string | null) => Promise<Employer>;
|
|
448
|
+
create: (employer: Employer, authToken?: string | null) => Promise<Employer>;
|
|
449
|
+
update: (id: string, employer: Employer, applyLogoIds?: string[], authToken?: string | null) => Promise<Employer>;
|
|
450
|
+
delete: (id: string, authToken?: string | null) => Promise<EmployerDeleteResult>;
|
|
451
|
+
};
|
|
428
452
|
forms: {
|
|
429
453
|
getForms(authToken?: string | null): Promise<Form[]>;
|
|
430
454
|
getForm(id: string, authToken?: string | null): Promise<Form>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Address } from "./company";
|
|
2
|
+
import ListingEntityMedia from "./listingEntityMedia";
|
|
3
|
+
export type EmployerLogo = ListingEntityMedia & {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
export type Employer = {
|
|
7
|
+
id: string;
|
|
8
|
+
companyId?: string;
|
|
9
|
+
dateCreated?: string;
|
|
10
|
+
dateUpdated?: string | null;
|
|
11
|
+
name: string;
|
|
12
|
+
ahaSystemId?: string | null;
|
|
13
|
+
madgexRecruiterId?: string | null;
|
|
14
|
+
address?: Address | null;
|
|
15
|
+
phone?: string | null;
|
|
16
|
+
hasEnhancedProfile: boolean;
|
|
17
|
+
logos: EmployerLogo[];
|
|
18
|
+
detailsJson?: string;
|
|
19
|
+
};
|
|
20
|
+
export type EmployerDeleteResult = {
|
|
21
|
+
outcome: number;
|
|
22
|
+
jobCount: number;
|
|
23
|
+
entitiesDeleted: number;
|
|
24
|
+
};
|
|
25
|
+
export default Employer;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AuditTrailEntry } from "./jobFeed";
|
|
2
|
+
export type JobDataAlertSeverity = "info" | "warning" | "error";
|
|
3
|
+
export type JobDataAlertType = "importIssue" | "missingUniqueId" | "missingRequiredField" | "unmatchedValue" | "autoAddedCategoryValue" | "approvalRequired" | "syncFailure";
|
|
4
|
+
export type JobDataAlert = {
|
|
5
|
+
id: string;
|
|
6
|
+
companyId: string;
|
|
7
|
+
feedId?: string | null;
|
|
8
|
+
feedName?: string | null;
|
|
9
|
+
jobListingId?: string | null;
|
|
10
|
+
jobUniqueId?: string | null;
|
|
11
|
+
jobReferenceNumber?: number | null;
|
|
12
|
+
jobTitle?: string | null;
|
|
13
|
+
sourceItemKey?: string | null;
|
|
14
|
+
fieldPath?: string | null;
|
|
15
|
+
alertType: JobDataAlertType | string;
|
|
16
|
+
severity: JobDataAlertSeverity | string;
|
|
17
|
+
value?: string | null;
|
|
18
|
+
valueFingerprint: string;
|
|
19
|
+
identityHash: string;
|
|
20
|
+
message: string;
|
|
21
|
+
open: boolean;
|
|
22
|
+
acknowledged: boolean;
|
|
23
|
+
muted: boolean;
|
|
24
|
+
resolved: boolean;
|
|
25
|
+
pendingNotification: boolean;
|
|
26
|
+
firstSeenAt: string;
|
|
27
|
+
lastSeenAt: string;
|
|
28
|
+
lastChangedAt?: string | null;
|
|
29
|
+
resolvedAt?: string | null;
|
|
30
|
+
lastNotifiedAt?: string | null;
|
|
31
|
+
acknowledgedAt?: string | null;
|
|
32
|
+
acknowledgedBy?: string | null;
|
|
33
|
+
mutedAt?: string | null;
|
|
34
|
+
mutedBy?: string | null;
|
|
35
|
+
resolvedBy?: string | null;
|
|
36
|
+
occurrenceCount: number;
|
|
37
|
+
context?: Record<string, string> | null;
|
|
38
|
+
auditTrail?: AuditTrailEntry[];
|
|
39
|
+
};
|
|
40
|
+
export type JobDataAlertQuery = {
|
|
41
|
+
feedId?: string | null;
|
|
42
|
+
status?: "open" | "acknowledged" | "muted" | "resolved" | "pendingNotification" | string;
|
|
43
|
+
alertType?: string | null;
|
|
44
|
+
severity?: string | null;
|
|
45
|
+
search?: string | null;
|
|
46
|
+
pageSize?: number | null;
|
|
47
|
+
pageNumber?: number | null;
|
|
48
|
+
};
|
|
49
|
+
export type JobDataAlertCounts = {
|
|
50
|
+
open: number;
|
|
51
|
+
acknowledged: number;
|
|
52
|
+
muted: number;
|
|
53
|
+
resolved: number;
|
|
54
|
+
pendingNotification: number;
|
|
55
|
+
};
|
|
56
|
+
export type JobDataAlertSettings = {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
requiredFields: string[];
|
|
59
|
+
};
|
|
@@ -25,8 +25,21 @@ export type mongoListingEntity = {
|
|
|
25
25
|
communityHtml?: string;
|
|
26
26
|
communityPlainText?: string;
|
|
27
27
|
customFields?: ListingEntityCustomFieldValues;
|
|
28
|
+
detailsJson?: string;
|
|
29
|
+
employerId?: string | null;
|
|
30
|
+
employerLogoId?: string | null;
|
|
31
|
+
ahaHospitalId?: string | null;
|
|
28
32
|
comapnyId?: string;
|
|
29
33
|
DateAdded?: Date | null;
|
|
30
34
|
DateCreated?: Date | null;
|
|
31
35
|
};
|
|
36
|
+
export type ListingEntitySummary = {
|
|
37
|
+
id: string;
|
|
38
|
+
entityKey: string;
|
|
39
|
+
entityDisplayName?: string | null;
|
|
40
|
+
employerId?: string | null;
|
|
41
|
+
active: boolean;
|
|
42
|
+
city?: string | null;
|
|
43
|
+
state?: string | null;
|
|
44
|
+
};
|
|
32
45
|
export default mongoListingEntity;
|
package/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ import jobFeedsController from "./controllers/jobFeedsController";
|
|
|
27
27
|
import jobListingSettingsController from "./controllers/jobListingSettingsController";
|
|
28
28
|
import listingEntitiesController from "./controllers/listingEntitiesController";
|
|
29
29
|
import recruitersController from "./controllers/recruitersController";
|
|
30
|
+
import employersController from "./controllers/employersController";
|
|
30
31
|
import fieldController from "./controllers/content/fieldController";
|
|
31
32
|
import ValidatorsController from "./controllers/content/validatorController";
|
|
32
33
|
import contentEntriesController from "./controllers/content/contentEntriesController";
|
|
@@ -138,6 +139,10 @@ import JobListingSettings, {
|
|
|
138
139
|
} from "./types/jobListingSettings";
|
|
139
140
|
import ListingEntityDto from "./types/listingEntity";
|
|
140
141
|
import RecruiterDto from "./types/recruiter";
|
|
142
|
+
import Employer, { EmployerLogo, EmployerDeleteResult } from "./types/employer";
|
|
143
|
+
import mongoListingEntity, {
|
|
144
|
+
ListingEntitySummary,
|
|
145
|
+
} from "./types/mongoListingEntity";
|
|
141
146
|
import FocalPoint from "./types/focalPoint";
|
|
142
147
|
import ListingEntityMedia from "./types/listingEntityMedia";
|
|
143
148
|
import CompletionRequest, {
|
|
@@ -310,6 +315,18 @@ export const listingEntities = {
|
|
|
310
315
|
update: listingEntitiesController.update,
|
|
311
316
|
delete: listingEntitiesController.delete,
|
|
312
317
|
getAllSql: listingEntitiesController.getAllSql,
|
|
318
|
+
getByEmployer: listingEntitiesController.getByEmployer,
|
|
319
|
+
getSummaries: listingEntitiesController.getSummaries,
|
|
320
|
+
getById: listingEntitiesController.getById,
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export const employers = {
|
|
324
|
+
getAll: employersController.getAll,
|
|
325
|
+
getById: employersController.getById,
|
|
326
|
+
getByEntityKey: employersController.getByEntityKey,
|
|
327
|
+
create: employersController.create,
|
|
328
|
+
update: employersController.update,
|
|
329
|
+
delete: employersController.delete,
|
|
313
330
|
};
|
|
314
331
|
|
|
315
332
|
export const recruiters = {
|
|
@@ -490,6 +507,11 @@ export type {
|
|
|
490
507
|
ListingEntityFieldCollection,
|
|
491
508
|
ListingEntityDto,
|
|
492
509
|
RecruiterDto,
|
|
510
|
+
Employer,
|
|
511
|
+
EmployerLogo,
|
|
512
|
+
EmployerDeleteResult,
|
|
513
|
+
mongoListingEntity,
|
|
514
|
+
ListingEntitySummary,
|
|
493
515
|
FocalPoint,
|
|
494
516
|
ListingEntityMedia,
|
|
495
517
|
CompletionRequest,
|
|
@@ -539,6 +561,7 @@ const hcApi = {
|
|
|
539
561
|
jobListingSettings,
|
|
540
562
|
listingEntities,
|
|
541
563
|
recruiters,
|
|
564
|
+
employers,
|
|
542
565
|
forms,
|
|
543
566
|
formSettings,
|
|
544
567
|
formSubmissions,
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Address } from "./company";
|
|
2
|
+
import ListingEntityMedia from "./listingEntityMedia";
|
|
3
|
+
|
|
4
|
+
// A logo managed on the Employer. Entities that use it store a copy in logo/logoUrl
|
|
5
|
+
// plus its id in mongoListingEntity.employerLogoId.
|
|
6
|
+
export type EmployerLogo = ListingEntityMedia & {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type Employer = {
|
|
11
|
+
id: string;
|
|
12
|
+
companyId?: string;
|
|
13
|
+
dateCreated?: string;
|
|
14
|
+
dateUpdated?: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
// AHA SYSID for AHA hospital systems; read-only (server-owned).
|
|
17
|
+
ahaSystemId?: string | null;
|
|
18
|
+
madgexRecruiterId?: string | null;
|
|
19
|
+
address?: Address | null;
|
|
20
|
+
phone?: string | null;
|
|
21
|
+
hasEnhancedProfile: boolean;
|
|
22
|
+
logos: EmployerLogo[];
|
|
23
|
+
// AHA rollup data; read-only (server-owned).
|
|
24
|
+
detailsJson?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type EmployerDeleteResult = {
|
|
28
|
+
// 0 = Deleted (errors come back as rejected requests: 404 / 409)
|
|
29
|
+
outcome: number;
|
|
30
|
+
jobCount: number;
|
|
31
|
+
entitiesDeleted: number;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default Employer;
|
|
@@ -36,9 +36,26 @@ export type mongoListingEntity = {
|
|
|
36
36
|
communityHtml?: string;
|
|
37
37
|
communityPlainText?: string;
|
|
38
38
|
customFields?: ListingEntityCustomFieldValues;
|
|
39
|
+
detailsJson?: string;
|
|
40
|
+
employerId?: string | null;
|
|
41
|
+
// Which Employer logo `logo` was copied from (null = custom logo).
|
|
42
|
+
employerLogoId?: string | null;
|
|
43
|
+
// Loader-owned; read-only.
|
|
44
|
+
ahaHospitalId?: string | null;
|
|
39
45
|
comapnyId?: string;
|
|
40
46
|
DateAdded?: Date | null;
|
|
41
47
|
DateCreated?: Date | null;
|
|
42
48
|
};
|
|
43
49
|
|
|
50
|
+
// Lean entity row from GET /listingEntities/summaries (for pickers).
|
|
51
|
+
export type ListingEntitySummary = {
|
|
52
|
+
id: string;
|
|
53
|
+
entityKey: string;
|
|
54
|
+
entityDisplayName?: string | null;
|
|
55
|
+
employerId?: string | null;
|
|
56
|
+
active: boolean;
|
|
57
|
+
city?: string | null;
|
|
58
|
+
state?: string | null;
|
|
59
|
+
};
|
|
60
|
+
|
|
44
61
|
export default mongoListingEntity;
|