@mindkey/recruiting-api-client 7.8.14 → 7.19.1
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/api-client-global.js +1 -1
- package/api-client-global.js.map +1 -1
- package/api-client.js +15 -12
- package/api-client.js.map +1 -1
- package/api-client.mjs +1 -1
- package/api-client.mjs.map +1 -1
- package/clients/index.d.ts +2 -0
- package/clients/video-upload.client.d.ts +78 -0
- package/errors/http.error.d.ts +3 -1
- package/models/application-form.model.d.ts +14 -0
- package/models/candidate.model.d.ts +13 -0
- package/package.json +1 -1
package/api-client-global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var P=Object.defineProperty,x=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var w=(a,t,e)=>t in a?P(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,r=(a,t)=>{for(var e in t||={})B.call(t,e)&&w(a,e,t[e]);if(k)for(var e of k(t))U.call(t,e)&&w(a,e,t[e]);return a},p=(a,t)=>x(a,C(t));var h=class extends Error{constructor(t,e,n){super(e),this.response=t,this.url=n??t.url}get status(){return this.response.status}};function u(a,t){return`${a}/${encodeURIComponent(t)}`}function o(a){return{"X-MindKey-User-Language":a}}var c={async get(a,t){return await c.sendRequest(a,"GET",t)},async post(a,t,e){return await c.sendRequest(a,"POST",e,t)},async put(a,t,e){return await c.sendRequest(a,"PUT",e,t)},async delete(a,t,e){return await c.sendRequest(a,"DELETE",e,t)},async sendRequest(a,t,e,n){let s=await fetch(a,{method:t,headers:e,body:b(n)}),i="";if(s.ok)i=await s.text();else{try{i=await s.text()}catch{i=`Http failure response for ${a}: ${s.status} ${s.statusText}`}throw new h(s,i)}return i||(i="{}"),JSON.parse(i)}};function b(a){if(a)return typeof Blob<"u"&&a instanceof Blob||typeof ArrayBuffer<"u"&&a instanceof ArrayBuffer||typeof FormData<"u"&&a instanceof FormData||typeof URLSearchParams<"u"&&a instanceof URLSearchParams?a:JSON.stringify(a)}function S(){return{"Content-Type":"application/json"}}var d=class{constructor(t,e=c){this.basePath=t,this.backend=e}getJobAgentConfiguration(t,e){return this.backend.get(`${this.getBaseUrl(t)}/configuration`,r({},o(e)))}getJobAgentType(t,e,n){return this.backend.get(`${this.getBaseUrl(t)}/types/${encodeURIComponent(n)}`,r({},o(e)))}getJobAgent(t,e,n,s,i){return this.backend.post(`${this.getBaseUrl(t)}/${i}`,{jobAgentId:n,code:s},r({},this.getDefaultPostHeaders(e)))}createJobAgent(t,e,n,s){return this.backend.post(`${this.getBaseUrl(t)}/create/${s}`,n,r({},this.getDefaultPostHeaders(e)))}updateJobAgent(t,e,n,s){return this.backend.put(`${this.getBaseUrl(t)}/${s}`,n,r({},this.getDefaultPostHeaders(e)))}deleteJobAgent(t,e,n,s,i){return this.backend.delete(`${this.getBaseUrl(t)}/delete/${i}?jobAgentId=${n}&code=${s}`,null,r({},this.getDefaultPostHeaders(e)))}resendEmail(t,e,n,s){return this.backend.post(`${this.getBaseUrl(t)}/resend-email/${s}`,n,r({},this.getDefaultPostHeaders(e)))}activate(t,e,n,s){return this.backend.post(`${this.getBaseUrl(t)}/activate/${s}`,n,r({},this.getDefaultPostHeaders(e)))}getBaseUrl(t){return`${u(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return r(r({},o(t)),S())}};var f=class{constructor(t,e=c){this.baseUrl=t,this.backend=e}getLookups(t,e){return this.backend.get(`${u(this.baseUrl,t)}/candidates/lookup`,r({},o(e)))}};var y=function(a){return a.All="All",a.External="External",a.Internal="Internal",a}(y||{});var D=(a,t,e)=>{let n=e?e[t]:void 0;if(n===void 0)return;let s=String(t);switch(typeof n){case"boolean":a.set(s,n?"true":"false");break;case"string":a.set(s,n);break;default:throw new Error(`${typeof n} is not implemented yet.`)}},m=(a,t)=>{if(t)for(let e of Object.keys(t))D(a,e,t)};var g=class{constructor(t,e=c){this.baseUrl=t,this.backend=e}getApplicationFormType(t,e,n="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(n)}`,r({},o(e)))}getVacancyListConfiguration(t,e){return this.backend.get(this.getVacancyListConfigurationPath(t),r({},o(e)))}async getVacancyList(t,e,n){let s=new URL(this.getVacancyListPath(t));return m(s.searchParams,this.setDefaultFilter(n)),(await this.backend.get(s.toString(),r({},o(e)))).map(l=>this.prepareVacancyDetailsModel(l))}async getSimpleVacancyList(t,e,n){let s=new URL(this.getSimpleVacancyListPath(t));return m(s.searchParams,this.setDefaultFilter(n)),(await this.backend.get(s.toString(),r({},o(e)))).map(l=>this.prepareSimpleVacancyDetailsModel(l))}getVacancyDetailsConfiguration(t,e){return this.backend.get(this.getVacancyDetailsConfigurationPath(t),r({},o(e)))}async getVacancyDetails(t,e,n,s){let i=new URL(`${this.getBasePath(t)}/${encodeURIComponent(e)}`);m(i.searchParams,s);let l=await this.backend.get(i.toString(),r({},o(n)));return this.prepareVacancyDetailsModel(l)}createCandidate(t,e,n,s,i){let l=new FormData;return s.forEach($=>l.append("attachments",$)),i&&l.set("image",i),l.set("candidate",JSON.stringify(n)),this.backend.post(`${this.getCandidatePath(t)}`,l,r({},o(e)))}prepareVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(t))}prepareSimpleVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)}mapDeprecatedVacancyDetailsFields(t){return p(r({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t){return p(r({},t),{areas:t.areas??[],fieldsOfWork:t.fieldsOfWork??[],locations:t.locations??[],regions:t.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(t){return p(r(r({},t),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)),{medias:t.medias??[],vacancyElements:t.vacancyElements??[]})}setDefaultFilter(t){return p(r({},t),{access:t?.access??y.External})}getBasePath(t){return`${u(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${u(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${u(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=h;window.mindkey.apiClient.JobAgentClient=d;window.mindkey.apiClient.VacancyClient=g;window.mindkey.apiClient.LookupClient=f;
|
|
2
2
|
|
package/api-client-global.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n constructor(\n readonly response: Response,\n message: string,\n ) {\n super(message);\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'PUT', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'DELETE', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(`${this.getBaseUrl(customerId)}/delete/${type}?jobAgentId=${jobAgentId}&code=${code}`, null, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,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+C0C,EAAoB,CACvE,OAAOT,EAAA5C,EAAA,GAAKqD,GAAL,CAAYC,OAAQD,GAAOC,QAAUC,EAAWC,QAAQ,EACnE,CAEQhC,YAAY9B,EAAkB,CAClC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,mBACnD,CAEQ6C,iBAAiB7C,EAAkB,CACvC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQuB,yBAAyBvB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQ+D,qBAAqB/D,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client-global.js"}
|
|
1
|
+
{"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts","projects/api-client/src/clients/video-upload.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n /** Request URL the error originated from. Falls back to {@link response.url}. */\n readonly url: string;\n\n constructor(\n readonly response: Response,\n message: string,\n url?: string,\n ) {\n super(message);\n this.url = url ?? response.url;\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'PUT', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'DELETE', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(`${this.getBaseUrl(customerId)}/delete/${type}?jobAgentId=${jobAgentId}&code=${code}`, null, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Flag indicating whether the candidate may attach an application video.\n */\n showApplicationVideo: boolean;\n\n /**\n * Per-form-type cap on video application length in seconds. 0 means\n * \"use the system-wide default\". Always bounded above by the system\n * ceiling configured in VideoApplication:MaxDurationSeconds.\n */\n videoMaxDurationSeconds: number;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Flag indicating whether the candidate must attach an application video to submit.\n */\n applicationVideoMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n","import { fetchBackend, getBasePath, HttpBackend } from '../helpers';\n\n/**\n * @public\n */\nexport type VideoSource = 'Recorded' | 'Uploaded';\n\n/**\n * @public\n */\nexport interface VideoSasRequest {\n fileName: string;\n fileSize: number;\n contentType: string;\n durationSeconds: number;\n}\n\n/**\n * @public\n */\nexport interface VideoSasResponse {\n sasUrl: string;\n blobPath: string;\n maxBlockSize: number;\n expiresAt: string;\n}\n\n/**\n * Thrown when the SAS endpoint returns a non-success status. The status code is preserved\n * so callers can distinguish 400 (validation), 404 (candidate missing), 409 (already\n * finalized), 410 (draft window expired), 429 (rate limited), 5xx (transient).\n *\n * @public\n */\nexport class VideoSasError extends Error {\n constructor(public readonly status: number) {\n super(`video-sas-${status}`);\n }\n}\n\n/**\n * Thrown when block uploads or finalize fail.\n *\n * @public\n */\nexport class VideoUploadError extends Error {\n constructor(public readonly status: number) {\n super(`video-upload-${status}`);\n }\n}\n\n/**\n * Uploads a candidate video directly to Azure Blob Storage using a scoped SAS issued\n * by the Recruiting API, then asks the API to commit the blob. The API never handles\n * the video bytes — only the browser and Azure Blob Storage do.\n *\n * @public\n */\nexport class VideoUploadClient {\n private static readonly SAS_CACHE_PREFIX = 'mk-video-sas';\n\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Uploads the given file for the candidate identified by the transient GUID returned\n * from createCandidate. Reports progress as blocks land. Throws VideoSasError or\n * VideoUploadError on failure.\n *\n * On retry after a failure the SAS cached in sessionStorage is reused (if still\n * valid) so block uploads resume from the last successful block rather than restarting\n * against a fresh blob.\n */\n async upload(\n customerId: string,\n transientCandidateId: string,\n file: File,\n durationSeconds: number,\n source: VideoSource,\n onProgress?: (done: number, total: number) => void,\n ): Promise<void> {\n const contentType = file.type.split(';')[0].trim().toLowerCase();\n\n const cachedSas = this.loadCachedSas(customerId, transientCandidateId);\n const sas =\n cachedSas ??\n (await this.requestSas(customerId, transientCandidateId, {\n fileName: file.name,\n fileSize: file.size,\n contentType,\n durationSeconds,\n }));\n this.cacheSas(customerId, transientCandidateId, sas);\n\n const blockIds = await this.uploadBlocks(file, sas.sasUrl, sas.maxBlockSize, cachedSas !== null, onProgress);\n\n await this.finalize(customerId, transientCandidateId, sas.blobPath, durationSeconds, source, blockIds, contentType);\n this.clearCachedSas(customerId, transientCandidateId);\n }\n\n private async requestSas(customerId: string, transientCandidateId: string, meta: VideoSasRequest): Promise<VideoSasResponse> {\n try {\n return await this.backend.post<VideoSasResponse>(this.sasPath(customerId, transientCandidateId), meta, {\n 'Content-Type': 'application/json',\n });\n } catch (err) {\n throw new VideoSasError(this.extractStatus(err));\n }\n }\n\n private async uploadBlocks(\n file: File,\n sasUrl: string,\n blockSize: number,\n resume: boolean,\n onProgress?: (done: number, total: number) => void,\n ): Promise<string[]> {\n const total = Math.ceil(file.size / blockSize);\n const blockIds: string[] = [];\n const uploadedBlockIds = resume ? await this.getUncommittedBlockIds(sasUrl) : new Set<string>();\n\n for (let i = 0; i < total; i++) {\n // Block IDs must be equal-length base64 strings within a single blob.\n const blockId = btoa(String(i).padStart(10, '0'));\n blockIds.push(blockId);\n\n if (uploadedBlockIds.has(blockId)) {\n onProgress?.(i + 1, total);\n continue;\n }\n\n const start = i * blockSize;\n const end = Math.min(start + blockSize, file.size);\n const chunk = file.slice(start, end);\n const url = `${sasUrl}&comp=block&blockid=${encodeURIComponent(blockId)}`;\n\n await this.retryWithBackoff(async () => {\n const res = await fetch(url, {\n method: 'PUT',\n headers: { 'x-ms-blob-type': 'BlockBlob' },\n body: chunk,\n });\n if (!res.ok) {\n throw new VideoUploadError(res.status);\n }\n });\n\n onProgress?.(i + 1, total);\n }\n\n return blockIds;\n }\n\n private async getUncommittedBlockIds(sasUrl: string): Promise<Set<string>> {\n try {\n const res = await fetch(`${sasUrl}&comp=blocklist&blocklisttype=uncommitted`);\n if (!res.ok) {\n return new Set<string>();\n }\n const xml = await res.text();\n return new Set([...xml.matchAll(/<Name>([^<]+)<\\/Name>/g)].map(m => m[1]));\n } catch {\n return new Set<string>();\n }\n }\n\n private loadCachedSas(customerId: string, transientCandidateId: string): VideoSasResponse | null {\n if (typeof sessionStorage === 'undefined') {\n return null;\n }\n try {\n const raw = sessionStorage.getItem(`${VideoUploadClient.SAS_CACHE_PREFIX}-${customerId}-${transientCandidateId}`);\n if (!raw) {\n return null;\n }\n const sas = JSON.parse(raw) as VideoSasResponse;\n if (new Date(sas.expiresAt).getTime() - Date.now() < 5 * 60 * 1000) {\n this.clearCachedSas(customerId, transientCandidateId);\n return null;\n }\n return sas;\n } catch {\n return null;\n }\n }\n\n private cacheSas(customerId: string, transientCandidateId: string, sas: VideoSasResponse): void {\n if (typeof sessionStorage === 'undefined') {\n return;\n }\n try {\n sessionStorage.setItem(`${VideoUploadClient.SAS_CACHE_PREFIX}-${customerId}-${transientCandidateId}`, JSON.stringify(sas));\n } catch {\n // sessionStorage unavailable or full — continue without caching\n }\n }\n\n private clearCachedSas(customerId: string, transientCandidateId: string): void {\n if (typeof sessionStorage === 'undefined') {\n return;\n }\n try {\n sessionStorage.removeItem(`${VideoUploadClient.SAS_CACHE_PREFIX}-${customerId}-${transientCandidateId}`);\n } catch {\n // ignore\n }\n }\n\n private async retryWithBackoff(fn: () => Promise<void>, maxAttempts = 4, baseDelayMs = 250): Promise<void> {\n for (let attempt = 0; ; attempt++) {\n try {\n return await fn();\n } catch (err) {\n if (!this.isRetryableUploadError(err) || attempt >= maxAttempts - 1) {\n throw err;\n }\n await new Promise<void>(resolve => setTimeout(resolve, baseDelayMs * Math.pow(2, attempt)));\n }\n }\n }\n\n private isRetryableUploadError(err: unknown): boolean {\n if (err instanceof VideoUploadError || err instanceof VideoSasError) {\n return err.status === 0 || err.status === 429 || err.status >= 500;\n }\n return true;\n }\n\n private async finalize(\n customerId: string,\n transientCandidateId: string,\n blobPath: string,\n durationSeconds: number,\n source: VideoSource,\n blockIds: string[],\n contentType: string,\n ): Promise<void> {\n await this.retryWithBackoff(async () => {\n try {\n await this.backend.post<unknown>(\n this.finalizePath(customerId, transientCandidateId),\n { blobPath, durationSeconds, source, blockIds, contentType },\n { 'Content-Type': 'application/json' },\n );\n } catch (err) {\n throw new VideoUploadError(this.extractStatus(err));\n }\n });\n }\n\n private sasPath(customerId: string, transientCandidateId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/${encodeURIComponent(transientCandidateId)}/video/sas`;\n }\n\n private finalizePath(customerId: string, transientCandidateId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/${encodeURIComponent(transientCandidateId)}/video/finalize`;\n }\n\n private extractStatus(err: unknown): number {\n if (typeof err === 'object' && err !== null && 'status' in err) {\n const status = (err as { status: unknown }).status;\n if (typeof status === 'number') {\n return status;\n }\n }\n return 0;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA,CAAQ,CAChD,CCCM,IAAOC,EAAP,cAAyBC,KAAK,CAIhCC,YACaC,EACTC,EACAC,EAAY,CAEZ,MAAMD,CAAO,EAJJ,KAAAD,SAAAA,EAKT,KAAKE,IAAMA,GAAOF,EAASE,GAC/B,CAEA,IAAIC,QAAM,CACN,OAAO,KAAK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BAC1G,CAEQ8B,cAAcD,EAAY,CAC9B,GAAI,OAAOA,GAAQ,UAAYA,IAAQ,MAAQ,WAAYA,EAAK,CAC5D,IAAMrC,EAAUqC,EAA4BrC,OAC5C,GAAI,OAAOA,GAAW,SAClB,OAAOA,CAEf,CACA,MAAO,EACX,GAjNwBiG,EAAArB,iBAAmB,eADzC,IAAO1E,EAAP+F,SAAO/F,CAAiB,GAAA","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","url","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath","VideoSasError","Error","constructor","status","VideoUploadError","VideoUploadClient","baseUrl","backend","fetchBackend","upload","customerId","transientCandidateId","file","durationSeconds","source","onProgress","contentType","type","split","trim","toLowerCase","cachedSas","loadCachedSas","sas","requestSas","fileName","name","fileSize","size","cacheSas","blockIds","uploadBlocks","sasUrl","maxBlockSize","finalize","blobPath","clearCachedSas","meta","post","sasPath","err","extractStatus","blockSize","resume","total","Math","ceil","uploadedBlockIds","getUncommittedBlockIds","Set","i","blockId","btoa","String","padStart","push","has","start","end","min","chunk","slice","url","encodeURIComponent","retryWithBackoff","res","fetch","method","headers","body","ok","xml","text","matchAll","map","m","sessionStorage","raw","getItem","SAS_CACHE_PREFIX","JSON","parse","Date","expiresAt","getTime","now","setItem","stringify","removeItem","fn","maxAttempts","baseDelayMs","attempt","isRetryableUploadError","Promise","resolve","setTimeout","pow","finalizePath","getBasePath","_VideoUploadClient"],"file":"dist/api-client/api-client-global.js"}
|
package/api-client.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var I=Object.defineProperty,N=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var A=(a,t,r)=>t in a?I(a,t,{enumerable:true,configurable:true,writable:true,value:r}):a[t]=r,i=(a,t)=>{for(var r in t||={})J.call(t,r)&&A(a,r,t[r]);if(C)for(var r of C(t))z.call(t,r)&&A(a,r,t[r]);return a},b=(a,t)=>N(a,M(t));function l(a,t){return `${a}/${encodeURIComponent(t)}`}function c(a){return {"X-MindKey-User-Language":a}}var k=class extends Error{constructor(t,r,e){super(r),this.response=t,this.url=e??t.url;}get status(){return this.response.status}};var u={async get(a,t){return await u.sendRequest(a,"GET",t)},async post(a,t,r){return await u.sendRequest(a,"POST",r,t)},async put(a,t,r){return await u.sendRequest(a,"PUT",r,t)},async delete(a,t,r){return await u.sendRequest(a,"DELETE",r,t)},async sendRequest(a,t,r,e){let s=await fetch(a,{method:t,headers:r,body:x(e)}),n="";if(s.ok)n=await s.text();else {try{n=await s.text();}catch{n=`Http failure response for ${a}: ${s.status} ${s.statusText}`;}throw new k(s,n)}return n||(n="{}"),JSON.parse(n)}};function x(a){if(a)return typeof Blob<"u"&&a instanceof Blob||typeof ArrayBuffer<"u"&&a instanceof ArrayBuffer||typeof FormData<"u"&&a instanceof FormData||typeof URLSearchParams<"u"&&a instanceof URLSearchParams?a:JSON.stringify(a)}function L(){return {"Content-Type":"application/json"}}var w=class{constructor(t,r=u){this.basePath=t,this.backend=r;}getJobAgentConfiguration(t,r){return this.backend.get(`${this.getBaseUrl(t)}/configuration`,i({},c(r)))}getJobAgentType(t,r,e){return this.backend.get(`${this.getBaseUrl(t)}/types/${encodeURIComponent(e)}`,i({},c(r)))}getJobAgent(t,r,e,s,n){return this.backend.post(`${this.getBaseUrl(t)}/${n}`,{jobAgentId:e,code:s},i({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/create/${s}`,e,i({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,e,s){return this.backend.put(`${this.getBaseUrl(t)}/${s}`,e,i({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,e,s,n){return this.backend.delete(`${this.getBaseUrl(t)}/delete/${n}?jobAgentId=${e}&code=${s}`,null,i({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/resend-email/${s}`,e,i({},this.getDefaultPostHeaders(r)))}activate(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/activate/${s}`,e,i({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return `${l(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return i(i({},c(t)),L())}};var B=class{constructor(t,r=u){this.baseUrl=t,this.backend=r;}getLookups(t,r){return this.backend.get(`${l(this.baseUrl,t)}/candidates/lookup`,i({},c(r)))}};var F=function(a){return a.Other="Other",a.Application="Application",a.Resume="Resume",a}(F||{});var R=function(a){return a.Show="Show",a.Hide="Hide",a.Sidebar="Sidebar",a}(R||{});var $=function(a){return a.All="All",a.External="External",a.Internal="Internal",a}($||{}),V=function(a){return a.Hide="Hide",a.Only="Only",a.Bottom="Bottom",a.Top="Top",a}(V||{});var H=function(a){return a.Description="Description",a.StartDate="StartDate",a.EndDate="EndDate",a.Priority="Priority",a}(H||{});var W=(a,t,r)=>{let e=r?r[t]:void 0;if(e===void 0)return;let s=String(t);switch(typeof e){case "boolean":a.set(s,e?"true":"false");break;case "string":a.set(s,e);break;default:throw new Error(`${typeof e} is not implemented yet.`)}},P=(a,t)=>{if(t)for(let r of Object.keys(t))W(a,r,t);};var U=class{constructor(t,r=u){this.baseUrl=t,this.backend=r;}getApplicationFormType(t,r,e="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(e)}`,i({},c(r)))}getVacancyListConfiguration(t,r){return this.backend.get(this.getVacancyListConfigurationPath(t),i({},c(r)))}async getVacancyList(t,r,e){let s=new URL(this.getVacancyListPath(t));return P(s.searchParams,this.setDefaultFilter(e)),(await this.backend.get(s.toString(),i({},c(r)))).map(o=>this.prepareVacancyDetailsModel(o))}async getSimpleVacancyList(t,r,e){let s=new URL(this.getSimpleVacancyListPath(t));return P(s.searchParams,this.setDefaultFilter(e)),(await this.backend.get(s.toString(),i({},c(r)))).map(o=>this.prepareSimpleVacancyDetailsModel(o))}getVacancyDetailsConfiguration(t,r){return this.backend.get(this.getVacancyDetailsConfigurationPath(t),i({},c(r)))}async getVacancyDetails(t,r,e,s){let n=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);P(n.searchParams,s);let o=await this.backend.get(n.toString(),i({},c(e)));return this.prepareVacancyDetailsModel(o)}createCandidate(t,r,e,s,n){let o=new FormData;return s.forEach(h=>o.append("attachments",h)),n&&o.set("image",n),o.set("candidate",JSON.stringify(e)),this.backend.post(`${this.getCandidatePath(t)}`,o,i({},c(r)))}prepareVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(t))}prepareSimpleVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)}mapDeprecatedVacancyDetailsFields(t){return b(i({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t){return b(i({},t),{areas:t.areas??[],fieldsOfWork:t.fieldsOfWork??[],locations:t.locations??[],regions:t.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(t){return b(i(i({},t),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)),{medias:t.medias??[],vacancyElements:t.vacancyElements??[]})}setDefaultFilter(t){return b(i({},t),{access:t?.access??$.External})}getBasePath(t){return `${l(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return `${l(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return `${l(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`}};var S=class extends Error{constructor(t){super(`video-sas-${t}`),this.status=t;}},y=class extends Error{constructor(t){super(`video-upload-${t}`),this.status=t;}},j=(()=>{let t=class t{constructor(e,s=u){this.baseUrl=e,this.backend=s;}async upload(e,s,n,o,h,d){let f=n.type.split(";")[0].trim().toLowerCase(),g=this.loadCachedSas(e,s),p=g??await this.requestSas(e,s,{fileName:n.name,fileSize:n.size,contentType:f,durationSeconds:o});this.cacheSas(e,s,p);let m=await this.uploadBlocks(n,p.sasUrl,p.maxBlockSize,g!==null,d);await this.finalize(e,s,p.blobPath,o,h,m,f),this.clearCachedSas(e,s);}async requestSas(e,s,n){try{return await this.backend.post(this.sasPath(e,s),n,{"Content-Type":"application/json"})}catch(o){throw new S(this.extractStatus(o))}}async uploadBlocks(e,s,n,o,h){let d=Math.ceil(e.size/n),f=[],g=o?await this.getUncommittedBlockIds(s):new Set;for(let p=0;p<d;p++){let m=btoa(String(p).padStart(10,"0"));if(f.push(m),g.has(m)){h?.(p+1,d);continue}let D=p*n,O=Math.min(D+n,e.size),v=e.slice(D,O),T=`${s}&comp=block&blockid=${encodeURIComponent(m)}`;await this.retryWithBackoff(async()=>{let E=await fetch(T,{method:"PUT",headers:{"x-ms-blob-type":"BlockBlob"},body:v});if(!E.ok)throw new y(E.status)}),h?.(p+1,d);}return f}async getUncommittedBlockIds(e){try{let s=await fetch(`${e}&comp=blocklist&blocklisttype=uncommitted`);if(!s.ok)return new Set;let n=await s.text();return new Set([...n.matchAll(/<Name>([^<]+)<\/Name>/g)].map(o=>o[1]))}catch{return new Set}}loadCachedSas(e,s){if(typeof sessionStorage>"u")return null;try{let n=sessionStorage.getItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`);if(!n)return null;let o=JSON.parse(n);return new Date(o.expiresAt).getTime()-Date.now()<5*60*1e3?(this.clearCachedSas(e,s),null):o}catch{return null}}cacheSas(e,s,n){if(!(typeof sessionStorage>"u"))try{sessionStorage.setItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`,JSON.stringify(n));}catch{}}clearCachedSas(e,s){if(!(typeof sessionStorage>"u"))try{sessionStorage.removeItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`);}catch{}}async retryWithBackoff(e,s=4,n=250){for(let o=0;;o++)try{return await e()}catch(h){if(!this.isRetryableUploadError(h)||o>=s-1)throw h;await new Promise(d=>setTimeout(d,n*Math.pow(2,o)));}}isRetryableUploadError(e){return e instanceof y||e instanceof S?e.status===0||e.status===429||e.status>=500:true}async finalize(e,s,n,o,h,d,f){await this.retryWithBackoff(async()=>{try{await this.backend.post(this.finalizePath(e,s),{blobPath:n,durationSeconds:o,source:h,blockIds:d,contentType:f},{"Content-Type":"application/json"});}catch(g){throw new y(this.extractStatus(g))}});}sasPath(e,s){return `${l(this.baseUrl,e)}/candidates/${encodeURIComponent(s)}/video/sas`}finalizePath(e,s){return `${l(this.baseUrl,e)}/candidates/${encodeURIComponent(s)}/video/finalize`}extractStatus(e){if(typeof e=="object"&&e!==null&&"status"in e){let s=e.status;if(typeof s=="number")return s}return 0}};t.SAS_CACHE_PREFIX="mk-video-sas";let a=t;return a})();
|
|
4
4
|
|
|
5
|
-
exports.AccessType =
|
|
6
|
-
exports.AttachmentType =
|
|
7
|
-
exports.DataPlacement =
|
|
8
|
-
exports.HttpError =
|
|
9
|
-
exports.JobAgentClient =
|
|
10
|
-
exports.LookupClient =
|
|
11
|
-
exports.SortFieldType =
|
|
12
|
-
exports.UnsolicitedType =
|
|
13
|
-
exports.VacancyClient =
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
5
|
+
exports.AccessType = $;
|
|
6
|
+
exports.AttachmentType = F;
|
|
7
|
+
exports.DataPlacement = R;
|
|
8
|
+
exports.HttpError = k;
|
|
9
|
+
exports.JobAgentClient = w;
|
|
10
|
+
exports.LookupClient = B;
|
|
11
|
+
exports.SortFieldType = H;
|
|
12
|
+
exports.UnsolicitedType = V;
|
|
13
|
+
exports.VacancyClient = U;
|
|
14
|
+
exports.VideoSasError = S;
|
|
15
|
+
exports.VideoUploadClient = j;
|
|
16
|
+
exports.VideoUploadError = y;
|
|
17
|
+
exports.convertToBodyInit = x;
|
|
18
|
+
exports.fetchBackend = u;
|
|
16
19
|
|
package/api-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sources":["api-client.mjs"],"sourcesContent":["var V=Object.defineProperty,E=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(t,e,a)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,s=(t,e)=>{for(var a in e||={})F.call(e,a)&&x(t,a,e[a]);if(b)for(var a of b(e))w.call(e,a)&&x(t,a,e[a]);return t},d=(t,e)=>E(t,S(e));function l(t,e){return`${t}/${encodeURIComponent(e)}`}function o(t){return{\"X-MindKey-User-Language\":t}}var p=class extends Error{constructor(e,a){super(a),this.response=e}get status(){return this.response.status}};var c={async get(t,e){return await c.sendRequest(t,\"GET\",e)},async post(t,e,a){return await c.sendRequest(t,\"POST\",a,e)},async put(t,e,a){return await c.sendRequest(t,\"PUT\",a,e)},async delete(t,e,a){return await c.sendRequest(t,\"DELETE\",a,e)},async sendRequest(t,e,a,r){let n=await fetch(t,{method:e,headers:a,body:f(r)}),i=\"\";if(n.ok)i=await n.text();else{try{i=await n.text()}catch{i=`Http failure response for ${t}: ${n.status} ${n.statusText}`}throw new p(n,i)}return i||(i=\"{}\"),JSON.parse(i)}};function f(t){if(t)return typeof Blob<\"u\"&&t instanceof Blob||typeof ArrayBuffer<\"u\"&&t instanceof ArrayBuffer||typeof FormData<\"u\"&&t instanceof FormData||typeof URLSearchParams<\"u\"&&t instanceof URLSearchParams?t:JSON.stringify(t)}function D(){return{\"Content-Type\":\"application/json\"}}var m=class{constructor(e,a=c){this.basePath=e,this.backend=a}getJobAgentConfiguration(e,a){return this.backend.get(`${this.getBaseUrl(e)}/configuration`,s({},o(a)))}getJobAgentType(e,a,r){return this.backend.get(`${this.getBaseUrl(e)}/types/${encodeURIComponent(r)}`,s({},o(a)))}getJobAgent(e,a,r,n,i){return this.backend.post(`${this.getBaseUrl(e)}/${i}`,{jobAgentId:r,code:n},s({},this.getDefaultPostHeaders(a)))}createJobAgent(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/create/${n}`,r,s({},this.getDefaultPostHeaders(a)))}updateJobAgent(e,a,r,n){return this.backend.put(`${this.getBaseUrl(e)}/${n}`,r,s({},this.getDefaultPostHeaders(a)))}deleteJobAgent(e,a,r,n,i){return this.backend.delete(`${this.getBaseUrl(e)}/delete/${i}?jobAgentId=${r}&code=${n}`,null,s({},this.getDefaultPostHeaders(a)))}resendEmail(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/resend-email/${n}`,r,s({},this.getDefaultPostHeaders(a)))}activate(e,a,r,n){return this.backend.post(`${this.getBaseUrl(e)}/activate/${n}`,r,s({},this.getDefaultPostHeaders(a)))}getBaseUrl(e){return`${l(this.basePath,e)}/job-agents`}getDefaultPostHeaders(e){return s(s({},o(e)),D())}};var y=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getLookups(e,a){return this.backend.get(`${l(this.baseUrl,e)}/candidates/lookup`,s({},o(a)))}};var $=function(t){return t.Other=\"Other\",t.Application=\"Application\",t.Resume=\"Resume\",t}($||{});var k=function(t){return t.Show=\"Show\",t.Hide=\"Hide\",t.Sidebar=\"Sidebar\",t}(k||{});var g=function(t){return t.All=\"All\",t.External=\"External\",t.Internal=\"Internal\",t}(g||{}),B=function(t){return t.Hide=\"Hide\",t.Only=\"Only\",t.Bottom=\"Bottom\",t.Top=\"Top\",t}(B||{});var U=function(t){return t.Description=\"Description\",t.StartDate=\"StartDate\",t.EndDate=\"EndDate\",t.Priority=\"Priority\",t}(U||{});var A=(t,e,a)=>{let r=a?a[e]:void 0;if(r===void 0)return;let n=String(e);switch(typeof r){case\"boolean\":t.set(n,r?\"true\":\"false\");break;case\"string\":t.set(n,r);break;default:throw new Error(`${typeof r} is not implemented yet.`)}},h=(t,e)=>{if(e)for(let a of Object.keys(e))A(t,a,e)};var P=class{constructor(e,a=c){this.baseUrl=e,this.backend=a}getApplicationFormType(e,a,r=\"Standard\"){return this.backend.get(`${this.getApplicationFormTypePath(e)}/${encodeURIComponent(r)}`,s({},o(a)))}getVacancyListConfiguration(e,a){return this.backend.get(this.getVacancyListConfigurationPath(e),s({},o(a)))}async getVacancyList(e,a,r){let n=new URL(this.getVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareVacancyDetailsModel(u))}async getSimpleVacancyList(e,a,r){let n=new URL(this.getSimpleVacancyListPath(e));return h(n.searchParams,this.setDefaultFilter(r)),(await this.backend.get(n.toString(),s({},o(a)))).map(u=>this.prepareSimpleVacancyDetailsModel(u))}getVacancyDetailsConfiguration(e,a){return this.backend.get(this.getVacancyDetailsConfigurationPath(e),s({},o(a)))}async getVacancyDetails(e,a,r,n){let i=new URL(`${this.getBasePath(e)}/${encodeURIComponent(a)}`);h(i.searchParams,n);let u=await this.backend.get(i.toString(),s({},o(r)));return this.prepareVacancyDetailsModel(u)}createCandidate(e,a,r,n,i){let u=new FormData;return n.forEach(L=>u.append(\"attachments\",L)),i&&u.set(\"image\",i),u.set(\"candidate\",JSON.stringify(r)),this.backend.post(`${this.getCandidatePath(e)}`,u,s({},o(a)))}prepareVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(e))}prepareSimpleVacancyDetailsModel(e){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)}mapDeprecatedVacancyDetailsFields(e){return d(s({},e),{contactEmployeeWorkPhoneNumber:e.contactEmployeeWorkPhoneNumber??e.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e){return d(s({},e),{areas:e.areas??[],fieldsOfWork:e.fieldsOfWork??[],locations:e.locations??[],regions:e.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(e){return d(s(s({},e),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(e)),{medias:e.medias??[],vacancyElements:e.vacancyElements??[]})}setDefaultFilter(e){return d(s({},e),{access:e?.access??g.External})}getBasePath(e){return`${l(this.baseUrl,e)}/vacancies`}getApplicationFormTypePath(e){return`${l(this.baseUrl,e)}/candidates/types`}getCandidatePath(e){return`${l(this.baseUrl,e)}/candidates`}getVacancyListPath(e){return`${this.getBasePath(e)}/detailed`}getSimpleVacancyListPath(e){return`${this.getBasePath(e)}/simple`}getConfigurationPath(e){return`${this.getBasePath(e)}/configuration`}getVacancyListConfigurationPath(e){return`${this.getConfigurationPath(e)}/list`}getVacancyDetailsConfigurationPath(e){return`${this.getConfigurationPath(e)}/details`}};export{g as AccessType,$ as AttachmentType,k as DataPlacement,p as HttpError,m as JobAgentClient,y as LookupClient,U as SortFieldType,B as UnsolicitedType,P as VacancyClient,f as convertToBodyInit,c as fetchBackend};\n\n//# sourceMappingURL=api-client.mjs.map\n"],"names":[],"mappings":";;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,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,IAAE,CA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AC,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 I=Object.defineProperty,N=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var A=(a,t,r)=>t in a?I(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,i=(a,t)=>{for(var r in t||={})J.call(t,r)&&A(a,r,t[r]);if(C)for(var r of C(t))z.call(t,r)&&A(a,r,t[r]);return a},b=(a,t)=>N(a,M(t));function l(a,t){return`${a}/${encodeURIComponent(t)}`}function c(a){return{\"X-MindKey-User-Language\":a}}var k=class extends Error{constructor(t,r,e){super(r),this.response=t,this.url=e??t.url}get status(){return this.response.status}};var u={async get(a,t){return await u.sendRequest(a,\"GET\",t)},async post(a,t,r){return await u.sendRequest(a,\"POST\",r,t)},async put(a,t,r){return await u.sendRequest(a,\"PUT\",r,t)},async delete(a,t,r){return await u.sendRequest(a,\"DELETE\",r,t)},async sendRequest(a,t,r,e){let s=await fetch(a,{method:t,headers:r,body:x(e)}),n=\"\";if(s.ok)n=await s.text();else{try{n=await s.text()}catch{n=`Http failure response for ${a}: ${s.status} ${s.statusText}`}throw new k(s,n)}return n||(n=\"{}\"),JSON.parse(n)}};function x(a){if(a)return typeof Blob<\"u\"&&a instanceof Blob||typeof ArrayBuffer<\"u\"&&a instanceof ArrayBuffer||typeof FormData<\"u\"&&a instanceof FormData||typeof URLSearchParams<\"u\"&&a instanceof URLSearchParams?a:JSON.stringify(a)}function L(){return{\"Content-Type\":\"application/json\"}}var w=class{constructor(t,r=u){this.basePath=t,this.backend=r}getJobAgentConfiguration(t,r){return this.backend.get(`${this.getBaseUrl(t)}/configuration`,i({},c(r)))}getJobAgentType(t,r,e){return this.backend.get(`${this.getBaseUrl(t)}/types/${encodeURIComponent(e)}`,i({},c(r)))}getJobAgent(t,r,e,s,n){return this.backend.post(`${this.getBaseUrl(t)}/${n}`,{jobAgentId:e,code:s},i({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/create/${s}`,e,i({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,e,s){return this.backend.put(`${this.getBaseUrl(t)}/${s}`,e,i({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,e,s,n){return this.backend.delete(`${this.getBaseUrl(t)}/delete/${n}?jobAgentId=${e}&code=${s}`,null,i({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/resend-email/${s}`,e,i({},this.getDefaultPostHeaders(r)))}activate(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/activate/${s}`,e,i({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return`${l(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return i(i({},c(t)),L())}};var B=class{constructor(t,r=u){this.baseUrl=t,this.backend=r}getLookups(t,r){return this.backend.get(`${l(this.baseUrl,t)}/candidates/lookup`,i({},c(r)))}};var F=function(a){return a.Other=\"Other\",a.Application=\"Application\",a.Resume=\"Resume\",a}(F||{});var R=function(a){return a.Show=\"Show\",a.Hide=\"Hide\",a.Sidebar=\"Sidebar\",a}(R||{});var $=function(a){return a.All=\"All\",a.External=\"External\",a.Internal=\"Internal\",a}($||{}),V=function(a){return a.Hide=\"Hide\",a.Only=\"Only\",a.Bottom=\"Bottom\",a.Top=\"Top\",a}(V||{});var H=function(a){return a.Description=\"Description\",a.StartDate=\"StartDate\",a.EndDate=\"EndDate\",a.Priority=\"Priority\",a}(H||{});var W=(a,t,r)=>{let e=r?r[t]:void 0;if(e===void 0)return;let s=String(t);switch(typeof e){case\"boolean\":a.set(s,e?\"true\":\"false\");break;case\"string\":a.set(s,e);break;default:throw new Error(`${typeof e} is not implemented yet.`)}},P=(a,t)=>{if(t)for(let r of Object.keys(t))W(a,r,t)};var U=class{constructor(t,r=u){this.baseUrl=t,this.backend=r}getApplicationFormType(t,r,e=\"Standard\"){return this.backend.get(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(e)}`,i({},c(r)))}getVacancyListConfiguration(t,r){return this.backend.get(this.getVacancyListConfigurationPath(t),i({},c(r)))}async getVacancyList(t,r,e){let s=new URL(this.getVacancyListPath(t));return P(s.searchParams,this.setDefaultFilter(e)),(await this.backend.get(s.toString(),i({},c(r)))).map(o=>this.prepareVacancyDetailsModel(o))}async getSimpleVacancyList(t,r,e){let s=new URL(this.getSimpleVacancyListPath(t));return P(s.searchParams,this.setDefaultFilter(e)),(await this.backend.get(s.toString(),i({},c(r)))).map(o=>this.prepareSimpleVacancyDetailsModel(o))}getVacancyDetailsConfiguration(t,r){return this.backend.get(this.getVacancyDetailsConfigurationPath(t),i({},c(r)))}async getVacancyDetails(t,r,e,s){let n=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);P(n.searchParams,s);let o=await this.backend.get(n.toString(),i({},c(e)));return this.prepareVacancyDetailsModel(o)}createCandidate(t,r,e,s,n){let o=new FormData;return s.forEach(h=>o.append(\"attachments\",h)),n&&o.set(\"image\",n),o.set(\"candidate\",JSON.stringify(e)),this.backend.post(`${this.getCandidatePath(t)}`,o,i({},c(r)))}prepareVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(t))}prepareSimpleVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)}mapDeprecatedVacancyDetailsFields(t){return b(i({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t){return b(i({},t),{areas:t.areas??[],fieldsOfWork:t.fieldsOfWork??[],locations:t.locations??[],regions:t.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(t){return b(i(i({},t),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)),{medias:t.medias??[],vacancyElements:t.vacancyElements??[]})}setDefaultFilter(t){return b(i({},t),{access:t?.access??$.External})}getBasePath(t){return`${l(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${l(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${l(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`}};var S=class extends Error{constructor(t){super(`video-sas-${t}`),this.status=t}},y=class extends Error{constructor(t){super(`video-upload-${t}`),this.status=t}},j=(()=>{let t=class t{constructor(e,s=u){this.baseUrl=e,this.backend=s}async upload(e,s,n,o,h,d){let f=n.type.split(\";\")[0].trim().toLowerCase(),g=this.loadCachedSas(e,s),p=g??await this.requestSas(e,s,{fileName:n.name,fileSize:n.size,contentType:f,durationSeconds:o});this.cacheSas(e,s,p);let m=await this.uploadBlocks(n,p.sasUrl,p.maxBlockSize,g!==null,d);await this.finalize(e,s,p.blobPath,o,h,m,f),this.clearCachedSas(e,s)}async requestSas(e,s,n){try{return await this.backend.post(this.sasPath(e,s),n,{\"Content-Type\":\"application/json\"})}catch(o){throw new S(this.extractStatus(o))}}async uploadBlocks(e,s,n,o,h){let d=Math.ceil(e.size/n),f=[],g=o?await this.getUncommittedBlockIds(s):new Set;for(let p=0;p<d;p++){let m=btoa(String(p).padStart(10,\"0\"));if(f.push(m),g.has(m)){h?.(p+1,d);continue}let D=p*n,O=Math.min(D+n,e.size),v=e.slice(D,O),T=`${s}&comp=block&blockid=${encodeURIComponent(m)}`;await this.retryWithBackoff(async()=>{let E=await fetch(T,{method:\"PUT\",headers:{\"x-ms-blob-type\":\"BlockBlob\"},body:v});if(!E.ok)throw new y(E.status)}),h?.(p+1,d)}return f}async getUncommittedBlockIds(e){try{let s=await fetch(`${e}&comp=blocklist&blocklisttype=uncommitted`);if(!s.ok)return new Set;let n=await s.text();return new Set([...n.matchAll(/<Name>([^<]+)<\\/Name>/g)].map(o=>o[1]))}catch{return new Set}}loadCachedSas(e,s){if(typeof sessionStorage>\"u\")return null;try{let n=sessionStorage.getItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`);if(!n)return null;let o=JSON.parse(n);return new Date(o.expiresAt).getTime()-Date.now()<5*60*1e3?(this.clearCachedSas(e,s),null):o}catch{return null}}cacheSas(e,s,n){if(!(typeof sessionStorage>\"u\"))try{sessionStorage.setItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`,JSON.stringify(n))}catch{}}clearCachedSas(e,s){if(!(typeof sessionStorage>\"u\"))try{sessionStorage.removeItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`)}catch{}}async retryWithBackoff(e,s=4,n=250){for(let o=0;;o++)try{return await e()}catch(h){if(!this.isRetryableUploadError(h)||o>=s-1)throw h;await new Promise(d=>setTimeout(d,n*Math.pow(2,o)))}}isRetryableUploadError(e){return e instanceof y||e instanceof S?e.status===0||e.status===429||e.status>=500:!0}async finalize(e,s,n,o,h,d,f){await this.retryWithBackoff(async()=>{try{await this.backend.post(this.finalizePath(e,s),{blobPath:n,durationSeconds:o,source:h,blockIds:d,contentType:f},{\"Content-Type\":\"application/json\"})}catch(g){throw new y(this.extractStatus(g))}})}sasPath(e,s){return`${l(this.baseUrl,e)}/candidates/${encodeURIComponent(s)}/video/sas`}finalizePath(e,s){return`${l(this.baseUrl,e)}/candidates/${encodeURIComponent(s)}/video/finalize`}extractStatus(e){if(typeof e==\"object\"&&e!==null&&\"status\"in e){let s=e.status;if(typeof s==\"number\")return s}return 0}};t.SAS_CACHE_PREFIX=\"mk-video-sas\";let a=t;return a})();export{$ as AccessType,F as AttachmentType,R as DataPlacement,k as HttpError,w as JobAgentClient,B as LookupClient,H as SortFieldType,V as UnsolicitedType,U as VacancyClient,S as VideoSasError,j as VideoUploadClient,y as VideoUploadError,x as convertToBodyInit,u as fetchBackend};\n\n//# sourceMappingURL=api-client.mjs.map\n"],"names":[],"mappings":";;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAE,CAAC,YAAY,CAAC,IAAE,CAAC,QAAQ,CAAC,IAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAA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AC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;"}
|
package/api-client.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var I=Object.defineProperty,N=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var A=(a,t,r)=>t in a?I(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r,i=(a,t)=>{for(var r in t||={})J.call(t,r)&&A(a,r,t[r]);if(C)for(var r of C(t))z.call(t,r)&&A(a,r,t[r]);return a},b=(a,t)=>N(a,M(t));function l(a,t){return`${a}/${encodeURIComponent(t)}`}function c(a){return{"X-MindKey-User-Language":a}}var k=class extends Error{constructor(t,r,e){super(r),this.response=t,this.url=e??t.url}get status(){return this.response.status}};var u={async get(a,t){return await u.sendRequest(a,"GET",t)},async post(a,t,r){return await u.sendRequest(a,"POST",r,t)},async put(a,t,r){return await u.sendRequest(a,"PUT",r,t)},async delete(a,t,r){return await u.sendRequest(a,"DELETE",r,t)},async sendRequest(a,t,r,e){let s=await fetch(a,{method:t,headers:r,body:x(e)}),n="";if(s.ok)n=await s.text();else{try{n=await s.text()}catch{n=`Http failure response for ${a}: ${s.status} ${s.statusText}`}throw new k(s,n)}return n||(n="{}"),JSON.parse(n)}};function x(a){if(a)return typeof Blob<"u"&&a instanceof Blob||typeof ArrayBuffer<"u"&&a instanceof ArrayBuffer||typeof FormData<"u"&&a instanceof FormData||typeof URLSearchParams<"u"&&a instanceof URLSearchParams?a:JSON.stringify(a)}function L(){return{"Content-Type":"application/json"}}var w=class{constructor(t,r=u){this.basePath=t,this.backend=r}getJobAgentConfiguration(t,r){return this.backend.get(`${this.getBaseUrl(t)}/configuration`,i({},c(r)))}getJobAgentType(t,r,e){return this.backend.get(`${this.getBaseUrl(t)}/types/${encodeURIComponent(e)}`,i({},c(r)))}getJobAgent(t,r,e,s,n){return this.backend.post(`${this.getBaseUrl(t)}/${n}`,{jobAgentId:e,code:s},i({},this.getDefaultPostHeaders(r)))}createJobAgent(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/create/${s}`,e,i({},this.getDefaultPostHeaders(r)))}updateJobAgent(t,r,e,s){return this.backend.put(`${this.getBaseUrl(t)}/${s}`,e,i({},this.getDefaultPostHeaders(r)))}deleteJobAgent(t,r,e,s,n){return this.backend.delete(`${this.getBaseUrl(t)}/delete/${n}?jobAgentId=${e}&code=${s}`,null,i({},this.getDefaultPostHeaders(r)))}resendEmail(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/resend-email/${s}`,e,i({},this.getDefaultPostHeaders(r)))}activate(t,r,e,s){return this.backend.post(`${this.getBaseUrl(t)}/activate/${s}`,e,i({},this.getDefaultPostHeaders(r)))}getBaseUrl(t){return`${l(this.basePath,t)}/job-agents`}getDefaultPostHeaders(t){return i(i({},c(t)),L())}};var B=class{constructor(t,r=u){this.baseUrl=t,this.backend=r}getLookups(t,r){return this.backend.get(`${l(this.baseUrl,t)}/candidates/lookup`,i({},c(r)))}};var F=function(a){return a.Other="Other",a.Application="Application",a.Resume="Resume",a}(F||{});var R=function(a){return a.Show="Show",a.Hide="Hide",a.Sidebar="Sidebar",a}(R||{});var $=function(a){return a.All="All",a.External="External",a.Internal="Internal",a}($||{}),V=function(a){return a.Hide="Hide",a.Only="Only",a.Bottom="Bottom",a.Top="Top",a}(V||{});var H=function(a){return a.Description="Description",a.StartDate="StartDate",a.EndDate="EndDate",a.Priority="Priority",a}(H||{});var W=(a,t,r)=>{let e=r?r[t]:void 0;if(e===void 0)return;let s=String(t);switch(typeof e){case"boolean":a.set(s,e?"true":"false");break;case"string":a.set(s,e);break;default:throw new Error(`${typeof e} is not implemented yet.`)}},P=(a,t)=>{if(t)for(let r of Object.keys(t))W(a,r,t)};var U=class{constructor(t,r=u){this.baseUrl=t,this.backend=r}getApplicationFormType(t,r,e="Standard"){return this.backend.get(`${this.getApplicationFormTypePath(t)}/${encodeURIComponent(e)}`,i({},c(r)))}getVacancyListConfiguration(t,r){return this.backend.get(this.getVacancyListConfigurationPath(t),i({},c(r)))}async getVacancyList(t,r,e){let s=new URL(this.getVacancyListPath(t));return P(s.searchParams,this.setDefaultFilter(e)),(await this.backend.get(s.toString(),i({},c(r)))).map(o=>this.prepareVacancyDetailsModel(o))}async getSimpleVacancyList(t,r,e){let s=new URL(this.getSimpleVacancyListPath(t));return P(s.searchParams,this.setDefaultFilter(e)),(await this.backend.get(s.toString(),i({},c(r)))).map(o=>this.prepareSimpleVacancyDetailsModel(o))}getVacancyDetailsConfiguration(t,r){return this.backend.get(this.getVacancyDetailsConfigurationPath(t),i({},c(r)))}async getVacancyDetails(t,r,e,s){let n=new URL(`${this.getBasePath(t)}/${encodeURIComponent(r)}`);P(n.searchParams,s);let o=await this.backend.get(n.toString(),i({},c(e)));return this.prepareVacancyDetailsModel(o)}createCandidate(t,r,e,s,n){let o=new FormData;return s.forEach(h=>o.append("attachments",h)),n&&o.set("image",n),o.set("candidate",JSON.stringify(e)),this.backend.post(`${this.getCandidatePath(t)}`,o,i({},c(r)))}prepareVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(t))}prepareSimpleVacancyDetailsModel(t){return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)}mapDeprecatedVacancyDetailsFields(t){return b(i({},t),{contactEmployeeWorkPhoneNumber:t.contactEmployeeWorkPhoneNumber??t.contactEmployeWorkPhoneNumber})}assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t){return b(i({},t),{areas:t.areas??[],fieldsOfWork:t.fieldsOfWork??[],locations:t.locations??[],regions:t.regions??[]})}assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(t){return b(i(i({},t),this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(t)),{medias:t.medias??[],vacancyElements:t.vacancyElements??[]})}setDefaultFilter(t){return b(i({},t),{access:t?.access??$.External})}getBasePath(t){return`${l(this.baseUrl,t)}/vacancies`}getApplicationFormTypePath(t){return`${l(this.baseUrl,t)}/candidates/types`}getCandidatePath(t){return`${l(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`}};var S=class extends Error{constructor(t){super(`video-sas-${t}`),this.status=t}},y=class extends Error{constructor(t){super(`video-upload-${t}`),this.status=t}},j=(()=>{let t=class t{constructor(e,s=u){this.baseUrl=e,this.backend=s}async upload(e,s,n,o,h,d){let f=n.type.split(";")[0].trim().toLowerCase(),g=this.loadCachedSas(e,s),p=g??await this.requestSas(e,s,{fileName:n.name,fileSize:n.size,contentType:f,durationSeconds:o});this.cacheSas(e,s,p);let m=await this.uploadBlocks(n,p.sasUrl,p.maxBlockSize,g!==null,d);await this.finalize(e,s,p.blobPath,o,h,m,f),this.clearCachedSas(e,s)}async requestSas(e,s,n){try{return await this.backend.post(this.sasPath(e,s),n,{"Content-Type":"application/json"})}catch(o){throw new S(this.extractStatus(o))}}async uploadBlocks(e,s,n,o,h){let d=Math.ceil(e.size/n),f=[],g=o?await this.getUncommittedBlockIds(s):new Set;for(let p=0;p<d;p++){let m=btoa(String(p).padStart(10,"0"));if(f.push(m),g.has(m)){h?.(p+1,d);continue}let D=p*n,O=Math.min(D+n,e.size),v=e.slice(D,O),T=`${s}&comp=block&blockid=${encodeURIComponent(m)}`;await this.retryWithBackoff(async()=>{let E=await fetch(T,{method:"PUT",headers:{"x-ms-blob-type":"BlockBlob"},body:v});if(!E.ok)throw new y(E.status)}),h?.(p+1,d)}return f}async getUncommittedBlockIds(e){try{let s=await fetch(`${e}&comp=blocklist&blocklisttype=uncommitted`);if(!s.ok)return new Set;let n=await s.text();return new Set([...n.matchAll(/<Name>([^<]+)<\/Name>/g)].map(o=>o[1]))}catch{return new Set}}loadCachedSas(e,s){if(typeof sessionStorage>"u")return null;try{let n=sessionStorage.getItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`);if(!n)return null;let o=JSON.parse(n);return new Date(o.expiresAt).getTime()-Date.now()<5*60*1e3?(this.clearCachedSas(e,s),null):o}catch{return null}}cacheSas(e,s,n){if(!(typeof sessionStorage>"u"))try{sessionStorage.setItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`,JSON.stringify(n))}catch{}}clearCachedSas(e,s){if(!(typeof sessionStorage>"u"))try{sessionStorage.removeItem(`${t.SAS_CACHE_PREFIX}-${e}-${s}`)}catch{}}async retryWithBackoff(e,s=4,n=250){for(let o=0;;o++)try{return await e()}catch(h){if(!this.isRetryableUploadError(h)||o>=s-1)throw h;await new Promise(d=>setTimeout(d,n*Math.pow(2,o)))}}isRetryableUploadError(e){return e instanceof y||e instanceof S?e.status===0||e.status===429||e.status>=500:!0}async finalize(e,s,n,o,h,d,f){await this.retryWithBackoff(async()=>{try{await this.backend.post(this.finalizePath(e,s),{blobPath:n,durationSeconds:o,source:h,blockIds:d,contentType:f},{"Content-Type":"application/json"})}catch(g){throw new y(this.extractStatus(g))}})}sasPath(e,s){return`${l(this.baseUrl,e)}/candidates/${encodeURIComponent(s)}/video/sas`}finalizePath(e,s){return`${l(this.baseUrl,e)}/candidates/${encodeURIComponent(s)}/video/finalize`}extractStatus(e){if(typeof e=="object"&&e!==null&&"status"in e){let s=e.status;if(typeof s=="number")return s}return 0}};t.SAS_CACHE_PREFIX="mk-video-sas";let a=t;return a})();export{$ as AccessType,F as AttachmentType,R as DataPlacement,k as HttpError,w as JobAgentClient,B as LookupClient,H as SortFieldType,V as UnsolicitedType,U as VacancyClient,S as VideoSasError,j as VideoUploadClient,y as VideoUploadError,x as convertToBodyInit,u as fetchBackend};
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=api-client.mjs.map
|
package/api-client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n constructor(\n readonly response: Response,\n message: string,\n ) {\n super(message);\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'PUT', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'DELETE', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(`${this.getBaseUrl(customerId)}/delete/${type}?jobAgentId=${jobAgentId}&code=${code}`, null, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAA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AEQzC,iBAA+C0C,EAAoB,CACvE,OAAOT,EAAA5C,EAAA,GAAKqD,GAAL,CAAYC,OAAQD,GAAOC,QAAUC,EAAWC,QAAQ,EACnE,CAEQhC,YAAY9B,EAAkB,CAClC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,YACnD,CAEQI,2BAA2BJ,EAAkB,CACjD,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,mBACnD,CAEQ6C,iBAAiB7C,EAAkB,CACvC,MAAO,GAAG8B,EAAY,KAAKlC,QAASI,CAAU,CAAC,aACnD,CAEQc,mBAAmBd,EAAkB,CACzC,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,WAC1C,CAEQuB,yBAAyBvB,EAAkB,CAC/C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,SAC1C,CAEQ+D,qBAAqB/D,EAAkB,CAC3C,MAAO,GAAG,KAAK8B,YAAY9B,CAAU,CAAC,gBAC1C,CAEQS,gCAAgCT,EAAkB,CACtD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,OACnD,CAEQ0B,mCAAmC1B,EAAkB,CACzD,MAAO,GAAG,KAAK+D,qBAAqB/D,CAAU,CAAC,UACnD","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath"],"file":"dist/api-client/api-client.mjs"}
|
|
1
|
+
{"version":3,"sources":["projects/api-client/src/helpers/get-base-path.ts","projects/api-client/src/helpers/get-user-language-header.ts","projects/api-client/src/errors/http.error.ts","projects/api-client/src/helpers/send-request.ts","projects/api-client/src/helpers/get-content-type-header.ts","projects/api-client/src/clients/job-agent.client.ts","projects/api-client/src/clients/lookup.client.ts","projects/api-client/src/models/application-form.model.ts","projects/api-client/src/models/vacancy-details-configuration.model.ts","projects/api-client/src/models/vacancy-list.model.ts","projects/api-client/src/models/vacancy-list-configuration.model.ts","projects/api-client/src/helpers/assign-filters.ts","projects/api-client/src/clients/vacancy.client.ts","projects/api-client/src/clients/video-upload.client.ts"],"sourcesContent":["export function getBasePath(baseUrl: string, customerId: string): string {\n return `${baseUrl}/${encodeURIComponent(customerId)}`;\n}\n","export function getUserLanguageHeader(language: string): { 'X-MindKey-User-Language': string } {\n return { 'X-MindKey-User-Language': language };\n}\n","/**\n * @public\n */\nexport class HttpError extends Error {\n /** Request URL the error originated from. Falls back to {@link response.url}. */\n readonly url: string;\n\n constructor(\n readonly response: Response,\n message: string,\n url?: string,\n ) {\n super(message);\n this.url = url ?? response.url;\n }\n\n get status(): number {\n return this.response.status;\n }\n}\n","import { HttpError } from '../errors';\n\nexport interface HttpBackend {\n get<T>(url: string, headers: Record<string, string>): Promise<T>;\n\n post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T>;\n\n sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T>;\n}\n\nexport const fetchBackend: HttpBackend = {\n async get<T>(url: string, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'GET', headers);\n },\n async post<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'POST', headers, body);\n },\n async put<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'PUT', headers, body);\n },\n async delete<T>(url: string, body: unknown, headers: Record<string, string>): Promise<T> {\n return await fetchBackend.sendRequest(url, 'DELETE', headers, body);\n },\n async sendRequest<T>(url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<T> {\n const response = await fetch(url, { method, headers, body: convertToBodyInit(body) });\n let text = '';\n\n if (!response.ok) {\n try {\n text = await response.text();\n } catch {\n text = `Http failure response for ${url}: ${response.status} ${response.statusText}`;\n }\n throw new HttpError(response, text);\n } else {\n text = await response.text();\n }\n\n if (!text) {\n text = '{}';\n }\n\n return JSON.parse(text) as T;\n },\n};\n\nexport function convertToBodyInit(body?: unknown): BodyInit | undefined {\n if (!body) {\n return undefined;\n }\n\n if (\n (typeof Blob !== 'undefined' && body instanceof Blob) ||\n (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) ||\n (typeof FormData !== 'undefined' && body instanceof FormData) ||\n (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)\n ) {\n return body;\n }\n\n // Convert the object to JSON\n return JSON.stringify(body);\n}\n","interface ContentType {\n 'Content-Type': string;\n}\n\nexport function getJsonContentTypeHeader(): ContentType {\n return { 'Content-Type': 'application/json' };\n}\n","import type { JobAgent, JobAgentConfiguration, JobAgentType, JobAgentUpdate } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { getJsonContentTypeHeader } from '../helpers/get-content-type-header';\n\n/**\n * API client to make requests to the Job Agent API.\n *\n * @public\n */\nexport class JobAgentClient {\n constructor(\n private readonly basePath: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the site settings for Job Agents.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getJobAgentConfiguration(customerId: string, language: string): Promise<JobAgentConfiguration> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/configuration`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the settings for a specific Job Agent type.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param type - The id of a Job Agent type.\n */\n getJobAgentType(customerId: string, language: string, type: string): Promise<JobAgentType> {\n return this.backend.get(`${this.getBaseUrl(customerId)}/types/${encodeURIComponent(type)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a specific Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n getJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<JobAgent> {\n return this.backend.post(\n `${this.getBaseUrl(customerId)}/${type}`,\n {\n jobAgentId,\n code,\n },\n {\n ...this.getDefaultPostHeaders(language),\n },\n );\n }\n\n /**\n * Creates a new Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to create.\n * @param type - The type of the Job Agent.\n */\n createJobAgent(customerId: string, language: string, jobAgent: JobAgent, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/create/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Updates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgent - The Job Agent to change.\n * @param type - The type of the Job Agent.\n */\n updateJobAgent(customerId: string, language: string, jobAgent: JobAgentUpdate, type: string): Promise<void> {\n return this.backend.put(`${this.getBaseUrl(customerId)}/${type}`, jobAgent, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Deletes an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param jobAgentId - The id of the Job Agent.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n deleteJobAgent(customerId: string, language: string, jobAgentId: string, code: string, type: string): Promise<void> {\n return this.backend.delete(`${this.getBaseUrl(customerId)}/delete/${type}?jobAgentId=${jobAgentId}&code=${code}`, null, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Tries to email the user allowing them to activate/modify/delete their Job Agent.\n * This API always returns success, even if the email was not found in the system to prevent checking if emails are in the system or not.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param email - The email that should be in the system to try to resent the recent Job Agent information to.\n * @param type - The type of the Job Agent.\n */\n resendEmail(customerId: string, language: string, email: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/resend-email/${type}`, email, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n /**\n * Activates an existing Job Agent.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param code - The code of the Job Agent.\n * @param type - The type of the Job Agent.\n */\n activate(customerId: string, language: string, code: string, type: string): Promise<void> {\n return this.backend.post(`${this.getBaseUrl(customerId)}/activate/${type}`, code, {\n ...this.getDefaultPostHeaders(language),\n });\n }\n\n private getBaseUrl(customerId: string): string {\n return `${getBasePath(this.basePath, customerId)}/job-agents`;\n }\n\n private getDefaultPostHeaders(language: string): Record<string, string> {\n return { ...getUserLanguageHeader(language), ...getJsonContentTypeHeader() };\n }\n}\n","import type { Lookups } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\n\n/**\n * API client to make requests to the Lookup API.\n *\n * @public\n */\nexport class LookupClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Gets all the lookups.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getLookups(customerId: string, language: string): Promise<Lookups> {\n return this.backend.get(`${getBasePath(this.baseUrl, customerId)}/candidates/lookup`, {\n ...getUserLanguageHeader(language),\n });\n }\n}\n","import { HasDescription } from './description.model';\n\n/**\n * @public\n */\nexport enum AttachmentType {\n Other = 'Other',\n Application = 'Application',\n Resume = 'Resume',\n}\n\n/**\n * @public\n */\nexport interface Attachment extends HasDescription {\n documentTypeId: string;\n mandatory: boolean;\n attachmentType: AttachmentType;\n}\n\n/**\n * @public\n */\nexport interface ApplicationFormType {\n /**\n * Flag indicating whether to display the image.\n */\n showImage: boolean;\n\n /**\n * Flag indicating whether the candidate may attach an application video.\n */\n showApplicationVideo: boolean;\n\n /**\n * Per-form-type cap on video application length in seconds. 0 means\n * \"use the system-wide default\". Always bounded above by the system\n * ceiling configured in VideoApplication:MaxDurationSeconds.\n */\n videoMaxDurationSeconds: number;\n\n /**\n * Represents a flag indicating whether to show regions.\n */\n showRegions: boolean;\n\n /**\n * Indicates whether to show locations or not.\n */\n showLocations: boolean;\n\n /**\n * Indicates whether to display fields of work.\n */\n showFieldsOfWork: boolean;\n\n /**\n * Indicates whether to display elements or not.\n */\n showElements: boolean;\n\n /**\n * Flag indicating whether to show the \"Allow Save Disclaimer\" message.\n */\n showAllowSaveDisclaimer: boolean;\n\n /**\n * Indicates whether to show previously applied changes or not.\n */\n showPreviouslyApplied: boolean;\n\n /**\n * Flags whether or not to display media.\n */\n showMedia: boolean;\n\n /**\n * Indicates whether the birth date should be shown or not.\n */\n showBirthDate: boolean;\n\n /**\n * Represents a variable that determines whether to show the gender.\n */\n showGender: boolean;\n\n /**\n * Represents a variable indicating whether to display the home phone number.\n */\n showHomePhone: boolean;\n\n /**\n * Indicates whether to display the mobile phone on the interface.\n */\n showMobilePhone: boolean;\n\n /**\n * Indicates whether to show the country information or not.\n */\n showCountry: boolean;\n\n /**\n * Indicates whether to display the state/province of a location.\n */\n showStateProvince: boolean;\n\n /**\n * Represents a variable indicating whether to show the address.\n */\n showAddress: boolean;\n\n /**\n * Represents a variable showAddress2 which indicates whether to display\n * the Address Line 2 in an address block.\n */\n showAddress2: boolean;\n\n /**\n * Determines whether to show the nationality of a person.\n */\n showNationality: boolean;\n\n /**\n * Represents the marital status of an individual.\n */\n showMaritalStatus: boolean;\n\n /**\n * Indicates whether to display the salutation or not.\n */\n showSalutation: boolean;\n\n /**\n * Represents whether gender is mandatory or not.\n */\n genderMandatory: boolean;\n\n /**\n * Indicates whether the birth date is mandatory or not.\n */\n birthDateMandatory: boolean;\n\n /**\n * Flag to indicate if a mobile phone is mandatory.\n */\n mobilePhoneMandatory: boolean;\n\n /**\n * Flag to indicate whether the home phone number is mandatory.\n */\n homePhoneMandatory: boolean;\n\n /**\n * Represents whether the address is mandatory or not.\n */\n addressMandatory: boolean;\n\n /**\n * Represents whether the media is mandatory or not.\n */\n mediaMandatory: boolean;\n\n /**\n * Flag indicating whether the candidate must attach an application video to submit.\n */\n applicationVideoMandatory: boolean;\n\n /**\n * Represents the document type ID of an invalid image document.\n */\n invalidImageDocumentTypeId: string;\n\n /**\n * Represents the unique identifier for the application note document type.\n */\n applicationNoteDocumentTypeId: string;\n\n /**\n * The reference to the default advertisement.\n */\n defaultAdvertisementReference: string;\n\n /**\n * Represents whether a note should be displayed or not.\n */\n showNote: boolean;\n\n /**\n * Flag indicating whether saving a disclaimer is mandatory.\n */\n allowSaveDisclaimerMandatory: boolean;\n\n /**\n * Indicates whether the email should be repeated or not.\n */\n repeatEmail: boolean;\n\n /**\n * The `allowSaveDisclaimer` variable stores the disclaimer text that is used to determine whether saving is allowed or not.\n */\n allowSaveDisclaimer: string;\n\n /**\n * Represents the confirmation page for a website.\n */\n confirmationPage: string;\n\n /**\n * Represents information about an attachment.\n */\n attachmentInfo: string;\n\n /**\n * The unique identifier for a candidate mailing template.\n */\n candidateMailingTemplateId: string;\n\n /**\n * Represents an array of {@link Attachment}.\n */\n attachments: Attachment[];\n\n /**\n * Indicates whether sign-in with LinkedIn is enabled.\n */\n enableSignInWithLinkedIn: boolean;\n\n /**\n * Indicates whether Jobindex QuickApply is enabled.\n */\n enableJobindexQuickApply: boolean;\n}\n\n/**\n * @internal\n */\nexport interface ApplicationFormSettings {\n enablePicturePreview?: boolean;\n showColonInFieldNames?: boolean;\n}\n","/**\n * @public\n */\nexport enum DataPlacement {\n Show = 'Show',\n Hide = 'Hide',\n Sidebar = 'Sidebar',\n}\n\n/**\n * @public\n */\nexport interface VacancyDetailsConfiguration {\n /**\n * Specifies if the start date is shown and where.\n */\n showStartDate?: DataPlacement;\n\n /**\n * Specifies if the end date is shown and where.\n */\n showEndDate?: DataPlacement;\n\n /**\n * Specifies if the vacancy type is shown and where.\n */\n showVacancyType?: DataPlacement;\n\n /**\n * Specifies if the contact person name is shown and where.\n */\n showContactPersonName?: DataPlacement;\n\n /**\n * Specifies if the contact person work phone is shown and where.\n */\n showContactPersonWorkPhone?: DataPlacement;\n\n /**\n * Specifies if the contact person mobile phone is shown and where.\n */\n showContactPersonMobilePhone?: DataPlacement;\n\n /**\n * Specifies if the contact person email is shown and where.\n */\n showContactPersonEmail?: DataPlacement;\n\n /**\n * Specifies if the position start date is shown and where.\n */\n showPositionStartDate?: DataPlacement;\n\n /**\n * Specifies if the employment category name is shown and where.\n */\n showEmploymentCategoryName?: DataPlacement;\n\n /**\n * Specifies if the organization name is shown and where.\n */\n showOrganizationName?: DataPlacement;\n\n /**\n * Specifies if the locations are shown and where.\n */\n showLocations?: DataPlacement;\n\n /**\n * Specifies if the regions are shown and where.\n */\n showRegions?: DataPlacement;\n\n /**\n * Specifies if the teaser is shown and where.\n */\n showTeaser?: DataPlacement;\n\n /**\n * Specifies if the company name is shown and where.\n */\n showCompanyName?: DataPlacement;\n\n /**\n * Specifies if the company address is shown and where.\n */\n showCompanyAddress?: DataPlacement;\n\n /**\n * Whether to display dates in a long date format.\n * If false, will use the short date format.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether to show the banner image or not.\n */\n showImage?: boolean;\n}\n","/**\n * @public\n */\nexport enum AccessType {\n All = 'All',\n External = 'External',\n Internal = 'Internal',\n}\n\nexport enum UnsolicitedType {\n Hide = 'Hide',\n Only = 'Only',\n Bottom = 'Bottom',\n Top = 'Top',\n}\n\n/**\n * @public\n */\nexport interface VacancyListFilters {\n /**\n * Represents a date in the format of \"YYYY-MM-DD\".\n */\n perDate?: string;\n\n /**\n * Filters for a specific vacancy type.\n */\n vacancyTypeId?: string;\n\n /**\n * Filters for a specific region.\n */\n regionName?: string;\n\n /**\n * Filters for a specific location.\n */\n locationId?: string;\n\n /**\n * Filters for a specific area.\n */\n vacancyAreaName?: string;\n\n /**\n * Filters for a specific media id.\n */\n mediaId?: string;\n\n /**\n * Filters for unsolicited vacancies, also defines the placement in the list in case of the Vacancy List web component usage.\n */\n unsolicited?: UnsolicitedType;\n\n /**\n * Filters for a specific {@link AccessType}\n */\n access?: AccessType;\n}\n","/**\n * @public\n */\nexport enum SortFieldType {\n Description = 'Description',\n StartDate = 'StartDate',\n EndDate = 'EndDate',\n Priority = 'Priority',\n}\n\n/**\n * @public\n */\nexport interface VacancyListConfiguration {\n /**\n * Indicates whether to include the advertisement text.\n *\n * The text also includes base64 encoded images leading to increased response times.\n */\n includeAdvertisementText?: boolean;\n\n /**\n * Indicates whether the start date of a show should be displayed.\n */\n showStartDate?: boolean;\n\n /**\n * Represents whether to show the end date or not.\n */\n showEndDate?: boolean;\n\n /**\n * Determines whether the long date should be shown or not.\n */\n showLongDate?: boolean;\n\n /**\n * Indicates whether to show the teaser text or not.\n */\n showTeaserText?: boolean;\n\n /**\n * Determines whether to show locations or not.\n */\n showLocations?: boolean;\n\n /**\n * Specifies whether to show regions.\n */\n showRegions?: boolean;\n\n /**\n * Specifies whether to show areas or not.\n */\n showAreas?: boolean;\n\n /**\n * Specifies whether to show fields of work or not.\n */\n showFieldsOfWork?: boolean;\n\n /**\n * Specified the field used for sorting.\n */\n sortField?: SortFieldType;\n\n /**\n * Indicates whether the sorting should be in descending order.\n */\n sortDescending?: boolean;\n\n /**\n * Indicates whether to show filters or not.\n */\n showFilters?: boolean;\n\n /**\n * Indicates whether to display the apply link.\n */\n showApplyLink?: boolean;\n\n /**\n * Indicates whether to display the search.\n */\n showSearch?: boolean;\n}\n\n/**\n * Configuration that only can be done via HTML attributes.\n * @public\n */\nexport interface VacancyListLocalConfiguration {\n showAreasFilter: boolean;\n showVacancyTypesFilter: boolean;\n showLocationsFilter: boolean;\n showRegionsFilter: boolean;\n showFieldsOfWorkFilter: boolean;\n showEmptyMessage: boolean;\n\n /**\n * Indicates whether to display the list image.\n */\n showImages?: boolean;\n\n /**\n * If no list image is set on a vacancy it will try to show the banner image instead.\n * @see {showImages} must be true in order to make this work.\n */\n useBannerImageFallback?: boolean;\n}\n","const setFilter = <T extends object>(searchParams: URLSearchParams, propertyName: keyof T, filters?: T): void => {\n const value = filters ? filters[propertyName] : undefined;\n\n if (value === undefined) {\n return;\n }\n\n const propertyNameAsString = String(propertyName);\n\n switch (typeof value) {\n case 'boolean':\n searchParams.set(propertyNameAsString, value ? 'true' : 'false');\n break;\n\n case 'string':\n searchParams.set(propertyNameAsString, value);\n break;\n\n default:\n throw new Error(`${typeof value} is not implemented yet.`);\n }\n};\n\nexport const assignFilters = <T extends object>(searchParams: URLSearchParams, filters?: T): void => {\n if (!filters) {\n return;\n }\n\n for (const key of Object.keys(filters)) {\n setFilter(searchParams, key as keyof T, filters);\n }\n};\n","import type {\n ApplicationFormType,\n CandidateResult,\n CandidateUpload,\n VacancyDetails,\n VacancyDetailsConfiguration,\n VacancyDetailsFilters,\n VacancyListConfiguration,\n VacancyListFilters,\n} from '../models';\nimport { AccessType, SimpleVacancyDetails } from '../models';\nimport { fetchBackend, getBasePath, getUserLanguageHeader, HttpBackend } from '../helpers';\nimport { assignFilters } from '../helpers/assign-filters';\n\n/**\n * API client to make requests to the Vacancy API.\n *\n * @public\n */\nexport class VacancyClient {\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Returns the setup for a Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param applicationFormType - The application form type to request.\n */\n getApplicationFormType(customerId: string, language: string, applicationFormType = 'Standard'): Promise<ApplicationFormType> {\n return this.backend.get(`${this.getApplicationFormTypePath(customerId)}/${encodeURIComponent(applicationFormType)}`, {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns the site settings for Vacancy List.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyListConfiguration(customerId: string, language: string): Promise<VacancyListConfiguration> {\n return this.backend.get(this.getVacancyListConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a detailed list of vacancies.\n *\n * The result of this API should be cached and reused.\n *\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<VacancyDetails[]> {\n const url = new URL(this.getVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<VacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareVacancyDetailsModel(item));\n }\n\n /**\n * Returns a less detailed list of vacancies.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param filtersAndConfiguration - Filters and configuration to apply to the request.\n */\n async getSimpleVacancyList(\n customerId: string,\n language: string,\n filtersAndConfiguration?: VacancyListFilters & VacancyListConfiguration,\n ): Promise<SimpleVacancyDetails[]> {\n const url = new URL(this.getSimpleVacancyListPath(customerId));\n\n assignFilters(url.searchParams, this.setDefaultFilter(filtersAndConfiguration));\n\n const result = await this.backend.get<SimpleVacancyDetails[]>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return result.map(item => this.prepareSimpleVacancyDetailsModel(item));\n }\n\n /**\n * Returns the site settings for Vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n */\n getVacancyDetailsConfiguration(customerId: string, language: string): Promise<VacancyDetailsConfiguration> {\n return this.backend.get(this.getVacancyDetailsConfigurationPath(customerId), {\n ...getUserLanguageHeader(language),\n });\n }\n\n /**\n * Returns a single vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param id - The id of the vacancy.\n * @param filters - The filters to apply to the request.\n */\n async getVacancyDetails(customerId: string, id: string, language: string, filters?: VacancyDetailsFilters): Promise<VacancyDetails> {\n const url = new URL(`${this.getBasePath(customerId)}/${encodeURIComponent(id)}`);\n\n assignFilters(url.searchParams, filters);\n\n const result = await this.backend.get<VacancyDetails>(url.toString(), {\n ...getUserLanguageHeader(language),\n });\n\n return this.prepareVacancyDetailsModel(result);\n }\n\n /**\n * Creates a new candidate for a vacancy.\n * @param customerId - Your customer id.\n * @param language - The language to request.\n * @param candidate - The candidate to add to the vacancy.\n * @param attachments - Attachments to upload.\n * @param image - Candidate image.\n */\n createCandidate(customerId: string, language: string, candidate: CandidateUpload, attachments: File[], image?: File): Promise<CandidateResult> {\n const formData = new FormData();\n attachments.forEach(attachment => formData.append('attachments', attachment));\n if (image) {\n formData.set('image', image);\n }\n\n formData.set('candidate', JSON.stringify(candidate));\n\n return this.backend.post(`${this.getCandidatePath(customerId)}`, formData, {\n ...getUserLanguageHeader(language),\n });\n }\n\n private prepareVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(this.mapDeprecatedVacancyDetailsFields(model));\n }\n\n private prepareSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model);\n }\n\n private mapDeprecatedVacancyDetailsFields(model: VacancyDetails): VacancyDetails {\n // noinspection JSDeprecatedSymbols\n return {\n ...model,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n contactEmployeeWorkPhoneNumber: model.contactEmployeeWorkPhoneNumber ?? model.contactEmployeWorkPhoneNumber,\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model: SimpleVacancyDetails): SimpleVacancyDetails {\n return {\n ...model,\n areas: model.areas ?? [],\n fieldsOfWork: model.fieldsOfWork ?? [],\n locations: model.locations ?? [],\n regions: model.regions ?? [],\n };\n }\n\n private assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel(model: VacancyDetails): VacancyDetails {\n return {\n ...model,\n ...this.assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel(model),\n medias: model.medias ?? [],\n vacancyElements: model.vacancyElements ?? [],\n };\n }\n\n private setDefaultFilter<T extends VacancyListFilters>(input: T | undefined): T {\n return { ...input, access: input?.access ?? AccessType.External } as T;\n }\n\n private getBasePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/vacancies`;\n }\n\n private getApplicationFormTypePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/types`;\n }\n\n private getCandidatePath(customerId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates`;\n }\n\n private getVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/detailed`;\n }\n\n private getSimpleVacancyListPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/simple`;\n }\n\n private getConfigurationPath(customerId: string): string {\n return `${this.getBasePath(customerId)}/configuration`;\n }\n\n private getVacancyListConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/list`;\n }\n\n private getVacancyDetailsConfigurationPath(customerId: string): string {\n return `${this.getConfigurationPath(customerId)}/details`;\n }\n}\n","import { fetchBackend, getBasePath, HttpBackend } from '../helpers';\n\n/**\n * @public\n */\nexport type VideoSource = 'Recorded' | 'Uploaded';\n\n/**\n * @public\n */\nexport interface VideoSasRequest {\n fileName: string;\n fileSize: number;\n contentType: string;\n durationSeconds: number;\n}\n\n/**\n * @public\n */\nexport interface VideoSasResponse {\n sasUrl: string;\n blobPath: string;\n maxBlockSize: number;\n expiresAt: string;\n}\n\n/**\n * Thrown when the SAS endpoint returns a non-success status. The status code is preserved\n * so callers can distinguish 400 (validation), 404 (candidate missing), 409 (already\n * finalized), 410 (draft window expired), 429 (rate limited), 5xx (transient).\n *\n * @public\n */\nexport class VideoSasError extends Error {\n constructor(public readonly status: number) {\n super(`video-sas-${status}`);\n }\n}\n\n/**\n * Thrown when block uploads or finalize fail.\n *\n * @public\n */\nexport class VideoUploadError extends Error {\n constructor(public readonly status: number) {\n super(`video-upload-${status}`);\n }\n}\n\n/**\n * Uploads a candidate video directly to Azure Blob Storage using a scoped SAS issued\n * by the Recruiting API, then asks the API to commit the blob. The API never handles\n * the video bytes — only the browser and Azure Blob Storage do.\n *\n * @public\n */\nexport class VideoUploadClient {\n private static readonly SAS_CACHE_PREFIX = 'mk-video-sas';\n\n constructor(\n private readonly baseUrl: string,\n private readonly backend: HttpBackend = fetchBackend,\n ) {}\n\n /**\n * Uploads the given file for the candidate identified by the transient GUID returned\n * from createCandidate. Reports progress as blocks land. Throws VideoSasError or\n * VideoUploadError on failure.\n *\n * On retry after a failure the SAS cached in sessionStorage is reused (if still\n * valid) so block uploads resume from the last successful block rather than restarting\n * against a fresh blob.\n */\n async upload(\n customerId: string,\n transientCandidateId: string,\n file: File,\n durationSeconds: number,\n source: VideoSource,\n onProgress?: (done: number, total: number) => void,\n ): Promise<void> {\n const contentType = file.type.split(';')[0].trim().toLowerCase();\n\n const cachedSas = this.loadCachedSas(customerId, transientCandidateId);\n const sas =\n cachedSas ??\n (await this.requestSas(customerId, transientCandidateId, {\n fileName: file.name,\n fileSize: file.size,\n contentType,\n durationSeconds,\n }));\n this.cacheSas(customerId, transientCandidateId, sas);\n\n const blockIds = await this.uploadBlocks(file, sas.sasUrl, sas.maxBlockSize, cachedSas !== null, onProgress);\n\n await this.finalize(customerId, transientCandidateId, sas.blobPath, durationSeconds, source, blockIds, contentType);\n this.clearCachedSas(customerId, transientCandidateId);\n }\n\n private async requestSas(customerId: string, transientCandidateId: string, meta: VideoSasRequest): Promise<VideoSasResponse> {\n try {\n return await this.backend.post<VideoSasResponse>(this.sasPath(customerId, transientCandidateId), meta, {\n 'Content-Type': 'application/json',\n });\n } catch (err) {\n throw new VideoSasError(this.extractStatus(err));\n }\n }\n\n private async uploadBlocks(\n file: File,\n sasUrl: string,\n blockSize: number,\n resume: boolean,\n onProgress?: (done: number, total: number) => void,\n ): Promise<string[]> {\n const total = Math.ceil(file.size / blockSize);\n const blockIds: string[] = [];\n const uploadedBlockIds = resume ? await this.getUncommittedBlockIds(sasUrl) : new Set<string>();\n\n for (let i = 0; i < total; i++) {\n // Block IDs must be equal-length base64 strings within a single blob.\n const blockId = btoa(String(i).padStart(10, '0'));\n blockIds.push(blockId);\n\n if (uploadedBlockIds.has(blockId)) {\n onProgress?.(i + 1, total);\n continue;\n }\n\n const start = i * blockSize;\n const end = Math.min(start + blockSize, file.size);\n const chunk = file.slice(start, end);\n const url = `${sasUrl}&comp=block&blockid=${encodeURIComponent(blockId)}`;\n\n await this.retryWithBackoff(async () => {\n const res = await fetch(url, {\n method: 'PUT',\n headers: { 'x-ms-blob-type': 'BlockBlob' },\n body: chunk,\n });\n if (!res.ok) {\n throw new VideoUploadError(res.status);\n }\n });\n\n onProgress?.(i + 1, total);\n }\n\n return blockIds;\n }\n\n private async getUncommittedBlockIds(sasUrl: string): Promise<Set<string>> {\n try {\n const res = await fetch(`${sasUrl}&comp=blocklist&blocklisttype=uncommitted`);\n if (!res.ok) {\n return new Set<string>();\n }\n const xml = await res.text();\n return new Set([...xml.matchAll(/<Name>([^<]+)<\\/Name>/g)].map(m => m[1]));\n } catch {\n return new Set<string>();\n }\n }\n\n private loadCachedSas(customerId: string, transientCandidateId: string): VideoSasResponse | null {\n if (typeof sessionStorage === 'undefined') {\n return null;\n }\n try {\n const raw = sessionStorage.getItem(`${VideoUploadClient.SAS_CACHE_PREFIX}-${customerId}-${transientCandidateId}`);\n if (!raw) {\n return null;\n }\n const sas = JSON.parse(raw) as VideoSasResponse;\n if (new Date(sas.expiresAt).getTime() - Date.now() < 5 * 60 * 1000) {\n this.clearCachedSas(customerId, transientCandidateId);\n return null;\n }\n return sas;\n } catch {\n return null;\n }\n }\n\n private cacheSas(customerId: string, transientCandidateId: string, sas: VideoSasResponse): void {\n if (typeof sessionStorage === 'undefined') {\n return;\n }\n try {\n sessionStorage.setItem(`${VideoUploadClient.SAS_CACHE_PREFIX}-${customerId}-${transientCandidateId}`, JSON.stringify(sas));\n } catch {\n // sessionStorage unavailable or full — continue without caching\n }\n }\n\n private clearCachedSas(customerId: string, transientCandidateId: string): void {\n if (typeof sessionStorage === 'undefined') {\n return;\n }\n try {\n sessionStorage.removeItem(`${VideoUploadClient.SAS_CACHE_PREFIX}-${customerId}-${transientCandidateId}`);\n } catch {\n // ignore\n }\n }\n\n private async retryWithBackoff(fn: () => Promise<void>, maxAttempts = 4, baseDelayMs = 250): Promise<void> {\n for (let attempt = 0; ; attempt++) {\n try {\n return await fn();\n } catch (err) {\n if (!this.isRetryableUploadError(err) || attempt >= maxAttempts - 1) {\n throw err;\n }\n await new Promise<void>(resolve => setTimeout(resolve, baseDelayMs * Math.pow(2, attempt)));\n }\n }\n }\n\n private isRetryableUploadError(err: unknown): boolean {\n if (err instanceof VideoUploadError || err instanceof VideoSasError) {\n return err.status === 0 || err.status === 429 || err.status >= 500;\n }\n return true;\n }\n\n private async finalize(\n customerId: string,\n transientCandidateId: string,\n blobPath: string,\n durationSeconds: number,\n source: VideoSource,\n blockIds: string[],\n contentType: string,\n ): Promise<void> {\n await this.retryWithBackoff(async () => {\n try {\n await this.backend.post<unknown>(\n this.finalizePath(customerId, transientCandidateId),\n { blobPath, durationSeconds, source, blockIds, contentType },\n { 'Content-Type': 'application/json' },\n );\n } catch (err) {\n throw new VideoUploadError(this.extractStatus(err));\n }\n });\n }\n\n private sasPath(customerId: string, transientCandidateId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/${encodeURIComponent(transientCandidateId)}/video/sas`;\n }\n\n private finalizePath(customerId: string, transientCandidateId: string): string {\n return `${getBasePath(this.baseUrl, customerId)}/candidates/${encodeURIComponent(transientCandidateId)}/video/finalize`;\n }\n\n private extractStatus(err: unknown): number {\n if (typeof err === 'object' && err !== null && 'status' in err) {\n const status = (err as { status: unknown }).status;\n if (typeof status === 'number') {\n return status;\n }\n }\n return 0;\n }\n}\n"],"mappings":"0aAAM,SAAUA,EAAYC,EAAiBC,EAAkB,CAC3D,MAAO,GAAGD,CAAO,IAAIE,mBAAmBD,CAAU,CAAC,EACvD,CCFM,SAAUE,EAAsBC,EAAgB,CAClD,MAAO,CAAE,0BAA2BA,CAAQ,CAChD,CCCM,IAAOC,EAAP,cAAyBC,KAAK,CAIhCC,YACaC,EACTC,EACAC,EAAY,CAEZ,MAAMD,CAAO,EAJJ,KAAAD,SAAAA,EAKT,KAAKE,IAAMA,GAAOF,EAASE,GAC/B,CAEA,IAAIC,QAAM,CACN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AoB,CAAC,iBAC1G,CAEQ8B,cAAcD,EAAY,CAC9B,GAAI,OAAOA,GAAQ,UAAYA,IAAQ,MAAQ,WAAYA,EAAK,CAC5D,IAAMrC,EAAUqC,EAA4BrC,OAC5C,GAAI,OAAOA,GAAW,SAClB,OAAOA,CAEf,CACA,MAAO,EACX,GAjNwBiG,EAAArB,iBAAmB,eADzC,IAAO1E,EAAP+F,SAAO/F,CAAiB,GAAA","names":["getBasePath","baseUrl","customerId","encodeURIComponent","getUserLanguageHeader","language","HttpError","Error","constructor","response","message","url","status","fetchBackend","get","url","headers","sendRequest","post","body","put","delete","method","response","fetch","convertToBodyInit","text","ok","status","statusText","HttpError","JSON","parse","Blob","ArrayBuffer","FormData","URLSearchParams","stringify","getJsonContentTypeHeader","JobAgentClient","constructor","basePath","backend","fetchBackend","getJobAgentConfiguration","customerId","language","get","getBaseUrl","__spreadValues","getUserLanguageHeader","getJobAgentType","type","encodeURIComponent","getJobAgent","jobAgentId","code","post","getDefaultPostHeaders","createJobAgent","jobAgent","updateJobAgent","put","deleteJobAgent","delete","resendEmail","email","activate","getBasePath","getJsonContentTypeHeader","LookupClient","constructor","baseUrl","backend","fetchBackend","getLookups","customerId","language","get","getBasePath","__spreadValues","getUserLanguageHeader","AttachmentType","DataPlacement","AccessType","UnsolicitedType","SortFieldType","setFilter","searchParams","propertyName","filters","value","undefined","propertyNameAsString","String","set","Error","assignFilters","key","Object","keys","VacancyClient","constructor","baseUrl","backend","fetchBackend","getApplicationFormType","customerId","language","applicationFormType","get","getApplicationFormTypePath","encodeURIComponent","__spreadValues","getUserLanguageHeader","getVacancyListConfiguration","getVacancyListConfigurationPath","getVacancyList","filtersAndConfiguration","url","URL","getVacancyListPath","assignFilters","searchParams","setDefaultFilter","toString","map","item","prepareVacancyDetailsModel","getSimpleVacancyList","getSimpleVacancyListPath","prepareSimpleVacancyDetailsModel","getVacancyDetailsConfiguration","getVacancyDetailsConfigurationPath","getVacancyDetails","id","filters","getBasePath","result","createCandidate","candidate","attachments","image","formData","FormData","forEach","attachment","append","set","JSON","stringify","post","getCandidatePath","model","assignEmptyArraysOnNullOrUndefinedListFieldsForVacancyDetailsModel","mapDeprecatedVacancyDetailsFields","assignEmptyArraysOnNullOrUndefinedListFieldsForSimpleVacancyDetailsModel","__spreadProps","contactEmployeeWorkPhoneNumber","contactEmployeWorkPhoneNumber","areas","fieldsOfWork","locations","regions","medias","vacancyElements","input","access","AccessType","External","getConfigurationPath","VideoSasError","Error","constructor","status","VideoUploadError","VideoUploadClient","baseUrl","backend","fetchBackend","upload","customerId","transientCandidateId","file","durationSeconds","source","onProgress","contentType","type","split","trim","toLowerCase","cachedSas","loadCachedSas","sas","requestSas","fileName","name","fileSize","size","cacheSas","blockIds","uploadBlocks","sasUrl","maxBlockSize","finalize","blobPath","clearCachedSas","meta","post","sasPath","err","extractStatus","blockSize","resume","total","Math","ceil","uploadedBlockIds","getUncommittedBlockIds","Set","i","blockId","btoa","String","padStart","push","has","start","end","min","chunk","slice","url","encodeURIComponent","retryWithBackoff","res","fetch","method","headers","body","ok","xml","text","matchAll","map","m","sessionStorage","raw","getItem","SAS_CACHE_PREFIX","JSON","parse","Date","expiresAt","getTime","now","setItem","stringify","removeItem","fn","maxAttempts","baseDelayMs","attempt","isRetryableUploadError","Promise","resolve","setTimeout","pow","finalizePath","getBasePath","_VideoUploadClient"],"file":"dist/api-client/api-client.mjs"}
|
package/clients/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { JobAgentClient } from './job-agent.client';
|
|
2
2
|
export { LookupClient } from './lookup.client';
|
|
3
3
|
export { VacancyClient } from './vacancy.client';
|
|
4
|
+
export { VideoUploadClient, VideoSasError, VideoUploadError } from './video-upload.client';
|
|
5
|
+
export type { VideoSasRequest, VideoSasResponse, VideoSource } from './video-upload.client';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { HttpBackend } from '../helpers';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export type VideoSource = 'Recorded' | 'Uploaded';
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface VideoSasRequest {
|
|
10
|
+
fileName: string;
|
|
11
|
+
fileSize: number;
|
|
12
|
+
contentType: string;
|
|
13
|
+
durationSeconds: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface VideoSasResponse {
|
|
19
|
+
sasUrl: string;
|
|
20
|
+
blobPath: string;
|
|
21
|
+
maxBlockSize: number;
|
|
22
|
+
expiresAt: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Thrown when the SAS endpoint returns a non-success status. The status code is preserved
|
|
26
|
+
* so callers can distinguish 400 (validation), 404 (candidate missing), 409 (already
|
|
27
|
+
* finalized), 410 (draft window expired), 429 (rate limited), 5xx (transient).
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare class VideoSasError extends Error {
|
|
32
|
+
readonly status: number;
|
|
33
|
+
constructor(status: number);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Thrown when block uploads or finalize fail.
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare class VideoUploadError extends Error {
|
|
41
|
+
readonly status: number;
|
|
42
|
+
constructor(status: number);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Uploads a candidate video directly to Azure Blob Storage using a scoped SAS issued
|
|
46
|
+
* by the Recruiting API, then asks the API to commit the blob. The API never handles
|
|
47
|
+
* the video bytes — only the browser and Azure Blob Storage do.
|
|
48
|
+
*
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export declare class VideoUploadClient {
|
|
52
|
+
private readonly baseUrl;
|
|
53
|
+
private readonly backend;
|
|
54
|
+
private static readonly SAS_CACHE_PREFIX;
|
|
55
|
+
constructor(baseUrl: string, backend?: HttpBackend);
|
|
56
|
+
/**
|
|
57
|
+
* Uploads the given file for the candidate identified by the transient GUID returned
|
|
58
|
+
* from createCandidate. Reports progress as blocks land. Throws VideoSasError or
|
|
59
|
+
* VideoUploadError on failure.
|
|
60
|
+
*
|
|
61
|
+
* On retry after a failure the SAS cached in sessionStorage is reused (if still
|
|
62
|
+
* valid) so block uploads resume from the last successful block rather than restarting
|
|
63
|
+
* against a fresh blob.
|
|
64
|
+
*/
|
|
65
|
+
upload(customerId: string, transientCandidateId: string, file: File, durationSeconds: number, source: VideoSource, onProgress?: (done: number, total: number) => void): Promise<void>;
|
|
66
|
+
private requestSas;
|
|
67
|
+
private uploadBlocks;
|
|
68
|
+
private getUncommittedBlockIds;
|
|
69
|
+
private loadCachedSas;
|
|
70
|
+
private cacheSas;
|
|
71
|
+
private clearCachedSas;
|
|
72
|
+
private retryWithBackoff;
|
|
73
|
+
private isRetryableUploadError;
|
|
74
|
+
private finalize;
|
|
75
|
+
private sasPath;
|
|
76
|
+
private finalizePath;
|
|
77
|
+
private extractStatus;
|
|
78
|
+
}
|
package/errors/http.error.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare class HttpError extends Error {
|
|
5
5
|
readonly response: Response;
|
|
6
|
-
|
|
6
|
+
/** Request URL the error originated from. Falls back to {@link response.url}. */
|
|
7
|
+
readonly url: string;
|
|
8
|
+
constructor(response: Response, message: string, url?: string);
|
|
7
9
|
get status(): number;
|
|
8
10
|
}
|
|
@@ -23,6 +23,16 @@ export interface ApplicationFormType {
|
|
|
23
23
|
* Flag indicating whether to display the image.
|
|
24
24
|
*/
|
|
25
25
|
showImage: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Flag indicating whether the candidate may attach an application video.
|
|
28
|
+
*/
|
|
29
|
+
showApplicationVideo: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Per-form-type cap on video application length in seconds. 0 means
|
|
32
|
+
* "use the system-wide default". Always bounded above by the system
|
|
33
|
+
* ceiling configured in VideoApplication:MaxDurationSeconds.
|
|
34
|
+
*/
|
|
35
|
+
videoMaxDurationSeconds: number;
|
|
26
36
|
/**
|
|
27
37
|
* Represents a flag indicating whether to show regions.
|
|
28
38
|
*/
|
|
@@ -120,6 +130,10 @@ export interface ApplicationFormType {
|
|
|
120
130
|
* Represents whether the media is mandatory or not.
|
|
121
131
|
*/
|
|
122
132
|
mediaMandatory: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Flag indicating whether the candidate must attach an application video to submit.
|
|
135
|
+
*/
|
|
136
|
+
applicationVideoMandatory: boolean;
|
|
123
137
|
/**
|
|
124
138
|
* Represents the document type ID of an invalid image document.
|
|
125
139
|
*/
|
|
@@ -43,10 +43,23 @@ export interface AttachmentUpload extends HasDescription {
|
|
|
43
43
|
*/
|
|
44
44
|
export interface CandidateUpload extends Candidate {
|
|
45
45
|
attachmentDetails: AttachmentUpload[];
|
|
46
|
+
/**
|
|
47
|
+
* Set to true when the caller will follow up with a video upload + finalize.
|
|
48
|
+
* The API will skip the immediate Service Bus enqueue and instead enqueue
|
|
49
|
+
* from the finalize endpoint once the video is committed to blob storage,
|
|
50
|
+
* preventing the create-candidate function from firing before upload completes.
|
|
51
|
+
*/
|
|
52
|
+
includesVideo?: boolean;
|
|
46
53
|
}
|
|
47
54
|
/**
|
|
48
55
|
* @public
|
|
49
56
|
*/
|
|
50
57
|
export interface CandidateResult {
|
|
51
58
|
success: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Transient upload identifier (GUID string) returned so the client can follow up with
|
|
61
|
+
* a video SAS request. Populated when the candidate went through the recruiting
|
|
62
|
+
* queue-based create flow; absent for older backend versions.
|
|
63
|
+
*/
|
|
64
|
+
candidateId?: string;
|
|
52
65
|
}
|
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.
|
|
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.19.1","main":"api-client.js","module":"api-client.mjs","typings":"index.d.ts","license":"MIT","keywords":["mindkey","recruiting","api","human resource"]}
|