export type DtosAddress = {addr1?: string | undefined, addr2?: string | undefined, city?: string | undefined, state?: string | undefined, zip?: string | undefined, county?: string | undefined, country?: ('Afghanistan' | 'Albania' | 'Algeria' | 'Argentina' | 'Armenia' | 'Australia' | 'Austria' | 'Azerbaijan' | 'Bahrain' | 'Bangladesh' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bhutan' | 'Bolivarian Republic of Venezuela' | 'Bolivia' | 'Bosnia and Herzegovina' | 'Botswana' | 'Brazil' | 'Brunei Darussalam' | 'Bulgaria' | 'Burundi' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Caribbean' | 'Chile' | 'Colombia' | 'Congo (DRC)' | 'Costa Rica' | 'Côte d'Ivoire' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czech Republic' | 'Denmark' | 'Djibouti' | 'Dominican Republic' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Eritrea' | 'Estonia' | 'Ethiopia' | 'Faroe Islands' | 'Fiji' | 'Finland' | 'France' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Greece' | 'Greenland' | 'Guatemala' | 'Haiti' | 'Honduras' | 'Hong Kong S.A.R.' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Islamic Republic of Pakistan' | 'Israel' | 'Italy' | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Korea' | 'Kuwait' | 'Kyrgyzstan' | 'Lao P.D.R.' | 'Latin America' | 'Latvia' | 'Lebanon' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Macao S.A.R.' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Mexico' | 'Moldova' | 'Mongolia' | 'Montenegro' | 'Morocco' | 'Myanmar' | 'Namibia' | 'Nepal' | 'Netherlands' | 'New Zealand' | 'Nicaragua' | 'Nigeria' | 'North Macedonia' | 'Norway' | 'Oman' | 'Palestine' | 'Panama' | 'Paraguay' | 'People's Republic of China' | 'Peru' | 'Philippines' | 'Poland' | 'Portugal' | 'Principality of Monaco' | 'Puerto Rico' | 'Qatar' | 'Réunion' | 'Romania' | 'Russia' | 'Rwanda' | 'Saudi Arabia' | 'Senegal' | 'Serbia' | 'Sierra Leone' | 'Singapore' | 'Slovakia' | 'Slovenia' | 'Somalia' | 'South Africa' | 'Spain' | 'Sri Lanka' | 'Sudan' | 'Sweden' | 'Switzerland' | 'Syria' | 'Taiwan' | 'Tajikistan' | 'Tanzania' | 'Thailand' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'U.A.E.' | 'Uganda' | 'Ukraine' | 'United Kingdom' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vietnam' | 'Yemen' | 'Zambia' | 'Zimbabwe') | undefined, region?: string | undefined}; export type DtosEmployeePatch = {eid?: string | undefined, payroll_id?: string | undefined, type?: ('Full-Time' | 'Part-Time' | 'Variable-Hour' | 'Contractor' | 'Seasonal' | 'Intern') | undefined, status?: ('Active' | 'Leave of Absence' | 'COBRA' | 'Terminated' | 'Resigned' | 'Deceased' | 'Retired' | 'Applicant' | 'Test') | undefined, status_effective_date?: string | undefined, status_reason?: string | undefined, termination_type?: ('Involuntary' | 'Voluntary' | 'Gross Misconduct') | undefined, first_name?: string | undefined, middle_name?: string | undefined, last_name?: string | undefined, home_address?: DtosAddress | undefined, email?: string | undefined, birth_date?: string | undefined, gender?: ('Male' | 'Female' | '') | undefined, personal_email?: string | undefined, home_phone?: string | undefined, mobile_phone?: string | undefined, work_phone?: string | undefined, marital?: ('' | 'Single' | 'Married' | 'Divorced' | 'Domestic Partner' | 'Legally Separated' | 'Widowed') | undefined, hire_date?: string | undefined, job_title?: string | undefined, payroll_group?: string | undefined, department?: string | undefined, location?: string | undefined, job_class?: string | undefined, division?: string | undefined, hours?: number | undefined, pay_cycle?: ('Annually' | '2 Pay Periods' | '3 Pay Periods' | '4 Pay Periods' | '5 Pay Periods' | '6 Pay Periods' | '7 Pay Periods' | '8 Pay Periods' | '9 Pay Periods' | '10 Pay Periods' | '11 Pay Periods' | 'Monthly' | '13 Pay Periods' | '14 Pay Periods' | '15 Pay Periods' | '16 Pay Periods' | '17 Pay Periods' | '18 Pay Periods' | '19 Pay Periods' | '20 Pay Periods' | '21 Pay Periods' | '22 Pay Periods' | '23 Pay Periods' | 'Semi-Monthly' | '25 Pay Periods' | 'Bi-Weekly' | '27 Pay Periods' | '28 Pay Periods' | '29 Pay Periods' | '30 Pay Periods' | '31 Pay Periods' | '32 Pay Periods' | '33 Pay Periods' | '34 Pay Periods' | '35 Pay Periods' | '36 Pay Periods' | '37 Pay Periods' | '38 Pay Periods' | '39 Pay Periods' | '40 Pay Periods' | '41 Pay Periods' | '42 Pay Periods' | '43 Pay Periods' | '44 Pay Periods' | '45 Pay Periods' | '46 Pay Periods' | '47 Pay Periods' | '48 Pay Periods' | '49 Pay Periods' | '50 Pay Periods' | '51 Pay Periods' | 'Weekly') | undefined}; export type PatchApiVVersionEmployeesIdArgs = {id: string, version: string, body: DtosEmployeePatch}; export type PatchApiVVersionEmployeesIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * employee * * PATCH /v{version}/employees/{id} */ export const patchApiVVersionEmployeesId = async (args: PatchApiVVersionEmployeesIdArgs, options: PatchApiVVersionEmployeesIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v${encodeURIComponent(String(args.version))}/employees/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 };