@abcagency/hire-control-sdk 1.1.29 → 1.1.31
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/formSubmissionsController.ts +27 -0
- package/dist/controllers/formSubmissionsController.d.ts +3 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/types/content/contentEntry.d.ts +7 -0
- package/dist/types/content/model.d.ts +18 -1
- package/dist/types/form.d.ts +15 -0
- package/dist/types/formSubmission.d.ts +25 -1
- package/dist/types/jobListingSettings.d.ts +23 -0
- package/dist/types/listing.d.ts +1 -0
- package/dist/types/mongoListingEntity.d.ts +4 -0
- package/dist/types/notificationSettings.d.ts +4 -0
- package/dist/types/userCompanyAccess.d.ts +6 -6
- package/index.ts +16 -0
- package/package.json +1 -1
- package/types/content/contentEntry.ts +7 -0
- package/types/content/model.ts +19 -1
- package/types/form.ts +16 -0
- package/types/formSubmission.ts +26 -0
- package/types/jobListingSettings.ts +35 -0
- package/types/listing.ts +1 -0
- package/types/mongoListingEntity.ts +14 -0
- package/types/notificationSettings.ts +4 -0
- package/types/userCompanyAccess.ts +7 -7
- package/.gitattributes +0 -1
- package/dist/controllers/jobDataAlertsController.d.ts +0 -13
- package/dist/types/jobDataAlert.d.ts +0 -59
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import FetchHandler from "../handlers/fetchHandler";
|
|
2
2
|
import { API_URL } from "../constants/config";
|
|
3
3
|
import FormSubmission, {
|
|
4
|
+
FormSubmissionWriteRequest,
|
|
4
5
|
FormSubmissionStatus,
|
|
5
6
|
SubmissionApprovalReviewRequest,
|
|
6
7
|
} from "../types/formSubmission";
|
|
@@ -42,6 +43,32 @@ class FormSubmissionsController {
|
|
|
42
43
|
);
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
async saveProgress(
|
|
47
|
+
submissionId: string,
|
|
48
|
+
request: FormSubmissionWriteRequest,
|
|
49
|
+
authToken: string | null = null,
|
|
50
|
+
): Promise<FormSubmission> {
|
|
51
|
+
return fetchHandler.put<FormSubmissionWriteRequest, FormSubmission>(
|
|
52
|
+
`/formsubmission/${submissionId}/progress`,
|
|
53
|
+
request,
|
|
54
|
+
true,
|
|
55
|
+
authToken,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async completeSubmission(
|
|
60
|
+
submissionId: string,
|
|
61
|
+
request: FormSubmissionWriteRequest,
|
|
62
|
+
authToken: string | null = null,
|
|
63
|
+
): Promise<FormSubmission> {
|
|
64
|
+
return fetchHandler.post<FormSubmissionWriteRequest, FormSubmission>(
|
|
65
|
+
`/formsubmission/${submissionId}/complete`,
|
|
66
|
+
request,
|
|
67
|
+
true,
|
|
68
|
+
authToken,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
45
72
|
/**
|
|
46
73
|
* Get form submissions with optional filters.
|
|
47
74
|
* @param {number} pageSize - Number of results per page (default: 20).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import FormSubmission, { FormSubmissionStatus, SubmissionApprovalReviewRequest } from "../types/formSubmission";
|
|
1
|
+
import FormSubmission, { FormSubmissionWriteRequest, FormSubmissionStatus, SubmissionApprovalReviewRequest } from "../types/formSubmission";
|
|
2
2
|
import ResultsWrapper from "../types/resultsWrapper";
|
|
3
3
|
declare class FormSubmissionsController {
|
|
4
4
|
/**
|
|
@@ -12,6 +12,8 @@ declare class FormSubmissionsController {
|
|
|
12
12
|
* @returns {Promise<string>} - Success message.
|
|
13
13
|
*/
|
|
14
14
|
submitFormSubmission(formSubmission: FormSubmission, authToken?: string | null): Promise<string>;
|
|
15
|
+
saveProgress(submissionId: string, request: FormSubmissionWriteRequest, authToken?: string | null): Promise<FormSubmission>;
|
|
16
|
+
completeSubmission(submissionId: string, request: FormSubmissionWriteRequest, authToken?: string | null): Promise<FormSubmission>;
|
|
15
17
|
/**
|
|
16
18
|
* Get form submissions with optional filters.
|
|
17
19
|
* @param {number} pageSize - Number of results per page (default: 20).
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function t(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function u(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(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,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(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(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(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}`}:{}},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(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),i="undefined"!=typeof window&&"localhost"===window.location.hostname;var o=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"+(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(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(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(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 A=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}})}};const b=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 b.get(`/listings${n}`,!0,t)}catch(t){throw t}})}getListingDetails(e){return t(this,arguments,void 0,function*(t,e=null){try{return yield b.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 F=new e(n);var I=new class{getAppendListings(){return t(this,arguments,void 0,function*(t=null){return F.get("/appendListings",!0,t)})}getAppendListing(e){return t(this,arguments,void 0,function*(t,e=null){return F.get(`/appendListings/${t}`,!0,e)})}createAppendListing(e){return t(this,arguments,void 0,function*(t,e=null){return F.post("/appendListings",t,!0,e)})}updateAppendListing(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return F.put(`/appendListings/${t}`,e,!0,n)})}deleteAppendListing(e){return t(this,arguments,void 0,function*(t,e=null){return F.delete(`/appendListings/${t}`,!0,e)})}};const R=new e(n);var k=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 B=new e(n);var x=new class{submitContactForm(e){return t(this,arguments,void 0,function*(t,e=null){return B.post("/contactForm",t,!0,e,!0)})}submitFormSubmission(e){return t(this,arguments,void 0,function*(t,e=null){return B.post("/formsubmission",t,!0,e)})}getFormSubmissions(){return t(this,arguments,void 0,function*(t=20,e=1,n=null,r=null,i=null,o=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),i&&u.append("from",i.toISOString()),o&&u.append("to",o.toISOString()),B.get(`/formsubmission?${u.toString()}`,!0,s)})}exportFormSubmissionsCsv(){return t(this,arguments,void 0,function*(t=20,e=1,n=null,r=null,i=null,o=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),i&&l.append("from",i.toISOString()),o&&l.append("to",o.toISOString()),s&&s.length>0&&s.forEach(t=>l.append("columns",t));const a=yield B.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 B.get("/formsubmission/types",!0,t)})}deleteFormSubmission(e){return t(this,arguments,void 0,function*(t,e=null){return B.delete(`/formsubmission/${t}`,!0,e)})}reviewSubmissionApproval(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return B.post(`/formsubmission/${t}/approval`,e,!0,n)})}};const O=new e(n);var M=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 j=new e(n);var U=new class{getCompanies(){return t(this,arguments,void 0,function*(t=null){return j.get("/companies",!0,t)})}getCompany(e){return t(this,arguments,void 0,function*(t,e=null){return j.get(`/companies/${t}`,!0,e)})}createCompany(e){return t(this,arguments,void 0,function*(t,e=null){return j.post("/companies",t,!0,e)})}updateCompany(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return j.put(`/companies/${t}`,e,!0,n)})}deleteCompany(e){return t(this,arguments,void 0,function*(t,e=null){return j.delete(`/companies/${t}`,!0,e)})}syncAllCompanies(){return t(this,arguments,void 0,function*(t=null){return j.get("/companies/syncall",!0,t)})}cloneCompany(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return j.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 i=r.toString();return P.get("/joblistings/MapListings"+(i?`?${i}`:""),!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 i=r.toString();return P.get(`/joblistings/MapListings/${t}${i?`?${i}`:""}`,!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,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 u=yield P.getFile(`/joblistings/Export-csv?${s.toString()}`,!0,o),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 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(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 z=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 K=new e(n);var X=new class{getAll(){return t(this,arguments,void 0,function*(t=null){return K.get("/jobfeeds",!0,t)})}get(e){return t(this,arguments,void 0,function*(t,e=null){return K.get(`/jobfeeds/${t}`,!0,e)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return K.post("/jobfeeds",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return K.put(`/jobfeeds/${t}`,e,!0,n)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){return K.delete(`/jobfeeds/${t}`,!0,e)})}sync(e){return t(this,arguments,void 0,function*(t,e=null){return K.post(`/jobfeeds/${t}/sync`,{},!0,e)})}toggleActive(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return K.patch(`/jobfeeds/${t}/toggle-active`,e,!0,n)})}};const Y=new e(n),q=(t,e)=>"object"==typeof t&&null!==t&&"statusCode"in t&&t.statusCode===e;var Z=new class{get(){return t(this,arguments,void 0,function*(t=null){try{return yield Y.get("/jobListingSettings",!0,t)}catch(t){if(q(t,404)||q(t,204))return null;throw t}})}create(e){return t(this,arguments,void 0,function*(t,e=null){return Y.post("/jobListingSettings",t,!0,e)})}delete(){return t(this,arguments,void 0,function*(t=null){return Y.delete("/jobListingSettings",!0,t)})}};const Q=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),Q.post("/listingEntities"+(r.toString()?"?"+r.toString():""),t,!0,n)})}getAll(){return t(this,arguments,void 0,function*(t=null){return Q.get("/listingEntities",!0,t)})}create(e){return t(this,arguments,void 0,function*(t,e=null){return Q.post("/listingEntities/create",t,!0,e)})}update(e,n){return t(this,arguments,void 0,function*(t,e,n=null){yield Q.put(`/listingEntities/update/${t}`,e,!0,n)})}delete(e){return t(this,arguments,void 0,function*(t,e=null){yield Q.delete(`/listingEntities/delete/${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 it=new class{getFieldTypes(){return t(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(this,arguments,void 0,function*(t=null){return ot.get("/validator/types",!0,t)})}};const ut=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,lt=t=>{if(Array.isArray(t))return t.map(t=>lt(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[ut(n)]=lt(r);return e},at=new e(n);var ct=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 i=yield at.get(r,!0,n);return lt(i)})}getContentEntry(e){return t(this,arguments,void 0,function*(t,e=null,n=null){let r=`/contententry/${t}`;null!==e&&(r+=`?statusFilter=${e}`);const i=yield at.get(r,!0,n);return lt(i)})}getContentEntryBySlug(e,n){return t(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 at.get(i,!0,r);return lt(o)})}createContentEntry(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield at.post("/contententry",t,!0,e);return lt(n)})}updateContentEntry(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return at.put(`/contententry/${t}`,e,!0,n)})}deleteContentEntry(e){return t(this,arguments,void 0,function*(t,e=null){return at.delete(`/contententry/${t}`,!0,e)})}getVersions(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield at.get(`/contententry/${t}/versions`,!0,e);return lt(n)})}unpublishAll(e){return t(this,arguments,void 0,function*(t,e=null){return at.post(`/contententry/${t}/unpublish`,void 0,!0,e)})}};const dt=new e(n);var gt=new class{getBlocks(){return t(this,arguments,void 0,function*(t=null){const e=yield dt.get("/block",!0,t);return lt(e)})}getBlock(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield dt.get(`/block/${t}`,!0,e);return lt(n)})}createBlock(e){return t(this,arguments,void 0,function*(t,e=null){const n=yield dt.post("/block",t,!0,e);return lt(n)})}updateBlock(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return dt.put(`/block/${t}`,e,!0,n)})}updateBlockWithMigrations(e,n){return t(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(this,arguments,void 0,function*(t,e,n=null){const r=yield dt.post(`/block/${t}/preview-update`,e,!0,n);return lt(r)})}deleteBlock(e){return t(this,arguments,void 0,function*(t,e=null){return dt.delete(`/block/${t}`,!0,e)})}getTemplateBlocks(){return t(this,arguments,void 0,function*(t=null){const e=yield dt.get("/block/template-blocks",!0,t);return lt(e)})}};const pt=new e(n);var ht=new class{getModels(){return t(this,arguments,void 0,function*(t=null){return pt.get("/model",!0,t)})}getModel(e){return t(this,arguments,void 0,function*(t,e=null){return pt.get(`/model/${t}`,!0,e)})}createModel(e){return t(this,arguments,void 0,function*(t,e=null){return pt.post("/model",t,!0,e)})}updateModel(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return pt.put(`/model/${t}`,e,!0,n)})}deleteModel(e){return t(this,arguments,void 0,function*(t,e=null){return pt.delete(`/model/${t}`,!0,e)})}previewSync(e){return t(this,arguments,void 0,function*(t,e=null){return pt.get(`/model/${t}/sync/preview`,!0,e)})}executeSync(e,n){return t(this,arguments,void 0,function*(t,e,n=null){return pt.post(`/model/${t}/sync`,e,!0,n)})}};const ft=new e(n);var vt,mt,yt,Ct,St,At,bt=new class{getCompletion(e){return t(this,arguments,void 0,function*(t,e=null){return ft.post("/openai/completion",t,!0,e)})}};exports.EventType=void 0,(vt=exports.EventType||(exports.EventType={}))[vt.Virtual=0]="Virtual",vt[vt.InPerson=1]="InPerson",vt[vt.Hybrid=2]="Hybrid",exports.CallToActionType=void 0,(mt=exports.CallToActionType||(exports.CallToActionType={}))[mt.Button=0]="Button",mt[mt.Link=1]="Link",mt[mt.Download=2]="Download",mt[mt.HireControlRegistration=3]="HireControlRegistration",exports.FormSubmissionStatus=void 0,(yt=exports.FormSubmissionStatus||(exports.FormSubmissionStatus={}))[yt.Submitted=1]="Submitted",yt[yt.Hold=2]="Hold",yt[yt.Rejected=3]="Rejected",yt[yt.Sent=4]="Sent",yt[yt.Failed=5]="Failed",yt[yt.Blacklisted=6]="Blacklisted",yt[yt.PendingApproval=7]="PendingApproval",exports.JobStatus=void 0,(Ct=exports.JobStatus||(exports.JobStatus={}))[Ct.Hold=0]="Hold",Ct[Ct.Published=1]="Published",Ct[Ct.Archived=2]="Archived",exports.FeedHandlingOption=void 0,(St=exports.FeedHandlingOption||(exports.FeedHandlingOption={}))[St.Replace=0]="Replace",St[St.Append=1]="Append",St[St.Custom=2]="Custom",exports.IntegrationType=void 0,(At=exports.IntegrationType||(exports.IntegrationType={}))[At.Custom=0]="Custom",At[At.SearchWrite=1]="SearchWrite",At[At.SearchRead=2]="SearchRead",At[At.ExternalSync=3]="ExternalSync";const Lt={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"},Tt={"testimonial-block":Lt.TESTIMONIAL,"button-block":Lt.BUTTON,"recruiter-block":Lt.RECRUITER},wt={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},$t={getAll:u.getEvents,get:u.getEvent,getBySlug:u.getEventBySlug,create:u.createEvent,update:u.updateEvent,delete:u.deleteEvent},Et={get:a.getAllRolesWithClaims,create:a.addRole,update:a.updateRole,delete:a.deleteRole},Ft=d,It=L,Rt={resetPassword:p.resetPassword,resetPasswordWithToken:p.resetPasswordWithToken,forgotPassword:p.forgotPassword},kt={get:f.getMapConfig,getThemeSystem:f.getThemeSystem,update:f.updateMapConfig,create:f.createMapConfig},Bt={get:C.getClientAuthConfigById,getAll:C.getAllClientAuthConfigs,update:C.updateClientAuthConfig,create:C.createClientAuthConfig,delete:C.deleteClientAuthConfig},xt={getAll:A.getAll,create:A.create,update:A.update,delete:A.delete,getSearchRead:A.getSearchReadConfig},Ot={upload:w.uploadMedia,uploadProfileImage:w.uploadProfileImage,get:w.listMedia,delete:w.deleteMedia},Mt={getList:E.getFilters,get:E.getFilter,update:E.updateFilter,create:E.createFilter,delete:E.deleteFilter},jt={get:I.getAppendListings,getAppendListing:I.getAppendListing,create:I.createAppendListing,update:I.updateAppendListing,delete:I.deleteAppendListing},Ut={getAll:D.getBlogs,getById:D.getBlog,create:D.createBlog,update:D.updateBlog,delete:D.deleteBlog},Pt={get:W.getCategories,getByCompany:W.getCategoriesByCompany},Nt={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},_t={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:X.getAll,getById:X.get,create:X.create,update:X.update,delete:X.delete,sync:X.sync,toggleActive:X.toggleActive},Vt={get:Z.get,create:Z.create,delete:Z.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:m.getAllPermissions},Gt={getAll:U.getCompanies,getById:U.getCompany,create:U.createCompany,update:U.updateCompany,delete:U.deleteCompany,sync:U.syncAllCompanies,clone:U.cloneCompany},zt={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},Kt={getTypes:it.getFieldTypes},Xt={getTypes:st.getValidatorTypes},Yt={getAll:ct.getContentEntries,getById:ct.getContentEntry,getBySlug:ct.getContentEntryBySlug,create:ct.createContentEntry,update:ct.updateContentEntry,delete:ct.deleteContentEntry,unpublish:ct.unpublishAll},qt={getAll:gt.getBlocks,getById:gt.getBlock,create:gt.createBlock,update:gt.updateBlock,updateWithMigrations:gt.updateBlockWithMigrations,previewUpdate:gt.previewBlockUpdate,delete:gt.deleteBlock,getTemplateBlocks:gt.getTemplateBlocks},Zt={getAll:ht.getModels,getById:ht.getModel,create:ht.createModel,update:ht.updateModel,delete:ht.deleteModel,previewSync:ht.previewSync,executeSync:ht.executeSync},Qt={getCompletion:bt.getCompletion},te=k,ee={get:M.get,save:M.save},ne={submitContactForm:x.submitContactForm,submitFormSubmission:x.submitFormSubmission,getFormSubmissions:x.getFormSubmissions,exportFormSubmissionsCsv:x.exportFormSubmissionsCsv,getFormSubmissionTypes:x.getFormSubmissionTypes,deleteFormSubmission:x.deleteFormSubmission,reviewSubmissionApproval:x.reviewSubmissionApproval},re={auth:wt,events:$t,roles:Et,users:Ft,account:Rt,mapConfig:kt,permissions:Ht,clientAuthConfig:Bt,integrationConfig:xt,filters:Mt,listings:It,media:Ot,appendListings:jt,blogs:Ut,categories:Pt,categoryLists:Nt,jobFeedFieldMappings:_t,jobFeeds:Dt,jobListingSettings:Vt,listingEntities:Wt,recruiters:Jt,forms:te,formSettings:ee,formSubmissions:ne,openAI:Qt,companies:Gt,jobListings:zt};exports.BLOCK_KEYS=Lt,exports.BLOCK_KEY_ALIASES=Tt,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=Rt,exports.appendListings=jt,exports.auth=wt,exports.blogs=Ut,exports.categories=Pt,exports.categoryLists=Nt,exports.clientAuthConfig=Bt,exports.companies=Gt,exports.contentBlocks=qt,exports.contentEntries=Yt,exports.contentField=Kt,exports.contentValidator=Xt,exports.default=re,exports.events=$t,exports.filters=Mt,exports.formSettings=ee,exports.formSubmissions=ne,exports.forms=te,exports.integrationConfig=xt,exports.jobFeedFieldMappings=_t,exports.jobFeeds=Dt,exports.jobListingSettings=Vt,exports.jobListings=zt,exports.listingEntities=Wt,exports.listings=It,exports.mapConfig=kt,exports.media=Ot,exports.model=Zt,exports.openAI=Qt,exports.permissions=Ht,exports.recruiters=Jt,exports.roles=Et,exports.users=Ft;
|
|
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}})}};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 U=new e(n);var P=new class{updateFieldVersionApproval(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return U.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 U.patch(`/joblistings/${t}/description-version-approval`,e,!0,n)})}getJobListingsByCompany(){return t.__awaiter(this,arguments,void 0,function*(t=null){return U.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 U.get("/joblistings/MapListings"+(i?`?${i}`:""),!0,t)})}previewMapJobListingsByCompany(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return U.post("/joblistings/MapListings/preview",t,!0,e)})}getJobListingById(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return U.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 U.get(`/joblistings/MapListings/${t}${i?`?${i}`:""}`,!0,e)})}createJobListing(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return U.post("/joblistings",t,!0,e)})}updateJobListing(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return U.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 U.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 U.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 K=new e(n);var X=new class{getAll(){return t.__awaiter(this,arguments,void 0,function*(t=null){return K.get("/jobfeeds",!0,t)})}get(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return K.get(`/jobfeeds/${t}`,!0,e)})}create(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return K.post("/jobfeeds",t,!0,e)})}update(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return K.put(`/jobfeeds/${t}`,e,!0,n)})}delete(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return K.delete(`/jobfeeds/${t}`,!0,e)})}sync(e){return t.__awaiter(this,arguments,void 0,function*(t,e=null){return K.post(`/jobfeeds/${t}/sync`,{},!0,e)})}toggleActive(e,n){return t.__awaiter(this,arguments,void 0,function*(t,e,n=null){return K.patch(`/jobfeeds/${t}/toggle-active`,e,!0,n)})}};const q=new e(n),Y=(t,e)=>"object"==typeof t&&null!==t&&"statusCode"in t&&t.statusCode===e;var Z=new class{get(){return t.__awaiter(this,arguments,void 0,function*(t=null){try{return yield q.get("/jobListingSettings",!0,t)}catch(t){if(Y(t,404)||Y(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 Q=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),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 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";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},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},Ut={get:W.getCategories,getByCompany:W.getCategoriesByCompany},Pt={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:X.getAll,getById:X.get,create:X.create,update:X.update,delete:X.delete,sync:X.sync,toggleActive:X.toggleActive},Vt={get:Z.get,create:Z.create,delete:Z.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:P.getJobListingsByCompany,getMapListings:P.getMapJobListingsByCompany,previewMapListings:P.previewMapJobListingsByCompany,getMapListing:P.getMapListingById,getById:P.getJobListingById,updateFieldVersionApproval:P.updateFieldVersionApproval,updateDescriptionVersionApproval:P.updateDescriptionVersionApproval,create:P.createJobListing,update:P.updateJobListing,delete:P.deleteJobListing},Kt={getTypes:it.getFieldTypes},Xt={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},Yt={getAll:gt.getBlocks,getById:gt.getBlock,create:gt.createBlock,update:gt.updateBlock,updateWithMigrations:gt.updateBlockWithMigrations,previewUpdate:gt.previewBlockUpdate,delete:gt.deleteBlock,getTemplateBlocks:gt.getTemplateBlocks},Zt={getAll:ht.getModels,getById:ht.getModel,create:ht.createModel,update:ht.updateModel,delete:ht.deleteModel,previewSync:ht.previewSync,executeSync:ht.executeSync},Qt={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:Ut,categoryLists:Pt,jobFeedFieldMappings:Nt,jobFeeds:Dt,jobListingSettings:Vt,listingEntities:Wt,recruiters:Jt,forms:te,formSettings:ee,formSubmissions:ne,openAI:Qt,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=Ut,exports.categoryLists=Pt,exports.clientAuthConfig=kt,exports.companies=Gt,exports.contentBlocks=Yt,exports.contentEntries=qt,exports.contentField=Kt,exports.contentValidator=Xt,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=Zt,exports.openAI=Qt,exports.permissions=Ht,exports.recruiters=Jt,exports.roles=$t,exports.users=Et;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ import Event, { EventDates, EventDateType, EventInstance, EventType, CallToActio
|
|
|
13
13
|
import { Listing } from "./types/listing";
|
|
14
14
|
import Filters from "./types/filters/filters";
|
|
15
15
|
import AppendListing from "./types/appendListing";
|
|
16
|
-
import Form, { FormExperienceType, EasyApplyForm, FormFieldMigrationRequest, FormUpdateOptions, GuidedActionExecutionRequest, GuidedActionExecutionResult, GuidedBranchAction, GuidedBranchDestination, GuidedBranchTrigger, GuidedFormSettings, JobTargetedFormSelection, JobTargetingSettings, SubmissionAutomationRule, SubmissionAutomationSettings, SubmissionConditionOperator } from "./types/form";
|
|
17
|
-
import FormSubmission, { FormSubmissionStatus, SubmissionApproval, SubmissionApprovalReviewRequest } from "./types/formSubmission";
|
|
16
|
+
import Form, { FormExperienceType, EasyApplyForm, FormFieldMigrationRequest, FormUpdateOptions, GuidedActionExecutionRequest, GuidedActionExecutionResult, GuidedBranchAction, GuidedBranchDestination, GuidedBranchTrigger, GuidedFormSettings, GuidedEarlySubmitRule, JobTargetedFormSelection, JobTargetingSettings, SubmissionAutomationRule, SubmissionAutomationSettings, SubmissionConditionOperator } from "./types/form";
|
|
17
|
+
import FormSubmission, { FormSubmissionWriteRequest, PartialDelivery, FormSubmissionStatus, SubmissionApproval, SubmissionApprovalReviewRequest } from "./types/formSubmission";
|
|
18
18
|
import FormSettings, { FormSettingsSaveRequest } from "./types/formSettings";
|
|
19
19
|
import ResultsWrapper from "./types/resultsWrapper";
|
|
20
20
|
import { JobListing, JobListingSaveResult, JobStatus, MapJobListingPreview, MapJobListingsPreviewRequest } from "./types/JobListing";
|
|
@@ -28,7 +28,7 @@ import Blog from "./types/blog";
|
|
|
28
28
|
import CategoryListDto, { AddValueRequest, CategoryListValueDto } from "./types/categoryList";
|
|
29
29
|
import JobFeed from "./types/jobFeed";
|
|
30
30
|
import JobFeedFieldMapping, { MultipleFieldConfig, ConditionalConfig, ConditionalRule } from "./types/jobFeedFieldMapping";
|
|
31
|
-
import JobListingSettings, { FeedHandlingOption, JobListingSettingsSaveRequest } from "./types/jobListingSettings";
|
|
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
34
|
import FocalPoint from "./types/focalPoint";
|
|
@@ -266,6 +266,8 @@ export declare const formSettings: {
|
|
|
266
266
|
export declare const formSubmissions: {
|
|
267
267
|
submitContactForm: (form: any, authToken?: string | null) => Promise<string>;
|
|
268
268
|
submitFormSubmission: (formSubmission: FormSubmission, authToken?: string | null) => Promise<string>;
|
|
269
|
+
saveProgress: (submissionId: string, request: FormSubmissionWriteRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
270
|
+
completeSubmission: (submissionId: string, request: FormSubmissionWriteRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
269
271
|
getFormSubmissions: (pageSize?: number, pageNumber?: number, type?: string | null, status?: FormSubmissionStatus | null, from?: Date | null, to?: Date | null, authToken?: string | null) => Promise<ResultsWrapper<FormSubmission>>;
|
|
270
272
|
exportFormSubmissionsCsv: (pageSize?: number, pageNumber?: number, type?: string | null, status?: FormSubmissionStatus | null, from?: Date | null, to?: Date | null, columns?: string[] | null, authToken?: string | null) => Promise<void>;
|
|
271
273
|
getFormSubmissionTypes: (authToken?: string | null) => Promise<string[]>;
|
|
@@ -273,7 +275,7 @@ export declare const formSubmissions: {
|
|
|
273
275
|
reviewSubmissionApproval: (id: string, request: SubmissionApprovalReviewRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
274
276
|
};
|
|
275
277
|
export { BLOCK_KEYS, BLOCK_KEY_ALIASES, FIELD_TYPES };
|
|
276
|
-
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, ListingEntityDto, RecruiterDto, FocalPoint, ListingEntityMedia, CompletionRequest, CompletionResponse, };
|
|
278
|
+
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, };
|
|
277
279
|
export type { BlockKey, FieldType, SearchReadConfig, IntegrationConfig };
|
|
278
280
|
export { EventType, CallToActionType, FormSubmissionStatus, FeedHandlingOption, JobStatus, IntegrationType, };
|
|
279
281
|
declare const hcApi: {
|
|
@@ -437,6 +439,8 @@ declare const hcApi: {
|
|
|
437
439
|
formSubmissions: {
|
|
438
440
|
submitContactForm: (form: any, authToken?: string | null) => Promise<string>;
|
|
439
441
|
submitFormSubmission: (formSubmission: FormSubmission, authToken?: string | null) => Promise<string>;
|
|
442
|
+
saveProgress: (submissionId: string, request: FormSubmissionWriteRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
443
|
+
completeSubmission: (submissionId: string, request: FormSubmissionWriteRequest, authToken?: string | null) => Promise<FormSubmission>;
|
|
440
444
|
getFormSubmissions: (pageSize?: number, pageNumber?: number, type?: string | null, status?: FormSubmissionStatus | null, from?: Date | null, to?: Date | null, authToken?: string | null) => Promise<ResultsWrapper<FormSubmission>>;
|
|
441
445
|
exportFormSubmissionsCsv: (pageSize?: number, pageNumber?: number, type?: string | null, status?: FormSubmissionStatus | null, from?: Date | null, to?: Date | null, columns?: string[] | null, authToken?: string | null) => Promise<void>;
|
|
442
446
|
getFormSubmissionTypes: (authToken?: string | null) => Promise<string[]>;
|
|
@@ -6,6 +6,13 @@ export type ContentEntry = {
|
|
|
6
6
|
contentName?: string;
|
|
7
7
|
displayName?: string;
|
|
8
8
|
companyId: string;
|
|
9
|
+
sourceBinding?: {
|
|
10
|
+
sourceType: string;
|
|
11
|
+
sourceKey: string;
|
|
12
|
+
lastSyncedAt: string;
|
|
13
|
+
lastSourceHash?: string;
|
|
14
|
+
schemaVersion: number;
|
|
15
|
+
};
|
|
9
16
|
fields: {
|
|
10
17
|
[key: string]: any;
|
|
11
18
|
};
|
|
@@ -80,6 +80,9 @@ export type ContentModuleSyncPreview = {
|
|
|
80
80
|
modelId: string;
|
|
81
81
|
sourceRecordCount: number;
|
|
82
82
|
entryCount: number;
|
|
83
|
+
linkedEntryCount: number;
|
|
84
|
+
inSyncEntryCount: number;
|
|
85
|
+
creationBlockedByUnboundEntries: boolean;
|
|
83
86
|
missingEntries: Array<{
|
|
84
87
|
sourceKey: string;
|
|
85
88
|
displayName: string;
|
|
@@ -89,16 +92,30 @@ export type ContentModuleSyncPreview = {
|
|
|
89
92
|
sourceKey: string;
|
|
90
93
|
displayName: string;
|
|
91
94
|
sourceExists: boolean;
|
|
95
|
+
differences?: ContentModuleFieldDifference[];
|
|
92
96
|
}>;
|
|
93
97
|
staleEntries: Array<{
|
|
94
98
|
entryId: string;
|
|
95
99
|
sourceKey: string;
|
|
96
100
|
displayName: string;
|
|
97
101
|
sourceExists: boolean;
|
|
102
|
+
differences?: ContentModuleFieldDifference[];
|
|
98
103
|
}>;
|
|
104
|
+
unboundEntries: Array<{
|
|
105
|
+
entryId: string;
|
|
106
|
+
displayName: string;
|
|
107
|
+
suggestedSourceKey?: string;
|
|
108
|
+
matchConfidence: "exact" | "suggested" | "ambiguous" | "none";
|
|
109
|
+
matchReason: string;
|
|
110
|
+
}>;
|
|
111
|
+
};
|
|
112
|
+
export type ContentModuleFieldDifference = {
|
|
113
|
+
targetField: string;
|
|
114
|
+
sourcePath: string;
|
|
115
|
+
kind: "value" | "richText" | "media" | "displayName" | "repeater" | "slug" | string;
|
|
99
116
|
};
|
|
100
117
|
export type ContentModuleSyncExecuteRequest = {
|
|
101
|
-
mode?: "create-missing" | "sync-existing" | "full";
|
|
118
|
+
mode?: "connect-existing" | "create-missing" | "sync-existing" | "full";
|
|
102
119
|
sourceKeys?: string[];
|
|
103
120
|
};
|
|
104
121
|
export type ContentModuleSyncExecuteResult = {
|
package/dist/types/form.d.ts
CHANGED
|
@@ -35,6 +35,16 @@ export interface GuidedBranchAction {
|
|
|
35
35
|
export interface GuidedFormSettings {
|
|
36
36
|
version: 1;
|
|
37
37
|
branchActions: GuidedBranchAction[];
|
|
38
|
+
earlySubmitRules?: GuidedEarlySubmitRule[];
|
|
39
|
+
}
|
|
40
|
+
export interface GuidedEarlySubmitRule {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
pageName: string;
|
|
45
|
+
fieldName: string;
|
|
46
|
+
operator: SubmissionConditionOperator;
|
|
47
|
+
values: string[];
|
|
38
48
|
}
|
|
39
49
|
export interface JobTargetingSettings {
|
|
40
50
|
enabled: boolean;
|
|
@@ -129,9 +139,14 @@ export interface EasyApplyForm {
|
|
|
129
139
|
experienceType?: FormExperienceType;
|
|
130
140
|
successTitle?: string;
|
|
131
141
|
successMessage?: string;
|
|
142
|
+
partialSubmissions?: {
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
inactivityMinutes: number;
|
|
145
|
+
};
|
|
132
146
|
guided?: {
|
|
133
147
|
version: 1;
|
|
134
148
|
branchActions: Array<Pick<GuidedBranchAction, "id" | "name" | "enabled" | "trigger">>;
|
|
149
|
+
earlySubmitRules?: GuidedEarlySubmitRule[];
|
|
135
150
|
};
|
|
136
151
|
}
|
|
137
152
|
interface FormUpdateOptions {
|
|
@@ -5,6 +5,12 @@ type FormSubmission = {
|
|
|
5
5
|
sqlFormId?: number;
|
|
6
6
|
type?: string;
|
|
7
7
|
dateCreated: string;
|
|
8
|
+
lastActivityAt?: string;
|
|
9
|
+
partialDueAt?: string;
|
|
10
|
+
completedAt?: string;
|
|
11
|
+
currentPageName?: string;
|
|
12
|
+
revision?: number;
|
|
13
|
+
partialDelivery?: PartialDelivery;
|
|
8
14
|
pageSource?: string;
|
|
9
15
|
status?: FormSubmissionStatus;
|
|
10
16
|
isDeleted?: boolean;
|
|
@@ -13,6 +19,23 @@ type FormSubmission = {
|
|
|
13
19
|
snapshotJobData?: Record<string, any>;
|
|
14
20
|
approval?: SubmissionApproval;
|
|
15
21
|
};
|
|
22
|
+
export type PartialDelivery = {
|
|
23
|
+
status: "pending" | "processing" | "sent" | "failed" | "cancelled";
|
|
24
|
+
attempts: number;
|
|
25
|
+
claimedAt?: string;
|
|
26
|
+
leaseExpiresAt?: string;
|
|
27
|
+
sentAt?: string;
|
|
28
|
+
lastError?: string;
|
|
29
|
+
};
|
|
30
|
+
export type FormSubmissionWriteRequest = {
|
|
31
|
+
formId: string;
|
|
32
|
+
sqlFormId?: number;
|
|
33
|
+
type?: string;
|
|
34
|
+
pageSource?: string;
|
|
35
|
+
currentPageName?: string;
|
|
36
|
+
formFields: Record<string, unknown>;
|
|
37
|
+
snapshotJobData?: Record<string, unknown>;
|
|
38
|
+
};
|
|
16
39
|
export type SubmissionApproval = {
|
|
17
40
|
ruleId: string;
|
|
18
41
|
ruleName: string;
|
|
@@ -41,6 +64,7 @@ export declare enum FormSubmissionStatus {
|
|
|
41
64
|
Sent = 4,
|
|
42
65
|
Failed = 5,
|
|
43
66
|
Blacklisted = 6,
|
|
44
|
-
PendingApproval = 7
|
|
67
|
+
PendingApproval = 7,
|
|
68
|
+
Partial = 8
|
|
45
69
|
}
|
|
46
70
|
export default FormSubmission;
|
|
@@ -5,6 +5,27 @@ export declare enum FeedHandlingOption {
|
|
|
5
5
|
Append = 1,
|
|
6
6
|
Custom = 2
|
|
7
7
|
}
|
|
8
|
+
export type ListingEntityCustomFieldType = "text" | "textarea" | "number" | "url" | "date" | "datetime" | "checkbox" | "image";
|
|
9
|
+
export type ListingEntityCustomFieldDefinition = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
type: ListingEntityCustomFieldType;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
allowMultiple?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type ListingEntityFieldCollection = {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
allowMultiple?: boolean;
|
|
21
|
+
fields: ListingEntityCustomFieldDefinition[];
|
|
22
|
+
};
|
|
23
|
+
export type EntityCmsSyncSettings = {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
targetModelId?: string;
|
|
26
|
+
publishMode: "draft";
|
|
27
|
+
deactivationBehavior: "flag" | "unpublish" | "archive";
|
|
28
|
+
};
|
|
8
29
|
export type JobListingSettings = {
|
|
9
30
|
id: string;
|
|
10
31
|
companyId: string;
|
|
@@ -14,6 +35,8 @@ export type JobListingSettings = {
|
|
|
14
35
|
syncEnabled: boolean;
|
|
15
36
|
defaultStatus?: string;
|
|
16
37
|
defaultFieldValues?: Record<string, string | number | boolean | null>;
|
|
38
|
+
entityFieldCollections?: ListingEntityFieldCollection[];
|
|
39
|
+
entityCmsSync?: EntityCmsSyncSettings;
|
|
17
40
|
lastUpdated: string;
|
|
18
41
|
notifications: NotificationSettings;
|
|
19
42
|
auditTrail?: AuditTrailEntry[];
|
package/dist/types/listing.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Address } from "./company";
|
|
2
2
|
import ListingEntityMedia from "./listingEntityMedia";
|
|
3
|
+
export type ListingEntityCustomFieldValue = string | null | Array<string | null>;
|
|
4
|
+
export type ListingEntityCustomFieldObject = Record<string, ListingEntityCustomFieldValue>;
|
|
5
|
+
export type ListingEntityCustomFieldValues = Record<string, ListingEntityCustomFieldObject | ListingEntityCustomFieldObject[] | null>;
|
|
3
6
|
export type mongoListingEntity = {
|
|
4
7
|
id: string;
|
|
5
8
|
listingId: number;
|
|
@@ -21,6 +24,7 @@ export type mongoListingEntity = {
|
|
|
21
24
|
communityJson?: string;
|
|
22
25
|
communityHtml?: string;
|
|
23
26
|
communityPlainText?: string;
|
|
27
|
+
customFields?: ListingEntityCustomFieldValues;
|
|
24
28
|
comapnyId?: string;
|
|
25
29
|
DateAdded?: Date | null;
|
|
26
30
|
DateCreated?: Date | null;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export type UserCompanyAccessUpdate = {
|
|
2
|
+
companyId: string;
|
|
3
|
+
isAssigned: boolean;
|
|
4
|
+
roleIds: string[];
|
|
5
|
+
permissions: string[];
|
|
6
|
+
};
|
|
1
7
|
export type UserAccessRole = {
|
|
2
8
|
roleId: string;
|
|
3
9
|
roleName: string;
|
|
@@ -16,9 +22,3 @@ export type UserCompanyAccessResponse = {
|
|
|
16
22
|
globalRoles: UserAccessRole[];
|
|
17
23
|
assignedGlobalRoleIds: string[];
|
|
18
24
|
};
|
|
19
|
-
export type UserCompanyAccessUpdate = {
|
|
20
|
-
companyId: string;
|
|
21
|
-
isAssigned: boolean;
|
|
22
|
-
roleIds: string[];
|
|
23
|
-
permissions: string[];
|
|
24
|
-
};
|
package/index.ts
CHANGED
|
@@ -74,6 +74,7 @@ import Form, {
|
|
|
74
74
|
GuidedBranchDestination,
|
|
75
75
|
GuidedBranchTrigger,
|
|
76
76
|
GuidedFormSettings,
|
|
77
|
+
GuidedEarlySubmitRule,
|
|
77
78
|
JobTargetedFormSelection,
|
|
78
79
|
JobTargetingSettings,
|
|
79
80
|
SubmissionAutomationRule,
|
|
@@ -81,6 +82,8 @@ import Form, {
|
|
|
81
82
|
SubmissionConditionOperator,
|
|
82
83
|
} from "./types/form";
|
|
83
84
|
import FormSubmission, {
|
|
85
|
+
FormSubmissionWriteRequest,
|
|
86
|
+
PartialDelivery,
|
|
84
87
|
FormSubmissionStatus,
|
|
85
88
|
SubmissionApproval,
|
|
86
89
|
SubmissionApprovalReviewRequest,
|
|
@@ -128,6 +131,10 @@ import JobFeedFieldMapping, {
|
|
|
128
131
|
import JobListingSettings, {
|
|
129
132
|
FeedHandlingOption,
|
|
130
133
|
JobListingSettingsSaveRequest,
|
|
134
|
+
EntityCmsSyncSettings,
|
|
135
|
+
ListingEntityCustomFieldDefinition,
|
|
136
|
+
ListingEntityCustomFieldType,
|
|
137
|
+
ListingEntityFieldCollection,
|
|
131
138
|
} from "./types/jobListingSettings";
|
|
132
139
|
import ListingEntityDto from "./types/listingEntity";
|
|
133
140
|
import RecruiterDto from "./types/recruiter";
|
|
@@ -381,6 +388,8 @@ export const formSettings = {
|
|
|
381
388
|
export const formSubmissions = {
|
|
382
389
|
submitContactForm: formSubmissionController.submitContactForm,
|
|
383
390
|
submitFormSubmission: formSubmissionController.submitFormSubmission,
|
|
391
|
+
saveProgress: formSubmissionController.saveProgress,
|
|
392
|
+
completeSubmission: formSubmissionController.completeSubmission,
|
|
384
393
|
getFormSubmissions: formSubmissionController.getFormSubmissions,
|
|
385
394
|
exportFormSubmissionsCsv: formSubmissionController.exportFormSubmissionsCsv,
|
|
386
395
|
getFormSubmissionTypes: formSubmissionController.getFormSubmissionTypes,
|
|
@@ -466,12 +475,19 @@ export type {
|
|
|
466
475
|
ConditionalRule,
|
|
467
476
|
JobListingSettings,
|
|
468
477
|
JobListingSettingsSaveRequest,
|
|
478
|
+
EntityCmsSyncSettings,
|
|
479
|
+
ListingEntityCustomFieldDefinition,
|
|
480
|
+
ListingEntityCustomFieldType,
|
|
481
|
+
ListingEntityFieldCollection,
|
|
469
482
|
ListingEntityDto,
|
|
470
483
|
RecruiterDto,
|
|
471
484
|
FocalPoint,
|
|
472
485
|
ListingEntityMedia,
|
|
473
486
|
CompletionRequest,
|
|
474
487
|
CompletionResponse,
|
|
488
|
+
FormSubmissionWriteRequest,
|
|
489
|
+
PartialDelivery,
|
|
490
|
+
GuidedEarlySubmitRule,
|
|
475
491
|
};
|
|
476
492
|
export type { BlockKey, FieldType, SearchReadConfig, IntegrationConfig };
|
|
477
493
|
|
package/package.json
CHANGED
|
@@ -7,6 +7,13 @@ export type ContentEntry = {
|
|
|
7
7
|
contentName?: string;
|
|
8
8
|
displayName?: string;
|
|
9
9
|
companyId: string;
|
|
10
|
+
sourceBinding?: {
|
|
11
|
+
sourceType: string;
|
|
12
|
+
sourceKey: string;
|
|
13
|
+
lastSyncedAt: string;
|
|
14
|
+
lastSourceHash?: string;
|
|
15
|
+
schemaVersion: number;
|
|
16
|
+
};
|
|
10
17
|
fields: {
|
|
11
18
|
[key: string]: any;
|
|
12
19
|
};
|
package/types/content/model.ts
CHANGED
|
@@ -91,6 +91,9 @@ export type ContentModuleSyncPreview = {
|
|
|
91
91
|
modelId: string;
|
|
92
92
|
sourceRecordCount: number;
|
|
93
93
|
entryCount: number;
|
|
94
|
+
linkedEntryCount: number;
|
|
95
|
+
inSyncEntryCount: number;
|
|
96
|
+
creationBlockedByUnboundEntries: boolean;
|
|
94
97
|
missingEntries: Array<{
|
|
95
98
|
sourceKey: string;
|
|
96
99
|
displayName: string;
|
|
@@ -100,17 +103,32 @@ export type ContentModuleSyncPreview = {
|
|
|
100
103
|
sourceKey: string;
|
|
101
104
|
displayName: string;
|
|
102
105
|
sourceExists: boolean;
|
|
106
|
+
differences?: ContentModuleFieldDifference[];
|
|
103
107
|
}>;
|
|
104
108
|
staleEntries: Array<{
|
|
105
109
|
entryId: string;
|
|
106
110
|
sourceKey: string;
|
|
107
111
|
displayName: string;
|
|
108
112
|
sourceExists: boolean;
|
|
113
|
+
differences?: ContentModuleFieldDifference[];
|
|
109
114
|
}>;
|
|
115
|
+
unboundEntries: Array<{
|
|
116
|
+
entryId: string;
|
|
117
|
+
displayName: string;
|
|
118
|
+
suggestedSourceKey?: string;
|
|
119
|
+
matchConfidence: "exact" | "suggested" | "ambiguous" | "none";
|
|
120
|
+
matchReason: string;
|
|
121
|
+
}>;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export type ContentModuleFieldDifference = {
|
|
125
|
+
targetField: string;
|
|
126
|
+
sourcePath: string;
|
|
127
|
+
kind: "value" | "richText" | "media" | "displayName" | "repeater" | "slug" | string;
|
|
110
128
|
};
|
|
111
129
|
|
|
112
130
|
export type ContentModuleSyncExecuteRequest = {
|
|
113
|
-
mode?: "create-missing" | "sync-existing" | "full";
|
|
131
|
+
mode?: "connect-existing" | "create-missing" | "sync-existing" | "full";
|
|
114
132
|
sourceKeys?: string[];
|
|
115
133
|
};
|
|
116
134
|
|
package/types/form.ts
CHANGED
|
@@ -45,6 +45,17 @@ export interface GuidedBranchAction {
|
|
|
45
45
|
export interface GuidedFormSettings {
|
|
46
46
|
version: 1;
|
|
47
47
|
branchActions: GuidedBranchAction[];
|
|
48
|
+
earlySubmitRules?: GuidedEarlySubmitRule[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface GuidedEarlySubmitRule {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
pageName: string;
|
|
56
|
+
fieldName: string;
|
|
57
|
+
operator: SubmissionConditionOperator;
|
|
58
|
+
values: string[];
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
export interface JobTargetingSettings {
|
|
@@ -153,11 +164,16 @@ export interface EasyApplyForm {
|
|
|
153
164
|
experienceType?: FormExperienceType;
|
|
154
165
|
successTitle?: string;
|
|
155
166
|
successMessage?: string;
|
|
167
|
+
partialSubmissions?: {
|
|
168
|
+
enabled: boolean;
|
|
169
|
+
inactivityMinutes: number;
|
|
170
|
+
};
|
|
156
171
|
guided?: {
|
|
157
172
|
version: 1;
|
|
158
173
|
branchActions: Array<
|
|
159
174
|
Pick<GuidedBranchAction, "id" | "name" | "enabled" | "trigger">
|
|
160
175
|
>;
|
|
176
|
+
earlySubmitRules?: GuidedEarlySubmitRule[];
|
|
161
177
|
};
|
|
162
178
|
}
|
|
163
179
|
|
package/types/formSubmission.ts
CHANGED
|
@@ -5,6 +5,12 @@ type FormSubmission = {
|
|
|
5
5
|
sqlFormId?: number;
|
|
6
6
|
type?: string;
|
|
7
7
|
dateCreated: string;
|
|
8
|
+
lastActivityAt?: string;
|
|
9
|
+
partialDueAt?: string;
|
|
10
|
+
completedAt?: string;
|
|
11
|
+
currentPageName?: string;
|
|
12
|
+
revision?: number;
|
|
13
|
+
partialDelivery?: PartialDelivery;
|
|
8
14
|
pageSource?: string;
|
|
9
15
|
status?: FormSubmissionStatus;
|
|
10
16
|
isDeleted?: boolean;
|
|
@@ -14,6 +20,25 @@ type FormSubmission = {
|
|
|
14
20
|
approval?: SubmissionApproval;
|
|
15
21
|
};
|
|
16
22
|
|
|
23
|
+
export type PartialDelivery = {
|
|
24
|
+
status: "pending" | "processing" | "sent" | "failed" | "cancelled";
|
|
25
|
+
attempts: number;
|
|
26
|
+
claimedAt?: string;
|
|
27
|
+
leaseExpiresAt?: string;
|
|
28
|
+
sentAt?: string;
|
|
29
|
+
lastError?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type FormSubmissionWriteRequest = {
|
|
33
|
+
formId: string;
|
|
34
|
+
sqlFormId?: number;
|
|
35
|
+
type?: string;
|
|
36
|
+
pageSource?: string;
|
|
37
|
+
currentPageName?: string;
|
|
38
|
+
formFields: Record<string, unknown>;
|
|
39
|
+
snapshotJobData?: Record<string, unknown>;
|
|
40
|
+
};
|
|
41
|
+
|
|
17
42
|
export type SubmissionApproval = {
|
|
18
43
|
ruleId: string;
|
|
19
44
|
ruleName: string;
|
|
@@ -45,6 +70,7 @@ export enum FormSubmissionStatus {
|
|
|
45
70
|
Failed = 5,
|
|
46
71
|
Blacklisted = 6,
|
|
47
72
|
PendingApproval = 7,
|
|
73
|
+
Partial = 8,
|
|
48
74
|
}
|
|
49
75
|
|
|
50
76
|
export default FormSubmission;
|
|
@@ -7,6 +7,39 @@ export enum FeedHandlingOption {
|
|
|
7
7
|
Custom = 2,
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
export type ListingEntityCustomFieldType =
|
|
11
|
+
| "text"
|
|
12
|
+
| "textarea"
|
|
13
|
+
| "number"
|
|
14
|
+
| "url"
|
|
15
|
+
| "date"
|
|
16
|
+
| "datetime"
|
|
17
|
+
| "checkbox"
|
|
18
|
+
| "image";
|
|
19
|
+
|
|
20
|
+
export type ListingEntityCustomFieldDefinition = {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
type: ListingEntityCustomFieldType;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
allowMultiple?: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type ListingEntityFieldCollection = {
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
allowMultiple?: boolean;
|
|
33
|
+
fields: ListingEntityCustomFieldDefinition[];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type EntityCmsSyncSettings = {
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
targetModelId?: string;
|
|
39
|
+
publishMode: "draft";
|
|
40
|
+
deactivationBehavior: "flag" | "unpublish" | "archive";
|
|
41
|
+
};
|
|
42
|
+
|
|
10
43
|
export type JobListingSettings = {
|
|
11
44
|
id: string;
|
|
12
45
|
companyId: string;
|
|
@@ -16,6 +49,8 @@ export type JobListingSettings = {
|
|
|
16
49
|
syncEnabled: boolean;
|
|
17
50
|
defaultStatus?: string;
|
|
18
51
|
defaultFieldValues?: Record<string, string | number | boolean | null>;
|
|
52
|
+
entityFieldCollections?: ListingEntityFieldCollection[];
|
|
53
|
+
entityCmsSync?: EntityCmsSyncSettings;
|
|
19
54
|
lastUpdated: string;
|
|
20
55
|
notifications: NotificationSettings;
|
|
21
56
|
auditTrail?: AuditTrailEntry[];
|
package/types/listing.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { Address } from "./company";
|
|
2
2
|
import ListingEntityMedia from "./listingEntityMedia";
|
|
3
3
|
|
|
4
|
+
export type ListingEntityCustomFieldValue =
|
|
5
|
+
string | null | Array<string | null>;
|
|
6
|
+
|
|
7
|
+
export type ListingEntityCustomFieldObject = Record<
|
|
8
|
+
string,
|
|
9
|
+
ListingEntityCustomFieldValue
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type ListingEntityCustomFieldValues = Record<
|
|
13
|
+
string,
|
|
14
|
+
ListingEntityCustomFieldObject | ListingEntityCustomFieldObject[] | null
|
|
15
|
+
>;
|
|
16
|
+
|
|
4
17
|
export type mongoListingEntity = {
|
|
5
18
|
id: string;
|
|
6
19
|
listingId: number;
|
|
@@ -22,6 +35,7 @@ export type mongoListingEntity = {
|
|
|
22
35
|
communityJson?: string;
|
|
23
36
|
communityHtml?: string;
|
|
24
37
|
communityPlainText?: string;
|
|
38
|
+
customFields?: ListingEntityCustomFieldValues;
|
|
25
39
|
comapnyId?: string;
|
|
26
40
|
DateAdded?: Date | null;
|
|
27
41
|
DateCreated?: Date | null;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export type UserCompanyAccessUpdate = {
|
|
2
|
+
companyId: string;
|
|
3
|
+
isAssigned: boolean;
|
|
4
|
+
roleIds: string[];
|
|
5
|
+
permissions: string[];
|
|
6
|
+
};
|
|
7
|
+
|
|
1
8
|
export type UserAccessRole = {
|
|
2
9
|
roleId: string;
|
|
3
10
|
roleName: string;
|
|
@@ -18,10 +25,3 @@ export type UserCompanyAccessResponse = {
|
|
|
18
25
|
globalRoles: UserAccessRole[];
|
|
19
26
|
assignedGlobalRoleIds: string[];
|
|
20
27
|
};
|
|
21
|
-
|
|
22
|
-
export type UserCompanyAccessUpdate = {
|
|
23
|
-
companyId: string;
|
|
24
|
-
isAssigned: boolean;
|
|
25
|
-
roleIds: string[];
|
|
26
|
-
permissions: string[];
|
|
27
|
-
};
|
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* text=auto eol=lf
|
|
@@ -1,13 +0,0 @@
|
|
|
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,59 +0,0 @@
|
|
|
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
|
-
};
|