@abcagency/hire-control-sdk 1.1.4 → 1.1.6
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/controllers/mapConfigController.ts +15 -0
- package/dist/controllers/mapConfigController.d.ts +7 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/types/filters/filters.d.ts +2 -0
- package/dist/types/hireControlConfig.d.ts +21 -0
- package/index.ts +9 -0
- package/package.json +1 -1
- package/types/filters/filters.ts +2 -0
- package/types/hireControlConfig.ts +24 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import FetchHandler from '../handlers/fetchHandler';
|
|
2
2
|
import HireControlConfig from '../types/hireControlConfig';
|
|
3
|
+
import type { ThemeSystemConfig } from '../types/hireControlConfig';
|
|
3
4
|
import { API_URL } from '../constants/config';
|
|
4
5
|
|
|
5
6
|
const fetchHandler = new FetchHandler(API_URL);
|
|
@@ -19,6 +20,20 @@ class MapConfigController {
|
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Get normalized theme system configuration for the current company.
|
|
25
|
+
* @param {string | null} authToken - Optional auth token.
|
|
26
|
+
* @returns {Promise<ThemeSystemConfig | null>} - Theme system config or null when unavailable.
|
|
27
|
+
*/
|
|
28
|
+
async getThemeSystem(authToken: string | null = null): Promise<ThemeSystemConfig | null> {
|
|
29
|
+
try {
|
|
30
|
+
const response = await fetchHandler.get<ThemeSystemConfig>('/mapconfig/theme-system', true, authToken);
|
|
31
|
+
return response;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
22
37
|
/**
|
|
23
38
|
* Update the map configuration for the current company.
|
|
24
39
|
* @param {HireControlConfig} hireControlConfig - The new map configuration data.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import HireControlConfig from '../types/hireControlConfig';
|
|
2
|
+
import type { ThemeSystemConfig } from '../types/hireControlConfig';
|
|
2
3
|
declare class MapConfigController {
|
|
3
4
|
/**
|
|
4
5
|
* Get the map configuration for the current company.
|
|
@@ -6,6 +7,12 @@ declare class MapConfigController {
|
|
|
6
7
|
* @returns {Promise<HireControlConfig | null>} - The map configuration or null if not found.
|
|
7
8
|
*/
|
|
8
9
|
getMapConfig(authToken?: string | null): Promise<HireControlConfig | null>;
|
|
10
|
+
/**
|
|
11
|
+
* Get normalized theme system configuration for the current company.
|
|
12
|
+
* @param {string | null} authToken - Optional auth token.
|
|
13
|
+
* @returns {Promise<ThemeSystemConfig | null>} - Theme system config or null when unavailable.
|
|
14
|
+
*/
|
|
15
|
+
getThemeSystem(authToken?: string | null): Promise<ThemeSystemConfig | null>;
|
|
9
16
|
/**
|
|
10
17
|
* Update the map configuration for the current company.
|
|
11
18
|
* @param {HireControlConfig} hireControlConfig - The new map configuration data.
|
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}}))}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}}))}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 y=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 m=new e(n);var C=new class{getSearchReadConfig(){return t.__awaiter(this,arguments,void 0,(function*(t=null){try{return yield m.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}}))}};const A=new e(n);var L=new class{getListings(){return t.__awaiter(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.__awaiter(this,arguments,void 0,(function*(t,e=null){try{return yield A.get(`/listings/${t}`,!0,e)}catch(t){throw t}}))}};const S=new e(n);var T=new class{uploadMedia(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return S.post("/media/upload",t,!0,e,!0)}))}uploadProfileImage(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return S.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 S.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 S.delete(`/media/delete?${n.toString()}`,!0,e)}))}};const b=new e(n);var E=new class{getFilters(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return b.get("/filters",!0,t)}))}getFilter(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return b.get(`/filters/${t}`,!0,e)}))}createFilter(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return b.post("/filters",t,!0,e)}))}updateFilter(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return b.put(`/filters/${t}`,e,!0,n)}))}deleteFilter(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return b.delete(`/filters/${t}`,!0,e)}))}};const $=new e(n);var I=new class{getAppendListings(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return $.get("/appendListings",!0,t)}))}getAppendListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return $.get(`/appendListings/${t}`,!0,e)}))}createAppendListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return $.post("/appendListings",t,!0,e)}))}updateAppendListing(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return $.put(`/appendListings/${t}`,e,!0,n)}))}deleteAppendListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return $.delete(`/appendListings/${t}`,!0,e)}))}};const R=new e(n);var F=new class{getForms(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return R.get("/forms",!0,t)}))}getForm(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.get(`/forms/${t}`,!0,e)}))}createForm(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.post("/forms",t,!0,e)}))}updateForm(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return R.put(`/forms/${t}`,e,!0,n)}))}updateFormWithFieldRenames(e,n,r){return t.__awaiter(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.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.get(`/forms/${t}/submission-count`,!0,e)}))}getFormSubmissionFieldUsage(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.get(`/forms/${t}/submission-fields`,!0,e)}))}migrateSubmissionFields(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return R.post(`/forms/${t}/migrate-submission-fields`,e,!0,n)}))}deleteForm(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.delete(`/forms/${t}`,!0,e)}))}processFormRequest(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.post("/forms/jsonSchema",t,!0,e)}))}};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)}))}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)}))}};const O=new e(n);var x=new class{getCompanies(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return O.get("/companies",!0,t)}))}getCompany(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return O.get(`/companies/${t}`,!0,e)}))}createCompany(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return O.post("/companies",t,!0,e)}))}updateCompany(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return O.put(`/companies/${t}`,e,!0,n)}))}deleteCompany(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return O.delete(`/companies/${t}`,!0,e)}))}syncAllCompanies(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return O.get("/companies/syncall",!0,t)}))}};const M=new e(n);var j=new class{updateFieldVersionApproval(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return M.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 M.patch(`/joblistings/${t}/description-version-approval`,e,!0,n)}))}getJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return M.get("/joblistings",!0,t)}))}getMapJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,(function*(t=null,e=null){return e?M.get(`/joblistings/MapListings?filterId=${e}`,!0,t):M.get("/joblistings/MapListings",!0,t)}))}getJobListingById(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return M.get(`/joblistings/${t}`,!0,e)}))}getMapListingById(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return M.get(`/joblistings/MapListings/${t}`,!0,e)}))}createJobListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return M.post("/joblistings",t,!0,e)}))}updateJobListing(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return M.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()});n&&s.append("status",n.toString()),r&&s.append("from",r.toISOString()),i&&s.append("to",i.toISOString());const a=yield M.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 M.delete(`/joblistings/${t}`,!0,e)}))}};const U=new e(n);var N=new class{getBlogs(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return U.get("/blog",!0,t)}))}getBlog(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return U.get(`/blog/${t}`,!0,e)}))}createBlog(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return U.post("/blog",t,!0,e)}))}updateBlog(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return U.put(`/blog/${t}`,e,!0,n)}))}deleteBlog(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return U.delete(`/blog/${t}`,!0,e)}))}};const P=new e(n);var D=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 P.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 P.get(`/categories/${t}${i}`,!0,n)}))}};const V=new e(n);var W=new class{getAllCategoryLists(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return V.get("/categorylist",!0,t)}))}getCategoryListById(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.get(`/categorylist/${t}`,!0,e)}))}getCategoryListsByType(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.get(`/categorylist/type/${t}`,!0,e)}))}getActiveCategoryLists(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return V.get("/categorylist/active",!0,t)}))}getCategoryListByTypeAndName(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.get(`/categorylist/type/${t}/name/${e}`,!0,n)}))}createCategoryList(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.post("/categorylist",t,!0,e)}))}updateCategoryList(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.put(`/categorylist/${t}`,e,!0,n)}))}deleteCategoryList(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.delete(`/categorylist/${t}`,!0,e)}))}addValue(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.post(`/categorylist/${t}/values`,e,!0,n)}))}removeValue(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.delete(`/categorylist/${t}/values/${e}`,!0,n)}))}updateValues(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.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 V.put(`/categorylist/${t}/values/${encodeURIComponent(e)}`,n,!0,r)}))}};const J=new e(n);var H=new class{getByFeed(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/feed/${t}`,!0,e)}))}get(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/${t}`,!0,e)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.post("/jobFeedFieldMappings",t,!0,e)}))}update(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return J.put(`/jobFeedFieldMappings/${t}`,e,!0,n)}))}delete(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.delete(`/jobFeedFieldMappings/${t}`,!0,e)}))}toggleActive(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.post("/jobFeedFieldMappings/toggle-active",t,!0,e)}))}discoverFields(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/discover-fields/${t}`,!0,e)}))}validate(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/validate/${t}`,!0,e)}))}};const G=new e(n);var z=new class{getAll(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return G.get("/jobfeeds",!0,t)}))}get(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.get(`/jobfeeds/${t}`,!0,e)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.post("/jobfeeds",t,!0,e)}))}update(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return G.put(`/jobfeeds/${t}`,e,!0,n)}))}delete(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.delete(`/jobfeeds/${t}`,!0,e)}))}sync(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.post(`/jobfeeds/${t}/sync`,{},!0,e)}))}toggleActive(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return G.patch(`/jobfeeds/${t}/toggle-active`,e,!0,n)}))}};const K=new e(n);var X=new class{get(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return K.get("/jobListingSettings",!0,t)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return K.post("/jobListingSettings",t,!0,e)}))}delete(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return K.delete("/jobListingSettings",!0,t)}))}};const q=new e(n);var Y=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),q.post("/listingEntities"+(r.toString()?"?"+r.toString():""),t,!0,n)}))}getAll(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return q.get("/listingEntities",!0,t)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return q.post("/listingEntities/create",t,!0,e)}))}update(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){yield q.put(`/listingEntities/update/${t}`,e,!0,n)}))}delete(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){yield q.delete(`/listingEntities/delete/${t}`,!0,e)}))}};const Z=new e(n);var Q=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 Z.get(`/recruiters${r}`,!0,e)}))}getAll(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return Z.get("/recruiters/all",!0,t)}))}sync(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return Z.post("/recruiters/sync",{},!0,t)}))}};const tt=new e(n);var et=new class{getFieldTypes(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return tt.get("/field/types",!0,t)}))}};const nt=new e(n);var rt=new class{getValidatorTypes(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return nt.get("/validator/types",!0,t)}))}};const it=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,ot=t=>{if(Array.isArray(t))return t.map((t=>ot(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[it(n)]=ot(r);return e},st=new e(n);var at=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 st.get(r,!0,n);return ot(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 st.get(r,!0,n);return ot(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 st.get(i,!0,r);return ot(o)}))}createContentEntry(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield st.post("/contententry",t,!0,e);return ot(n)}))}updateContentEntry(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return st.put(`/contententry/${t}`,e,!0,n)}))}deleteContentEntry(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return st.delete(`/contententry/${t}`,!0,e)}))}getVersions(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield st.get(`/contententry/${t}/versions`,!0,e);return ot(n)}))}unpublishAll(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return st.post(`/contententry/${t}/unpublish`,void 0,!0,e)}))}};const ut=new e(n);var lt=new class{getBlocks(){return t.__awaiter(this,arguments,void 0,(function*(t=null){const e=yield ut.get("/block",!0,t);return ot(e)}))}getBlock(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield ut.get(`/block/${t}`,!0,e);return ot(n)}))}createBlock(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield ut.post("/block",t,!0,e);return ot(n)}))}updateBlock(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return ut.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 ut.put(`/block/${t}`,i,!0,r)}))}previewBlockUpdate(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){const r=yield ut.post(`/block/${t}/preview-update`,e,!0,n);return ot(r)}))}deleteBlock(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ut.delete(`/block/${t}`,!0,e)}))}getTemplateBlocks(){return t.__awaiter(this,arguments,void 0,(function*(t=null){const e=yield ut.get("/block/template-blocks",!0,t);return ot(e)}))}};const ct=new e(n);var dt=new class{getModels(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return ct.get("/model",!0,t)}))}getModel(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.get(`/model/${t}`,!0,e)}))}createModel(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.post("/model",t,!0,e)}))}updateModel(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return ct.put(`/model/${t}`,e,!0,n)}))}deleteModel(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.delete(`/model/${t}`,!0,e)}))}previewSync(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.get(`/model/${t}/sync/preview`,!0,e)}))}executeSync(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return ct.post(`/model/${t}/sync`,e,!0,n)}))}};const gt=new e(n);var pt,ht,_t,ft,vt=new class{getCompletion(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return gt.post("/openai/completion",t,!0,e)}))}};exports.EventType=void 0,(pt=exports.EventType||(exports.EventType={}))[pt.Virtual=0]="Virtual",pt[pt.InPerson=1]="InPerson",pt[pt.Hybrid=2]="Hybrid",exports.CallToActionType=void 0,(ht=exports.CallToActionType||(exports.CallToActionType={}))[ht.Button=0]="Button",ht[ht.Link=1]="Link",ht[ht.Download=2]="Download",ht[ht.HireControlRegistration=3]="HireControlRegistration",exports.FormSubmissionStatus=void 0,(_t=exports.FormSubmissionStatus||(exports.FormSubmissionStatus={}))[_t.Submitted=1]="Submitted",_t[_t.Hold=2]="Hold",_t[_t.Rejected=3]="Rejected",_t[_t.Sent=4]="Sent",exports.FeedHandlingOption=void 0,(ft=exports.FeedHandlingOption||(exports.FeedHandlingOption={}))[ft.Replace=0]="Replace",ft[ft.Append=1]="Append",ft[ft.Custom=2]="Custom";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"},yt={"testimonial-block":wt.TESTIMONIAL,"button-block":wt.BUTTON,"recruiter-block":wt.RECRUITER},mt={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},Ct={getAll:a.getEvents,get:a.getEvent,getBySlug:a.getEventBySlug,create:a.createEvent,update:a.updateEvent,delete:a.deleteEvent},At={get:l.getAllRolesWithClaims,create:l.addRole,update:l.updateRole,delete:l.deleteRole},Lt=d,St=L,Tt={resetPassword:p.resetPassword,resetPasswordWithToken:p.resetPasswordWithToken,forgotPassword:p.forgotPassword},bt={get:_.getMapConfig,update:_.updateMapConfig,create:_.createMapConfig},Et={get:y.getClientAuthConfigById,getAll:y.getAllClientAuthConfigs,update:y.updateClientAuthConfig,create:y.createClientAuthConfig,delete:y.deleteClientAuthConfig},$t={getSearchRead:C.getSearchReadConfig},It={upload:T.uploadMedia,uploadProfileImage:T.uploadProfileImage,get:T.listMedia,delete:T.deleteMedia},Rt={getList:E.getFilters,get:E.getFilter,update:E.updateFilter,create:E.createFilter,delete:E.deleteFilter},Ft={get:I.getAppendListings,getAppendListing:I.getAppendListing,create:I.createAppendListing,update:I.updateAppendListing,delete:I.deleteAppendListing},kt={getAll:N.getBlogs,getById:N.getBlog,create:N.createBlog,update:N.updateBlog,delete:N.deleteBlog},Bt={get:D.getCategories,getByCompany:D.getCategoriesByCompany},Ot={getAll:W.getAllCategoryLists,getById:W.getCategoryListById,getByType:W.getCategoryListsByType,getActive:W.getActiveCategoryLists,getByTypeAndName:W.getCategoryListByTypeAndName,create:W.createCategoryList,update:W.updateCategoryList,delete:W.deleteCategoryList,addValue:W.addValue,removeValue:W.removeValue,updateValue:W.updateValue,updateValues:W.updateValues},xt={getByFeed:H.getByFeed,get:H.get,create:H.create,update:H.update,delete:H.delete,toggleActive:H.toggleActive,discoverFields:H.discoverFields,validate:H.validate},Mt={getAll:z.getAll,getById:z.get,create:z.create,update:z.update,delete:z.delete,sync:z.sync,toggleActive:z.toggleActive},jt={get:X.get,create:X.create,delete:X.delete},Ut={create:Y.create,get:Y.getAll,update:Y.update,delete:Y.delete,getAllSql:Y.getAllSql},Nt={get:Q.get,getAll:Q.getAll,sync:Q.sync},Pt={get:v.getAllPermissions},Dt={getAll:x.getCompanies,getById:x.getCompany,create:x.createCompany,update:x.updateCompany,delete:x.deleteCompany,sync:x.syncAllCompanies},Vt={getAll:j.getJobListingsByCompany,getMapListings:j.getMapJobListingsByCompany,getMapListing:j.getMapListingById,getById:j.getJobListingById,updateFieldVersionApproval:j.updateFieldVersionApproval,updateDescriptionVersionApproval:j.updateDescriptionVersionApproval,create:j.createJobListing,update:j.updateJobListing,delete:j.deleteJobListing},Wt={getTypes:et.getFieldTypes},Jt={getTypes:rt.getValidatorTypes},Ht={getAll:at.getContentEntries,getById:at.getContentEntry,getBySlug:at.getContentEntryBySlug,create:at.createContentEntry,update:at.updateContentEntry,delete:at.deleteContentEntry,unpublish:at.unpublishAll},Gt={getAll:lt.getBlocks,getById:lt.getBlock,create:lt.createBlock,update:lt.updateBlock,updateWithMigrations:lt.updateBlockWithMigrations,previewUpdate:lt.previewBlockUpdate,delete:lt.deleteBlock,getTemplateBlocks:lt.getTemplateBlocks},zt={getAll:dt.getModels,getById:dt.getModel,create:dt.createModel,update:dt.updateModel,delete:dt.deleteModel,previewSync:dt.previewSync,executeSync:dt.executeSync},Kt={getCompletion:vt.getCompletion},Xt=F,qt=B,Yt={auth:mt,events:Ct,roles:At,users:Lt,account:Tt,mapConfig:bt,permissions:Pt,clientAuthConfig:Et,integrationConfig:$t,filters:Rt,listings:St,media:It,appendListings:Ft,blogs:kt,categories:Bt,categoryLists:Ot,jobFeedFieldMappings:xt,jobFeeds:Mt,jobListingSettings:jt,listingEntities:Ut,recruiters:Nt,forms:Xt,formSubmissions:qt,openAI:Kt,companies:Dt,jobListings:Vt};exports.BLOCK_KEYS=wt,exports.BLOCK_KEY_ALIASES=yt,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=Tt,exports.appendListings=Ft,exports.auth=mt,exports.blogs=kt,exports.categories=Bt,exports.categoryLists=Ot,exports.clientAuthConfig=Et,exports.companies=Dt,exports.contentBlocks=Gt,exports.contentEntries=Ht,exports.contentField=Wt,exports.contentValidator=Jt,exports.default=Yt,exports.events=Ct,exports.filters=Rt,exports.formSubmissions=qt,exports.forms=Xt,exports.integrationConfig=$t,exports.jobFeedFieldMappings=xt,exports.jobFeeds=Mt,exports.jobListingSettings=jt,exports.jobListings=Vt,exports.listingEntities=Ut,exports.listings=St,exports.mapConfig=bt,exports.media=It,exports.model=zt,exports.openAI=Kt,exports.permissions=Pt,exports.recruiters=Nt,exports.roles=At,exports.users=Lt;
|
|
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}}))}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 y=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 m=new e(n);var C=new class{getSearchReadConfig(){return t.__awaiter(this,arguments,void 0,(function*(t=null){try{return yield m.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}}))}};const A=new e(n);var L=new class{getListings(){return t.__awaiter(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.__awaiter(this,arguments,void 0,(function*(t,e=null){try{return yield A.get(`/listings/${t}`,!0,e)}catch(t){throw t}}))}};const S=new e(n);var T=new class{uploadMedia(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return S.post("/media/upload",t,!0,e,!0)}))}uploadProfileImage(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return S.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 S.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 S.delete(`/media/delete?${n.toString()}`,!0,e)}))}};const b=new e(n);var E=new class{getFilters(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return b.get("/filters",!0,t)}))}getFilter(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return b.get(`/filters/${t}`,!0,e)}))}createFilter(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return b.post("/filters",t,!0,e)}))}updateFilter(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return b.put(`/filters/${t}`,e,!0,n)}))}deleteFilter(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return b.delete(`/filters/${t}`,!0,e)}))}};const $=new e(n);var I=new class{getAppendListings(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return $.get("/appendListings",!0,t)}))}getAppendListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return $.get(`/appendListings/${t}`,!0,e)}))}createAppendListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return $.post("/appendListings",t,!0,e)}))}updateAppendListing(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return $.put(`/appendListings/${t}`,e,!0,n)}))}deleteAppendListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return $.delete(`/appendListings/${t}`,!0,e)}))}};const R=new e(n);var F=new class{getForms(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return R.get("/forms",!0,t)}))}getForm(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.get(`/forms/${t}`,!0,e)}))}createForm(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.post("/forms",t,!0,e)}))}updateForm(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return R.put(`/forms/${t}`,e,!0,n)}))}updateFormWithFieldRenames(e,n,r){return t.__awaiter(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.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.get(`/forms/${t}/submission-count`,!0,e)}))}getFormSubmissionFieldUsage(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.get(`/forms/${t}/submission-fields`,!0,e)}))}migrateSubmissionFields(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return R.post(`/forms/${t}/migrate-submission-fields`,e,!0,n)}))}deleteForm(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.delete(`/forms/${t}`,!0,e)}))}processFormRequest(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return R.post("/forms/jsonSchema",t,!0,e)}))}};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)}))}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)}))}};const O=new e(n);var x=new class{getCompanies(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return O.get("/companies",!0,t)}))}getCompany(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return O.get(`/companies/${t}`,!0,e)}))}createCompany(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return O.post("/companies",t,!0,e)}))}updateCompany(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return O.put(`/companies/${t}`,e,!0,n)}))}deleteCompany(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return O.delete(`/companies/${t}`,!0,e)}))}syncAllCompanies(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return O.get("/companies/syncall",!0,t)}))}};const M=new e(n);var j=new class{updateFieldVersionApproval(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return M.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 M.patch(`/joblistings/${t}/description-version-approval`,e,!0,n)}))}getJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return M.get("/joblistings",!0,t)}))}getMapJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,(function*(t=null,e=null){return e?M.get(`/joblistings/MapListings?filterId=${e}`,!0,t):M.get("/joblistings/MapListings",!0,t)}))}getJobListingById(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return M.get(`/joblistings/${t}`,!0,e)}))}getMapListingById(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return M.get(`/joblistings/MapListings/${t}`,!0,e)}))}createJobListing(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return M.post("/joblistings",t,!0,e)}))}updateJobListing(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return M.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()});n&&s.append("status",n.toString()),r&&s.append("from",r.toISOString()),i&&s.append("to",i.toISOString());const a=yield M.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 M.delete(`/joblistings/${t}`,!0,e)}))}};const U=new e(n);var N=new class{getBlogs(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return U.get("/blog",!0,t)}))}getBlog(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return U.get(`/blog/${t}`,!0,e)}))}createBlog(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return U.post("/blog",t,!0,e)}))}updateBlog(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return U.put(`/blog/${t}`,e,!0,n)}))}deleteBlog(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return U.delete(`/blog/${t}`,!0,e)}))}};const P=new e(n);var D=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 P.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 P.get(`/categories/${t}${i}`,!0,n)}))}};const V=new e(n);var W=new class{getAllCategoryLists(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return V.get("/categorylist",!0,t)}))}getCategoryListById(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.get(`/categorylist/${t}`,!0,e)}))}getCategoryListsByType(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.get(`/categorylist/type/${t}`,!0,e)}))}getActiveCategoryLists(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return V.get("/categorylist/active",!0,t)}))}getCategoryListByTypeAndName(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.get(`/categorylist/type/${t}/name/${e}`,!0,n)}))}createCategoryList(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.post("/categorylist",t,!0,e)}))}updateCategoryList(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.put(`/categorylist/${t}`,e,!0,n)}))}deleteCategoryList(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return V.delete(`/categorylist/${t}`,!0,e)}))}addValue(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.post(`/categorylist/${t}/values`,e,!0,n)}))}removeValue(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.delete(`/categorylist/${t}/values/${e}`,!0,n)}))}updateValues(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return V.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 V.put(`/categorylist/${t}/values/${encodeURIComponent(e)}`,n,!0,r)}))}};const J=new e(n);var H=new class{getByFeed(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/feed/${t}`,!0,e)}))}get(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/${t}`,!0,e)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.post("/jobFeedFieldMappings",t,!0,e)}))}update(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return J.put(`/jobFeedFieldMappings/${t}`,e,!0,n)}))}delete(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.delete(`/jobFeedFieldMappings/${t}`,!0,e)}))}toggleActive(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.post("/jobFeedFieldMappings/toggle-active",t,!0,e)}))}discoverFields(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/discover-fields/${t}`,!0,e)}))}validate(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return J.get(`/jobFeedFieldMappings/validate/${t}`,!0,e)}))}};const G=new e(n);var z=new class{getAll(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return G.get("/jobfeeds",!0,t)}))}get(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.get(`/jobfeeds/${t}`,!0,e)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.post("/jobfeeds",t,!0,e)}))}update(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return G.put(`/jobfeeds/${t}`,e,!0,n)}))}delete(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.delete(`/jobfeeds/${t}`,!0,e)}))}sync(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return G.post(`/jobfeeds/${t}/sync`,{},!0,e)}))}toggleActive(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return G.patch(`/jobfeeds/${t}/toggle-active`,e,!0,n)}))}};const K=new e(n);var X=new class{get(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return K.get("/jobListingSettings",!0,t)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return K.post("/jobListingSettings",t,!0,e)}))}delete(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return K.delete("/jobListingSettings",!0,t)}))}};const q=new e(n);var Y=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),q.post("/listingEntities"+(r.toString()?"?"+r.toString():""),t,!0,n)}))}getAll(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return q.get("/listingEntities",!0,t)}))}create(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return q.post("/listingEntities/create",t,!0,e)}))}update(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){yield q.put(`/listingEntities/update/${t}`,e,!0,n)}))}delete(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){yield q.delete(`/listingEntities/delete/${t}`,!0,e)}))}};const Z=new e(n);var Q=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 Z.get(`/recruiters${r}`,!0,e)}))}getAll(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return Z.get("/recruiters/all",!0,t)}))}sync(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return Z.post("/recruiters/sync",{},!0,t)}))}};const tt=new e(n);var et=new class{getFieldTypes(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return tt.get("/field/types",!0,t)}))}};const nt=new e(n);var rt=new class{getValidatorTypes(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return nt.get("/validator/types",!0,t)}))}};const it=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,ot=t=>{if(Array.isArray(t))return t.map((t=>ot(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[it(n)]=ot(r);return e},st=new e(n);var at=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 st.get(r,!0,n);return ot(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 st.get(r,!0,n);return ot(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 st.get(i,!0,r);return ot(o)}))}createContentEntry(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield st.post("/contententry",t,!0,e);return ot(n)}))}updateContentEntry(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return st.put(`/contententry/${t}`,e,!0,n)}))}deleteContentEntry(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return st.delete(`/contententry/${t}`,!0,e)}))}getVersions(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield st.get(`/contententry/${t}/versions`,!0,e);return ot(n)}))}unpublishAll(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return st.post(`/contententry/${t}/unpublish`,void 0,!0,e)}))}};const ut=new e(n);var lt=new class{getBlocks(){return t.__awaiter(this,arguments,void 0,(function*(t=null){const e=yield ut.get("/block",!0,t);return ot(e)}))}getBlock(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield ut.get(`/block/${t}`,!0,e);return ot(n)}))}createBlock(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){const n=yield ut.post("/block",t,!0,e);return ot(n)}))}updateBlock(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return ut.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 ut.put(`/block/${t}`,i,!0,r)}))}previewBlockUpdate(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){const r=yield ut.post(`/block/${t}/preview-update`,e,!0,n);return ot(r)}))}deleteBlock(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ut.delete(`/block/${t}`,!0,e)}))}getTemplateBlocks(){return t.__awaiter(this,arguments,void 0,(function*(t=null){const e=yield ut.get("/block/template-blocks",!0,t);return ot(e)}))}};const ct=new e(n);var dt=new class{getModels(){return t.__awaiter(this,arguments,void 0,(function*(t=null){return ct.get("/model",!0,t)}))}getModel(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.get(`/model/${t}`,!0,e)}))}createModel(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.post("/model",t,!0,e)}))}updateModel(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return ct.put(`/model/${t}`,e,!0,n)}))}deleteModel(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.delete(`/model/${t}`,!0,e)}))}previewSync(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return ct.get(`/model/${t}/sync/preview`,!0,e)}))}executeSync(e,n){return t.__awaiter(this,arguments,void 0,(function*(t,e,n=null){return ct.post(`/model/${t}/sync`,e,!0,n)}))}};const gt=new e(n);var pt,ht,_t,ft,vt=new class{getCompletion(e){return t.__awaiter(this,arguments,void 0,(function*(t,e=null){return gt.post("/openai/completion",t,!0,e)}))}};exports.EventType=void 0,(pt=exports.EventType||(exports.EventType={}))[pt.Virtual=0]="Virtual",pt[pt.InPerson=1]="InPerson",pt[pt.Hybrid=2]="Hybrid",exports.CallToActionType=void 0,(ht=exports.CallToActionType||(exports.CallToActionType={}))[ht.Button=0]="Button",ht[ht.Link=1]="Link",ht[ht.Download=2]="Download",ht[ht.HireControlRegistration=3]="HireControlRegistration",exports.FormSubmissionStatus=void 0,(_t=exports.FormSubmissionStatus||(exports.FormSubmissionStatus={}))[_t.Submitted=1]="Submitted",_t[_t.Hold=2]="Hold",_t[_t.Rejected=3]="Rejected",_t[_t.Sent=4]="Sent",exports.FeedHandlingOption=void 0,(ft=exports.FeedHandlingOption||(exports.FeedHandlingOption={}))[ft.Replace=0]="Replace",ft[ft.Append=1]="Append",ft[ft.Custom=2]="Custom";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"},yt={"testimonial-block":wt.TESTIMONIAL,"button-block":wt.BUTTON,"recruiter-block":wt.RECRUITER},mt={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},Ct={getAll:a.getEvents,get:a.getEvent,getBySlug:a.getEventBySlug,create:a.createEvent,update:a.updateEvent,delete:a.deleteEvent},At={get:l.getAllRolesWithClaims,create:l.addRole,update:l.updateRole,delete:l.deleteRole},Lt=d,St=L,Tt={resetPassword:p.resetPassword,resetPasswordWithToken:p.resetPasswordWithToken,forgotPassword:p.forgotPassword},bt={get:_.getMapConfig,getThemeSystem:_.getThemeSystem,update:_.updateMapConfig,create:_.createMapConfig},Et={get:y.getClientAuthConfigById,getAll:y.getAllClientAuthConfigs,update:y.updateClientAuthConfig,create:y.createClientAuthConfig,delete:y.deleteClientAuthConfig},$t={getSearchRead:C.getSearchReadConfig},It={upload:T.uploadMedia,uploadProfileImage:T.uploadProfileImage,get:T.listMedia,delete:T.deleteMedia},Rt={getList:E.getFilters,get:E.getFilter,update:E.updateFilter,create:E.createFilter,delete:E.deleteFilter},Ft={get:I.getAppendListings,getAppendListing:I.getAppendListing,create:I.createAppendListing,update:I.updateAppendListing,delete:I.deleteAppendListing},kt={getAll:N.getBlogs,getById:N.getBlog,create:N.createBlog,update:N.updateBlog,delete:N.deleteBlog},Bt={get:D.getCategories,getByCompany:D.getCategoriesByCompany},Ot={getAll:W.getAllCategoryLists,getById:W.getCategoryListById,getByType:W.getCategoryListsByType,getActive:W.getActiveCategoryLists,getByTypeAndName:W.getCategoryListByTypeAndName,create:W.createCategoryList,update:W.updateCategoryList,delete:W.deleteCategoryList,addValue:W.addValue,removeValue:W.removeValue,updateValue:W.updateValue,updateValues:W.updateValues},xt={getByFeed:H.getByFeed,get:H.get,create:H.create,update:H.update,delete:H.delete,toggleActive:H.toggleActive,discoverFields:H.discoverFields,validate:H.validate},Mt={getAll:z.getAll,getById:z.get,create:z.create,update:z.update,delete:z.delete,sync:z.sync,toggleActive:z.toggleActive},jt={get:X.get,create:X.create,delete:X.delete},Ut={create:Y.create,get:Y.getAll,update:Y.update,delete:Y.delete,getAllSql:Y.getAllSql},Nt={get:Q.get,getAll:Q.getAll,sync:Q.sync},Pt={get:v.getAllPermissions},Dt={getAll:x.getCompanies,getById:x.getCompany,create:x.createCompany,update:x.updateCompany,delete:x.deleteCompany,sync:x.syncAllCompanies},Vt={getAll:j.getJobListingsByCompany,getMapListings:j.getMapJobListingsByCompany,getMapListing:j.getMapListingById,getById:j.getJobListingById,updateFieldVersionApproval:j.updateFieldVersionApproval,updateDescriptionVersionApproval:j.updateDescriptionVersionApproval,create:j.createJobListing,update:j.updateJobListing,delete:j.deleteJobListing},Wt={getTypes:et.getFieldTypes},Jt={getTypes:rt.getValidatorTypes},Ht={getAll:at.getContentEntries,getById:at.getContentEntry,getBySlug:at.getContentEntryBySlug,create:at.createContentEntry,update:at.updateContentEntry,delete:at.deleteContentEntry,unpublish:at.unpublishAll},Gt={getAll:lt.getBlocks,getById:lt.getBlock,create:lt.createBlock,update:lt.updateBlock,updateWithMigrations:lt.updateBlockWithMigrations,previewUpdate:lt.previewBlockUpdate,delete:lt.deleteBlock,getTemplateBlocks:lt.getTemplateBlocks},zt={getAll:dt.getModels,getById:dt.getModel,create:dt.createModel,update:dt.updateModel,delete:dt.deleteModel,previewSync:dt.previewSync,executeSync:dt.executeSync},Kt={getCompletion:vt.getCompletion},Xt=F,qt=B,Yt={auth:mt,events:Ct,roles:At,users:Lt,account:Tt,mapConfig:bt,permissions:Pt,clientAuthConfig:Et,integrationConfig:$t,filters:Rt,listings:St,media:It,appendListings:Ft,blogs:kt,categories:Bt,categoryLists:Ot,jobFeedFieldMappings:xt,jobFeeds:Mt,jobListingSettings:jt,listingEntities:Ut,recruiters:Nt,forms:Xt,formSubmissions:qt,openAI:Kt,companies:Dt,jobListings:Vt};exports.BLOCK_KEYS=wt,exports.BLOCK_KEY_ALIASES=yt,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=Tt,exports.appendListings=Ft,exports.auth=mt,exports.blogs=kt,exports.categories=Bt,exports.categoryLists=Ot,exports.clientAuthConfig=Et,exports.companies=Dt,exports.contentBlocks=Gt,exports.contentEntries=Ht,exports.contentField=Wt,exports.contentValidator=Jt,exports.default=Yt,exports.events=Ct,exports.filters=Rt,exports.formSubmissions=qt,exports.forms=Xt,exports.integrationConfig=$t,exports.jobFeedFieldMappings=xt,exports.jobFeeds=Mt,exports.jobListingSettings=jt,exports.jobListings=Vt,exports.listingEntities=Ut,exports.listings=St,exports.mapConfig=bt,exports.media=It,exports.model=zt,exports.openAI=Kt,exports.permissions=Pt,exports.recruiters=Nt,exports.roles=At,exports.users=Lt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import Register from "./types/register";
|
|
|
5
5
|
import User from "./types/user";
|
|
6
6
|
import Role from "./types/role";
|
|
7
7
|
import HireControlConfig from "./types/hireControlConfig";
|
|
8
|
+
import type { ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken } from "./types/hireControlConfig";
|
|
8
9
|
import ClientAuthConfig from "./types/clientAuthConfig";
|
|
9
10
|
import MediaType from "./types/media/media";
|
|
10
11
|
import Event, { EventDates, EventDateType, EventInstance, EventType, CallToActionType } from "./types/event";
|
|
@@ -70,6 +71,7 @@ export declare const account: {
|
|
|
70
71
|
};
|
|
71
72
|
export declare const mapConfig: {
|
|
72
73
|
get: (authToken?: string | null) => Promise<HireControlConfig | null>;
|
|
74
|
+
getThemeSystem: (authToken?: string | null) => Promise<ThemeSystemConfig | null>;
|
|
73
75
|
update: (hireControlConfig: HireControlConfig, authToken?: string | null) => Promise<void>;
|
|
74
76
|
create: (hireControlConfig: HireControlConfig, authToken?: string | null) => Promise<void>;
|
|
75
77
|
};
|
|
@@ -257,7 +259,7 @@ export declare const formSubmissions: {
|
|
|
257
259
|
getFormSubmissionTypes(authToken?: string | null): Promise<string[]>;
|
|
258
260
|
};
|
|
259
261
|
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
260
|
-
export type { Register, User, Role, HireControlConfig, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, FormFieldMigrationRequest, FormUpdateOptions, FormSubmission, ResultsWrapper, Company, JobListing, 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, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, SearchReadConfig, };
|
|
262
|
+
export type { Register, User, Role, HireControlConfig, ThemeSystemConfig, ThemeSemanticToken, ThemeScaleToken, ClientAuthConfig, Event, Listing, EventDates, EventDateType, EventInstance, MediaType, Filters, AppendListing, Form, FormFieldMigrationRequest, FormUpdateOptions, FormSubmission, ResultsWrapper, Company, JobListing, 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, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, SearchReadConfig, };
|
|
261
263
|
export type { BlockKey, FieldType };
|
|
262
264
|
export { EventType, CallToActionType, FormSubmissionStatus, FeedHandlingOption, };
|
|
263
265
|
declare const hcApi: {
|
|
@@ -297,6 +299,7 @@ declare const hcApi: {
|
|
|
297
299
|
};
|
|
298
300
|
mapConfig: {
|
|
299
301
|
get: (authToken?: string | null) => Promise<HireControlConfig | null>;
|
|
302
|
+
getThemeSystem: (authToken?: string | null) => Promise<ThemeSystemConfig | null>;
|
|
300
303
|
update: (hireControlConfig: HireControlConfig, authToken?: string | null) => Promise<void>;
|
|
301
304
|
create: (hireControlConfig: HireControlConfig, authToken?: string | null) => Promise<void>;
|
|
302
305
|
};
|
|
@@ -52,6 +52,7 @@ export interface HireControlConfig {
|
|
|
52
52
|
siteBuildHook?: string;
|
|
53
53
|
analyticsEmbedUrl?: string;
|
|
54
54
|
cmsNavigation?: CmsNavigationConfig;
|
|
55
|
+
themeSystem?: ThemeSystemConfig;
|
|
55
56
|
}
|
|
56
57
|
export interface InputField {
|
|
57
58
|
name?: string;
|
|
@@ -89,4 +90,24 @@ export interface CmsNavigationConfig {
|
|
|
89
90
|
roots?: CmsNavigationNode[];
|
|
90
91
|
updatedAt?: string;
|
|
91
92
|
}
|
|
93
|
+
export interface ThemeSemanticToken {
|
|
94
|
+
key: string;
|
|
95
|
+
label: string;
|
|
96
|
+
cssVar?: string;
|
|
97
|
+
description?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface ThemeScaleToken {
|
|
100
|
+
key: string;
|
|
101
|
+
label: string;
|
|
102
|
+
value: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ThemeSystemConfig {
|
|
105
|
+
version?: number;
|
|
106
|
+
updatedAt?: string;
|
|
107
|
+
cssVars?: Record<string, string>;
|
|
108
|
+
colorTokens?: ThemeSemanticToken[];
|
|
109
|
+
textTokens?: ThemeSemanticToken[];
|
|
110
|
+
spacingTokens?: ThemeScaleToken[];
|
|
111
|
+
radiusTokens?: ThemeScaleToken[];
|
|
112
|
+
}
|
|
92
113
|
export default HireControlConfig;
|
package/index.ts
CHANGED
|
@@ -38,6 +38,11 @@ import Register from "./types/register";
|
|
|
38
38
|
import User from "./types/user";
|
|
39
39
|
import Role from "./types/role";
|
|
40
40
|
import HireControlConfig from "./types/hireControlConfig";
|
|
41
|
+
import type {
|
|
42
|
+
ThemeSystemConfig,
|
|
43
|
+
ThemeSemanticToken,
|
|
44
|
+
ThemeScaleToken,
|
|
45
|
+
} from "./types/hireControlConfig";
|
|
41
46
|
import ClientAuthConfig from "./types/clientAuthConfig";
|
|
42
47
|
import MediaType from "./types/media/media";
|
|
43
48
|
import Event, {
|
|
@@ -149,6 +154,7 @@ export const account = {
|
|
|
149
154
|
|
|
150
155
|
export const mapConfig = {
|
|
151
156
|
get: mapConfigController.getMapConfig,
|
|
157
|
+
getThemeSystem: mapConfigController.getThemeSystem,
|
|
152
158
|
update: mapConfigController.updateMapConfig,
|
|
153
159
|
create: mapConfigController.createMapConfig,
|
|
154
160
|
};
|
|
@@ -335,6 +341,9 @@ export type {
|
|
|
335
341
|
User,
|
|
336
342
|
Role,
|
|
337
343
|
HireControlConfig,
|
|
344
|
+
ThemeSystemConfig,
|
|
345
|
+
ThemeSemanticToken,
|
|
346
|
+
ThemeScaleToken,
|
|
338
347
|
ClientAuthConfig,
|
|
339
348
|
Event,
|
|
340
349
|
Listing,
|
package/package.json
CHANGED
package/types/filters/filters.ts
CHANGED
|
@@ -59,6 +59,7 @@ export interface HireControlConfig {
|
|
|
59
59
|
siteBuildHook?: string;
|
|
60
60
|
analyticsEmbedUrl?: string;
|
|
61
61
|
cmsNavigation?: CmsNavigationConfig;
|
|
62
|
+
themeSystem?: ThemeSystemConfig;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
export interface InputField {
|
|
@@ -102,4 +103,27 @@ export interface CmsNavigationConfig {
|
|
|
102
103
|
updatedAt?: string;
|
|
103
104
|
}
|
|
104
105
|
|
|
106
|
+
export interface ThemeSemanticToken {
|
|
107
|
+
key: string;
|
|
108
|
+
label: string;
|
|
109
|
+
cssVar?: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface ThemeScaleToken {
|
|
114
|
+
key: string;
|
|
115
|
+
label: string;
|
|
116
|
+
value: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface ThemeSystemConfig {
|
|
120
|
+
version?: number;
|
|
121
|
+
updatedAt?: string;
|
|
122
|
+
cssVars?: Record<string, string>;
|
|
123
|
+
colorTokens?: ThemeSemanticToken[];
|
|
124
|
+
textTokens?: ThemeSemanticToken[];
|
|
125
|
+
spacingTokens?: ThemeScaleToken[];
|
|
126
|
+
radiusTokens?: ThemeScaleToken[];
|
|
127
|
+
}
|
|
128
|
+
|
|
105
129
|
export default HireControlConfig;
|