@mindkey/recruiting-api-client
Version:
The MindKey API Client allows easy access to your MindKey Recruiting data.
81 lines (80 loc) • 3.77 kB
TypeScript
import type { ApplicationFormType, CandidateResult, CandidateUpload, VacancyDetails, VacancyDetailsConfiguration, VacancyDetailsFilters, VacancyListConfiguration, VacancyListFilters } from '../models';
import { SimpleVacancyDetails } from '../models';
import { HttpBackend } from '../helpers';
/**
* API client to make requests to the Vacancy API.
*
* @public
*/
export declare class VacancyClient {
private readonly baseUrl;
private readonly backend;
constructor(baseUrl: string, backend?: HttpBackend);
/**
* Returns the setup for a Vacancy.
* @param customerId - Your customer id.
* @param language - The language to request.
* @param applicationFormType - The application form type to request.
*/
getApplicationFormType(customerId: string, language: string, applicationFormType?: string): Promise<ApplicationFormType>;
/**
* Returns the site settings for Vacancy List.
* @param customerId - Your customer id.
* @param language - The language to request.
*/
getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration>;
/**
* Returns a detailed list of vacancies.
*
* The result of this API should be cached and reused.
*
* @param customerId - Your customer id.
* @param language - The language to request.
* @param filtersAndConfiguration - Filters and configuration to apply to the request.
*/
getVacancyList(customerId: string, language: string, filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration): Promise<VacancyDetails[]>;
/**
* Returns a less detailed list of vacancies.
* @param customerId - Your customer id.
* @param language - The language to request.
* @param filtersAndConfiguration - Filters and configuration to apply to the request.
*/
getSimpleVacancyList(customerId: string, language: string, filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration): Promise<SimpleVacancyDetails[]>;
/**
* Returns the site settings for Vacancy.
* @param customerId - Your customer id.
* @param language - The language to request.
*/
getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration>;
/**
* Returns a single vacancy.
* @param customerId - Your customer id.
* @param language - The language to request.
* @param id - The id of the vacancy.
* @param filters - The filters to apply to the request.
*/
getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails>;
/**
* Creates a new candidate for a vacancy.
* @param customerId - Your customer id.
* @param language - The language to request.
* @param candidate - The candidate to add to the vacancy.
* @param attachments - Attachments to upload.
* @param image - Candidate image.
*/
createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult>;
private prepareVacancyDetailsModel;
private prepareSimpleVacancyDetailsModel;
private mapDeprecatedVacancyDetailsFields;
private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel;
private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel;
private setDefaultFilter;
private getBasePath;
private getApplicationFormTypePath;
private getCandidatePath;
private getVacancyListPath;
private getSimpleVacancyListPath;
private getConfigurationPath;
private getVacancyListConfigurationPath;
private getVacancyDetailsConfigurationPath;
}