@mindkey/recruiting-api-client 7.3.7-ci.21751
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +2 -0
- package/api-client-global.js +2 -0
- package/api-client-global.js.map +1 -0
- package/api-client-module.js +3 -0
- package/api-client-module.js.map +1 -0
- package/clients/index.d.ts +3 -0
- package/clients/job-agent.client.d.ts +76 -0
- package/clients/lookup.client.d.ts +16 -0
- package/clients/vacancy.client.d.ts +70 -0
- package/errors/http.error.d.ts +9 -0
- package/errors/index.d.ts +1 -0
- package/helpers/assign-filters.d.ts +1 -0
- package/helpers/get-base-path.d.ts +1 -0
- package/helpers/get-content-type-header.d.ts +5 -0
- package/helpers/get-user-language-header.d.ts +3 -0
- package/helpers/index.d.ts +3 -0
- package/helpers/send-request.d.ts +4 -0
- package/index-legacy.d.ts +15 -0
- package/index.d.ts +3 -0
- package/models/application-form.model.d.ts +48 -0
- package/models/candidate.model.d.ts +48 -0
- package/models/culture.model.d.ts +7 -0
- package/models/description.model.d.ts +5 -0
- package/models/id.model.d.ts +6 -0
- package/models/index.d.ts +15 -0
- package/models/job-agent-configuration.model.d.ts +6 -0
- package/models/job-agent.model.d.ts +50 -0
- package/models/lookup.model.d.ts +17 -0
- package/models/vacancy-details-configuration.model.d.ts +29 -0
- package/models/vacancy-details.model.d.ts +58 -0
- package/models/vacancy-list-configuration.model.d.ts +36 -0
- package/models/vacancy-list.model.d.ts +27 -0
- package/package.json +1 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var H=Object.defineProperty,S=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var R=(r,e,t)=>e in r?H(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,s=(r,e)=>{for(var t in e||={})A.call(e,t)&&R(r,t,e[t]);if(B)for(var t of B(e))k.call(e,t)&&R(r,t,e[t]);return r},L=(r,e)=>S(r,T(e));var h=(r,e,t)=>new Promise((a,n)=>{var i=l=>{try{m(t.next(l))}catch(x){n(x)}},f=l=>{try{m(t.throw(l))}catch(x){n(x)}},m=l=>l.done?a(l.value):Promise.resolve(l.value).then(i,f);m((t=t.apply(r,e)).next())});var d=class{constructor(e,t){this.response=e,this.message=t}get status(){return this.response.status}};function c(r,e){return`${r}/${encodeURIComponent(e)}`}function o(r){return{"X-MindKey-User-Language":r}}function w(r,e,t,a){return h(this,null,function*(){let n=yield fetch(r,{method:e,headers:t,body:q(a)});if(!n.ok){let i="";try{i=yield n.text()}catch{i=`Http failure response for ${r}: ${n.status} ${n.statusText}`}throw new d(n,i)}try{let i=yield n.text();return i||(i="{}"),JSON.parse(i)}catch{throw new d(n,`Http failure during parsing for ${r}`)}})}function q(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,e){return h(this,null,function*(){return yield w(r,"GET",e)})}function p(r,e,t){return h(this,null,function*(){return yield w(r,"POST",t,e)})}function C(r,e,t){return h(this,null,function*(){return yield w(r,"PUT",t,e)})}function D(r,e,t){return h(this,null,function*(){return yield w(r,"DELETE",t,e)})}function b(){return{"Content-Type":"application/json"}}var y=class{constructor(e){this.basePath=e}getJobAgentConfiguration(e,t){return u(`${this.getBaseUrl(e)}/configuration`,s({},o(t)))}getJobAgentType(e,t,a){return u(`${this.getBaseUrl(e)}/types/${encodeURIComponent(a)}`,s({},o(t)))}getJobAgent(e,t,a,n,i){return p(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:a,code:n},s({},this.getDefaultPostHeaders(t)))}createJobAgent(e,t,a,n){return p(`${this.getBaseUrl(e)}/create/${n}`,a,s({},this.getDefaultPostHeaders(t)))}updateJobAgent(e,t,a,n){return C(`${this.getBaseUrl(e)}/${n}`,a,s({},this.getDefaultPostHeaders(t)))}deleteJobAgent(e,t,a,n,i){return D(`${this.getBaseUrl(e)}/${i}`,{code:n,jobAgentId:a},s({},this.getDefaultPostHeaders(t)))}resendEmail(e,t,a,n){return p(`${this.getBaseUrl(e)}/resend-email/${n}`,a,s({},this.getDefaultPostHeaders(t)))}activate(e,t,a,n){return p(`${this.getBaseUrl(e)}/activate/${n}`,a,s({},this.getDefaultPostHeaders(t)))}getBaseUrl(e){return`${c(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),b())}};var P=class{constructor(e){this.baseUrl=e}getLookups(e,t){return u(`${c(this.baseUrl,e)}/candidates/lookup`,s({},o(t)))}};var g=(()=>(g=g||{},g.All="all",g.External="external",g.Internal="internal",g))();var V=(r,e,t)=>{let a=t?t[e]:void 0;if(a===void 0)return;let n=String(e);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.`)}},U=(r,e)=>{if(e)for(let t of Object.keys(e))V(r,t,e)};var $=class{constructor(e){this.baseUrl=e}getApplicationFormType(e,t,a="Standard"){return u(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(a)}`,s({},o(t)))}getVacancyListConfiguration(e,t){return u(this.getVacancyListConfigurationPath(e),s({},o(t)))}getVacancyList(e,t,a){let n=new URL(this.getVacancyListPath(e));return U(n.searchParams,this.setDefaultFilter(a)),u(n.toString(),s({},o(t)))}getSimpleVacancyList(e,t,a){let n=new URL(this.getSimpleVacancyListPath(e));return U(n.searchParams,this.setDefaultFilter(a)),u(n.toString(),s({},o(t)))}getVacancyDetailsConfiguration(e,t){return u(this.getVacancyDetailsConfigurationPath(e),s({},o(t)))}getVacancyDetails(e,t,a,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(t)}`);return U(i.searchParams,n),u(i.toString(),s({},o(a)))}createCandidate(e,t,a,n,i){let f=new FormData;return n.forEach(m=>f.append("attachments",m)),i&&f.set("image",i),f.set("candidate",JSON.stringify(a)),p(`${this.getCandidatePath(e)}`,f,s({},o(t)))}setDefaultFilter(e){return L(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${c(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${c(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${c(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};window.mindkey=window.mindkey||{};window.mindkey.apiClient=window.mindkey.apiClient||{};window.mindkey.apiClient.HttpError=d;window.mindkey.apiClient.JobAgentClient=y;window.mindkey.apiClient.VacancyClient=$;window.mindkey.apiClient.LookupClient=P;
|
|
2
|
+
|
|
@@ -0,0 +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(readonly response: Response, readonly message: string) {}\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,KAAWE,mBAAmBD,CAAU,GACtD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA,CAAQ,CAChD,CCCM,IAAOC,EAAP,KAAgB,CAClBC,YAAqBC,EAA6BC,EAAe,CAA5C,KAAAD,SAAAA,EAA6B,KAAAC,QAAAA,CAAkB,CAEpE,IAAIC,QAAM,CACN,OAAO,KAAKF,SAASE,MACzB,GCNJ,SAAeC,EAAeC,EAAaC,EAAgBC,EAAsBC,EAAc,QAAAC,EAAA,sBAC3F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CAAU,iBACzC,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,QAClD,CAEQsB,mCAAmCtB,EAAkB,CACzD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,WAClD","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"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var q=Object.defineProperty,A=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var w=(r,e,t)=>e in r?q(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,s=(r,e)=>{for(var t in e||={})V.call(e,t)&&w(r,t,e[t]);if(b)for(var t of b(e))E.call(e,t)&&w(r,t,e[t]);return r},C=(r,e)=>A(r,F(e));var y=(r,e,t)=>new Promise((n,a)=>{var o=l=>{try{$(t.next(l))}catch(D){a(D)}},m=l=>{try{$(t.throw(l))}catch(D){a(D)}},$=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,m);$((t=t.apply(r,e)).next())});function c(r,e){return`${r}/${encodeURIComponent(e)}`}function i(r){return{"X-MindKey-User-Language":r}}var P=class{constructor(e,t){this.response=e,this.message=t}get status(){return this.response.status}};function x(r,e,t,n){return y(this,null,function*(){let a=yield fetch(r,{method:e,headers:t,body:J(n)});if(!a.ok){let o="";try{o=yield a.text()}catch{o=`Http failure response for ${r}: ${a.status} ${a.statusText}`}throw new P(a,o)}try{let o=yield a.text();return o||(o="{}"),JSON.parse(o)}catch{throw new P(a,`Http failure during parsing for ${r}`)}})}function J(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,e){return y(this,null,function*(){return yield x(r,"GET",e)})}function p(r,e,t){return y(this,null,function*(){return yield x(r,"POST",t,e)})}function B(r,e,t){return y(this,null,function*(){return yield x(r,"PUT",t,e)})}function R(r,e,t){return y(this,null,function*(){return yield x(r,"DELETE",t,e)})}function H(){return{"Content-Type":"application/json"}}var L=class{constructor(e){this.basePath=e}getJobAgentConfiguration(e,t){return u(`${this.getBaseUrl(e)}/configuration`,s({},i(t)))}getJobAgentType(e,t,n){return u(`${this.getBaseUrl(e)}/types/${encodeURIComponent(n)}`,s({},i(t)))}getJobAgent(e,t,n,a,o){return p(`${this.getBaseUrl(e)}/${o}`,{jobAgentId:n,code:a},s({},this.getDefaultPostHeaders(t)))}createJobAgent(e,t,n,a){return p(`${this.getBaseUrl(e)}/create/${a}`,n,s({},this.getDefaultPostHeaders(t)))}updateJobAgent(e,t,n,a){return B(`${this.getBaseUrl(e)}/${a}`,n,s({},this.getDefaultPostHeaders(t)))}deleteJobAgent(e,t,n,a,o){return R(`${this.getBaseUrl(e)}/${o}`,{code:a,jobAgentId:n},s({},this.getDefaultPostHeaders(t)))}resendEmail(e,t,n,a){return p(`${this.getBaseUrl(e)}/resend-email/${a}`,n,s({},this.getDefaultPostHeaders(t)))}activate(e,t,n,a){return p(`${this.getBaseUrl(e)}/activate/${a}`,n,s({},this.getDefaultPostHeaders(t)))}getBaseUrl(e){return`${c(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},i(e)),H())}};var S=class{constructor(e){this.baseUrl=e}getLookups(e,t){return u(`${c(this.baseUrl,e)}/candidates/lookup`,s({},i(t)))}};var h=(()=>(h=h||{},h.Show="Show",h.Hide="Hide",h.Sidebar="Sidebar",h))();var g=(()=>(g=g||{},g.All="all",g.External="external",g.Internal="internal",g))(),f=(()=>(f=f||{},f.Hide="hide",f.Only="only",f.Bottom="bottom",f.Top="top",f))();var d=(()=>(d=d||{},d.Description="description",d.StartDate="startDate",d.EndDate="endDate",d.Priority="priority",d))();var v=(r,e,t)=>{let n=t?t[e]:void 0;if(n===void 0)return;let a=String(e);switch(typeof n){case"boolean":r.set(a,n?"true":"false");break;case"string":r.set(a,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},U=(r,e)=>{if(e)for(let t of Object.keys(e))v(r,t,e)};var T=class{constructor(e){this.baseUrl=e}getApplicationFormType(e,t,n="Standard"){return u(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(n)}`,s({},i(t)))}getVacancyListConfiguration(e,t){return u(this.getVacancyListConfigurationPath(e),s({},i(t)))}getVacancyList(e,t,n){let a=new URL(this.getVacancyListPath(e));return U(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(t)))}getSimpleVacancyList(e,t,n){let a=new URL(this.getSimpleVacancyListPath(e));return U(a.searchParams,this.setDefaultFilter(n)),u(a.toString(),s({},i(t)))}getVacancyDetailsConfiguration(e,t){return u(this.getVacancyDetailsConfigurationPath(e),s({},i(t)))}getVacancyDetails(e,t,n,a){let o=new URL(`${this.getBasePath(e)}/${encodeURIComponent(t)}`);return U(o.searchParams,a),u(o.toString(),s({},i(n)))}createCandidate(e,t,n,a,o){let m=new FormData;return a.forEach($=>m.append("attachments",$)),o&&m.set("image",o),m.set("candidate",JSON.stringify(n)),p(`${this.getCandidatePath(e)}`,m,s({},i(t)))}setDefaultFilter(e){return C(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${c(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${c(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${c(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};export{g as AccessType,h as DataPlacement,P as HttpError,L as JobAgentClient,S as LookupClient,d as SortFieldType,f as UnsolicitedType,T as VacancyClient};
|
|
2
|
+
|
|
3
|
+
|
|
@@ -0,0 +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(readonly response: Response, readonly message: string) {}\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.getConfig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,CAClC,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,aAClD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,oBAClD,CAEQwC,iBAAiBxC,EAAkB,CACvC,MAAO,GAAG0B,EAAY,KAAK5B,QAASE,CAAU,cAClD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,YACzC,CAEQoB,yBAAyBpB,EAAkB,CAC/C,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,UACzC,CAEQ8C,qBAAqB9C,EAAkB,CAC3C,MAAO,GAAG,KAAK0B,YAAY1B,CAAU,iBACzC,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,QAClD,CAEQsB,mCAAmCtB,EAAkB,CACzD,MAAO,GAAG,KAAK8C,qBAAqB9C,CAAU,WAClD","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-module.js"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* API client to make requests to the Job Agent API.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class JobAgentClient {
|
|
8
|
+
private readonly basePath;
|
|
9
|
+
constructor(basePath: string);
|
|
10
|
+
/**
|
|
11
|
+
* Returns the site settings for Job Agents.
|
|
12
|
+
* @param customerId - Your customer id.
|
|
13
|
+
* @param language - The language to request.
|
|
14
|
+
*/
|
|
15
|
+
getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration>;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the settings for a specific Job Agent type.
|
|
18
|
+
* @param customerId - Your customer id.
|
|
19
|
+
* @param language - The language to request.
|
|
20
|
+
* @param type - The id of a Job Agent type.
|
|
21
|
+
*/
|
|
22
|
+
getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns a specific Job Agent.
|
|
25
|
+
* @param customerId - Your customer id.
|
|
26
|
+
* @param language - The language to request.
|
|
27
|
+
* @param jobAgentId - The id of the Job Agent.
|
|
28
|
+
* @param code - The code of the Job Agent.
|
|
29
|
+
* @param type - The type of the Job Agent.
|
|
30
|
+
*/
|
|
31
|
+
getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new Job Agent.
|
|
34
|
+
* @param customerId - Your customer id.
|
|
35
|
+
* @param language - The language to request.
|
|
36
|
+
* @param jobAgent - The Job Agent to create.
|
|
37
|
+
* @param type - The type of the Job Agent.
|
|
38
|
+
*/
|
|
39
|
+
createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Updates an existing Job Agent.
|
|
42
|
+
* @param customerId - Your customer id.
|
|
43
|
+
* @param language - The language to request.
|
|
44
|
+
* @param jobAgent - The Job Agent to change.
|
|
45
|
+
* @param type - The type of the Job Agent.
|
|
46
|
+
*/
|
|
47
|
+
updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Deletes an existing Job Agent.
|
|
50
|
+
* @param customerId - Your customer id.
|
|
51
|
+
* @param language - The language to request.
|
|
52
|
+
* @param jobAgentId - The id of the Job Agent.
|
|
53
|
+
* @param code - The code of the Job Agent.
|
|
54
|
+
* @param type - The type of the Job Agent.
|
|
55
|
+
*/
|
|
56
|
+
deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Tries to email the user allowing them to activate/modify/delete their Job Agent.
|
|
59
|
+
* 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.
|
|
60
|
+
* @param customerId - Your customer id.
|
|
61
|
+
* @param language - The language to request.
|
|
62
|
+
* @param email - The email that should be in the system to try to resent the recent Job Agent information to.
|
|
63
|
+
* @param type - The type of the Job Agent.
|
|
64
|
+
*/
|
|
65
|
+
resendEmail(customerId: string, language: string, email: string, type: string): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Activates an existing Job Agent.
|
|
68
|
+
* @param customerId - Your customer id.
|
|
69
|
+
* @param language - The language to request.
|
|
70
|
+
* @param code - The code of the Job Agent.
|
|
71
|
+
* @param type - The type of the Job Agent.
|
|
72
|
+
*/
|
|
73
|
+
activate(customerId: string, language: string, code: string, type: string): Promise<void>;
|
|
74
|
+
private getBaseUrl;
|
|
75
|
+
private getDefaultPostHeaders;
|
|
76
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Lookups } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* API client to make requests to the Lookup API.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class LookupClient {
|
|
8
|
+
private readonly baseUrl;
|
|
9
|
+
constructor(baseUrl: string);
|
|
10
|
+
/**
|
|
11
|
+
* Gets all the lookups.
|
|
12
|
+
* @param customerId - Your customer id.
|
|
13
|
+
* @param language - The language to request.
|
|
14
|
+
*/
|
|
15
|
+
getLookups(customerId: string, language: string): Promise<Lookups>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ApplicationFormType, CandidateResult, CandidateUpload, VacancyDetails, VacancyDetailsConfiguration, VacancyDetailsFilters, VacancyListConfiguration, VacancyListFilters } from '../models';
|
|
2
|
+
import { SimpleVacancyDetails } from '../models';
|
|
3
|
+
/**
|
|
4
|
+
* API client to make requests to the Vacancy API.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class VacancyClient {
|
|
9
|
+
private readonly baseUrl;
|
|
10
|
+
constructor(baseUrl: string);
|
|
11
|
+
/**
|
|
12
|
+
* Returns the setup for a Vacancy.
|
|
13
|
+
* @param customerId - Your customer id.
|
|
14
|
+
* @param language - The language to request.
|
|
15
|
+
* @param applicationFormType - The application form type to request.
|
|
16
|
+
*/
|
|
17
|
+
getApplicationFormType(customerId: string, language: string, applicationFormType?: string): Promise<ApplicationFormType>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the site settings for Vacancy List.
|
|
20
|
+
* @param customerId - Your customer id.
|
|
21
|
+
* @param language - The language to request.
|
|
22
|
+
*/
|
|
23
|
+
getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a detailed list of vacancies.
|
|
26
|
+
* @param customerId - Your customer id.
|
|
27
|
+
* @param language - The language to request.
|
|
28
|
+
* @param filtersAndConfiguration - Filters and configuration to apply to the request.
|
|
29
|
+
*/
|
|
30
|
+
getVacancyList(customerId: string, language: string, filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration): Promise<VacancyDetails[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a less detailed list of vacancies.
|
|
33
|
+
* @param customerId - Your customer id.
|
|
34
|
+
* @param language - The language to request.
|
|
35
|
+
* @param filtersAndConfiguration - Filters and configuration to apply to the request.
|
|
36
|
+
*/
|
|
37
|
+
getSimpleVacancyList(customerId: string, language: string, filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration): Promise<SimpleVacancyDetails[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the site settings for Vacancy.
|
|
40
|
+
* @param customerId - Your customer id.
|
|
41
|
+
* @param language - The language to request.
|
|
42
|
+
*/
|
|
43
|
+
getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration>;
|
|
44
|
+
/**
|
|
45
|
+
* Returns a single vacancy.
|
|
46
|
+
* @param customerId - Your customer id.
|
|
47
|
+
* @param language - The language to request.
|
|
48
|
+
* @param id - The id of the vacancy.
|
|
49
|
+
* @param filters - The filters to apply to the request.
|
|
50
|
+
*/
|
|
51
|
+
getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new candidate for a vacancy.
|
|
54
|
+
* @param customerId - Your customer id.
|
|
55
|
+
* @param language - The language to request.
|
|
56
|
+
* @param candidate - The candidate to add to the vacancy.
|
|
57
|
+
* @param attachments - Attachments to upload.
|
|
58
|
+
* @param image - Candidate image.
|
|
59
|
+
*/
|
|
60
|
+
createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult>;
|
|
61
|
+
private setDefaultFilter;
|
|
62
|
+
private getBasePath;
|
|
63
|
+
private getApplicationFormTypePath;
|
|
64
|
+
private getCandidatePath;
|
|
65
|
+
private getVacancyListPath;
|
|
66
|
+
private getSimpleVacancyListPath;
|
|
67
|
+
private getConfigurationPath;
|
|
68
|
+
private getVacancyListConfigurationPath;
|
|
69
|
+
private getVacancyDetailsConfigurationPath;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HttpError } from './http.error';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const assignFilters: <T extends object>(searchParams: URLSearchParams, filters?: T | undefined) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getBasePath(baseUrl: string, customerId: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function sendGetRequest<T>(url: string, headers: HeadersInit): Promise<T>;
|
|
2
|
+
export declare function sendPostRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T>;
|
|
3
|
+
export declare function sendPutRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T>;
|
|
4
|
+
export declare function sendDeleteRequest<T>(url: string, body: unknown, headers: HeadersInit): Promise<T>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HttpError } from './errors';
|
|
2
|
+
import { JobAgentClient, LookupClient, VacancyClient } from './clients';
|
|
3
|
+
declare global {
|
|
4
|
+
interface ApiClient {
|
|
5
|
+
HttpError: typeof HttpError;
|
|
6
|
+
JobAgentClient: typeof JobAgentClient;
|
|
7
|
+
VacancyClient: typeof VacancyClient;
|
|
8
|
+
LookupClient: typeof LookupClient;
|
|
9
|
+
}
|
|
10
|
+
interface Window {
|
|
11
|
+
mindkey: {
|
|
12
|
+
apiClient: ApiClient;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { HasDescription } from './description.model';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface Attachment extends HasDescription {
|
|
6
|
+
documentTypeId: string;
|
|
7
|
+
mandatory: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface ApplicationFormType {
|
|
13
|
+
showImage: boolean;
|
|
14
|
+
showRegions: boolean;
|
|
15
|
+
showLocations: boolean;
|
|
16
|
+
showFieldsOfWork: boolean;
|
|
17
|
+
showElements: boolean;
|
|
18
|
+
showAllowSaveDisclaimer: boolean;
|
|
19
|
+
showPreviouslyApplied: boolean;
|
|
20
|
+
showMedia: boolean;
|
|
21
|
+
showBirthDate: boolean;
|
|
22
|
+
showGender: boolean;
|
|
23
|
+
showHomePhone: boolean;
|
|
24
|
+
showMobilePhone: boolean;
|
|
25
|
+
showCountry: boolean;
|
|
26
|
+
showStateProvince: boolean;
|
|
27
|
+
showAddress: boolean;
|
|
28
|
+
showAddress2: boolean;
|
|
29
|
+
showNationality: boolean;
|
|
30
|
+
showMaritalStatus: boolean;
|
|
31
|
+
showSalutation: boolean;
|
|
32
|
+
genderMandatory: boolean;
|
|
33
|
+
birthDateMandatory: boolean;
|
|
34
|
+
mobilePhoneMandatory: boolean;
|
|
35
|
+
homePhoneMandatory: boolean;
|
|
36
|
+
addressMandatory: boolean;
|
|
37
|
+
invalidImageDocumentTypeId: string;
|
|
38
|
+
applicationNoteDocumentTypeId: string;
|
|
39
|
+
defaultAdvertisementReference: string;
|
|
40
|
+
showNote: boolean;
|
|
41
|
+
allowSaveDisclaimerMandatory: boolean;
|
|
42
|
+
repeatEmail: boolean;
|
|
43
|
+
allowSaveDisclaimer: string;
|
|
44
|
+
confirmationPage: string;
|
|
45
|
+
attachmentInfo: string;
|
|
46
|
+
candidateMailingTemplateId: string;
|
|
47
|
+
attachments: Attachment[];
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { HasDescription } from './description.model';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface Candidate {
|
|
6
|
+
vacancyId: string;
|
|
7
|
+
email: string;
|
|
8
|
+
name: string;
|
|
9
|
+
allowSave: boolean;
|
|
10
|
+
nationalityId: string | null;
|
|
11
|
+
previouslyApplied: boolean;
|
|
12
|
+
addressStreet1: string | null;
|
|
13
|
+
addressStreet2: string | null;
|
|
14
|
+
addressCity: string | null;
|
|
15
|
+
addressStateProvince: string | null;
|
|
16
|
+
addressZipPostalCode: string | null;
|
|
17
|
+
addressCountryRegion: string | null;
|
|
18
|
+
homePhone: string | null;
|
|
19
|
+
mobilePhone: string | null;
|
|
20
|
+
birthDate: string | null;
|
|
21
|
+
advertisementReference: string | null;
|
|
22
|
+
gender: string | null;
|
|
23
|
+
maritalStatus: string | null;
|
|
24
|
+
salutation: string | null;
|
|
25
|
+
candidateMailingTemplateId: string | null;
|
|
26
|
+
locations: string[];
|
|
27
|
+
fieldsOfWork: string[];
|
|
28
|
+
regions: string[];
|
|
29
|
+
vacancyElementLines: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export interface AttachmentUpload extends HasDescription {
|
|
35
|
+
documentTypeId: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export interface CandidateUpload extends Candidate {
|
|
41
|
+
attachmentDetails: AttachmentUpload[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface CandidateResult {
|
|
47
|
+
success: boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { JobAgent, JobAgentType, JobAgentUpdate, Region, Location, FieldsOfWork } from './job-agent.model';
|
|
2
|
+
export type { JobAgentConfiguration } from './job-agent-configuration.model';
|
|
3
|
+
export type { Lookups, DocumentFileType } from './lookup.model';
|
|
4
|
+
export type { VacancyType, VacancyElement, VacancyDetails, VacancyDetailsFilters, SimpleVacancyDetails, Area } from './vacancy-details.model';
|
|
5
|
+
export type { Attachment, ApplicationFormType } from './application-form.model';
|
|
6
|
+
export type { Candidate, CandidateResult, CandidateUpload, AttachmentUpload } from './candidate.model';
|
|
7
|
+
export type { VacancyListConfiguration, VacancyListLocalConfiguration } from './vacancy-list-configuration.model';
|
|
8
|
+
export type { VacancyDetailsConfiguration } from './vacancy-details-configuration.model';
|
|
9
|
+
export type { Culture } from './culture.model';
|
|
10
|
+
export type { HasId } from './id.model';
|
|
11
|
+
export type { HasDescription } from './description.model';
|
|
12
|
+
export { DataPlacement } from './vacancy-details-configuration.model';
|
|
13
|
+
export type { VacancyListFilters } from './vacancy-list.model';
|
|
14
|
+
export { AccessType, UnsolicitedType } from './vacancy-list.model';
|
|
15
|
+
export { SortFieldType } from './vacancy-list-configuration.model';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Culture } from './culture.model';
|
|
2
|
+
import { HasDescription } from './description.model';
|
|
3
|
+
import { HasId } from './id.model';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface Location extends HasId, HasDescription {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface FieldsOfWork extends HasId, HasDescription {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export interface Region extends HasId, HasDescription {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export interface JobAgentType {
|
|
23
|
+
repeatEmail: boolean;
|
|
24
|
+
showCulture: boolean;
|
|
25
|
+
showKeywords: boolean;
|
|
26
|
+
allowSaveDisclaimer: string;
|
|
27
|
+
cultures: Culture[];
|
|
28
|
+
locations: Location[];
|
|
29
|
+
fieldsOfWork: FieldsOfWork[];
|
|
30
|
+
regions: Region[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface JobAgent {
|
|
36
|
+
name: string;
|
|
37
|
+
email: string;
|
|
38
|
+
keywords: string;
|
|
39
|
+
cultureId: string | null;
|
|
40
|
+
locations: string[];
|
|
41
|
+
regions: string[];
|
|
42
|
+
fieldsOfWork: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export interface JobAgentUpdate extends JobAgent {
|
|
48
|
+
jobAgentId: string;
|
|
49
|
+
code: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Culture } from './culture.model';
|
|
2
|
+
import { HasDescription } from './description.model';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface DocumentFileType extends HasDescription {
|
|
7
|
+
documentFileTypeId: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface Lookups {
|
|
13
|
+
countries: string[];
|
|
14
|
+
nationalities: string[];
|
|
15
|
+
documentFileTypes: DocumentFileType[];
|
|
16
|
+
cultures: Culture[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DataPlacement {
|
|
5
|
+
Show = "Show",
|
|
6
|
+
Hide = "Hide",
|
|
7
|
+
Sidebar = "Sidebar"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface VacancyDetailsConfiguration {
|
|
13
|
+
showStartDate?: DataPlacement;
|
|
14
|
+
showEndDate?: DataPlacement;
|
|
15
|
+
showVacancyType?: DataPlacement;
|
|
16
|
+
showContactPersonName?: DataPlacement;
|
|
17
|
+
showContactPersonWorkPhone?: DataPlacement;
|
|
18
|
+
showContactPersonMobilePhone?: DataPlacement;
|
|
19
|
+
showContactPersonEmail?: DataPlacement;
|
|
20
|
+
showPositionStartDate?: DataPlacement;
|
|
21
|
+
showEmploymentCategoryName?: DataPlacement;
|
|
22
|
+
showOrganizationName?: DataPlacement;
|
|
23
|
+
showLocations?: DataPlacement;
|
|
24
|
+
showRegions?: DataPlacement;
|
|
25
|
+
showTeaser?: DataPlacement;
|
|
26
|
+
showCompanyName?: DataPlacement;
|
|
27
|
+
showCompanyAddress?: DataPlacement;
|
|
28
|
+
showLongDate?: boolean;
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { HasDescription } from './description.model';
|
|
2
|
+
import { HasId } from './id.model';
|
|
3
|
+
import { VacancyListFilters } from './vacancy-list.model';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface VacancyDetails extends HasId, HasDescription {
|
|
8
|
+
type: VacancyType;
|
|
9
|
+
startDate: Date;
|
|
10
|
+
endDate: Date | null;
|
|
11
|
+
positionStartDate: Date | null;
|
|
12
|
+
priority: number;
|
|
13
|
+
reAdvertisement: boolean;
|
|
14
|
+
unsolicited: boolean;
|
|
15
|
+
employmentCategoryName: string | null;
|
|
16
|
+
internalAccess: boolean;
|
|
17
|
+
externalAccess: boolean;
|
|
18
|
+
teaserText: null | string;
|
|
19
|
+
candidateApplicationFormTypeId: string;
|
|
20
|
+
contactEmployeeName: null | string;
|
|
21
|
+
contactEmployeWorkPhoneNumber: null | string;
|
|
22
|
+
contactEmployeeMobilePhoneNumber: null | string;
|
|
23
|
+
contactEmployeeEmail: null | string;
|
|
24
|
+
advertisementText: null | string;
|
|
25
|
+
companyName: string;
|
|
26
|
+
companyAddress: string;
|
|
27
|
+
organizationName: string;
|
|
28
|
+
locations: VacancyType[];
|
|
29
|
+
fieldsOfWork: VacancyType[];
|
|
30
|
+
regions: VacancyType[];
|
|
31
|
+
areas: Area[];
|
|
32
|
+
vacancyElements: VacancyElement[];
|
|
33
|
+
medias: VacancyType[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export type SimpleVacancyDetails = Pick<VacancyDetails, 'id' | 'description' | 'type' | 'startDate' | 'endDate' | 'priority' | 'unsolicited' | 'internalAccess' | 'externalAccess' | 'teaserText' | 'locations' | 'regions' | 'areas'>;
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export interface VacancyType extends HasId, HasDescription {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type Area = HasId;
|
|
48
|
+
/**
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export interface VacancyElement extends HasId, HasDescription {
|
|
52
|
+
allowMultipleSelection: boolean;
|
|
53
|
+
vacancyElementLines: VacancyType[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export type VacancyDetailsFilters = Pick<VacancyListFilters, 'includeAdvertisementText' | 'access'>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SortFieldType {
|
|
5
|
+
Description = "description",
|
|
6
|
+
StartDate = "startDate",
|
|
7
|
+
EndDate = "endDate",
|
|
8
|
+
Priority = "priority"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export interface VacancyListConfiguration {
|
|
14
|
+
showStartDate?: boolean;
|
|
15
|
+
showEndDate?: boolean;
|
|
16
|
+
showLongDate?: boolean;
|
|
17
|
+
showTeaserText?: boolean;
|
|
18
|
+
showLocations?: boolean;
|
|
19
|
+
showRegions?: boolean;
|
|
20
|
+
showAreas?: boolean;
|
|
21
|
+
sortField?: SortFieldType;
|
|
22
|
+
sortDescending?: boolean;
|
|
23
|
+
showFilters?: boolean;
|
|
24
|
+
showApplyLink?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Configuration that only can be done via HTML attributes.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface VacancyListLocalConfiguration {
|
|
31
|
+
showAreasFilter: boolean;
|
|
32
|
+
showVacancyTypesFilter: boolean;
|
|
33
|
+
showLocationsFilter: boolean;
|
|
34
|
+
showRegionsFilter: boolean;
|
|
35
|
+
showEmptyMessage: boolean;
|
|
36
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AccessType {
|
|
5
|
+
All = "all",
|
|
6
|
+
External = "external",
|
|
7
|
+
Internal = "internal"
|
|
8
|
+
}
|
|
9
|
+
export declare enum UnsolicitedType {
|
|
10
|
+
Hide = "hide",
|
|
11
|
+
Only = "only",
|
|
12
|
+
Bottom = "bottom",
|
|
13
|
+
Top = "top"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface VacancyListFilters {
|
|
19
|
+
includeAdvertisementText?: boolean;
|
|
20
|
+
perDate?: string;
|
|
21
|
+
vacancyTypeId?: string;
|
|
22
|
+
regionName?: string;
|
|
23
|
+
locationId?: string;
|
|
24
|
+
vacancyAreaName?: string;
|
|
25
|
+
unsolicited?: UnsolicitedType;
|
|
26
|
+
access?: AccessType;
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@mindkey/recruiting-api-client","author":"MindKey Software A/S","homepage":"https://mindkey.com","version":"7.3.7-ci.21751","main":"api-client-module.js","typings":"index.d.ts"}
|