@mindkey/recruiting-api-client 7.4.6 → 7.4.7

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 H=Object.defineProperty,S=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var R=(r,t,e)=>t in r?H(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,s=(r,t)=>{for(var e in t||={})q.call(t,e)&&R(r,e,t[e]);if(B)for(var e of B(t))A.call(t,e)&&R(r,e,t[e]);return r},L=(r,t)=>S(r,k(t));var l=(r,t,e)=>new Promise((a,n)=>{var o=f=>{try{h(e.next(f))}catch(C){n(C)}},p=f=>{try{h(e.throw(f))}catch(C){n(C)}},h=f=>f.done?a(f.value):Promise.resolve(f.value).then(o,p);h((e=e.apply(r,t)).next())});var g=class{constructor(t,e){this.response=t,this.message=e}get status(){return this.response.status}};function c(r,t){return`${r}/${encodeURIComponent(t)}`}function i(r){return{"X-MindKey-User-Language":r}}function $(r,t,e,a){return l(this,null,function*(){let n=yield fetch(r,{method:t,headers:e,body:V(a)});if(!n.ok){let o="";try{o=yield n.text()}catch{o=`Http failure response for ${r}: ${n.status} ${n.statusText}`}throw new g(n,o)}try{let o=yield n.text();return o||(o="{}"),JSON.parse(o)}catch{throw new g(n,`Http failure during parsing for ${r}`)}})}function V(r){if(r)return typeof Blob<"u"&&r instanceof Blob||typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer||typeof FormData<"u"&&r instanceof FormData||typeof URLSearchParams<"u"&&r instanceof URLSearchParams?r:JSON.stringify(r)}function u(r,t){return l(this,null,function*(){return yield $(r,"GET",t)})}function d(r,t,e){return l(this,null,function*(){return yield $(r,"POST",e,t)})}function U(r,t,e){return l(this,null,function*(){return yield $(r,"PUT",e,t)})}function D(r,t,e){return l(this,null,function*(){return yield $(r,"DELETE",e,t)})}function b(){return{"Content-Type":"application/json"}}var m=class{constructor(t){this.basePath=t}getJobAgentConfiguration(t,e){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(e)))}getJobAgentType(t,e,a){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(a)}`,s({},i(e)))}getJobAgent(t,e,a,n,o){return d(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:a,code:n},s({},this.getDefaultPostHeaders(e)))}createJobAgent(t,e,a,n){return d(`${this.getBaseUrl(t)}/create/${n}`,a,s({},this.getDefaultPostHeaders(e)))}updateJobAgent(t,e,a,n){return U(`${this.getBaseUrl(t)}/${n}`,a,s({},this.getDefaultPostHeaders(e)))}deleteJobAgent(t,e,a,n,o){return D(`${this.getBaseUrl(t)}/${o}`,{code:n,jobAgentId:a},s({},this.getDefaultPostHeaders(e)))}resendEmail(t,e,a,n){return d(`${this.getBaseUrl(t)}/resend-email/${n}`,a,s({},this.getDefaultPostHeaders(e)))}activate(t,e,a,n){return d(`${this.getBaseUrl(t)}/activate/${n}`,a,s({},this.getDefaultPostHeaders(e)))}getBaseUrl(t){return`${c(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),b())}};var y=class{constructor(t){this.baseUrl=t}getLookups(t,e){return u(`${c(this.baseUrl,t)}/candidates/lookup`,s({},i(e)))}};var w=function(r){return r.All="all",r.External="external",r.Internal="internal",r}(w||{});var E=(r,t,e)=>{let a=e?e[t]:void 0;if(a===void 0)return;let n=String(t);switch(typeof a){case"boolean":r.set(n,a?"true":"false");break;case"string":r.set(n,a);break;default:throw new Error(`${typeof a} is not implemented yet.`)}},x=(r,t)=>{if(t)for(let e of Object.keys(t))E(r,e,t)};var P=class{constructor(t){this.baseUrl=t}getApplicationFormType(t,e,a="Standard"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(a)}`,s({},i(e)))}getVacancyListConfiguration(t,e){return u(this.getVacancyListConfigurationPath(t),s({},i(e)))}getVacancyList(t,e,a){let n=new URL(this.getVacancyListPath(t));return x(n.searchParams,this.setDefaultFilter(a)),u(n.toString(),s({},i(e)))}getSimpleVacancyList(t,e,a){let n=new URL(this.getSimpleVacancyListPath(t));return x(n.searchParams,this.setDefaultFilter(a)),u(n.toString(),s({},i(e)))}getVacancyDetailsConfiguration(t,e){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(e)))}getVacancyDetails(t,e,a,n){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(e)}`);return x(o.searchParams,n),u(o.toString(),s({},i(a)))}createCandidate(t,e,a,n,o){let p=new FormData;return n.forEach(h=>p.append("attachments",h)),o&&p.set("image",o),p.set("candidate",JSON.stringify(a)),d(`${this.getCandidatePath(t)}`,p,s({},i(e)))}setDefaultFilter(t){return L(s({},t),{access:t?.access??w.External})}getBasePath(t){return`${c(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${c(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${c(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return`${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return`${this.getBasePath(t)}/simple`}getConfigurationPath(t){return`${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return`${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return`${this.getConfigurationPath(t)}/details`}};window.mindkey=window.mindkey||{};window.mindkey.apiClient=window.mindkey.apiClient||{};window.mindkey.apiClient.HttpError=g;window.mindkey.apiClient.JobAgentClient=m;window.mindkey.apiClient.VacancyClient=P;window.mindkey.apiClient.LookupClient=y;
1
+ var H=Object.defineProperty,k=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var R=(r,t,e)=>t in r?H(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,s=(r,t)=>{for(var e in t||={})V.call(t,e)&&R(r,e,t[e]);if(B)for(var e of B(t))q.call(t,e)&&R(r,e,t[e]);return r},D=(r,t)=>k(r,S(t));var g=(r,t,e)=>new Promise((a,n)=>{var o=f=>{try{h(e.next(f))}catch(C){n(C)}},c=f=>{try{h(e.throw(f))}catch(C){n(C)}},h=f=>f.done?a(f.value):Promise.resolve(f.value).then(o,c);h((e=e.apply(r,t)).next())});var d=class{constructor(t,e){this.response=t,this.message=e}get status(){return this.response.status}};function p(r,t){return`${r}/${encodeURIComponent(t)}`}function i(r){return{"X-MindKey-User-Language":r}}function w(r,t,e,a){return g(this,null,function*(){let n=yield fetch(r,{method:t,headers:e,body:E(a)});if(!n.ok){let o="";try{o=yield n.text()}catch{o=`Http failure response for ${r}: ${n.status} ${n.statusText}`}throw new d(n,o)}try{let o=yield n.text();return o||(o="{}"),JSON.parse(o)}catch{throw new d(n,`Http failure during parsing for ${r}`)}})}function E(r){if(r)return typeof Blob<"u"&&r instanceof Blob||typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer||typeof FormData<"u"&&r instanceof FormData||typeof URLSearchParams<"u"&&r instanceof URLSearchParams?r:JSON.stringify(r)}function u(r,t){return g(this,null,function*(){return yield w(r,"GET",t)})}function l(r,t,e){return g(this,null,function*(){return yield w(r,"POST",e,t)})}function U(r,t,e){return g(this,null,function*(){return yield w(r,"PUT",e,t)})}function b(r,t,e){return g(this,null,function*(){return yield w(r,"DELETE",e,t)})}function L(){return{"Content-Type":"application/json"}}var m=class{constructor(t){this.basePath=t}getJobAgentConfiguration(t,e){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(e)))}getJobAgentType(t,e,a){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(a)}`,s({},i(e)))}getJobAgent(t,e,a,n,o){return l(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:a,code:n},s({},this.getDefaultPostHeaders(e)))}createJobAgent(t,e,a,n){return l(`${this.getBaseUrl(t)}/create/${n}`,a,s({},this.getDefaultPostHeaders(e)))}updateJobAgent(t,e,a,n){return U(`${this.getBaseUrl(t)}/${n}`,a,s({},this.getDefaultPostHeaders(e)))}deleteJobAgent(t,e,a,n,o){return b(`${this.getBaseUrl(t)}/${o}`,{code:n,jobAgentId:a},s({},this.getDefaultPostHeaders(e)))}resendEmail(t,e,a,n){return l(`${this.getBaseUrl(t)}/resend-email/${n}`,a,s({},this.getDefaultPostHeaders(e)))}activate(t,e,a,n){return l(`${this.getBaseUrl(t)}/activate/${n}`,a,s({},this.getDefaultPostHeaders(e)))}getBaseUrl(t){return`${p(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),L())}};var y=class{constructor(t){this.baseUrl=t}getLookups(t,e){return u(`${p(this.baseUrl,t)}/candidates/lookup`,s({},i(e)))}};var $=function(r){return r.All="all",r.External="external",r.Internal="internal",r}($||{});var A=(r,t,e)=>{let a=e?e[t]:void 0;if(a===void 0)return;let n=String(t);switch(typeof a){case"boolean":r.set(n,a?"true":"false");break;case"string":r.set(n,a);break;default:throw new Error(`${typeof a} is not implemented yet.`)}},x=(r,t)=>{if(t)for(let e of Object.keys(t))A(r,e,t)};var P=class{constructor(t){this.baseUrl=t}getApplicationFormType(t,e,a="Standard"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(a)}`,s({},i(e)))}getVacancyListConfiguration(t,e){return u(this.getVacancyListConfigurationPath(t),s({},i(e)))}getVacancyList(t,e,a){return g(this,null,function*(){let n=new URL(this.getVacancyListPath(t));return x(n.searchParams,this.setDefaultFilter(a)),(yield u(n.toString(),s({},i(e)))).map(c=>this.mapDeprecatedVacancyDetailsFields(c))})}getSimpleVacancyList(t,e,a){let n=new URL(this.getSimpleVacancyListPath(t));return x(n.searchParams,this.setDefaultFilter(a)),u(n.toString(),s({},i(e)))}getVacancyDetailsConfiguration(t,e){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(e)))}getVacancyDetails(t,e,a,n){return g(this,null,function*(){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(e)}`);x(o.searchParams,n);let c=yield u(o.toString(),s({},i(a)));return this.mapDeprecatedVacancyDetailsFields(c)})}createCandidate(t,e,a,n,o){let c=new FormData;return n.forEach(h=>c.append("attachments",h)),o&&c.set("image",o),c.set("candidate",JSON.stringify(a)),l(`${this.getCandidatePath(t)}`,c,s({},i(e)))}mapDeprecatedVacancyDetailsFields(t){return D(s({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}setDefaultFilter(t){return D(s({},t),{access:t?.access??$.External})}getBasePath(t){return`${p(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${p(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${p(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return`${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return`${this.getBasePath(t)}/simple`}getConfigurationPath(t){return`${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return`${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return`${this.getConfigurationPath(t)}/details`}};window.mindkey=window.mindkey||{};window.mindkey.apiClient=window.mindkey.apiClient||{};window.mindkey.apiClient.HttpError=d;window.mindkey.apiClient.JobAgentClient=m;window.mindkey.apiClient.VacancyClient=P;window.mindkey.apiClient.LookupClient=y;
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/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 {\n constructor(\n readonly response: Response,\n readonly message: string,\n ) {}\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nasync function sendRequest<T>(url: string, method: string, headers: HeadersInit, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n if (!response.ok) {\n let body = '';\n try {\n body = await response.text();\n } catch {\n body = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, body);\n }\n\n try {\n let result = await response.text();\n if (!result) {\n result = '{}';\n }\n return JSON.parse(result) as T;\n } catch {\n // Parsing error\n throw new HttpError(response, `Http failure during parsing for ${url}`);\n }\n}\n\nfunction 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\nexport async function sendGetRequest<T>(url: string, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'GET', headers);\n}\n\nexport async function sendPostRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'POST', headers, body);\n}\n\nexport async function sendPutRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'PUT', headers, body);\n}\n\nexport async function sendDeleteRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'DELETE', headers, 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 { getBasePath, getUserLanguageHeader, sendDeleteRequest, sendGetRequest, sendPostRequest, sendPutRequest } 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(private readonly basePath: string) {}\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 sendGetRequest(`${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 sendGetRequest(`${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 sendPostRequest(\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 sendPostRequest(`${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 sendPutRequest(`${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 sendDeleteRequest(\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 sendPostRequest(`${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 sendPostRequest(`${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): { [header: string]: string } {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { getBasePath, getUserLanguageHeader, sendGetRequest } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(private readonly baseUrl: string) {}\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 sendGetRequest(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\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 showStartDate?: DataPlacement;\n showEndDate?: DataPlacement;\n showVacancyType?: DataPlacement;\n showContactPersonName?: DataPlacement;\n showContactPersonWorkPhone?: DataPlacement;\n showContactPersonMobilePhone?: DataPlacement;\n showContactPersonEmail?: DataPlacement;\n showPositionStartDate?: DataPlacement;\n showEmploymentCategoryName?: DataPlacement;\n showOrganizationName?: DataPlacement;\n showLocations?: DataPlacement;\n showRegions?: DataPlacement;\n showTeaser?: DataPlacement;\n showCompanyName?: DataPlacement;\n showCompanyAddress?: DataPlacement;\n showLongDate?: 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 includeAdvertisementText?: boolean;\n perDate?: string;\n vacancyTypeId?: string;\n regionName?: string;\n locationId?: string;\n vacancyAreaName?: string;\n unsolicited?: UnsolicitedType;\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 showStartDate?: boolean;\n showEndDate?: boolean;\n showLongDate?: boolean;\n showTeaserText?: boolean;\n showLocations?: boolean;\n showRegions?: boolean;\n showAreas?: boolean;\n sortField?: SortFieldType;\n sortDescending?: boolean;\n showFilters?: boolean;\n showApplyLink?: 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 showEmptyMessage: 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 { getBasePath, getUserLanguageHeader, sendGetRequest, sendPostRequest } 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(private readonly baseUrl: string) {}\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 sendGetRequest(`${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 sendGetRequest(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a 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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 sendGetRequest(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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 sendPostRequest(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\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":"unBAAM,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,E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EACnE,CAEQnB,YAAY1B,EAAkB,CAClC,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,CAAC,mBACnD,CAEQwC,iBAAiBxC,EAAkB,CACvC,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,CAAC,WAC1C,CAEQoB,yBAAyBpB,EAAkB,CAC/C,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,CAAC,SAC1C,CAEQ8C,qBAAqB9C,EAAkB,CAC3C,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,CAAC,OACnD,CAEQsB,mCAAmCtB,EAAkB,CACzD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","constructor","response","message","status","sendRequest","url","method","headers","body","__async","response","fetch","convertToBodyInit","ok","text","status","statusText","HttpError","result","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","sendGetRequest","sendPostRequest","sendPutRequest","sendDeleteRequest","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","getJobAgentConfiguration","customerId","language","sendGetRequest","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","sendPostRequest","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","sendPutRequest","deleteJobAgent","sendDeleteRequest","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","getLookups","customerId","language","sendGetRequest","getBasePath","__spreadValues","getUserLanguageHeader","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","getApplicationFormType","customerId","language","applicationFormType","sendGetRequest","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","getSimpleVacancyList","getSimpleVacancyListPath","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","sendPostRequest","getCandidatePath","input","__spreadProps","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/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 {\n constructor(\n readonly response: Response,\n readonly message: string,\n ) {}\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nasync function sendRequest<T>(url: string, method: string, headers: HeadersInit, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n if (!response.ok) {\n let body = '';\n try {\n body = await response.text();\n } catch {\n body = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, body);\n }\n\n try {\n let result = await response.text();\n if (!result) {\n result = '{}';\n }\n return JSON.parse(result) as T;\n } catch {\n // Parsing error\n throw new HttpError(response, `Http failure during parsing for ${url}`);\n }\n}\n\nfunction 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\nexport async function sendGetRequest<T>(url: string, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'GET', headers);\n}\n\nexport async function sendPostRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'POST', headers, body);\n}\n\nexport async function sendPutRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'PUT', headers, body);\n}\n\nexport async function sendDeleteRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'DELETE', headers, 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 { getBasePath, getUserLanguageHeader, sendDeleteRequest, sendGetRequest, sendPostRequest, sendPutRequest } 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(private readonly basePath: string) {}\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 sendGetRequest(`${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 sendGetRequest(`${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 sendPostRequest(\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 sendPostRequest(`${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 sendPutRequest(`${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 sendDeleteRequest(\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 sendPostRequest(`${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 sendPostRequest(`${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): { [header: string]: string } {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { getBasePath, getUserLanguageHeader, sendGetRequest } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(private readonly baseUrl: string) {}\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 sendGetRequest(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\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 * @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 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 * 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/**\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 showEmptyMessage: 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 { getBasePath, getUserLanguageHeader, sendGetRequest, sendPostRequest } 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(private readonly baseUrl: string) {}\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 sendGetRequest(`${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 sendGetRequest(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 sendGetRequest<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.mapDeprecatedVacancyDetailsFields(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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 sendGetRequest(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 sendGetRequest<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.mapDeprecatedVacancyDetailsFields(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 sendPostRequest(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line deprecation/deprecation\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\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":"unBAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA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GAAIoC,EAAU9B,EAAA,GAClEC,EAAsBN,CAAQ,EACpC,CACL,CAEQqB,kCAAkCwB,EAAqB,CAE3D,OAAOC,EAAAzC,EAAA,GACAwC,GADA,CAGHE,+BAAgCF,EAAME,gCAAkCF,EAAMG,+BAEtF,CAEQ/B,iBAA+CgC,EAAoB,CACvE,OAAOH,EAAAzC,EAAA,GAAK4C,GAAL,CAAYC,OAAQD,GAAOC,QAAUC,EAAWC,QAAQ,EACnE,CAEQvB,YAAY9B,EAAkB,CAClC,MAAO,GAAG8B,EAAY,KAAKhC,QAASE,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG8B,EAAY,KAAKhC,QAASE,CAAU,CAAC,mBACnD,CAEQ6C,iBAAiB7C,EAAkB,CACvC,MAAO,GAAG8B,EAAY,KAAKhC,QAASE,CAAU,CAAC,aACnD,CAEQe,mBAAmBf,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQwB,yBAAyBxB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQsD,qBAAqBtD,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAKsD,qBAAqBtD,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAKsD,qBAAqBtD,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","constructor","response","message","status","sendRequest","url","method","headers","body","__async","response","fetch","convertToBodyInit","ok","text","status","statusText","HttpError","result","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","sendGetRequest","sendPostRequest","sendPutRequest","sendDeleteRequest","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","getJobAgentConfiguration","customerId","language","sendGetRequest","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","sendPostRequest","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","sendPutRequest","deleteJobAgent","sendDeleteRequest","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","getLookups","customerId","language","sendGetRequest","getBasePath","__spreadValues","getUserLanguageHeader","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","getApplicationFormType","customerId","language","applicationFormType","sendGetRequest","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","__async","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","mapDeprecatedVacancyDetailsFields","getSimpleVacancyList","getSimpleVacancyListPath","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","sendPostRequest","getCandidatePath","model","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client-global.js"}
package/api-client.js CHANGED
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var A=Object.defineProperty,V=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var b=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||={})J.call(t,r)&&b(e,r,t[r]);if(L)for(var r of L(t))F.call(t,r)&&b(e,r,t[r]);return e},w=(e,t)=>V(e,E(t));var p=(e,t,r)=>new Promise((n,a)=>{var o=f=>{try{l(r.next(f));}catch($){a($);}},h=f=>{try{l(r.throw(f));}catch($){a($);}},l=f=>f.done?n(f.value):Promise.resolve(f.value).then(o,h);l((r=r.apply(e,t)).next());});function c(e,t){return `${e}/${encodeURIComponent(t)}`}function i(e){return {"X-MindKey-User-Language":e}}var d=class{constructor(t,r){this.response=t,this.message=r;}get status(){return this.response.status}};function m(e,t,r,n){return p(this,null,function*(){let a=yield fetch(e,{method:t,headers:r,body:T(n)});if(!a.ok){let o="";try{o=yield a.text();}catch{o=`Http failure response for ${e}: ${a.status} ${a.statusText}`;}throw new d(a,o)}try{let o=yield a.text();return o||(o="{}"),JSON.parse(o)}catch{throw new d(a,`Http failure during parsing for ${e}`)}})}function T(e){if(e)return typeof Blob<"u"&&e instanceof Blob||typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof URLSearchParams<"u"&&e instanceof URLSearchParams?e:JSON.stringify(e)}function u(e,t){return p(this,null,function*(){return yield m(e,"GET",t)})}function g(e,t,r){return p(this,null,function*(){return yield m(e,"POST",r,t)})}function x(e,t,r){return p(this,null,function*(){return yield m(e,"PUT",r,t)})}function U(e,t,r){return p(this,null,function*(){return yield m(e,"DELETE",r,t)})}function C(){return {"Content-Type":"application/json"}}var D=class{constructor(t){this.basePath=t;}getJobAgentConfiguration(t,r){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(r)))}getJobAgentType(t,r,n){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,s({},i(r)))}getJobAgent(t,r,n,a,o){return g(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,n,a){return g(`${this.getBaseUrl(t)}/create/${a}`,n,s({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,n,a){return x(`${this.getBaseUrl(t)}/${a}`,n,s({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,n,a,o){return U(`${this.getBaseUrl(t)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,n,a){return g(`${this.getBaseUrl(t)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(r)))}activate(t,r,n,a){return g(`${this.getBaseUrl(t)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return `${c(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),C())}};var B=class{constructor(t){this.baseUrl=t;}getLookups(t,r){return u(`${c(this.baseUrl,t)}/candidates/lookup`,s({},i(r)))}};var H=function(e){return e.Show="Show",e.Hide="Hide",e.Sidebar="Sidebar",e}(H||{});var P=function(e){return e.All="all",e.External="external",e.Internal="internal",e}(P||{}),S=function(e){return e.Hide="hide",e.Only="only",e.Bottom="bottom",e.Top="top",e}(S||{});var q=function(e){return e.Description="description",e.StartDate="startDate",e.EndDate="endDate",e.Priority="priority",e}(q||{});var v=(e,t,r)=>{let n=r?r[t]:void 0;if(n===void 0)return;let a=String(t);switch(typeof n){case"boolean":e.set(a,n?"true":"false");break;case"string":e.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},y=(e,t)=>{if(t)for(let r of Object.keys(t))v(e,r,t);};var R=class{constructor(t){this.baseUrl=t;}getApplicationFormType(t,r,n="Standard"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,s({},i(r)))}getVacancyListConfiguration(t,r){return u(this.getVacancyListConfigurationPath(t),s({},i(r)))}getVacancyList(t,r,n){let a=new URL(this.getVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getSimpleVacancyList(t,r,n){let a=new URL(this.getSimpleVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getVacancyDetailsConfiguration(t,r){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(r)))}getVacancyDetails(t,r,n,a){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);return y(o.searchParams,a),u(o.toString(),s({},i(n)))}createCandidate(t,r,n,a,o){let h=new FormData;return a.forEach(l=>h.append("attachments",l)),o&&h.set("image",o),h.set("candidate",JSON.stringify(n)),g(`${this.getCandidatePath(t)}`,h,s({},i(r)))}setDefaultFilter(t){return w(s({},t),{access:t?.access??P.External})}getBasePath(t){return `${c(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return `${c(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return `${c(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return `${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return `${this.getBasePath(t)}/simple`}getConfigurationPath(t){return `${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return `${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return `${this.getConfigurationPath(t)}/details`}};
3
+ var V=Object.defineProperty,E=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var L=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||={})F.call(t,r)&&L(e,r,t[r]);if(w)for(var r of w(t))J.call(t,r)&&L(e,r,t[r]);return e},x=(e,t)=>E(e,A(t));var g=(e,t,r)=>new Promise((n,a)=>{var o=h=>{try{d(r.next(h));}catch($){a($);}},c=h=>{try{d(r.throw(h));}catch($){a($);}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,c);d((r=r.apply(e,t)).next());});function f(e,t){return `${e}/${encodeURIComponent(t)}`}function i(e){return {"X-MindKey-User-Language":e}}var l=class{constructor(t,r){this.response=t,this.message=r;}get status(){return this.response.status}};function m(e,t,r,n){return g(this,null,function*(){let a=yield fetch(e,{method:t,headers:r,body:k(n)});if(!a.ok){let o="";try{o=yield a.text();}catch{o=`Http failure response for ${e}: ${a.status} ${a.statusText}`;}throw new l(a,o)}try{let o=yield a.text();return o||(o="{}"),JSON.parse(o)}catch{throw new l(a,`Http failure during parsing for ${e}`)}})}function k(e){if(e)return typeof Blob<"u"&&e instanceof Blob||typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof URLSearchParams<"u"&&e instanceof URLSearchParams?e:JSON.stringify(e)}function u(e,t){return g(this,null,function*(){return yield m(e,"GET",t)})}function p(e,t,r){return g(this,null,function*(){return yield m(e,"POST",r,t)})}function D(e,t,r){return g(this,null,function*(){return yield m(e,"PUT",r,t)})}function U(e,t,r){return g(this,null,function*(){return yield m(e,"DELETE",r,t)})}function C(){return {"Content-Type":"application/json"}}var B=class{constructor(t){this.basePath=t;}getJobAgentConfiguration(t,r){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(r)))}getJobAgentType(t,r,n){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,s({},i(r)))}getJobAgent(t,r,n,a,o){return p(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,n,a){return p(`${this.getBaseUrl(t)}/create/${a}`,n,s({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,n,a){return D(`${this.getBaseUrl(t)}/${a}`,n,s({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,n,a,o){return U(`${this.getBaseUrl(t)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,n,a){return p(`${this.getBaseUrl(t)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(r)))}activate(t,r,n,a){return p(`${this.getBaseUrl(t)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return `${f(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),C())}};var R=class{constructor(t){this.baseUrl=t;}getLookups(t,r){return u(`${f(this.baseUrl,t)}/candidates/lookup`,s({},i(r)))}};var H=function(e){return e.Show="Show",e.Hide="Hide",e.Sidebar="Sidebar",e}(H||{});var P=function(e){return e.All="all",e.External="external",e.Internal="internal",e}(P||{}),S=function(e){return e.Hide="hide",e.Only="only",e.Bottom="bottom",e.Top="top",e}(S||{});var q=function(e){return e.Description="description",e.StartDate="startDate",e.EndDate="endDate",e.Priority="priority",e}(q||{});var T=(e,t,r)=>{let n=r?r[t]:void 0;if(n===void 0)return;let a=String(t);switch(typeof n){case"boolean":e.set(a,n?"true":"false");break;case"string":e.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},y=(e,t)=>{if(t)for(let r of Object.keys(t))T(e,r,t);};var b=class{constructor(t){this.baseUrl=t;}getApplicationFormType(t,r,n="Standard"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,s({},i(r)))}getVacancyListConfiguration(t,r){return u(this.getVacancyListConfigurationPath(t),s({},i(r)))}getVacancyList(t,r,n){return g(this,null,function*(){let a=new URL(this.getVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),(yield u(a.toString(),s({},i(r)))).map(c=>this.mapDeprecatedVacancyDetailsFields(c))})}getSimpleVacancyList(t,r,n){let a=new URL(this.getSimpleVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getVacancyDetailsConfiguration(t,r){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(r)))}getVacancyDetails(t,r,n,a){return g(this,null,function*(){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);y(o.searchParams,a);let c=yield u(o.toString(),s({},i(n)));return this.mapDeprecatedVacancyDetailsFields(c)})}createCandidate(t,r,n,a,o){let c=new FormData;return a.forEach(d=>c.append("attachments",d)),o&&c.set("image",o),c.set("candidate",JSON.stringify(n)),p(`${this.getCandidatePath(t)}`,c,s({},i(r)))}mapDeprecatedVacancyDetailsFields(t){return x(s({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}setDefaultFilter(t){return x(s({},t),{access:t?.access??P.External})}getBasePath(t){return `${f(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return `${f(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return `${f(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return `${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return `${this.getBasePath(t)}/simple`}getConfigurationPath(t){return `${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return `${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return `${this.getConfigurationPath(t)}/details`}};
4
4
 
5
5
  exports.AccessType = P;
6
6
  exports.DataPlacement = H;
7
- exports.HttpError = d;
8
- exports.JobAgentClient = D;
9
- exports.LookupClient = B;
7
+ exports.HttpError = l;
8
+ exports.JobAgentClient = B;
9
+ exports.LookupClient = R;
10
10
  exports.SortFieldType = q;
11
11
  exports.UnsolicitedType = S;
12
- exports.VacancyClient = R;
12
+ exports.VacancyClient = b;
13
13
 
package/api-client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sources":["api-client.mjs"],"sourcesContent":["var A=Object.defineProperty,V=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var b=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||={})J.call(t,r)&&b(e,r,t[r]);if(L)for(var r of L(t))F.call(t,r)&&b(e,r,t[r]);return e},w=(e,t)=>V(e,E(t));var p=(e,t,r)=>new Promise((n,a)=>{var o=f=>{try{l(r.next(f))}catch($){a($)}},h=f=>{try{l(r.throw(f))}catch($){a($)}},l=f=>f.done?n(f.value):Promise.resolve(f.value).then(o,h);l((r=r.apply(e,t)).next())});function c(e,t){return`${e}/${encodeURIComponent(t)}`}function i(e){return{\"X-MindKey-User-Language\":e}}var d=class{constructor(t,r){this.response=t,this.message=r}get status(){return this.response.status}};function m(e,t,r,n){return p(this,null,function*(){let a=yield fetch(e,{method:t,headers:r,body:T(n)});if(!a.ok){let o=\"\";try{o=yield a.text()}catch{o=`Http failure response for ${e}: ${a.status} ${a.statusText}`}throw new d(a,o)}try{let o=yield a.text();return o||(o=\"{}\"),JSON.parse(o)}catch{throw new d(a,`Http failure during parsing for ${e}`)}})}function T(e){if(e)return typeof Blob<\"u\"&&e instanceof Blob||typeof ArrayBuffer<\"u\"&&e instanceof ArrayBuffer||typeof FormData<\"u\"&&e instanceof FormData||typeof URLSearchParams<\"u\"&&e instanceof URLSearchParams?e:JSON.stringify(e)}function u(e,t){return p(this,null,function*(){return yield m(e,\"GET\",t)})}function g(e,t,r){return p(this,null,function*(){return yield m(e,\"POST\",r,t)})}function x(e,t,r){return p(this,null,function*(){return yield m(e,\"PUT\",r,t)})}function U(e,t,r){return p(this,null,function*(){return yield m(e,\"DELETE\",r,t)})}function C(){return{\"Content-Type\":\"application/json\"}}var D=class{constructor(t){this.basePath=t}getJobAgentConfiguration(t,r){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(r)))}getJobAgentType(t,r,n){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,s({},i(r)))}getJobAgent(t,r,n,a,o){return g(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,n,a){return g(`${this.getBaseUrl(t)}/create/${a}`,n,s({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,n,a){return x(`${this.getBaseUrl(t)}/${a}`,n,s({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,n,a,o){return U(`${this.getBaseUrl(t)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,n,a){return g(`${this.getBaseUrl(t)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(r)))}activate(t,r,n,a){return g(`${this.getBaseUrl(t)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return`${c(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),C())}};var B=class{constructor(t){this.baseUrl=t}getLookups(t,r){return u(`${c(this.baseUrl,t)}/candidates/lookup`,s({},i(r)))}};var H=function(e){return e.Show=\"Show\",e.Hide=\"Hide\",e.Sidebar=\"Sidebar\",e}(H||{});var P=function(e){return e.All=\"all\",e.External=\"external\",e.Internal=\"internal\",e}(P||{}),S=function(e){return e.Hide=\"hide\",e.Only=\"only\",e.Bottom=\"bottom\",e.Top=\"top\",e}(S||{});var q=function(e){return e.Description=\"description\",e.StartDate=\"startDate\",e.EndDate=\"endDate\",e.Priority=\"priority\",e}(q||{});var v=(e,t,r)=>{let n=r?r[t]:void 0;if(n===void 0)return;let a=String(t);switch(typeof n){case\"boolean\":e.set(a,n?\"true\":\"false\");break;case\"string\":e.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},y=(e,t)=>{if(t)for(let r of Object.keys(t))v(e,r,t)};var R=class{constructor(t){this.baseUrl=t}getApplicationFormType(t,r,n=\"Standard\"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,s({},i(r)))}getVacancyListConfiguration(t,r){return u(this.getVacancyListConfigurationPath(t),s({},i(r)))}getVacancyList(t,r,n){let a=new URL(this.getVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getSimpleVacancyList(t,r,n){let a=new URL(this.getSimpleVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getVacancyDetailsConfiguration(t,r){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(r)))}getVacancyDetails(t,r,n,a){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);return y(o.searchParams,a),u(o.toString(),s({},i(n)))}createCandidate(t,r,n,a,o){let h=new FormData;return a.forEach(l=>h.append(\"attachments\",l)),o&&h.set(\"image\",o),h.set(\"candidate\",JSON.stringify(n)),g(`${this.getCandidatePath(t)}`,h,s({},i(r)))}setDefaultFilter(t){return w(s({},t),{access:t?.access??P.External})}getBasePath(t){return`${c(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${c(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${c(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return`${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return`${this.getBasePath(t)}/simple`}getConfigurationPath(t){return`${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return`${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return`${this.getConfigurationPath(t)}/details`}};export{P as AccessType,H as DataPlacement,d as HttpError,D as JobAgentClient,B as LookupClient,q as SortFieldType,S as UnsolicitedType,R as VacancyClient};\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,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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AAC,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;;;;;;;;;;;"}
1
+ {"version":3,"file":"api-client.js","sources":["api-client.mjs"],"sourcesContent":["var V=Object.defineProperty,E=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var L=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||={})F.call(t,r)&&L(e,r,t[r]);if(w)for(var r of w(t))J.call(t,r)&&L(e,r,t[r]);return e},x=(e,t)=>E(e,A(t));var g=(e,t,r)=>new Promise((n,a)=>{var o=h=>{try{d(r.next(h))}catch($){a($)}},c=h=>{try{d(r.throw(h))}catch($){a($)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,c);d((r=r.apply(e,t)).next())});function f(e,t){return`${e}/${encodeURIComponent(t)}`}function i(e){return{\"X-MindKey-User-Language\":e}}var l=class{constructor(t,r){this.response=t,this.message=r}get status(){return this.response.status}};function m(e,t,r,n){return g(this,null,function*(){let a=yield fetch(e,{method:t,headers:r,body:k(n)});if(!a.ok){let o=\"\";try{o=yield a.text()}catch{o=`Http failure response for ${e}: ${a.status} ${a.statusText}`}throw new l(a,o)}try{let o=yield a.text();return o||(o=\"{}\"),JSON.parse(o)}catch{throw new l(a,`Http failure during parsing for ${e}`)}})}function k(e){if(e)return typeof Blob<\"u\"&&e instanceof Blob||typeof ArrayBuffer<\"u\"&&e instanceof ArrayBuffer||typeof FormData<\"u\"&&e instanceof FormData||typeof URLSearchParams<\"u\"&&e instanceof URLSearchParams?e:JSON.stringify(e)}function u(e,t){return g(this,null,function*(){return yield m(e,\"GET\",t)})}function p(e,t,r){return g(this,null,function*(){return yield m(e,\"POST\",r,t)})}function D(e,t,r){return g(this,null,function*(){return yield m(e,\"PUT\",r,t)})}function U(e,t,r){return g(this,null,function*(){return yield m(e,\"DELETE\",r,t)})}function C(){return{\"Content-Type\":\"application/json\"}}var B=class{constructor(t){this.basePath=t}getJobAgentConfiguration(t,r){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(r)))}getJobAgentType(t,r,n){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,s({},i(r)))}getJobAgent(t,r,n,a,o){return p(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,n,a){return p(`${this.getBaseUrl(t)}/create/${a}`,n,s({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,n,a){return D(`${this.getBaseUrl(t)}/${a}`,n,s({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,n,a,o){return U(`${this.getBaseUrl(t)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,n,a){return p(`${this.getBaseUrl(t)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(r)))}activate(t,r,n,a){return p(`${this.getBaseUrl(t)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return`${f(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),C())}};var R=class{constructor(t){this.baseUrl=t}getLookups(t,r){return u(`${f(this.baseUrl,t)}/candidates/lookup`,s({},i(r)))}};var H=function(e){return e.Show=\"Show\",e.Hide=\"Hide\",e.Sidebar=\"Sidebar\",e}(H||{});var P=function(e){return e.All=\"all\",e.External=\"external\",e.Internal=\"internal\",e}(P||{}),S=function(e){return e.Hide=\"hide\",e.Only=\"only\",e.Bottom=\"bottom\",e.Top=\"top\",e}(S||{});var q=function(e){return e.Description=\"description\",e.StartDate=\"startDate\",e.EndDate=\"endDate\",e.Priority=\"priority\",e}(q||{});var T=(e,t,r)=>{let n=r?r[t]:void 0;if(n===void 0)return;let a=String(t);switch(typeof n){case\"boolean\":e.set(a,n?\"true\":\"false\");break;case\"string\":e.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},y=(e,t)=>{if(t)for(let r of Object.keys(t))T(e,r,t)};var b=class{constructor(t){this.baseUrl=t}getApplicationFormType(t,r,n=\"Standard\"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,s({},i(r)))}getVacancyListConfiguration(t,r){return u(this.getVacancyListConfigurationPath(t),s({},i(r)))}getVacancyList(t,r,n){return g(this,null,function*(){let a=new URL(this.getVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),(yield u(a.toString(),s({},i(r)))).map(c=>this.mapDeprecatedVacancyDetailsFields(c))})}getSimpleVacancyList(t,r,n){let a=new URL(this.getSimpleVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getVacancyDetailsConfiguration(t,r){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(r)))}getVacancyDetails(t,r,n,a){return g(this,null,function*(){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);y(o.searchParams,a);let c=yield u(o.toString(),s({},i(n)));return this.mapDeprecatedVacancyDetailsFields(c)})}createCandidate(t,r,n,a,o){let c=new FormData;return a.forEach(d=>c.append(\"attachments\",d)),o&&c.set(\"image\",o),c.set(\"candidate\",JSON.stringify(n)),p(`${this.getCandidatePath(t)}`,c,s({},i(r)))}mapDeprecatedVacancyDetailsFields(t){return x(s({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}setDefaultFilter(t){return x(s({},t),{access:t?.access??P.External})}getBasePath(t){return`${f(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${f(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${f(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return`${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return`${this.getBasePath(t)}/simple`}getConfigurationPath(t){return`${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return`${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return`${this.getConfigurationPath(t)}/details`}};export{P as AccessType,H as DataPlacement,l as HttpError,B as JobAgentClient,R as LookupClient,q as SortFieldType,S as UnsolicitedType,b as VacancyClient};\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,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,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ties;var E=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var b=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||={})J.call(t,r)&&b(e,r,t[r]);if(L)for(var r of L(t))F.call(t,r)&&b(e,r,t[r]);return e},w=(e,t)=>V(e,E(t));var p=(e,t,r)=>new Promise((n,a)=>{var o=f=>{try{l(r.next(f))}catch($){a($)}},h=f=>{try{l(r.throw(f))}catch($){a($)}},l=f=>f.done?n(f.value):Promise.resolve(f.value).then(o,h);l((r=r.apply(e,t)).next())});function c(e,t){return`${e}/${encodeURIComponent(t)}`}function i(e){return{"X-MindKey-User-Language":e}}var d=class{constructor(t,r){this.response=t,this.message=r}get status(){return this.response.status}};function m(e,t,r,n){return p(this,null,function*(){let a=yield fetch(e,{method:t,headers:r,body:T(n)});if(!a.ok){let o="";try{o=yield a.text()}catch{o=`Http failure response for ${e}: ${a.status} ${a.statusText}`}throw new d(a,o)}try{let o=yield a.text();return o||(o="{}"),JSON.parse(o)}catch{throw new d(a,`Http failure during parsing for ${e}`)}})}function T(e){if(e)return typeof Blob<"u"&&e instanceof Blob||typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof URLSearchParams<"u"&&e instanceof URLSearchParams?e:JSON.stringify(e)}function u(e,t){return p(this,null,function*(){return yield m(e,"GET",t)})}function g(e,t,r){return p(this,null,function*(){return yield m(e,"POST",r,t)})}function x(e,t,r){return p(this,null,function*(){return yield m(e,"PUT",r,t)})}function U(e,t,r){return p(this,null,function*(){return yield m(e,"DELETE",r,t)})}function C(){return{"Content-Type":"application/json"}}var D=class{constructor(t){this.basePath=t}getJobAgentConfiguration(t,r){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(r)))}getJobAgentType(t,r,n){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,s({},i(r)))}getJobAgent(t,r,n,a,o){return g(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,n,a){return g(`${this.getBaseUrl(t)}/create/${a}`,n,s({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,n,a){return x(`${this.getBaseUrl(t)}/${a}`,n,s({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,n,a,o){return U(`${this.getBaseUrl(t)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,n,a){return g(`${this.getBaseUrl(t)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(r)))}activate(t,r,n,a){return g(`${this.getBaseUrl(t)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return`${c(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),C())}};var B=class{constructor(t){this.baseUrl=t}getLookups(t,r){return u(`${c(this.baseUrl,t)}/candidates/lookup`,s({},i(r)))}};var H=function(e){return e.Show="Show",e.Hide="Hide",e.Sidebar="Sidebar",e}(H||{});var P=function(e){return e.All="all",e.External="external",e.Internal="internal",e}(P||{}),S=function(e){return e.Hide="hide",e.Only="only",e.Bottom="bottom",e.Top="top",e}(S||{});var q=function(e){return e.Description="description",e.StartDate="startDate",e.EndDate="endDate",e.Priority="priority",e}(q||{});var v=(e,t,r)=>{let n=r?r[t]:void 0;if(n===void 0)return;let a=String(t);switch(typeof n){case"boolean":e.set(a,n?"true":"false");break;case"string":e.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},y=(e,t)=>{if(t)for(let r of Object.keys(t))v(e,r,t)};var R=class{constructor(t){this.baseUrl=t}getApplicationFormType(t,r,n="Standard"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,s({},i(r)))}getVacancyListConfiguration(t,r){return u(this.getVacancyListConfigurationPath(t),s({},i(r)))}getVacancyList(t,r,n){let a=new URL(this.getVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getSimpleVacancyList(t,r,n){let a=new URL(this.getSimpleVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getVacancyDetailsConfiguration(t,r){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(r)))}getVacancyDetails(t,r,n,a){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);return y(o.searchParams,a),u(o.toString(),s({},i(n)))}createCandidate(t,r,n,a,o){let h=new FormData;return a.forEach(l=>h.append("attachments",l)),o&&h.set("image",o),h.set("candidate",JSON.stringify(n)),g(`${this.getCandidatePath(t)}`,h,s({},i(r)))}setDefaultFilter(t){return w(s({},t),{access:t?.access??P.External})}getBasePath(t){return`${c(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${c(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${c(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return`${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return`${this.getBasePath(t)}/simple`}getConfigurationPath(t){return`${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return`${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return`${this.getConfigurationPath(t)}/details`}};export{P as AccessType,H as DataPlacement,d as HttpError,D as JobAgentClient,B as LookupClient,q as SortFieldType,S as UnsolicitedType,R as VacancyClient};
1
+ var V=Object.defineProperty,E=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var L=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||={})F.call(t,r)&&L(e,r,t[r]);if(w)for(var r of w(t))J.call(t,r)&&L(e,r,t[r]);return e},x=(e,t)=>E(e,A(t));var g=(e,t,r)=>new Promise((n,a)=>{var o=h=>{try{d(r.next(h))}catch($){a($)}},c=h=>{try{d(r.throw(h))}catch($){a($)}},d=h=>h.done?n(h.value):Promise.resolve(h.value).then(o,c);d((r=r.apply(e,t)).next())});function f(e,t){return`${e}/${encodeURIComponent(t)}`}function i(e){return{"X-MindKey-User-Language":e}}var l=class{constructor(t,r){this.response=t,this.message=r}get status(){return this.response.status}};function m(e,t,r,n){return g(this,null,function*(){let a=yield fetch(e,{method:t,headers:r,body:k(n)});if(!a.ok){let o="";try{o=yield a.text()}catch{o=`Http failure response for ${e}: ${a.status} ${a.statusText}`}throw new l(a,o)}try{let o=yield a.text();return o||(o="{}"),JSON.parse(o)}catch{throw new l(a,`Http failure during parsing for ${e}`)}})}function k(e){if(e)return typeof Blob<"u"&&e instanceof Blob||typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof URLSearchParams<"u"&&e instanceof URLSearchParams?e:JSON.stringify(e)}function u(e,t){return g(this,null,function*(){return yield m(e,"GET",t)})}function p(e,t,r){return g(this,null,function*(){return yield m(e,"POST",r,t)})}function D(e,t,r){return g(this,null,function*(){return yield m(e,"PUT",r,t)})}function U(e,t,r){return g(this,null,function*(){return yield m(e,"DELETE",r,t)})}function C(){return{"Content-Type":"application/json"}}var B=class{constructor(t){this.basePath=t}getJobAgentConfiguration(t,r){return u(`${this.getBaseUrl(t)}/configuration`,s({},i(r)))}getJobAgentType(t,r,n){return u(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,s({},i(r)))}getJobAgent(t,r,n,a,o){return p(`${this.getBaseUrl(t)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,n,a){return p(`${this.getBaseUrl(t)}/create/${a}`,n,s({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,n,a){return D(`${this.getBaseUrl(t)}/${a}`,n,s({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,n,a,o){return U(`${this.getBaseUrl(t)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,n,a){return p(`${this.getBaseUrl(t)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(r)))}activate(t,r,n,a){return p(`${this.getBaseUrl(t)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return`${f(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return s(s({},i(t)),C())}};var R=class{constructor(t){this.baseUrl=t}getLookups(t,r){return u(`${f(this.baseUrl,t)}/candidates/lookup`,s({},i(r)))}};var H=function(e){return e.Show="Show",e.Hide="Hide",e.Sidebar="Sidebar",e}(H||{});var P=function(e){return e.All="all",e.External="external",e.Internal="internal",e}(P||{}),S=function(e){return e.Hide="hide",e.Only="only",e.Bottom="bottom",e.Top="top",e}(S||{});var q=function(e){return e.Description="description",e.StartDate="startDate",e.EndDate="endDate",e.Priority="priority",e}(q||{});var T=(e,t,r)=>{let n=r?r[t]:void 0;if(n===void 0)return;let a=String(t);switch(typeof n){case"boolean":e.set(a,n?"true":"false");break;case"string":e.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},y=(e,t)=>{if(t)for(let r of Object.keys(t))T(e,r,t)};var b=class{constructor(t){this.baseUrl=t}getApplicationFormType(t,r,n="Standard"){return u(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,s({},i(r)))}getVacancyListConfiguration(t,r){return u(this.getVacancyListConfigurationPath(t),s({},i(r)))}getVacancyList(t,r,n){return g(this,null,function*(){let a=new URL(this.getVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),(yield u(a.toString(),s({},i(r)))).map(c=>this.mapDeprecatedVacancyDetailsFields(c))})}getSimpleVacancyList(t,r,n){let a=new URL(this.getSimpleVacancyListPath(t));return y(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(r)))}getVacancyDetailsConfiguration(t,r){return u(this.getVacancyDetailsConfigurationPath(t),s({},i(r)))}getVacancyDetails(t,r,n,a){return g(this,null,function*(){let o=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);y(o.searchParams,a);let c=yield u(o.toString(),s({},i(n)));return this.mapDeprecatedVacancyDetailsFields(c)})}createCandidate(t,r,n,a,o){let c=new FormData;return a.forEach(d=>c.append("attachments",d)),o&&c.set("image",o),c.set("candidate",JSON.stringify(n)),p(`${this.getCandidatePath(t)}`,c,s({},i(r)))}mapDeprecatedVacancyDetailsFields(t){return x(s({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}setDefaultFilter(t){return x(s({},t),{access:t?.access??P.External})}getBasePath(t){return`${f(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${f(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${f(this.baseUrl,t)}/candidates`}getVacancyListPath(t){return`${this.getBasePath(t)}/detailed`}getSimpleVacancyListPath(t){return`${this.getBasePath(t)}/simple`}getConfigurationPath(t){return`${this.getBasePath(t)}/configuration`}getVacancyListConfigurationPath(t){return`${this.getConfigurationPath(t)}/list`}getVacancyDetailsConfigurationPath(t){return`${this.getConfigurationPath(t)}/details`}};export{P as AccessType,H as DataPlacement,l as HttpError,B as JobAgentClient,R as LookupClient,q as SortFieldType,S as UnsolicitedType,b as VacancyClient};
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/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 {\n constructor(\n readonly response: Response,\n readonly message: string,\n ) {}\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nasync function sendRequest<T>(url: string, method: string, headers: HeadersInit, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n if (!response.ok) {\n let body = '';\n try {\n body = await response.text();\n } catch {\n body = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, body);\n }\n\n try {\n let result = await response.text();\n if (!result) {\n result = '{}';\n }\n return JSON.parse(result) as T;\n } catch {\n // Parsing error\n throw new HttpError(response, `Http failure during parsing for ${url}`);\n }\n}\n\nfunction 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\nexport async function sendGetRequest<T>(url: string, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'GET', headers);\n}\n\nexport async function sendPostRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'POST', headers, body);\n}\n\nexport async function sendPutRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'PUT', headers, body);\n}\n\nexport async function sendDeleteRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'DELETE', headers, 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 { getBasePath, getUserLanguageHeader, sendDeleteRequest, sendGetRequest, sendPostRequest, sendPutRequest } 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(private readonly basePath: string) {}\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 sendGetRequest(`${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 sendGetRequest(`${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 sendPostRequest(\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 sendPostRequest(`${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 sendPutRequest(`${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 sendDeleteRequest(\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 sendPostRequest(`${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 sendPostRequest(`${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): { [header: string]: string } {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { getBasePath, getUserLanguageHeader, sendGetRequest } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(private readonly baseUrl: string) {}\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 sendGetRequest(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\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 showStartDate?: DataPlacement;\n showEndDate?: DataPlacement;\n showVacancyType?: DataPlacement;\n showContactPersonName?: DataPlacement;\n showContactPersonWorkPhone?: DataPlacement;\n showContactPersonMobilePhone?: DataPlacement;\n showContactPersonEmail?: DataPlacement;\n showPositionStartDate?: DataPlacement;\n showEmploymentCategoryName?: DataPlacement;\n showOrganizationName?: DataPlacement;\n showLocations?: DataPlacement;\n showRegions?: DataPlacement;\n showTeaser?: DataPlacement;\n showCompanyName?: DataPlacement;\n showCompanyAddress?: DataPlacement;\n showLongDate?: 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 includeAdvertisementText?: boolean;\n perDate?: string;\n vacancyTypeId?: string;\n regionName?: string;\n locationId?: string;\n vacancyAreaName?: string;\n unsolicited?: UnsolicitedType;\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 showStartDate?: boolean;\n showEndDate?: boolean;\n showLongDate?: boolean;\n showTeaserText?: boolean;\n showLocations?: boolean;\n showRegions?: boolean;\n showAreas?: boolean;\n sortField?: SortFieldType;\n sortDescending?: boolean;\n showFilters?: boolean;\n showApplyLink?: 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 showEmptyMessage: 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 { getBasePath, getUserLanguageHeader, sendGetRequest, sendPostRequest } 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(private readonly baseUrl: string) {}\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 sendGetRequest(`${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 sendGetRequest(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a 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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 sendGetRequest(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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 sendPostRequest(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\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":"unBAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,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AAoB,CACvE,OAAOC,EAAApC,EAAA,GAAKmC,GAAL,CAAYE,OAAQF,GAAOE,QAAUC,EAAWC,QAAQ,EACnE,CAEQnB,YAAY1B,EAAkB,CAClC,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,CAAC,mBACnD,CAEQwC,iBAAiBxC,EAAkB,CACvC,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,CAAC,WAC1C,CAEQoB,yBAAyBpB,EAAkB,CAC/C,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,CAAC,SAC1C,CAEQ8C,qBAAqB9C,EAAkB,CAC3C,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,CAAC,OACnD,CAEQsB,mCAAmCtB,EAAkB,CACzD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","constructor","response","message","status","sendRequest","url","method","headers","body","__async","response","fetch","convertToBodyInit","ok","text","status","statusText","HttpError","result","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","sendGetRequest","sendPostRequest","sendPutRequest","sendDeleteRequest","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","getJobAgentConfiguration","customerId","language","sendGetRequest","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","sendPostRequest","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","sendPutRequest","deleteJobAgent","sendDeleteRequest","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","getLookups","customerId","language","sendGetRequest","getBasePath","__spreadValues","getUserLanguageHeader","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","getApplicationFormType","customerId","language","applicationFormType","sendGetRequest","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","getSimpleVacancyList","getSimpleVacancyListPath","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","sendPostRequest","getCandidatePath","input","__spreadProps","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/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 {\n constructor(\n readonly response: Response,\n readonly message: string,\n ) {}\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nasync function sendRequest<T>(url: string, method: string, headers: HeadersInit, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n if (!response.ok) {\n let body = '';\n try {\n body = await response.text();\n } catch {\n body = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, body);\n }\n\n try {\n let result = await response.text();\n if (!result) {\n result = '{}';\n }\n return JSON.parse(result) as T;\n } catch {\n // Parsing error\n throw new HttpError(response, `Http failure during parsing for ${url}`);\n }\n}\n\nfunction 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\nexport async function sendGetRequest<T>(url: string, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'GET', headers);\n}\n\nexport async function sendPostRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'POST', headers, body);\n}\n\nexport async function sendPutRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'PUT', headers, body);\n}\n\nexport async function sendDeleteRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T> {\n return await sendRequest<T>(url, 'DELETE', headers, 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 { getBasePath, getUserLanguageHeader, sendDeleteRequest, sendGetRequest, sendPostRequest, sendPutRequest } 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(private readonly basePath: string) {}\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 sendGetRequest(`${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 sendGetRequest(`${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 sendPostRequest(\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 sendPostRequest(`${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 sendPutRequest(`${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 sendDeleteRequest(\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 sendPostRequest(`${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 sendPostRequest(`${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): { [header: string]: string } {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { getBasePath, getUserLanguageHeader, sendGetRequest } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(private readonly baseUrl: string) {}\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 sendGetRequest(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\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 * @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 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 * 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/**\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 showEmptyMessage: 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 { getBasePath, getUserLanguageHeader, sendGetRequest, sendPostRequest } 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(private readonly baseUrl: string) {}\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 sendGetRequest(`${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 sendGetRequest(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 sendGetRequest<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.mapDeprecatedVacancyDetailsFields(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 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 return sendGetRequest(url.toString(), {\n ...getUserLanguageHeader(language),\n });\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 sendGetRequest(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 sendGetRequest<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.mapDeprecatedVacancyDetailsFields(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 sendPostRequest(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line deprecation/deprecation\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\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":"unBAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,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AAI,YAAaC,KAAKC,UAAUV,CAAS,CAAC,EAE5CW,EAAgB,GAAG,KAAKC,iBAAiB7C,CAAU,CAAC,GAAIoC,EAAU9B,EAAA,GAClEC,EAAsBN,CAAQ,EACpC,CACL,CAEQqB,kCAAkCwB,EAAqB,CAE3D,OAAOC,EAAAzC,EAAA,GACAwC,GADA,CAGHE,+BAAgCF,EAAME,gCAAkCF,EAAMG,+BAEtF,CAEQ/B,iBAA+CgC,EAAoB,CACvE,OAAOH,EAAAzC,EAAA,GAAK4C,GAAL,CAAYC,OAAQD,GAAOC,QAAUC,EAAWC,QAAQ,EACnE,CAEQvB,YAAY9B,EAAkB,CAClC,MAAO,GAAG8B,EAAY,KAAKhC,QAASE,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG8B,EAAY,KAAKhC,QAASE,CAAU,CAAC,mBACnD,CAEQ6C,iBAAiB7C,EAAkB,CACvC,MAAO,GAAG8B,EAAY,KAAKhC,QAASE,CAAU,CAAC,aACnD,CAEQe,mBAAmBf,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQwB,yBAAyBxB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQsD,qBAAqBtD,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAKsD,qBAAqBtD,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAKsD,qBAAqBtD,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","constructor","response","message","status","sendRequest","url","method","headers","body","__async","response","fetch","convertToBodyInit","ok","text","status","statusText","HttpError","result","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","sendGetRequest","sendPostRequest","sendPutRequest","sendDeleteRequest","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","getJobAgentConfiguration","customerId","language","sendGetRequest","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","sendPostRequest","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","sendPutRequest","deleteJobAgent","sendDeleteRequest","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","getLookups","customerId","language","sendGetRequest","getBasePath","__spreadValues","getUserLanguageHeader","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","getApplicationFormType","customerId","language","applicationFormType","sendGetRequest","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","__async","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","mapDeprecatedVacancyDetailsFields","getSimpleVacancyList","getSimpleVacancyListPath","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","sendPostRequest","getCandidatePath","model","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client.mjs"}
@@ -23,6 +23,9 @@ export declare class VacancyClient {
23
23
  getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration>;
24
24
  /**
25
25
  * Returns a detailed list of vacancies.
26
+ *
27
+ * The result of this API should be cached and reused.
28
+ *
26
29
  * @param customerId - Your customer id.
27
30
  * @param language - The language to request.
28
31
  * @param filtersAndConfiguration - Filters and configuration to apply to the request.
@@ -58,6 +61,7 @@ export declare class VacancyClient {
58
61
  * @param image - Candidate image.
59
62
  */
60
63
  createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult>;
64
+ private mapDeprecatedVacancyDetailsFields;
61
65
  private setDefaultFilter;
62
66
  private getBasePath;
63
67
  private getApplicationFormTypePath;
@@ -10,40 +10,149 @@ export interface Attachment extends HasDescription {
10
10
  * @public
11
11
  */
12
12
  export interface ApplicationFormType {
13
+ /**
14
+ * Flag indicating whether to display the image.
15
+ */
13
16
  showImage: boolean;
17
+ /**
18
+ * Represents a flag indicating whether to show regions.
19
+ */
14
20
  showRegions: boolean;
21
+ /**
22
+ * Indicates whether to show locations or not.
23
+ */
15
24
  showLocations: boolean;
25
+ /**
26
+ * Indicates whether to display fields of work.
27
+ */
16
28
  showFieldsOfWork: boolean;
29
+ /**
30
+ * Indicates whether to display elements or not.
31
+ */
17
32
  showElements: boolean;
33
+ /**
34
+ * Flag indicating whether to show the "Allow Save Disclaimer" message.
35
+ */
18
36
  showAllowSaveDisclaimer: boolean;
37
+ /**
38
+ * Indicates whether to show previously applied changes or not.
39
+ */
19
40
  showPreviouslyApplied: boolean;
41
+ /**
42
+ * Flags whether or not to display media.
43
+ */
20
44
  showMedia: boolean;
45
+ /**
46
+ * Indicates whether the birth date should be shown or not.
47
+ */
21
48
  showBirthDate: boolean;
49
+ /**
50
+ * Represents a variable that determines whether to show the gender.
51
+ */
22
52
  showGender: boolean;
53
+ /**
54
+ * Represents a variable indicating whether to display the home phone number.
55
+ */
23
56
  showHomePhone: boolean;
57
+ /**
58
+ * Indicates whether to display the mobile phone on the interface.
59
+ */
24
60
  showMobilePhone: boolean;
61
+ /**
62
+ * Indicates whether to show the country information or not.
63
+ */
25
64
  showCountry: boolean;
65
+ /**
66
+ * Indicates whether to display the state/province of a location.
67
+ */
26
68
  showStateProvince: boolean;
69
+ /**
70
+ * Represents a variable indicating whether to show the address.
71
+ */
27
72
  showAddress: boolean;
73
+ /**
74
+ * Represents a variable showAddress2 which indicates whether to display
75
+ * the Address Line 2 in an address block.
76
+ */
28
77
  showAddress2: boolean;
78
+ /**
79
+ * Determines whether to show the nationality of a person.
80
+ */
29
81
  showNationality: boolean;
82
+ /**
83
+ * Represents the marital status of an individual.
84
+ */
30
85
  showMaritalStatus: boolean;
86
+ /**
87
+ * Indicates whether to display the salutation or not.
88
+ */
31
89
  showSalutation: boolean;
90
+ /**
91
+ * Represents whether gender is mandatory or not.
92
+ */
32
93
  genderMandatory: boolean;
94
+ /**
95
+ * Indicates whether the birth date is mandatory or not.
96
+ */
33
97
  birthDateMandatory: boolean;
98
+ /**
99
+ * Flag to indicate if a mobile phone is mandatory.
100
+ */
34
101
  mobilePhoneMandatory: boolean;
102
+ /**
103
+ * Flag to indicate whether the home phone number is mandatory.
104
+ */
35
105
  homePhoneMandatory: boolean;
106
+ /**
107
+ * Represents whether the address is mandatory or not.
108
+ */
36
109
  addressMandatory: boolean;
110
+ /**
111
+ * Represents whether the media is mandatory or not.
112
+ */
37
113
  mediaMandatory: boolean;
114
+ /**
115
+ * Represents the document type ID of an invalid image document.
116
+ */
38
117
  invalidImageDocumentTypeId: string;
118
+ /**
119
+ * Represents the unique identifier for the application note document type.
120
+ */
39
121
  applicationNoteDocumentTypeId: string;
122
+ /**
123
+ * The reference to the default advertisement.
124
+ */
40
125
  defaultAdvertisementReference: string;
126
+ /**
127
+ * Represents whether a note should be displayed or not.
128
+ */
41
129
  showNote: boolean;
130
+ /**
131
+ * Flag indicating whether saving a disclaimer is mandatory.
132
+ */
42
133
  allowSaveDisclaimerMandatory: boolean;
134
+ /**
135
+ * Indicates whether the email should be repeated or not.
136
+ */
43
137
  repeatEmail: boolean;
138
+ /**
139
+ * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.
140
+ */
44
141
  allowSaveDisclaimer: string;
142
+ /**
143
+ * Represents the confirmation page for a website.
144
+ */
45
145
  confirmationPage: string;
146
+ /**
147
+ * Represents information about an attachment.
148
+ */
46
149
  attachmentInfo: string;
150
+ /**
151
+ * The unique identifier for a candidate mailing template.
152
+ */
47
153
  candidateMailingTemplateId: string;
154
+ /**
155
+ * Represents an array of {@link Attachment}.
156
+ */
48
157
  attachments: Attachment[];
49
158
  }
@@ -2,6 +2,12 @@
2
2
  * @public
3
3
  */
4
4
  export interface Culture {
5
+ /**
6
+ * ID of the culture.
7
+ */
5
8
  cultureId: string;
9
+ /**
10
+ * Localized name of the culture.
11
+ */
6
12
  name: string;
7
13
  }
@@ -2,5 +2,8 @@
2
2
  * @public
3
3
  */
4
4
  export interface HasId {
5
+ /**
6
+ * Unique identifier.
7
+ */
5
8
  id: string;
6
9
  }
@@ -10,8 +10,20 @@ export interface DocumentFileType extends HasDescription {
10
10
  * @public
11
11
  */
12
12
  export interface Lookups {
13
+ /**
14
+ * List of all available countries.
15
+ */
13
16
  countries: string[];
17
+ /**
18
+ * List of all available nationalities.
19
+ */
14
20
  nationalities: string[];
21
+ /**
22
+ * List of all available {@link DocumentFileType}
23
+ */
15
24
  documentFileTypes: DocumentFileType[];
25
+ /**
26
+ * List of all available {@link Culture}.
27
+ */
16
28
  cultures: Culture[];
17
29
  }
@@ -10,20 +10,75 @@ export declare enum DataPlacement {
10
10
  * @public
11
11
  */
12
12
  export interface VacancyDetailsConfiguration {
13
+ /**
14
+ * Specifies if the start date is shown and where.
15
+ */
13
16
  showStartDate?: DataPlacement;
17
+ /**
18
+ * Specifies if the end date is shown and where.
19
+ */
14
20
  showEndDate?: DataPlacement;
21
+ /**
22
+ * Specifies if the vacancy type is shown and where.
23
+ */
15
24
  showVacancyType?: DataPlacement;
25
+ /**
26
+ * Specifies if the contact person name is shown and where.
27
+ */
16
28
  showContactPersonName?: DataPlacement;
29
+ /**
30
+ * Specifies if the contact person work phone is shown and where.
31
+ */
17
32
  showContactPersonWorkPhone?: DataPlacement;
33
+ /**
34
+ * Specifies if the contact person mobile phone is shown and where.
35
+ */
18
36
  showContactPersonMobilePhone?: DataPlacement;
37
+ /**
38
+ * Specifies if the contact person email is shown and where.
39
+ */
19
40
  showContactPersonEmail?: DataPlacement;
41
+ /**
42
+ * Specifies if the position start date is shown and where.
43
+ */
20
44
  showPositionStartDate?: DataPlacement;
45
+ /**
46
+ * Specifies if the employment category name is shown and where.
47
+ */
21
48
  showEmploymentCategoryName?: DataPlacement;
49
+ /**
50
+ * Specifies if the organization name is shown and where.
51
+ */
22
52
  showOrganizationName?: DataPlacement;
53
+ /**
54
+ * Specifies if the locations are shown and where.
55
+ */
23
56
  showLocations?: DataPlacement;
57
+ /**
58
+ * Specifies if the regions are shown and where.
59
+ */
24
60
  showRegions?: DataPlacement;
61
+ /**
62
+ * Specifies if the teaser is shown and where.
63
+ */
25
64
  showTeaser?: DataPlacement;
65
+ /**
66
+ * Specifies if the company name is shown and where.
67
+ */
26
68
  showCompanyName?: DataPlacement;
69
+ /**
70
+ * Specifies if the company address is shown and where.
71
+ */
27
72
  showCompanyAddress?: DataPlacement;
73
+ /**
74
+ * Whether to display dates in a long date format.
75
+ * If false, will use the short date format.
76
+ */
28
77
  showLongDate?: boolean;
78
+ /**
79
+ * Indicates whether to include the advertisement text.
80
+ *
81
+ * The text also includes base64 encoded images leading to increased response times.
82
+ */
83
+ includeAdvertisementText?: boolean;
29
84
  }
@@ -18,7 +18,11 @@ export interface VacancyDetails extends HasId, HasDescription {
18
18
  teaserText: null | string;
19
19
  candidateApplicationFormTypeId: string;
20
20
  contactEmployeeName: null | string;
21
+ /**
22
+ * @deprecated Use {@link contactEmployeeWorkPhoneNumber} instead.
23
+ */
21
24
  contactEmployeWorkPhoneNumber: null | string;
25
+ contactEmployeeWorkPhoneNumber: null | string;
22
26
  contactEmployeeMobilePhoneNumber: null | string;
23
27
  contactEmployeeEmail: null | string;
24
28
  advertisementText: null | string;
@@ -55,4 +59,4 @@ export interface VacancyElement extends HasId, HasDescription {
55
59
  /**
56
60
  * @public
57
61
  */
58
- export type VacancyDetailsFilters = Pick<VacancyListFilters, 'includeAdvertisementText' | 'access'>;
62
+ export type VacancyDetailsFilters = Pick<VacancyListFilters, 'access'>;
@@ -11,16 +11,55 @@ export declare enum SortFieldType {
11
11
  * @public
12
12
  */
13
13
  export interface VacancyListConfiguration {
14
+ /**
15
+ * Indicates whether to include the advertisement text.
16
+ *
17
+ * The text also includes base64 encoded images leading to increased response times.
18
+ */
19
+ includeAdvertisementText?: boolean;
20
+ /**
21
+ * Indicates whether the start date of a show should be displayed.
22
+ */
14
23
  showStartDate?: boolean;
24
+ /**
25
+ * Represents whether to show the end date or not.
26
+ */
15
27
  showEndDate?: boolean;
28
+ /**
29
+ * Determines whether the long date should be shown or not.
30
+ */
16
31
  showLongDate?: boolean;
32
+ /**
33
+ * Indicates whether to show the teaser text or not.
34
+ */
17
35
  showTeaserText?: boolean;
36
+ /**
37
+ * Determines whether to show locations or not.
38
+ */
18
39
  showLocations?: boolean;
40
+ /**
41
+ * Specifies whether to show regions.
42
+ */
19
43
  showRegions?: boolean;
44
+ /**
45
+ * Specifies whether to show areas or not.
46
+ */
20
47
  showAreas?: boolean;
48
+ /**
49
+ * Specified the field used for sorting.
50
+ */
21
51
  sortField?: SortFieldType;
52
+ /**
53
+ * Indicates whether the sorting should be in descending order.
54
+ */
22
55
  sortDescending?: boolean;
56
+ /**
57
+ * Indicates whether to show filters or not.
58
+ */
23
59
  showFilters?: boolean;
60
+ /**
61
+ * Indicates whether to display the apply link.
62
+ */
24
63
  showApplyLink?: boolean;
25
64
  }
26
65
  /**
@@ -16,12 +16,32 @@ export declare enum UnsolicitedType {
16
16
  * @public
17
17
  */
18
18
  export interface VacancyListFilters {
19
- includeAdvertisementText?: boolean;
19
+ /**
20
+ * Represents a date in the format of "YYYY-MM-DD".
21
+ */
20
22
  perDate?: string;
23
+ /**
24
+ * Filters for a specific vacancy type.
25
+ */
21
26
  vacancyTypeId?: string;
27
+ /**
28
+ * Filters for a specific region.
29
+ */
22
30
  regionName?: string;
31
+ /**
32
+ * Filters for a specific location.
33
+ */
23
34
  locationId?: string;
35
+ /**
36
+ * Filters for a specific area.
37
+ */
24
38
  vacancyAreaName?: string;
39
+ /**
40
+ * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.
41
+ */
25
42
  unsolicited?: UnsolicitedType;
43
+ /**
44
+ * Filters for a specific {@link AccessType}
45
+ */
26
46
  access?: AccessType;
27
47
  }
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.4.6","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.4.7","main":"api-client.js","module":"api-client.mjs","typings":"index.d.ts","license":"MIT","keywords":["mindkey","recruiting","api","human resource"]}