export type LocationType = 'primary_home' | 'secondary_home' | 'primary_work' | 'headquarters' | 'regional_office'; export type CreateLocationDto = {street1: string | null, street2: string | null, postalCode: string | null, city: string | null, region: string | null, state: string | null, country: string | null, latitude?: (number | null) | undefined, longitude?: (number | null) | undefined, type: LocationType | null}; export type DmCurrency = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTC' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JEP' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XCD' | 'XCG' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'YER' | 'ZAR' | 'ZMW' | 'ZWG' | 'ZWL'; export type CreateVacancySalaryRangeDto = {min: number | null, max: number | null, currency: DmCurrency}; export type DateISO = string; export type UpdateVacancyScorecardAttributeDto = {attribute: string}; export type UpdateVacancyScorecardGroupDto = {groupName: string, attributes: Array}; export type DmSupportedCurrency = 'EUR' | 'GBP' | 'USD' | 'ZAR' | 'AUD' | 'CHF' | 'SAR' | 'AED' | 'EGP' | 'HUF' | 'RON' | 'BGN' | 'CZK' | 'PLN' | 'NOK' | 'SEK' | 'DKK' | 'CAD' | 'HKD' | 'JPY' | 'THB' | 'CNY' | 'INR' | 'SGD' | 'MYR' | 'QAR' | 'PHP' | 'LKR' | 'KWD' | 'PKR' | 'MOP' | 'IDR' | 'VND' | 'KRW' | 'MXN' | 'BRL' | 'ARS' | 'NZD' | 'TWD' | 'ILS' | 'TRY' | 'RUB' | 'MDL' | 'MUR' | 'OMR'; export type UpdateVacancyDto = {companyId?: string | undefined, description?: (string | null) | undefined, employmentType?: ('fullTime' | 'partTime' | 'temporary' | 'internship' | 'permanent' | 'fixedTermContract' | 'interimOrTemporary' | null) | undefined, locationType?: ('remote' | 'hybrid' | 'onsite' | null) | undefined, restricted?: boolean | undefined, location?: (CreateLocationDto | null) | undefined, locations?: Array | undefined, salaryRange?: (CreateVacancySalaryRangeDto | null) | undefined, startAt?: (DateISO | null) | undefined, endAt?: (DateISO | null) | undefined, teamUserIds?: Array | undefined, clientContactIds?: Array | undefined, stageId?: string | undefined, name?: string | undefined, scorecard?: Array | undefined, dealValue?: ({amount: number, currency: DmSupportedCurrency} | null) | undefined, targetCompanyId?: (string | null) | undefined}; export type UpdateApiVacanciesIdArgs = {id: string, body: UpdateVacancyDto}; export type UpdateApiVacanciesIdOptions = {baseUrl: string, xApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update a job * * PUT /vacancies/{id} */ export const updateApiVacanciesId = async (args: UpdateApiVacanciesIdArgs, options: UpdateApiVacanciesIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, xApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (xApiKey !== undefined) headers.set("x-api-key", xApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/vacancies/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };