@mindkey/recruiting-api-client 7.8.10 → 7.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- var $=Object.defineProperty,x=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var P=(a,e,t)=>e in a?$(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,s=(a,e)=>{for(var t in e||={})B.call(e,t)&&P(a,t,e[t]);if(k)for(var t of k(e))C.call(e,t)&&P(a,t,e[t]);return a},p=(a,e)=>x(a,U(e));var d=class extends Error{constructor(e,t){super(t),this.response=e}get status(){return this.response.status}};function l(a,e){return`${a}/${encodeURIComponent(e)}`}function o(a){return{"X-MindKey-User-Language":a}}var c={async get(a,e){return await c.sendRequest(a,"GET",e)},async post(a,e,t){return await c.sendRequest(a,"POST",t,e)},async put(a,e,t){return await c.sendRequest(a,"GET",t,e)},async delete(a,e,t){return await c.sendRequest(a,"GET",t,e)},async sendRequest(a,e,t,r){let n=await fetch(a,{method:e,headers:t,body:b(r)}),i="";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${a}: ${n.status} ${n.statusText}`}throw new d(n,i)}return i||(i="{}"),JSON.parse(i)}};function b(a){if(a)return typeof Blob<"u"&&a instanceof Blob||typeof ArrayBuffer<"u"&&a instanceof ArrayBuffer||typeof FormData<"u"&&a instanceof FormData||typeof URLSearchParams<"u"&&a instanceof URLSearchParams?a:JSON.stringify(a)}function w(){return{"Content-Type":"application/json"}}var g=class{constructor(e,t=c){this.basePath=e,this.backend=t}getJobAgentConfiguration(e,t){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(t)))}getJobAgentType(e,t,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(t)))}getJobAgent(e,t,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(t)))}createJobAgent(e,t,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(t)))}updateJobAgent(e,t,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(t)))}deleteJobAgent(e,t,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/${i}`,{code:n,jobAgentId:r},s({},this.getDefaultPostHeaders(t)))}resendEmail(e,t,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(t)))}activate(e,t,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(t)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),w())}};var h=class{constructor(e,t=c){this.baseUrl=e,this.backend=t}getLookups(e,t){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(t)))}};var m=function(a){return a.All="All",a.External="External",a.Internal="Internal",a}(m||{});var L=(a,e,t)=>{let r=t?t[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case"boolean":a.set(n,r?"true":"false");break;case"string":a.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},y=(a,e)=>{if(e)for(let t of Object.keys(e))L(a,t,e)};var f=class{constructor(e,t=c){this.baseUrl=e,this.backend=t}getApplicationFormType(e,t,r="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(t)))}getVacancyListConfiguration(e,t){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(t)))}async getVacancyList(e,t,r){let n=new URL(this.getVacancyListPath(e));return y(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(t)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,t,r){let n=new URL(this.getSimpleVacancyListPath(e));return y(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(t)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,t){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(t)))}async getVacancyDetails(e,t,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(t)}`);y(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,t,r,n,i){let u=new FormData;return n.forEach(D=>u.append("attachments",D)),i&&u.set("image",i),u.set("candidate",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(t)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return p(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return p(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return p(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return p(s({},e),{access:e?.access??m.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};window.mindkey=window.mindkey||{};window.mindkey.apiClient=window.mindkey.apiClient||{};window.mindkey.apiClient.HttpError=d;window.mindkey.apiClient.JobAgentClient=g;window.mindkey.apiClient.VacancyClient=f;window.mindkey.apiClient.LookupClient=h;
1
+ var w=Object.defineProperty,x=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var P=(a,e,t)=>e in a?w(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,s=(a,e)=>{for(var t in e||={})B.call(e,t)&&P(a,t,e[t]);if(k)for(var t of k(e))C.call(e,t)&&P(a,t,e[t]);return a},p=(a,e)=>x(a,U(e));var d=class extends Error{constructor(e,t){super(t),this.response=e}get status(){return this.response.status}};function l(a,e){return`${a}/${encodeURIComponent(e)}`}function o(a){return{"X-MindKey-User-Language":a}}var c={async get(a,e){return await c.sendRequest(a,"GET",e)},async post(a,e,t){return await c.sendRequest(a,"POST",t,e)},async put(a,e,t){return await c.sendRequest(a,"PUT",t,e)},async delete(a,e,t){return await c.sendRequest(a,"DELETE",t,e)},async sendRequest(a,e,t,r){let n=await fetch(a,{method:e,headers:t,body:b(r)}),i="";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${a}: ${n.status} ${n.statusText}`}throw new d(n,i)}return i||(i="{}"),JSON.parse(i)}};function b(a){if(a)return typeof Blob<"u"&&a instanceof Blob||typeof ArrayBuffer<"u"&&a instanceof ArrayBuffer||typeof FormData<"u"&&a instanceof FormData||typeof URLSearchParams<"u"&&a instanceof URLSearchParams?a:JSON.stringify(a)}function D(){return{"Content-Type":"application/json"}}var g=class{constructor(e,t=c){this.basePath=e,this.backend=t}getJobAgentConfiguration(e,t){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(t)))}getJobAgentType(e,t,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(t)))}getJobAgent(e,t,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(t)))}createJobAgent(e,t,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(t)))}updateJobAgent(e,t,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(t)))}deleteJobAgent(e,t,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/delete/${i}?jobAgentId=${r}&code=${n}`,null,s({},this.getDefaultPostHeaders(t)))}resendEmail(e,t,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(t)))}activate(e,t,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(t)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),D())}};var h=class{constructor(e,t=c){this.baseUrl=e,this.backend=t}getLookups(e,t){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(t)))}};var m=function(a){return a.All="All",a.External="External",a.Internal="Internal",a}(m||{});var L=(a,e,t)=>{let r=t?t[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case"boolean":a.set(n,r?"true":"false");break;case"string":a.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},y=(a,e)=>{if(e)for(let t of Object.keys(e))L(a,t,e)};var f=class{constructor(e,t=c){this.baseUrl=e,this.backend=t}getApplicationFormType(e,t,r="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(t)))}getVacancyListConfiguration(e,t){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(t)))}async getVacancyList(e,t,r){let n=new URL(this.getVacancyListPath(e));return y(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(t)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,t,r){let n=new URL(this.getSimpleVacancyListPath(e));return y(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(t)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,t){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(t)))}async getVacancyDetails(e,t,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(t)}`);y(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,t,r,n,i){let u=new FormData;return n.forEach($=>u.append("attachments",$)),i&&u.set("image",i),u.set("candidate",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(t)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return p(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return p(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return p(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return p(s({},e),{access:e?.access??m.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};window.mindkey=window.mindkey||{};window.mindkey.apiClient=window.mindkey.apiClient||{};window.mindkey.apiClient.HttpError=d;window.mindkey.apiClient.JobAgentClient=g;window.mindkey.apiClient.VacancyClient=f;window.mindkey.apiClient.LookupClient=h;
2
2
 
@@ -1 +1 @@
1
- {"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n constructor(\n readonly response: Response,\n message: string,\n ) {\n super(message);\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n code,\n jobAgentId,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA,CAAQ,CAChD,CCCM,IAAOC,EAAP,cAAyBC,KAAK,CAChCC,YACaC,EACTC,EAA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AEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,mBACnD,CAEQ6C,iBAAiB7C,EAAkB,CACvC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQuB,yBAAyBvB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQ+D,qBAAqB/D,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client-global.js"}
1
+ {"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n constructor(\n readonly response: Response,\n message: string,\n ) {\n super(message);\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'PUT', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'DELETE', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(`${this.getBaseUrl(customerId)}/delete/${type}?jobAgentId=${jobAgentId}&code=${code}`, null, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAg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WC,QAAQ,EACnE,CAEQhC,YAAY9B,EAAkB,CAClC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,mBACnD,CAEQ6C,iBAAiB7C,EAAkB,CACvC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQuB,yBAAyBvB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQ+D,qBAAqB/D,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client-global.js"}
package/api-client.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var V=Object.defineProperty,S=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:true,configurable:true,writable:true,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},p=(t,e)=>S(t,E(e));function l(t,e){return `${t}/${encodeURIComponent(e)}`}function o(t){return {"X-MindKey-User-Language":t}}var d=class extends Error{constructor(e,a){super(a),this.response=e;}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,"GET",e)},async post(t,e,a){return await c.sendRequest(t,"POST",a,e)},async put(t,e,a){return await c.sendRequest(t,"GET",a,e)},async delete(t,e,a){return await c.sendRequest(t,"GET",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i="";if(n.ok)i=await n.text();else {try{i=await n.text();}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`;}throw new d(n,i)}return i||(i="{}"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<"u"&&t instanceof Blob||typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof URLSearchParams<"u"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function k(){return {"Content-Type":"application/json"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a;}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/${i}`,{code:n,jobAgentId:r},s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return `${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),k())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a;}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var D=function(t){return t.Other="Other",t.Application="Application",t.Resume="Resume",t}(D||{});var $=function(t){return t.Show="Show",t.Hide="Hide",t.Sidebar="Sidebar",t}($||{});var g=function(t){return t.All="All",t.External="External",t.Internal="Internal",t}(g||{}),B=function(t){return t.Hide="Hide",t.Only="Only",t.Bottom="Bottom",t.Top="Top",t}(B||{});var U=function(t){return t.Description="Description",t.StartDate="StartDate",t.EndDate="EndDate",t.Priority="Priority",t}(U||{});var O=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case "boolean":t.set(n,r?"true":"false");break;case "string":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))O(t,a,e);};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a;}getApplicationFormType(e,a,r="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append("attachments",L)),i&&u.set("image",i),u.set("candidate",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return p(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return p(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return p(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return p(s({},e),{access:e?.access??g.External})}getBasePath(e){return `${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return `${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return `${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return `${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return `${this.getBasePath(e)}/simple`}getConfigurationPath(e){return `${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return `${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return `${this.getConfigurationPath(e)}/details`}};
3
+ var V=Object.defineProperty,E=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:true,configurable:true,writable:true,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},d=(t,e)=>E(t,S(e));function l(t,e){return `${t}/${encodeURIComponent(e)}`}function o(t){return {"X-MindKey-User-Language":t}}var p=class extends Error{constructor(e,a){super(a),this.response=e;}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,"GET",e)},async post(t,e,a){return await c.sendRequest(t,"POST",a,e)},async put(t,e,a){return await c.sendRequest(t,"PUT",a,e)},async delete(t,e,a){return await c.sendRequest(t,"DELETE",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i="";if(n.ok)i=await n.text();else {try{i=await n.text();}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`;}throw new p(n,i)}return i||(i="{}"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<"u"&&t instanceof Blob||typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof URLSearchParams<"u"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function D(){return {"Content-Type":"application/json"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a;}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/delete/${i}?jobAgentId=${r}&code=${n}`,null,s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return `${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),D())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a;}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var $=function(t){return t.Other="Other",t.Application="Application",t.Resume="Resume",t}($||{});var k=function(t){return t.Show="Show",t.Hide="Hide",t.Sidebar="Sidebar",t}(k||{});var g=function(t){return t.All="All",t.External="External",t.Internal="Internal",t}(g||{}),B=function(t){return t.Hide="Hide",t.Only="Only",t.Bottom="Bottom",t.Top="Top",t}(B||{});var U=function(t){return t.Description="Description",t.StartDate="StartDate",t.EndDate="EndDate",t.Priority="Priority",t}(U||{});var A=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case "boolean":t.set(n,r?"true":"false");break;case "string":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))A(t,a,e);};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a;}getApplicationFormType(e,a,r="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append("attachments",L)),i&&u.set("image",i),u.set("candidate",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return d(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return d(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return d(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return d(s({},e),{access:e?.access??g.External})}getBasePath(e){return `${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return `${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return `${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return `${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return `${this.getBasePath(e)}/simple`}getConfigurationPath(e){return `${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return `${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return `${this.getConfigurationPath(e)}/details`}};
4
4
 
5
5
  exports.AccessType = g;
6
- exports.AttachmentType = D;
7
- exports.DataPlacement = $;
8
- exports.HttpError = d;
6
+ exports.AttachmentType = $;
7
+ exports.DataPlacement = k;
8
+ exports.HttpError = p;
9
9
  exports.JobAgentClient = m;
10
10
  exports.LookupClient = y;
11
11
  exports.SortFieldType = U;
package/api-client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sources":["api-client.mjs"],"sourcesContent":["var V=Object.defineProperty,S=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},p=(t,e)=>S(t,E(e));function l(t,e){return`${t}/${encodeURIComponent(e)}`}function o(t){return{\"X-MindKey-User-Language\":t}}var d=class extends Error{constructor(e,a){super(a),this.response=e}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,\"GET\",e)},async post(t,e,a){return await c.sendRequest(t,\"POST\",a,e)},async put(t,e,a){return await c.sendRequest(t,\"GET\",a,e)},async delete(t,e,a){return await c.sendRequest(t,\"GET\",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i=\"\";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`}throw new d(n,i)}return i||(i=\"{}\"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<\"u\"&&t instanceof Blob||typeof ArrayBuffer<\"u\"&&t instanceof ArrayBuffer||typeof FormData<\"u\"&&t instanceof FormData||typeof URLSearchParams<\"u\"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function k(){return{\"Content-Type\":\"application/json\"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/${i}`,{code:n,jobAgentId:r},s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),k())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var D=function(t){return t.Other=\"Other\",t.Application=\"Application\",t.Resume=\"Resume\",t}(D||{});var $=function(t){return t.Show=\"Show\",t.Hide=\"Hide\",t.Sidebar=\"Sidebar\",t}($||{});var g=function(t){return t.All=\"All\",t.External=\"External\",t.Internal=\"Internal\",t}(g||{}),B=function(t){return t.Hide=\"Hide\",t.Only=\"Only\",t.Bottom=\"Bottom\",t.Top=\"Top\",t}(B||{});var U=function(t){return t.Description=\"Description\",t.StartDate=\"StartDate\",t.EndDate=\"EndDate\",t.Priority=\"Priority\",t}(U||{});var O=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case\"boolean\":t.set(n,r?\"true\":\"false\");break;case\"string\":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))O(t,a,e)};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getApplicationFormType(e,a,r=\"Standard\"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append(\"attachments\",L)),i&&u.set(\"image\",i),u.set(\"candidate\",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return p(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return p(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return p(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return p(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};export{g as AccessType,D as AttachmentType,$ as DataPlacement,d as HttpError,m as JobAgentClient,y as LookupClient,U as SortFieldType,B as UnsolicitedType,P as VacancyClient,f as convertToBodyInit,c as fetchBackend};\n\n//# sourceMappingURL=api-client.mjs.map\n"],"names":[],"mappings":";;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAA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AS,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"api-client.js","sources":["api-client.mjs"],"sourcesContent":["var V=Object.defineProperty,E=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},d=(t,e)=>E(t,S(e));function l(t,e){return`${t}/${encodeURIComponent(e)}`}function o(t){return{\"X-MindKey-User-Language\":t}}var p=class extends Error{constructor(e,a){super(a),this.response=e}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,\"GET\",e)},async post(t,e,a){return await c.sendRequest(t,\"POST\",a,e)},async put(t,e,a){return await c.sendRequest(t,\"PUT\",a,e)},async delete(t,e,a){return await c.sendRequest(t,\"DELETE\",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i=\"\";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`}throw new p(n,i)}return i||(i=\"{}\"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<\"u\"&&t instanceof Blob||typeof ArrayBuffer<\"u\"&&t instanceof ArrayBuffer||typeof FormData<\"u\"&&t instanceof FormData||typeof URLSearchParams<\"u\"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function D(){return{\"Content-Type\":\"application/json\"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/delete/${i}?jobAgentId=${r}&code=${n}`,null,s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),D())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var $=function(t){return t.Other=\"Other\",t.Application=\"Application\",t.Resume=\"Resume\",t}($||{});var k=function(t){return t.Show=\"Show\",t.Hide=\"Hide\",t.Sidebar=\"Sidebar\",t}(k||{});var g=function(t){return t.All=\"All\",t.External=\"External\",t.Internal=\"Internal\",t}(g||{}),B=function(t){return t.Hide=\"Hide\",t.Only=\"Only\",t.Bottom=\"Bottom\",t.Top=\"Top\",t}(B||{});var U=function(t){return t.Description=\"Description\",t.StartDate=\"StartDate\",t.EndDate=\"EndDate\",t.Priority=\"Priority\",t}(U||{});var A=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case\"boolean\":t.set(n,r?\"true\":\"false\");break;case\"string\":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))A(t,a,e)};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getApplicationFormType(e,a,r=\"Standard\"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append(\"attachments\",L)),i&&u.set(\"image\",i),u.set(\"candidate\",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return d(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return d(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return d(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return d(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};export{g as AccessType,$ as AttachmentType,k as DataPlacement,p as HttpError,m as JobAgentClient,y as LookupClient,U as SortFieldType,B as UnsolicitedType,P as VacancyClient,f as convertToBodyInit,c as fetchBackend};\n\n//# sourceMappingURL=api-client.mjs.map\n"],"names":[],"mappings":";;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI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,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;"}
package/api-client.mjs CHANGED
@@ -1,3 +1,3 @@
1
- var V=Object.defineProperty,S=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},p=(t,e)=>S(t,E(e));function l(t,e){return`${t}/${encodeURIComponent(e)}`}function o(t){return{"X-MindKey-User-Language":t}}var d=class extends Error{constructor(e,a){super(a),this.response=e}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,"GET",e)},async post(t,e,a){return await c.sendRequest(t,"POST",a,e)},async put(t,e,a){return await c.sendRequest(t,"GET",a,e)},async delete(t,e,a){return await c.sendRequest(t,"GET",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i="";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`}throw new d(n,i)}return i||(i="{}"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<"u"&&t instanceof Blob||typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof URLSearchParams<"u"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function k(){return{"Content-Type":"application/json"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/${i}`,{code:n,jobAgentId:r},s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),k())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var D=function(t){return t.Other="Other",t.Application="Application",t.Resume="Resume",t}(D||{});var $=function(t){return t.Show="Show",t.Hide="Hide",t.Sidebar="Sidebar",t}($||{});var g=function(t){return t.All="All",t.External="External",t.Internal="Internal",t}(g||{}),B=function(t){return t.Hide="Hide",t.Only="Only",t.Bottom="Bottom",t.Top="Top",t}(B||{});var U=function(t){return t.Description="Description",t.StartDate="StartDate",t.EndDate="EndDate",t.Priority="Priority",t}(U||{});var O=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case"boolean":t.set(n,r?"true":"false");break;case"string":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))O(t,a,e)};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getApplicationFormType(e,a,r="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append("attachments",L)),i&&u.set("image",i),u.set("candidate",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return p(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return p(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return p(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return p(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};export{g as AccessType,D as AttachmentType,$ as DataPlacement,d as HttpError,m as JobAgentClient,y as LookupClient,U as SortFieldType,B as UnsolicitedType,P as VacancyClient,f as convertToBodyInit,c as fetchBackend};
1
+ var V=Object.defineProperty,E=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},d=(t,e)=>E(t,S(e));function l(t,e){return`${t}/${encodeURIComponent(e)}`}function o(t){return{"X-MindKey-User-Language":t}}var p=class extends Error{constructor(e,a){super(a),this.response=e}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,"GET",e)},async post(t,e,a){return await c.sendRequest(t,"POST",a,e)},async put(t,e,a){return await c.sendRequest(t,"PUT",a,e)},async delete(t,e,a){return await c.sendRequest(t,"DELETE",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i="";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`}throw new p(n,i)}return i||(i="{}"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<"u"&&t instanceof Blob||typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof URLSearchParams<"u"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function D(){return{"Content-Type":"application/json"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/delete/${i}?jobAgentId=${r}&code=${n}`,null,s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),D())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var $=function(t){return t.Other="Other",t.Application="Application",t.Resume="Resume",t}($||{});var k=function(t){return t.Show="Show",t.Hide="Hide",t.Sidebar="Sidebar",t}(k||{});var g=function(t){return t.All="All",t.External="External",t.Internal="Internal",t}(g||{}),B=function(t){return t.Hide="Hide",t.Only="Only",t.Bottom="Bottom",t.Top="Top",t}(B||{});var U=function(t){return t.Description="Description",t.StartDate="StartDate",t.EndDate="EndDate",t.Priority="Priority",t}(U||{});var A=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case"boolean":t.set(n,r?"true":"false");break;case"string":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))A(t,a,e)};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getApplicationFormType(e,a,r="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append("attachments",L)),i&&u.set("image",i),u.set("candidate",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return d(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return d(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return d(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return d(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};export{g as AccessType,$ as AttachmentType,k as DataPlacement,p as HttpError,m as JobAgentClient,y as LookupClient,U as SortFieldType,B as UnsolicitedType,P as VacancyClient,f as convertToBodyInit,c as fetchBackend};
2
2
 
3
3
  //# sourceMappingURL=api-client.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n constructor(\n readonly response: Response,\n message: string,\n ) {\n super(message);\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n code,\n jobAgentId,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA,CAAQ,CAChD,CCCM,IAAOC,EAAP,cAAyBC,KAAK,CAChCC,YACaC,EACTC,EAAe,CAEf,MAAMA,CAAO,EAHJ,KAAAD,SAAAA,CAIb,CAEA,IAAIE,QAAM,CACN,OAAO,KAAKF,SAASE,MACzB,GCCG,IAAMC,EAA4B,CACrC,MAAMC,IAAOC,EAAaC,EAA+B,CACrD,OAAO,MAAMH,EAAaI,YAAYF,EAAK,MAAOC,CAAO,CAC7D,EACA,M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,YAAY9B,CAAU,CAAC,WAC1C,CAEQuB,yBAAyBvB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQ+D,qBAAqB/D,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client.mjs"}
1
+ {"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n constructor(\n readonly response: Response,\n message: string,\n ) {\n super(message);\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'PUT', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'DELETE', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(`${this.getBaseUrl(customerId)}/delete/${type}?jobAgentId=${jobAgentId}&code=${code}`, null, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA,CAAQ,CAChD,CCCM,IAAOC,EAAP,cAAyBC,KAAK,CAChCC,YACaC,EACTC,EAAe,CAEf,MAAMA,CAAO,EAHJ,KAAAD,SAAAA,CAIb,CAEA,IAAIE,QAAM,CACN,OAAO,KAAKF,SAASE,MACzB,GCCG,IAAMC,EAA4B,C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AAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQuB,yBAAyBvB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQ+D,qBAAqB/D,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client.mjs"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@mindkey/recruiting-api-client","description":"The MindKey API Client allows easy access to your MindKey Recruiting data.","author":"Manuel Rauber <mra@mindkey.com> (https://mindkey.com)","homepage":"https://mindkey.com","version":"7.8.10","main":"api-client.js","module":"api-client.mjs","typings":"index.d.ts","license":"MIT","keywords":["mindkey","recruiting","api","human resource"]}
1
+ {"name":"@mindkey/recruiting-api-client","description":"The MindKey API Client allows easy access to your MindKey Recruiting data.","author":"Manuel Rauber <mra@mindkey.com> (https://mindkey.com)","homepage":"https://mindkey.com","version":"7.8.12","main":"api-client.js","module":"api-client.mjs","typings":"index.d.ts","license":"MIT","keywords":["mindkey","recruiting","api","human resource"]}