From 4761b9f9eb4297b2d7ba30e27b58f1f60b5f236c Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 9 Jun 2026 21:12:38 +0200 Subject: [PATCH 01/14] =?UTF-8?q?feat(gp):=20PayrollAdminOnboardingFlow=20?= =?UTF-8?q?=E2=80=94=20steps,=20mutations,=20and=20example=20app=20(PBYR-4?= =?UTF-8?q?044)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add api.ts with useGPFormSchema, useGPCreateEmployment, useGPUpdateContractDetails, useGPUpdateAdministrativeDetails, useGPInviteEmployee (all via mutateAsyncOrThrow) - Expand usePayrollAdminOnboarding hook with step-aware form schemas, mutations, handleValidation, parseFormValues, onSubmit, and sendInvite - Implement SelectCountryStep, ContractDetailsStep, AdministrativeDetailsStep, InvitationStep, SubmitButton, BackButton, and PayrollAdminForm components - Extract useStepSubmitHandler to eliminate duplicated try/catch/navigate logic across form-based step components - Wire real components into PayrollAdminOnboardingFlow (replaces scaffolding stubs) - Add PayrollAdminOnboardingForm demo page to the example app Co-Authored-By: Claude Sonnet 4.6 --- example/src/App.tsx | 8 + example/src/PayrollAdminOnboarding.tsx | 274 ++++++++++++++++++ .../PayrollAdminOnboardingFlow.tsx | 15 +- src/flows/PayrollAdminOnboarding/api.ts | 129 +++++++++ .../components/AdministrativeDetailsStep.tsx | 21 ++ .../components/BackButton.tsx | 28 ++ .../components/ContractDetailsStep.tsx | 18 ++ .../components/InvitationStep.tsx | 54 ++++ .../components/PayrollAdminForm.tsx | 38 +++ .../components/SelectCountryStep.tsx | 91 ++++++ .../components/SubmitButton.tsx | 26 ++ .../components/useStepSubmitHandler.ts | 38 +++ src/flows/PayrollAdminOnboarding/hooks.tsx | 203 ++++++++++++- src/flows/PayrollAdminOnboarding/index.ts | 1 + src/flows/PayrollAdminOnboarding/types.ts | 37 ++- 15 files changed, 957 insertions(+), 24 deletions(-) create mode 100644 example/src/PayrollAdminOnboarding.tsx create mode 100644 src/flows/PayrollAdminOnboarding/api.ts create mode 100644 src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/BackButton.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/PayrollAdminForm.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/SubmitButton.tsx create mode 100644 src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts diff --git a/example/src/App.tsx b/example/src/App.tsx index da4c367ae..173a210d5 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -47,6 +47,7 @@ import { ContractorOnboardingForm } from './ContractorOnboarding'; import { CreateCompanyForm } from './CreateCompany'; import { MagicLinkTest } from './MagicLinkTest'; import { JsonSchemaComparisonDemo } from './JsonSchemaComparisonDemo'; +import { PayrollAdminOnboardingForm } from './PayrollAdminOnboarding'; import ContractorOnboardingCode from './ContractorOnboarding?raw'; import CreateCompanyCode from './CreateCompany?raw'; import MagicLinkTestCode from './MagicLinkTest?raw'; @@ -175,6 +176,13 @@ const additionalDemos = [ component: JsonSchemaComparisonDemo, sourceCode: JsonSchemaComparisonCode, }, + { + id: 'payroll-admin-onboarding', + title: 'GP Admin Onboarding', + description: 'Global Payroll admin onboarding flow (PBYR-4044)', + component: PayrollAdminOnboardingForm, + sourceCode: '', + }, ]; const demoStructure = [ diff --git a/example/src/PayrollAdminOnboarding.tsx b/example/src/PayrollAdminOnboarding.tsx new file mode 100644 index 000000000..9e37a9aae --- /dev/null +++ b/example/src/PayrollAdminOnboarding.tsx @@ -0,0 +1,274 @@ +import { useState } from 'react'; +import { + PayrollAdminOnboardingFlow, + PayrollAdminOnboardingRenderProps, + useGPLegalEntities, +} from '@remoteoss/remote-flows'; +import { RemoteFlows } from './RemoteFlows'; +import { AlertError } from './AlertError'; +import './css/main.css'; + +const COMPANY_ID = import.meta.env.VITE_COMPANY_ID as string; + +const STEP_LABELS: Record = { + select_country: 'Country & Basic Info', + contract_details: 'Contract Details', + administrative_details: 'Administrative Details', + invite: 'Send Invitation', +}; + +const STEP_DESCRIPTIONS: Record = { + select_country: + "Select the employee's country and fill in their basic information.", + contract_details: + 'Define the employment contract terms for this Global Payroll employee.', + administrative_details: + 'Provide administrative details required for payroll processing.', + invite: + 'Send the invitation email so the employee can complete their self-onboarding.', +}; + +type Errors = { + apiError: string; + fieldErrors: { + field: string; + messages: string[]; + userFriendlyLabel: string; + }[]; +}; + +const emptyErrors: Errors = { apiError: '', fieldErrors: [] }; + +function AdminFlowForm({ legalEntityId }: { legalEntityId: string }) { + const [errors, setErrors] = useState(emptyErrors); + const [done, setDone] = useState(false); + + const clearErrors = () => setErrors(emptyErrors); + + const handleError = (error: Error, fieldErrors: Errors['fieldErrors']) => { + setErrors({ apiError: error.message, fieldErrors }); + }; + + if (done) { + return ( +
+

Invitation Sent

+

+ The employee will receive an email to complete their self-onboarding. +

+
+ +
+
+ ); + } + + return ( + { + const { + SelectCountryStep, + ContractDetailsStep, + AdministrativeDetailsStep, + InvitationStep, + SubmitButton, + BackButton, + } = components; + + const currentStep = adminBag.stepState.currentStep.name; + const allSteps = Object.entries(STEP_LABELS); + + if (adminBag.isLoading && !adminBag.countryCode) { + return

Loading...

; + } + + return ( + <> + {/* Step navigation bar — same pattern as Onboarding */} +
+
    + {allSteps.map(([key, label], index) => ( +
  • + {index + 1} + {label} +
  • + ))} +
+
+ +
+

{STEP_LABELS[currentStep]}

+

+ {STEP_DESCRIPTIONS[currentStep]} +

+ + {currentStep === 'select_country' && ( + <> + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={clearErrors} + /> + + {adminBag.countryCode && adminBag.fields.length > 0 && ( +
+ + Create Employment & Continue + +
+ )} + {adminBag.isLoading && adminBag.countryCode && ( +

+ Loading form… +

+ )} + + )} + + {currentStep === 'contract_details' && ( + <> + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={clearErrors} + /> + +
+ + Previous Step + + + Save & Continue + +
+ + )} + + {currentStep === 'administrative_details' && ( + <> + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={clearErrors} + /> + +
+ + Previous Step + + + Save & Continue + +
+ + )} + + {currentStep === 'invite' && ( + <> + +
+ + Previous Step + + { + clearErrors(); + setDone(true); + }} + onError={(e) => + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + > + Send Invitation + +
+ + )} +
+ + ); + }} + /> + ); +} + +function GPAdminOnboardingInner() { + const { data: legalEntities, isLoading } = useGPLegalEntities(COMPANY_ID); + + if (isLoading) { + return

Loading…

; + } + + if (!legalEntities || legalEntities.length === 0) { + return ( +
+

+ No GP-enabled legal entity found. The company{' '} + {COMPANY_ID} has no legal entity with Global Payroll + enabled. +

+
+ ); + } + + return ; +} + +export function PayrollAdminOnboardingForm() { + return ( + + + + ); +} diff --git a/src/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.tsx b/src/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.tsx index 67f9b1c7b..3002dbc1a 100644 --- a/src/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.tsx +++ b/src/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.tsx @@ -2,15 +2,12 @@ import { useId } from 'react'; import { usePayrollAdminOnboarding } from '@/src/flows/PayrollAdminOnboarding/hooks'; import { PayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; import type { PayrollAdminOnboardingFlowProps } from '@/src/flows/PayrollAdminOnboarding/types'; - -// Stable module-level references — prevents consumer subtrees from unmounting on parent re-renders. -// Each will be replaced with a real implementation in PBYR-4044. -const SelectCountryStep = () => null; -const ContractDetailsStep = () => null; -const AdministrativeDetailsStep = () => null; -const InvitationStep = () => null; -const SubmitButton = () => null; -const BackButton = () => null; +import { SelectCountryStep } from '@/src/flows/PayrollAdminOnboarding/components/SelectCountryStep'; +import { ContractDetailsStep } from '@/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep'; +import { AdministrativeDetailsStep } from '@/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep'; +import { InvitationStep } from '@/src/flows/PayrollAdminOnboarding/components/InvitationStep'; +import { SubmitButton } from '@/src/flows/PayrollAdminOnboarding/components/SubmitButton'; +import { BackButton } from '@/src/flows/PayrollAdminOnboarding/components/BackButton'; export const PayrollAdminOnboardingFlow = ({ companyId, diff --git a/src/flows/PayrollAdminOnboarding/api.ts b/src/flows/PayrollAdminOnboarding/api.ts new file mode 100644 index 000000000..3a1c260cf --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/api.ts @@ -0,0 +1,129 @@ +import { useMutation, useQuery } from '@tanstack/react-query'; +import type { FieldValues } from 'react-hook-form'; +import { + getV1CountriesCountryCodeForm, + postV1Employments, + postV1EmploymentsEmploymentIdInvite, + putV2EmploymentsEmploymentIdAdministrativeDetails, + putV2EmploymentsEmploymentIdContractDetails, +} from '@/src/client'; +import { Client } from '@/src/client/client'; +import { useClient } from '@/src/context'; +import { createHeadlessForm } from '@/src/common/createHeadlessForm'; +import { JSONSchemaFormResultWithFieldsets } from '@/src/flows/types'; + +export type GPAdminSchemaType = + | 'global_payroll_basic_information' + | 'global_payroll_contract_details' + | 'global_payroll_administrative_details'; + +export const useGPFormSchema = ( + countryCode: string | undefined, + schemaType: GPAdminSchemaType, + fieldValues: FieldValues, + queryOptions?: { enabled?: boolean }, +): ReturnType> => { + const { client } = useClient(); + return useQuery({ + queryKey: ['gp-form-schema', countryCode, schemaType], + enabled: !!countryCode && (queryOptions?.enabled ?? true), + retry: false, + queryFn: async () => { + const response = await getV1CountriesCountryCodeForm({ + client: client as Client, + headers: { Authorization: `` }, + path: { + country_code: countryCode as string, + form: schemaType, + }, + }); + if (response.error || !response.data) { + throw new Error(`Failed to fetch ${schemaType} schema`); + } + return response; + }, + select: ({ data }) => + createHeadlessForm( + (data?.data as Record) || {}, + fieldValues, + ), + }); +}; + +export const useGPCreateEmployment = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: ({ + countryCode, + legalEntityId, + basicInformation, + externalId, + }: { + countryCode: string; + legalEntityId: string; + basicInformation: Record; + externalId?: string; + }) => + postV1Employments({ + client: client as Client, + headers: { Authorization: `` }, + body: { + type: 'global_payroll_employee', + country_code: countryCode, + engaged_by_entity_slug: legalEntityId, + basic_information: basicInformation, + external_id: externalId, + }, + }), + }); +}; + +export const useGPUpdateContractDetails = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: ({ + employmentId, + contractDetails, + }: { + employmentId: string; + contractDetails: Record; + }) => + putV2EmploymentsEmploymentIdContractDetails({ + client: client as Client, + headers: { Authorization: `` }, + path: { employment_id: employmentId }, + body: { contract_details: contractDetails }, + }), + }); +}; + +export const useGPUpdateAdministrativeDetails = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: ({ + employmentId, + administrativeDetails, + }: { + employmentId: string; + administrativeDetails: Record; + }) => + putV2EmploymentsEmploymentIdAdministrativeDetails({ + client: client as Client, + headers: { Authorization: `` }, + path: { employment_id: employmentId }, + body: { administrative_details: administrativeDetails }, + }), + }); +}; + +export const useGPInviteEmployee = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: ({ employmentId }: { employmentId: string }) => + postV1EmploymentsEmploymentIdInvite({ + client: client as Client, + headers: { Authorization: `` }, + path: { employment_id: employmentId }, + }), + }); +}; diff --git a/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx b/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx new file mode 100644 index 000000000..2178c20eb --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx @@ -0,0 +1,21 @@ +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { PayrollAdminForm } from '@/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm'; +import { useStepSubmitHandler } from '@/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler'; +import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; + +export function AdministrativeDetailsStep(props: GPAdminStepCallbacks) { + const { adminBag } = usePayrollAdminOnboardingContext(); + const handleSubmit = useStepSubmitHandler(props); + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/BackButton.tsx b/src/flows/PayrollAdminOnboarding/components/BackButton.tsx new file mode 100644 index 000000000..c4eca82de --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/BackButton.tsx @@ -0,0 +1,28 @@ +import { ButtonHTMLAttributes, PropsWithChildren } from 'react'; +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { useFormFields } from '@/src/context'; + +export function BackButton({ + children, + onClick, + ...props +}: PropsWithChildren>) { + const { adminBag } = usePayrollAdminOnboardingContext(); + const { components } = useFormFields(); + + const CustomButton = components?.button; + if (!CustomButton) { + throw new Error('Button component not found'); + } + + const handleBack = (evt: React.MouseEvent) => { + adminBag.goToPreviousStep(); + onClick?.(evt); + }; + + return ( + + {children} + + ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx b/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx new file mode 100644 index 000000000..a6a541c20 --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx @@ -0,0 +1,18 @@ +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { PayrollAdminForm } from '@/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm'; +import { useStepSubmitHandler } from '@/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler'; +import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; + +export function ContractDetailsStep(props: GPAdminStepCallbacks) { + const { adminBag } = usePayrollAdminOnboardingContext(); + const handleSubmit = useStepSubmitHandler(props); + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx b/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx new file mode 100644 index 000000000..8b531c58e --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx @@ -0,0 +1,54 @@ +import { PropsWithChildren } from 'react'; +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { useFormFields } from '@/src/context'; +import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import { isMutationError } from '@/src/lib/mutations'; + +type InvitationStepProps = Pick< + GPAdminStepCallbacks, + 'onSuccess' | 'onError' +> & { + children?: React.ReactNode; +}; + +export function InvitationStep({ + onSuccess, + onError, + children, +}: PropsWithChildren) { + const { adminBag } = usePayrollAdminOnboardingContext(); + const { components } = useFormFields(); + + const CustomButton = components?.button; + if (!CustomButton) { + throw new Error('Button component not found'); + } + + const handleInvite = async () => { + try { + const data = await adminBag.sendInvite(); + await onSuccess?.(data); + adminBag.goToNextStep(); + } catch (error: unknown) { + if (isMutationError(error)) { + onError?.({ + error: error.error, + rawError: error.rawError, + fieldErrors: error.fieldErrors, + }); + } else { + onError?.({ + error: error as Error, + rawError: error as Record, + fieldErrors: [], + }); + } + } + }; + + return ( + + {children ?? 'Send invitation'} + + ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm.tsx b/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm.tsx new file mode 100644 index 000000000..a4eaa61c5 --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm.tsx @@ -0,0 +1,38 @@ +import { Form } from '@/src/components/ui/form'; +import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm'; +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { useJSONSchemaForm } from '@/src/components/form/useJSONSchemaForm'; + +type PayrollAdminFormProps = { + onSubmit: (values: Record) => Promise; + defaultValues?: Record; +}; + +export function PayrollAdminForm({ + onSubmit, + defaultValues, +}: PayrollAdminFormProps) { + const { formId, adminBag } = usePayrollAdminOnboardingContext(); + + const form = useJSONSchemaForm({ + handleValidation: adminBag.handleValidation, + defaultValues: defaultValues ?? {}, + checkFieldUpdates: adminBag.setFieldValues, + }); + + return ( +
+ + + + + ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx b/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx new file mode 100644 index 000000000..c38687fa0 --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx @@ -0,0 +1,91 @@ +import { useQuery } from '@tanstack/react-query'; +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { PayrollAdminForm } from '@/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm'; +import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import { useClient } from '@/src/context'; +import { Client } from '@/src/client/client'; +import { countriesOptions } from '@/src/common/api/countries'; +import { isMutationError } from '@/src/lib/mutations'; + +export function SelectCountryStep({ + onSubmit, + onSuccess, + onError, +}: GPAdminStepCallbacks) { + const { adminBag } = usePayrollAdminOnboardingContext(); + const { client } = useClient(); + + const { data: countriesResponse, isLoading: isLoadingCountries } = useQuery( + countriesOptions(client as Client, 'gp-admin'), + ); + + const countryList = countriesResponse?.data?.data ?? []; + + const handleCountryChange = (e: React.ChangeEvent) => { + adminBag.setInternalCountryCode(e.target.value || undefined); + }; + + const handleSubmit = async (values: Record) => { + try { + await onSubmit?.(values); + const data = await adminBag.onSubmit(values); + await onSuccess?.(data); + adminBag.goToNextStep(); + } catch (error: unknown) { + if (isMutationError(error)) { + onError?.({ + error: error.error, + rawError: error.rawError, + fieldErrors: error.fieldErrors, + }); + } else { + onError?.({ + error: error as Error, + rawError: error as Record, + fieldErrors: [], + }); + } + } + }; + + return ( +
+
+ + +
+ + {adminBag.countryCode && + !adminBag.isLoading && + adminBag.fields.length > 0 && ( + + } + /> + )} +
+ ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/SubmitButton.tsx b/src/flows/PayrollAdminOnboarding/components/SubmitButton.tsx new file mode 100644 index 000000000..a5d37b6d5 --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/SubmitButton.tsx @@ -0,0 +1,26 @@ +import { ButtonHTMLAttributes, PropsWithChildren } from 'react'; +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import { useFormFields } from '@/src/context'; + +export function SubmitButton({ + children, + ...props +}: PropsWithChildren>) { + const { formId, adminBag } = usePayrollAdminOnboardingContext(); + const { components } = useFormFields(); + + const CustomButton = components?.button; + if (!CustomButton) { + throw new Error('Button component not found'); + } + + return ( + + {children} + + ); +} diff --git a/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts b/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts new file mode 100644 index 000000000..0174bdeac --- /dev/null +++ b/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts @@ -0,0 +1,38 @@ +import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; +import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import { isMutationError } from '@/src/lib/mutations'; + +/** + * Shared submit handler for form-based GP admin steps. + * Calls adminBag.onSubmit, routes errors through isMutationError, then advances step. + */ +export function useStepSubmitHandler({ + onSubmit, + onSuccess, + onError, +}: GPAdminStepCallbacks) { + const { adminBag } = usePayrollAdminOnboardingContext(); + + return async (values: Record) => { + try { + await onSubmit?.(values); + const data = await adminBag.onSubmit(values); + await onSuccess?.(data); + adminBag.goToNextStep(); + } catch (error: unknown) { + if (isMutationError(error)) { + onError?.({ + error: error.error, + rawError: error.rawError, + fieldErrors: error.fieldErrors, + }); + } else { + onError?.({ + error: error as Error, + rawError: error as Record, + fieldErrors: [], + }); + } + } + }; +} diff --git a/src/flows/PayrollAdminOnboarding/hooks.tsx b/src/flows/PayrollAdminOnboarding/hooks.tsx index 8ce5898b0..d70507df9 100644 --- a/src/flows/PayrollAdminOnboarding/hooks.tsx +++ b/src/flows/PayrollAdminOnboarding/hooks.tsx @@ -1,9 +1,20 @@ import { useState, useMemo, useCallback } from 'react'; +import { FieldValues } from 'react-hook-form'; import { useGPOnboardingSteps } from '@/src/common/api/gpOnboarding'; import { useStepState } from '@/src/flows/useStepState'; import type { Step } from '@/src/flows/useStepState'; import type { PayrollAdminOnboardingFlowProps } from '@/src/flows/PayrollAdminOnboarding/types'; import { useErrorReporting } from '@/src/components/error-handling/useErrorReporting'; +import { mutationToPromise } from '@/src/lib/mutations'; +import { parseJSFToValidate } from '@/src/components/form/utils'; +import { + useGPFormSchema, + useGPCreateEmployment, + useGPUpdateContractDetails, + useGPUpdateAdministrativeDetails, + useGPInviteEmployee, +} from '@/src/flows/PayrollAdminOnboarding/api'; +import type { JSONSchemaFormResultWithFieldsets } from '@/src/flows/types'; export type AdminStepKey = | 'select_country' @@ -46,10 +57,11 @@ export const usePayrollAdminOnboarding = ({ string | undefined >(initialCountryCode); - // Fix: derive from state, not from the prop, so setInternalCountryCode changes are reflected - const skipCountry = !!internalCountryCode; + const [fieldValues, setFieldValues] = useState({}); + + // Fix: derive from state so setInternalCountryCode is reflected in step visibility + const skipCountry = !!internalCountryCode && !!initialCountryCode; - // Fix: memoize to avoid allocating a new object on every render const steps = useMemo(() => buildAdminSteps(skipCountry), [skipCountry]); const { updateErrorContext } = useErrorReporting({ @@ -66,6 +78,77 @@ export const usePayrollAdminOnboarding = ({ const { stepState, nextStep, previousStep, goToStep, setStepValues } = useStepState(steps, onStepChange); + const currentStep = stepState.currentStep.name; + + // Schema queries — each enabled only on its own step (or when employment exists for resume) + const basicInfoSchema = useGPFormSchema( + internalCountryCode, + 'global_payroll_basic_information', + fieldValues, + { enabled: currentStep === 'select_country' && !!internalCountryCode }, + ); + + const contractDetailsSchema = useGPFormSchema( + internalCountryCode, + 'global_payroll_contract_details', + fieldValues, + { enabled: currentStep === 'contract_details' && !!internalCountryCode }, + ); + + const adminDetailsSchema = useGPFormSchema( + internalCountryCode, + 'global_payroll_administrative_details', + fieldValues, + { + enabled: + currentStep === 'administrative_details' && !!internalCountryCode, + }, + ); + + // Current step's schema form + const currentSchema = useMemo(() => { + if (currentStep === 'select_country') return basicInfoSchema.data; + if (currentStep === 'contract_details') return contractDetailsSchema.data; + if (currentStep === 'administrative_details') + return adminDetailsSchema.data; + return undefined; + }, [ + currentStep, + basicInfoSchema.data, + contractDetailsSchema.data, + adminDetailsSchema.data, + ]); + + const isLoadingSchema = + basicInfoSchema.isLoading || + contractDetailsSchema.isLoading || + adminDetailsSchema.isLoading; + + // Mutations + const createEmploymentMutation = useGPCreateEmployment(); + const updateContractDetailsMutation = useGPUpdateContractDetails(); + const updateAdminDetailsMutation = useGPUpdateAdministrativeDetails(); + const inviteEmployeeMutation = useGPInviteEmployee(); + + const { mutateAsyncOrThrow: createEmploymentAsync } = mutationToPromise( + createEmploymentMutation, + ); + const { mutateAsyncOrThrow: updateContractDetailsAsync } = mutationToPromise( + updateContractDetailsMutation, + ); + const { mutateAsyncOrThrow: updateAdminDetailsAsync } = mutationToPromise( + updateAdminDetailsMutation, + ); + const { mutateAsyncOrThrow: inviteEmployeeAsync } = mutationToPromise( + inviteEmployeeMutation, + ); + + const isSubmitting = + createEmploymentMutation.isPending || + updateContractDetailsMutation.isPending || + updateAdminDetailsMutation.isPending || + inviteEmployeeMutation.isPending; + const { data: apiSteps, isLoading: isLoadingSteps, @@ -76,20 +159,128 @@ export const usePayrollAdminOnboarding = ({ apiSteps?.find((s) => s.type === 'completion')?.sub_steps?.[0]?.status === 'completed'; + const handleValidation = useCallback( + async (values: FieldValues) => { + if (!currentSchema) return null; + const parsedValues = await parseJSFToValidate( + values, + currentSchema.fields, + { isPartialValidation: false }, + ); + return currentSchema.handleValidation(parsedValues); + }, + [currentSchema], + ); + + const parseFormValues = useCallback( + async (values: FieldValues): Promise> => { + if (!currentSchema) return values; + return parseJSFToValidate(values, currentSchema.fields, { + isPartialValidation: false, + }); + }, + [currentSchema], + ); + + const onSubmit = useCallback( + async (values: FieldValues) => { + const parsedValues = await parseFormValues(values); + + switch (currentStep) { + case 'select_country': { + if (!internalCountryCode) return; + const data = await createEmploymentAsync({ + countryCode: internalCountryCode, + legalEntityId, + basicInformation: parsedValues, + }); + const empId = (data as { data?: { employment?: { id?: string } } }) + ?.data?.employment?.id; + if (empId) { + setInternalEmploymentId(empId); + await refetchSteps(); + } + return data; + } + + case 'contract_details': { + if (!internalEmploymentId) return; + const data = await updateContractDetailsAsync({ + employmentId: internalEmploymentId, + contractDetails: parsedValues, + }); + await refetchSteps(); + return data; + } + + case 'administrative_details': { + if (!internalEmploymentId) return; + const data = await updateAdminDetailsAsync({ + employmentId: internalEmploymentId, + administrativeDetails: parsedValues, + }); + await refetchSteps(); + return data; + } + + default: + return; + } + }, + [ + currentStep, + internalCountryCode, + internalEmploymentId, + legalEntityId, + parseFormValues, + createEmploymentAsync, + updateContractDetailsAsync, + updateAdminDetailsAsync, + refetchSteps, + ], + ); + + // sendInvite does NOT call nextStep() — navigation is the caller's responsibility, + // consistent with onSubmit. InvitationStep calls goToNextStep() after onSuccess. + const sendInvite = useCallback(async () => { + if (!internalEmploymentId) return; + const data = await inviteEmployeeAsync({ + employmentId: internalEmploymentId, + }); + await refetchSteps(); + return data; + }, [internalEmploymentId, inviteEmployeeAsync, refetchSteps]); + return { + // Step state stepState, - isLoading: isLoadingSteps, + isLoading: isLoadingSteps || isLoadingSchema, + isSubmitting, isComplete: isComplete ?? false, + // Identity companyId, legalEntityId, countryCode: internalCountryCode, employmentId: internalEmploymentId, initialValues, options, + // API steps apiSteps, - setInternalEmploymentId, - setInternalCountryCode, refetchSteps, + // Current step schema + fields: currentSchema?.fields ?? [], + meta: (currentSchema?.meta ?? + {}) as JSONSchemaFormResultWithFieldsets['meta'], + fieldValues, + setFieldValues, + // Form helpers + handleValidation, + parseFormValues, + onSubmit, + sendInvite, + // Navigation + setInternalCountryCode, + setInternalEmploymentId, goToNextStep: nextStep, goToPreviousStep: previousStep, goToStep, diff --git a/src/flows/PayrollAdminOnboarding/index.ts b/src/flows/PayrollAdminOnboarding/index.ts index b58abe6a9..17f027377 100644 --- a/src/flows/PayrollAdminOnboarding/index.ts +++ b/src/flows/PayrollAdminOnboarding/index.ts @@ -3,4 +3,5 @@ export { usePayrollAdminOnboarding } from './hooks'; export type { PayrollAdminOnboardingFlowProps, PayrollAdminOnboardingRenderProps, + GPAdminStepCallbacks, } from './types'; diff --git a/src/flows/PayrollAdminOnboarding/types.ts b/src/flows/PayrollAdminOnboarding/types.ts index 19e8442ab..156d9832d 100644 --- a/src/flows/PayrollAdminOnboarding/types.ts +++ b/src/flows/PayrollAdminOnboarding/types.ts @@ -1,19 +1,38 @@ import { FlowOptions } from '@/src/flows/types'; import { usePayrollAdminOnboarding } from '@/src/flows/PayrollAdminOnboarding/hooks'; +import type { FieldError } from '@/src/lib/mutations'; -// Step component prop types are intentionally empty for this scaffold — PBYR-4044 will -// replace these with typed props once each step component is implemented. -type StepComponentType = React.ComponentType>; +export type GPAdminStepCallbacks = { + onSubmit?: (payload: Record) => void | Promise; + onSuccess?: (data: unknown) => void | Promise; + onError?: (args: { + error: Error; + rawError: Record; + fieldErrors: FieldError[]; + }) => void; +}; export type PayrollAdminOnboardingRenderProps = { adminBag: ReturnType; components: { - SelectCountryStep: StepComponentType; - ContractDetailsStep: StepComponentType; - AdministrativeDetailsStep: StepComponentType; - InvitationStep: StepComponentType; - SubmitButton: StepComponentType; - BackButton: StepComponentType; + SelectCountryStep: React.ComponentType; + ContractDetailsStep: React.ComponentType; + AdministrativeDetailsStep: React.ComponentType; + InvitationStep: React.ComponentType< + Pick & { + children?: React.ReactNode; + } + >; + SubmitButton: React.ComponentType< + React.ButtonHTMLAttributes & { + children?: React.ReactNode; + } + >; + BackButton: React.ComponentType< + React.ButtonHTMLAttributes & { + children?: React.ReactNode; + } + >; }; }; From a4584697e37b3adba90423f4abb2fd9f639f616a Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Thu, 11 Jun 2026 15:06:36 +0200 Subject: [PATCH 02/14] fix(gp): use as const for PayrollAdminOnboardingContext return type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses Jordi's review comment on PR #1076 — aligns with the pattern used in the other flow contexts instead of asserting a redefined type. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/flows/PayrollAdminOnboarding/context.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flows/PayrollAdminOnboarding/context.ts b/src/flows/PayrollAdminOnboarding/context.ts index 1cb178462..64a64f0b7 100644 --- a/src/flows/PayrollAdminOnboarding/context.ts +++ b/src/flows/PayrollAdminOnboarding/context.ts @@ -16,8 +16,8 @@ export const usePayrollAdminOnboardingContext = () => { 'usePayrollAdminOnboardingContext must be used within a PayrollAdminOnboardingFlow', ); } - return context as { - formId: string; - adminBag: ReturnType; - }; + return { + formId: context.formId, + adminBag: context.adminBag, + } as const; }; From 5ada72016f76f526c52c51e8a2b919dbd8eecf97 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Thu, 11 Jun 2026 15:33:01 +0200 Subject: [PATCH 03/14] chore: bump bundle size limit to 650kB for PayrollAdminOnboardingFlow The new flow brings total raw size to ~614 kB, exceeding the prior 600 kB cap. Following the existing pattern of 50 kB bumps when new flows ship. Co-Authored-By: Claude Opus 4.7 (1M context) --- .sizelimit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.sizelimit.json b/.sizelimit.json index e80a99a33..07eb863e5 100644 --- a/.sizelimit.json +++ b/.sizelimit.json @@ -1,6 +1,6 @@ { "limits": { - "total": 600000, + "total": 650000, "totalGzip": 250000, "css": 150000, "cssGzip": 25000, From fc73142298990e2c44b659b38dd4e7f1dc5d3993 Mon Sep 17 00:00:00 2001 From: hamzaremote <158288621+hamzaremote@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:35:59 +0200 Subject: [PATCH 04/14] feat(gp): PayrollEmployeeOnboardingFlow (#1078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(gp): PayrollEmployeeOnboardingFlow — steps, mutations, and example app (PBYR-4045) - Add security field to putV1EmployeePersonalDetails, putV1EmployeeAddress, putV1EmployeeBankAccount in sdk.gen.ts so hey-api injects the Bearer token - Export getV1EmployeeBankAccount and putV1EmployeeBankAccount from client/index.ts - Extract GPStepCallbacks to src/flows/types.ts; both admin and employee flows re-export as GPAdminStepCallbacks / GPEmployeeStepCallbacks for compat - Add api.ts: useGPEmployeeFormSchema, useGPUpdatePersonalDetails, useGPUpdateHomeAddress, useGPUpdateBankAccount (all via mutateAsyncOrThrow) - Expand usePayrollEmployeeOnboarding with step-aware schemas, mutations, handleValidation, parseFormValues, onSubmit; add required countryCode prop - Implement PersonalDetailsStep, HomeAddressStep, BankAccountStep (self-guards when substep not required), SubmitButton, BackButton, PayrollEmployeeForm - Extract useEmployeeStepSubmitHandler mirroring the admin pattern - Export useGPOnboardingSteps from public SDK surface - Date picker: add captionLayout="dropdown" with year range from field constraints; add CSS for rdp caption_dropdowns in global.css - Example app: PayrollEmployeeOnboardingForm with employment ID input, two-context auth (company manager for step status, employee assertion for mutations) - Example backend: GET /api/fetch-employee-token/:employmentId via JWT assertion grant (sub: urn:remote-api:employee:employment:) - Proxy: pass-through token type for /v1/employee/* preserves employee Bearer token instead of overwriting with company manager token Co-Authored-By: Claude Sonnet 4.6 * fix(gp): personal_details field fixes and jsfModify stability (PBYR-4045) Strip read-only name field and clarify mobile_number format: - Strip 'name' from PUT personal_details payload (additionalProperties: false on the PUT endpoint rejects it — 422 "is not accepted") - Hide 'name' via jsfModify so it is never rendered in the employee form - Add description to mobile_number: 10 digits only, no + or country code (USA) - Add jsfModify param to useGPEmployeeFormSchema for per-schema field overrides Extract hook calls to variables in PersonalDetailsStep and HomeAddressStep: - Avoids calling useEmployeeStepSubmitHandler inline inside JSX prop expression Hoist PERSONAL_DETAILS_JSF_MODIFY to module constant: - The inline object literal was a new reference every render, causing createHeadlessForm to be called on every keystroke (select closure captures jsfModify; React Query re-runs select when its function reference changes). A stable module constant eliminates the unnecessary re-computation. Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 --- example/api/jwt_auth.js | 74 + example/api/proxy.js | 38 +- example/api/routes.js | 3 +- example/src/App.tsx | 8 + example/src/PayrollAdminOnboarding.tsx | 2 +- example/src/PayrollEmployeeOnboarding.tsx | 347 + src/client/index.ts | 12 + src/client/sdk.gen.ts | 8782 +++++----- src/client/types.gen.ts | 13247 ++++++++-------- .../fields/default/DatePickerFieldDefault.tsx | 13 +- .../components/AdministrativeDetailsStep.tsx | 4 +- .../components/ContractDetailsStep.tsx | 4 +- .../components/InvitationStep.tsx | 7 +- .../components/SelectCountryStep.tsx | 4 +- .../components/useStepSubmitHandler.ts | 4 +- src/flows/PayrollAdminOnboarding/types.ts | 21 +- .../PayrollEmployeeOnboardingFlow.tsx | 15 +- src/flows/PayrollEmployeeOnboarding/api.ts | 95 + .../components/BackButton.tsx | 28 + .../components/BankAccountStep.tsx | 29 + .../components/HomeAddressStep.tsx | 18 + .../components/PayrollEmployeeForm.tsx | 39 + .../components/PersonalDetailsStep.tsx | 18 + .../components/SubmitButton.tsx | 26 + .../useEmployeeStepSubmitHandler.ts | 34 + src/flows/PayrollEmployeeOnboarding/hooks.tsx | 177 +- src/flows/PayrollEmployeeOnboarding/index.ts | 1 + src/flows/PayrollEmployeeOnboarding/types.ts | 24 +- src/flows/types.ts | 14 + src/index.tsx | 5 +- src/styles/global.css | 36 + 31 files changed, 12023 insertions(+), 11106 deletions(-) create mode 100644 example/src/PayrollEmployeeOnboarding.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/api.ts create mode 100644 src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/BankAccountStep.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/SubmitButton.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts diff --git a/example/api/jwt_auth.js b/example/api/jwt_auth.js index a72d6c199..0f867bfe3 100644 --- a/example/api/jwt_auth.js +++ b/example/api/jwt_auth.js @@ -101,8 +101,82 @@ async function getCompanyManagerToken(req, res) { } } +const EMPLOYEE_SCOPES = 'all:write'; + +async function fetchEmployeeToken(employmentId) { + const { VITE_CLIENT_ID, VITE_CLIENT_SECRET, VITE_REMOTE_GATEWAY } = + process.env; + + if ( + !VITE_CLIENT_ID || + (!VITE_CLIENT_SECRET && VITE_REMOTE_GATEWAY !== 'local') || + !VITE_REMOTE_GATEWAY || + !employmentId + ) { + throw new Error( + 'Missing VITE_CLIENT_ID, VITE_CLIENT_SECRET, or employmentId', + ); + } + + const gatewayUrl = buildGatewayURL(); + const now = Math.floor(Date.now() / 1000); + const exp = now + 5 * 60; + + const payload = { + iss: VITE_CLIENT_ID, + sub: `urn:remote-api:employee:employment:${employmentId}`, + aud: `${gatewayUrl}/auth`, + exp, + scope: EMPLOYEE_SCOPES, + iat: now, + }; + + const jwtToken = jwt.sign(payload, VITE_CLIENT_SECRET, { + algorithm: 'HS256', + }); + + const encodedCredentials = Buffer.from( + `${VITE_CLIENT_ID}:${VITE_CLIENT_SECRET}`, + ).toString('base64'); + + const response = await fetch(`${gatewayUrl}/auth/oauth2/token`, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + Authorization: `Basic ${encodedCredentials}`, + }, + body: new URLSearchParams({ + grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', + assertion: jwtToken, + scope: EMPLOYEE_SCOPES, + }), + }); + + if (!response.ok) { + const errorText = await response.text(); + throw new Error(`HTTP ${response.status}: ${errorText}`); + } + + const data = await response.json(); + return { accessToken: data.access_token, expiresIn: data.expires_in }; +} + +async function getEmployeeToken(req, res) { + const { employmentId } = req.params; + try { + const { accessToken, expiresIn } = await fetchEmployeeToken(employmentId); + return res + .status(200) + .json({ access_token: accessToken, expires_in: expiresIn }); + } catch (error) { + console.error('Error fetching employee token:', error); + return res.status(500).json({ error: error.message }); + } +} + module.exports = { getCompanyManagerToken, generateJWTToken, fetchCompanyManagerToken, + getEmployeeToken, }; diff --git a/example/api/proxy.js b/example/api/proxy.js index 7e481fe12..3cdf32b2f 100644 --- a/example/api/proxy.js +++ b/example/api/proxy.js @@ -16,17 +16,10 @@ function getTokenType(method, path) { // Extract pathname without query parameters const pathname = path.split('?')[0].toLowerCase(); - // GET /v1/countries or /v2/countries - if (normalizedMethod === 'GET' && /^\/v[12]\/countries$/.test(pathname)) { - return 'client-credentials'; - } - - // GET /v1/countries/{country_code}/address_details or /v2/countries/{country_code}/address_details - if ( - normalizedMethod === 'GET' && - /^\/v[12]\/countries\/[^/]+\/address_details$/.test(pathname) - ) { - return 'client-credentials'; + // GET /v1/countries or /v2/countries — user token works and is required when + // client_credentials isn't available (e.g. local dev without client secret) + if (normalizedMethod === 'GET' && /^\/v[12]\/countries/.test(pathname)) { + return 'user-token'; } // GET /v1/company-currencies or /v2/company-currencies @@ -50,6 +43,12 @@ function getTokenType(method, path) { return 'client-credentials'; } + // /v1/employee/* endpoints require an employee-scoped assertion token. + // The SDK already sends the correct Bearer token — pass it through unchanged. + if (/^\/v1\/employee\//.test(pathname)) { + return 'pass-through'; + } + // All other requests use user token return 'user-token'; } @@ -94,11 +93,18 @@ async function createProxyRequest(path, method = 'GET', options = {}) { // Add authentication if required if (requiresAuth) { const tokenType = getTokenType(method, path); - const { accessToken } = - tokenType === 'client-credentials' - ? await fetchClientCredentialsAccessToken() - : await fetchAccessToken(); - requestConfig.headers.Authorization = `Bearer ${accessToken}`; + if (tokenType === 'pass-through') { + // Employee endpoints: the SDK already set the correct Bearer token in the + // incoming request — forward it unchanged instead of overwriting with a + // company manager token. + // headers already contains the incoming Authorization from ...headers above. + } else { + const { accessToken } = + tokenType === 'client-credentials' + ? await fetchClientCredentialsAccessToken() + : await fetchAccessToken(); + requestConfig.headers.Authorization = `Bearer ${accessToken}`; + } } return axios(requestConfig); diff --git a/example/api/routes.js b/example/api/routes.js index 2a51b3817..302746bda 100644 --- a/example/api/routes.js +++ b/example/api/routes.js @@ -1,11 +1,12 @@ const { getToken } = require('./get_token.js'); -const { getCompanyManagerToken } = require('./jwt_auth.js'); +const { getCompanyManagerToken, getEmployeeToken } = require('./jwt_auth.js'); const { createProxyMiddleware } = require('./proxy.js'); function setupRoutes(app) { // API routes app.get('/api/fetch-refresh-token', getToken); app.get('/api/fetch-company-manager', getCompanyManagerToken); + app.get('/api/fetch-employee-token/:employmentId', getEmployeeToken); // Proxy all versioned API routes (v1, v2, etc.) app.use(/^\/v\d+/, createProxyMiddleware()); diff --git a/example/src/App.tsx b/example/src/App.tsx index 173a210d5..fa36f224a 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -48,6 +48,7 @@ import { CreateCompanyForm } from './CreateCompany'; import { MagicLinkTest } from './MagicLinkTest'; import { JsonSchemaComparisonDemo } from './JsonSchemaComparisonDemo'; import { PayrollAdminOnboardingForm } from './PayrollAdminOnboarding'; +import { PayrollEmployeeOnboardingForm } from './PayrollEmployeeOnboarding'; import ContractorOnboardingCode from './ContractorOnboarding?raw'; import CreateCompanyCode from './CreateCompany?raw'; import MagicLinkTestCode from './MagicLinkTest?raw'; @@ -183,6 +184,13 @@ const additionalDemos = [ component: PayrollAdminOnboardingForm, sourceCode: '', }, + { + id: 'payroll-employee-onboarding', + title: 'GP Employee Onboarding', + description: 'Global Payroll employee self-onboarding flow (PBYR-4045)', + component: PayrollEmployeeOnboardingForm, + sourceCode: '', + }, ]; const demoStructure = [ diff --git a/example/src/PayrollAdminOnboarding.tsx b/example/src/PayrollAdminOnboarding.tsx index 9e37a9aae..6fae0c355 100644 --- a/example/src/PayrollAdminOnboarding.tsx +++ b/example/src/PayrollAdminOnboarding.tsx @@ -267,7 +267,7 @@ function GPAdminOnboardingInner() { export function PayrollAdminOnboardingForm() { return ( - + ); diff --git a/example/src/PayrollEmployeeOnboarding.tsx b/example/src/PayrollEmployeeOnboarding.tsx new file mode 100644 index 000000000..edb688652 --- /dev/null +++ b/example/src/PayrollEmployeeOnboarding.tsx @@ -0,0 +1,347 @@ +import { useState, useMemo } from 'react'; +import { + PayrollEmployeeOnboardingFlow, + PayrollEmployeeOnboardingRenderProps, +} from '@remoteoss/remote-flows'; +import { useGPOnboardingSteps } from '@remoteoss/remote-flows'; +import { RemoteFlows } from './RemoteFlows'; +import { AlertError } from './AlertError'; +import './css/main.css'; + +const COUNTRY_CODE = (import.meta.env.VITE_GP_COUNTRY_CODE as string) || 'AUS'; +const EMPLOYMENT_ID = (import.meta.env.VITE_EMPLOYMENT_ID as string) || ''; + +const STEP_LABELS: Record = { + personal_details: 'Personal Details', + home_address: 'Home Address', + bank_account: 'Bank Account', +}; + +const STEP_DESCRIPTIONS: Record = { + personal_details: + 'Provide your personal information for the employment record.', + home_address: 'Enter your home address for payroll and compliance purposes.', + bank_account: 'Add your bank account details to receive payroll payments.', +}; + +type Errors = { + apiError: string; + fieldErrors: { + field: string; + messages: string[]; + userFriendlyLabel: string; + }[]; +}; + +const emptyErrors: Errors = { apiError: '', fieldErrors: [] }; + +// Fetches an employee-scoped token via the JWT assertion grant. +function buildEmployeeAuth(employmentId: string) { + return () => + fetch(`/api/fetch-employee-token/${employmentId}`) + .then((res) => res.json()) + .then((data) => ({ + accessToken: data.access_token as string, + expiresIn: (data.expires_in as number) ?? 300, + })); +} + +// ── Step status fetcher (company manager token, outer context) ────────────── + +function useEmployeeStepInfo(employmentId: string) { + const { data: apiSteps, isLoading } = useGPOnboardingSteps(employmentId); + const selfOnboarding = apiSteps?.find( + (s: { type: string }) => s.type === 'self_onboarding', + ); + const substeps = (selfOnboarding?.sub_steps ?? []) as { type: string }[]; + const hasBankAccount = substeps.some( + (s: { type: string }) => s.type === 'employee_provides_bank_details', + ); + return { substeps, hasBankAccount, isLoading }; +} + +// ── Employee form (employee-scoped token, inner context) ──────────────────── + +function EmployeeFlowInner({ + employmentId, + hasBankAccount, +}: { + employmentId: string; + hasBankAccount: boolean; +}) { + const [errors, setErrors] = useState(emptyErrors); + const [done, setDone] = useState(false); + + const clearErrors = () => setErrors(emptyErrors); + const handleError = (error: Error, fieldErrors: Errors['fieldErrors']) => + setErrors({ apiError: error.message, fieldErrors }); + + const allSteps = Object.entries(STEP_LABELS); + const visibleSteps = hasBankAccount + ? allSteps + : allSteps.filter(([key]) => key !== 'bank_account'); + const lastStepKey = visibleSteps[visibleSteps.length - 1][0]; + + if (done) { + return ( +
+

Self-onboarding Complete

+

+ All your information has been submitted. Your employer will review and + activate your employment. +

+
+ +
+
+ ); + } + + return ( + { + const { + PersonalDetailsStep, + HomeAddressStep, + BankAccountStep, + SubmitButton, + BackButton, + } = components; + + const currentStep = employeeBag.stepState.currentStep.name; + + if (employeeBag.isLoading && !employeeBag.fields.length) { + return

Loading...

; + } + + const isLastStep = currentStep === lastStepKey; + + return ( + <> +
+
    + {visibleSteps.map(([key, label], index) => ( +
  • + {index + 1} + {label} +
  • + ))} +
+
+ +
+

{STEP_LABELS[currentStep]}

+

+ {STEP_DESCRIPTIONS[currentStep]} +

+ + {currentStep === 'personal_details' && ( + <> + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={clearErrors} + /> + + {employeeBag.fields.length > 0 && ( +
+ + Save & Continue + +
+ )} + + )} + + {currentStep === 'home_address' && ( + <> + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={() => { + clearErrors(); + if (isLastStep) setDone(true); + }} + /> + +
+ + Previous Step + + + {isLastStep ? 'Submit' : 'Save & Continue'} + +
+ + )} + + {currentStep === 'bank_account' && hasBankAccount && ( + <> + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={() => { + clearErrors(); + setDone(true); + }} + /> + +
+ + Previous Step + + + Submit + +
+ + )} +
+ + ); + }} + /> + ); +} + +// ── Step info loader (company manager context) then hands off to employee ctx ─ + +function EmployeeFlowForm({ employmentId }: { employmentId: string }) { + const { hasBankAccount, isLoading } = useEmployeeStepInfo(employmentId); + const employeeAuth = useMemo( + () => buildEmployeeAuth(employmentId), + [employmentId], + ); + + if (isLoading) return

Loading...

; + + return ( + // Inner RemoteFlows uses the employee-scoped token for all mutations + + + + ); +} + +// ── Employment ID entry ────────────────────────────────────────────────────── + +function GPEmployeeOnboardingInner() { + const [employmentId, setEmploymentId] = useState(EMPLOYMENT_ID); + const [submitted, setSubmitted] = useState(!!EMPLOYMENT_ID); + + if (!submitted) { + return ( +
+

Employee Self-onboarding

+

+ Enter the employment ID created by the GP Admin flow to begin + self-onboarding. +

+
+

+ Prerequisite: The admin must complete the GP Admin + Onboarding flow and send the invitation first. The + employee endpoints only activate after the invitation is sent. +

+
+
+ + setEmploymentId(e.target.value.trim())} + /> +
+
+ +
+
+ ); + } + + return ( +
+

+ Employment:{' '} + {employmentId}{' '} + +

+ +
+ ); +} + +export function PayrollEmployeeOnboardingForm() { + return ( + // Outer RemoteFlows uses company manager token to fetch step status + + + + ); +} diff --git a/src/client/index.ts b/src/client/index.ts index b43ad1fdb..c0fb230db 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -55,6 +55,7 @@ export { getV1CustomFields, getV1CustomFieldsCustomFieldIdValuesEmploymentId, getV1EmployeeAddress, + getV1EmployeeBankAccount, getV1EmployeeCurrent, getV1EmployeeDocuments, getV1EmployeeDocumentsId, @@ -235,6 +236,7 @@ export { postV2EmploymentsEmploymentIdEngagementAgreementDetails, putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails, putV1EmployeeAddress, + putV1EmployeeBankAccount, putV1EmployeeEmergencyContact, putV1EmployeeFederalTaxes, putV1EmployeePersonalDetails, @@ -843,6 +845,11 @@ export type { GetV1EmployeeLeavePoliciesSummaryErrors, GetV1EmployeeLeavePoliciesSummaryResponse, GetV1EmployeeLeavePoliciesSummaryResponses, + GetV1EmployeeBankAccountData, + GetV1EmployeeBankAccountError, + GetV1EmployeeBankAccountErrors, + GetV1EmployeeBankAccountResponse, + GetV1EmployeeBankAccountResponses, GetV1EmployeePayslipFilesData, GetV1EmployeePayslipFilesError, GetV1EmployeePayslipFilesErrors, @@ -1861,6 +1868,11 @@ export type { PutV1EmployeeEmergencyContactErrors, PutV1EmployeeEmergencyContactResponse, PutV1EmployeeEmergencyContactResponses, + PutV1EmployeeBankAccountData, + PutV1EmployeeBankAccountError, + PutV1EmployeeBankAccountErrors, + PutV1EmployeeBankAccountResponse, + PutV1EmployeeBankAccountResponses, PutV1EmployeeFederalTaxesData, PutV1EmployeeFederalTaxesError, PutV1EmployeeFederalTaxesErrors, diff --git a/src/client/sdk.gen.ts b/src/client/sdk.gen.ts index 2906c113d..aeb61d867 100644 --- a/src/client/sdk.gen.ts +++ b/src/client/sdk.gen.ts @@ -122,6 +122,9 @@ import type { GetV1ContractorInvoicesIdErrors, GetV1ContractorInvoicesIdResponses, GetV1ContractorInvoicesResponses, + GetV1ContractorsCorTerminationRequestsData, + GetV1ContractorsCorTerminationRequestsErrors, + GetV1ContractorsCorTerminationRequestsResponses, GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData, GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors, GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses, @@ -169,6 +172,9 @@ import type { GetV1EmployeeAddressData, GetV1EmployeeAddressErrors, GetV1EmployeeAddressResponses, + GetV1EmployeeBankAccountData, + GetV1EmployeeBankAccountErrors, + GetV1EmployeeBankAccountResponses, GetV1EmployeeCurrentData, GetV1EmployeeCurrentErrors, GetV1EmployeeCurrentResponses, @@ -240,6 +246,12 @@ import type { GetV1EmploymentsEmploymentIdCustomFieldsErrors, GetV1EmploymentsEmploymentIdCustomFieldsResponses, GetV1EmploymentsEmploymentIdData, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses, GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData, GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, @@ -396,6 +408,24 @@ import type { GetV1TravelLetterRequestsIdErrors, GetV1TravelLetterRequestsIdResponses, GetV1TravelLetterRequestsResponses, + GetV1WdGphPayDetailData, + GetV1WdGphPayDetailDataData, + GetV1WdGphPayDetailDataErrors, + GetV1WdGphPayDetailDataResponses, + GetV1WdGphPayDetailErrors, + GetV1WdGphPayDetailResponses, + GetV1WdGphPayProcessingFeatureData, + GetV1WdGphPayProcessingFeatureErrors, + GetV1WdGphPayProcessingFeatureResponses, + GetV1WdGphPayProgressData, + GetV1WdGphPayProgressErrors, + GetV1WdGphPayProgressResponses, + GetV1WdGphPaySummaryData, + GetV1WdGphPaySummaryErrors, + GetV1WdGphPaySummaryResponses, + GetV1WdGphPayVarianceData, + GetV1WdGphPayVarianceErrors, + GetV1WdGphPayVarianceResponses, GetV1WebhookEventsData, GetV1WebhookEventsErrors, GetV1WebhookEventsResponses, @@ -405,6 +435,9 @@ import type { GetV1WorkAuthorizationRequestsIdErrors, GetV1WorkAuthorizationRequestsIdResponses, GetV1WorkAuthorizationRequestsResponses, + GetV2EmploymentsEmploymentIdBasicInformationData, + GetV2EmploymentsEmploymentIdBasicInformationErrors, + GetV2EmploymentsEmploymentIdBasicInformationResponses, GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData, GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, @@ -489,6 +522,9 @@ import type { PatchV2EmploymentsEmploymentIdData, PatchV2EmploymentsEmploymentIdErrors, PatchV2EmploymentsEmploymentIdResponses, + PostAuthOauth2Token2Data, + PostAuthOauth2Token2Errors, + PostAuthOauth2Token2Responses, PostAuthOauth2TokenData, PostAuthOauth2TokenErrors, PostAuthOauth2TokenResponses, @@ -684,6 +720,9 @@ import type { PostV1TimeoffTimeoffIdDeclineData, PostV1TimeoffTimeoffIdDeclineErrors, PostV1TimeoffTimeoffIdDeclineResponses, + PostV1TimesheetsData, + PostV1TimesheetsErrors, + PostV1TimesheetsResponses, PostV1TimesheetsTimesheetIdApproveData, PostV1TimesheetsTimesheetIdApproveErrors, PostV1TimesheetsTimesheetIdApproveResponses, @@ -705,6 +744,9 @@ import type { PutV1EmployeeAddressData, PutV1EmployeeAddressErrors, PutV1EmployeeAddressResponses, + PutV1EmployeeBankAccountData, + PutV1EmployeeBankAccountErrors, + PutV1EmployeeBankAccountResponses, PutV1EmployeeEmergencyContactData, PutV1EmployeeEmergencyContactErrors, PutV1EmployeeEmergencyContactResponses, @@ -789,220 +831,249 @@ export type Options< }; /** - * List Offboarding + * Update administrative details + * + * Updates employment's administrative details. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * * - * Lists Offboarding requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1Offboardings = ( - options?: Options, +export const putV2EmploymentsEmploymentIdAdministrativeDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV2EmploymentsEmploymentIdAdministrativeDetailsData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1OffboardingsResponses, - GetV1OffboardingsErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses, + PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/offboardings', + url: '/v2/employments/{employment_id}/administrative_details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create Offboarding - * - * Creates an Offboarding request. + * Get engagement agreement details * + * Returns the engagement agreement details for an employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage offboarding (`offboarding:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postV1Offboardings = ( - options?: Options, +export const getV1EmploymentsEmploymentIdEngagementAgreementDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData, + ThrowOnError + >, ) => - (options?.client ?? client).post< - PostV1OffboardingsResponses, - PostV1OffboardingsErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/offboardings', + url: '/v1/employments/{employment_id}/engagement-agreement-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * List Offboardings (v2) + * Upsert engagement agreement details + * + * Creates or updates the engagement agreement details for an employment. + * + * This endpoint requires country-specific data. The exact required fields will vary depending on + * which country the employment is in. To see the list of parameters for each country, see the + * **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that compliance requirements for each country are subject to change according to local laws. + * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended + * to avoid compliance issues and to have the latest version of a country's requirements. * - * Lists offboardings for a company. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV2Offboardings = ( - options?: Options, +export const postV1EmploymentsEmploymentIdEngagementAgreementDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV2OffboardingsResponses, - GetV2OffboardingsErrors, + (options.client ?? client).post< + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/offboardings', + url: '/v1/employments/{employment_id}/engagement-agreement-details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show timesheet + * Convert currency using dynamic rates * - * Shows a timesheet by its ID. + * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | * */ -export const getV1TimesheetsId = ( - options: Options, +export const postV1CurrencyConverterEffective2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetV1TimesheetsIdResponses, - GetV1TimesheetsIdErrors, + (options.client ?? client).post< + PostV1CurrencyConverterEffective2Responses, + PostV1CurrencyConverterEffective2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timesheets/{id}', + url: '/v1/currency-converter', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Cancel onboarding + * Submit employee federal taxes * - * Cancel onboarding. + * Submits the authenticated employee's US federal tax (W-4) details. * - * Requirements for the cancellation to succeed: + * Available for US Global Payroll employees once they reach the + * post-enrollment state. Calls made before then return a 404. + * + * This endpoint requires country-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_federal_taxes` + * as the form name to discover the schema for a given country. * - * * Employment has to be in `invited`, `created`, `created_awaiting_reserve`, `created_reserve_paid`, `pre_hire` status - * * Employee must not have signed the employment contract * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage onboarding (`onboarding:write`) | + * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | * */ -export const postV1CancelOnboardingEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const putV1EmployeeFederalTaxes = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1CancelOnboardingEmploymentIdResponses, - PostV1CancelOnboardingEmploymentIdErrors, + (options?.client ?? client).put< + PutV1EmployeeFederalTaxesResponses, + PutV1EmployeeFederalTaxesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cancel-onboarding/{employment_id}', + url: '/v1/employee/federal-taxes', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Show form schema + * List contractor subscriptions * - * Returns the json schema of the `contract_amendment` form for a specific employment. - * This endpoint requires a company access token, as forms are dependent on certain - * properties of companies and their current employments. + * Endpoint that can be used to list contractor subscriptions. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1ContractAmendmentsSchema = < +export const getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1ContractAmendmentsSchemaResponses, - GetV1ContractAmendmentsSchemaErrors, + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses, + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contract-amendments/schema', + url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions', ...options, }); /** - * Bulk Create Pay Items - * - * Bulk creates pay items for employments. Supports up to 500 items per request. - * Integration-specific fields (shift code, currency, pay amount, etc.) go in the `provider_data` object. - * Only Global Payroll employments are supported. Non-GP employments are returned as `employment_not_global_payroll`. + * Convert currency using flat rates * + * Convert currency using FX rates used in Remote’s estimation tools. + * These rates are not guaranteed to match final onboarding or contract rates. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | - | Manage pay items (`pay_item:write`) | + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | * */ -export const postV1PayItemsBulk = ( - options: Options, +export const postV1CurrencyConverterRaw = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1PayItemsBulkResponses, - PostV1PayItemsBulkErrors, + PostV1CurrencyConverterRawResponses, + PostV1CurrencyConverterRawErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/pay-items/bulk', + url: '/v1/currency-converter/raw', ...options, headers: { 'Content-Type': 'application/json', @@ -1011,96 +1082,96 @@ export const postV1PayItemsBulk = ( }); /** - * Show Offboarding (v2) - * - * Returns a single offboarding by its ID. + * List Incentives * + * Lists all Incentives of a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getV2OffboardingsId = ( - options: Options, +export const getV1Incentives = ( + options: Options, ) => (options.client ?? client).get< - GetV2OffboardingsIdResponses, - GetV2OffboardingsIdErrors, + GetV1IncentivesResponses, + GetV1IncentivesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/offboardings/{id}', - ...options, - }); + >({ url: '/v1/incentives', ...options }); /** - * List pricing plans + * Create Incentive * - * List all pricing plans for a company. - * Currently the endpoint only returns the pricing plans for the EOR monthly product and the contractor products (Standard, Plus and COR). + * Creates an Incentive. + * + * Incentives use the currency of the employment specified provided in the `employment_id` field. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getV1CompaniesCompanyIdPricingPlans = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1Incentives = ( + options: Options, ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdPricingPlansResponses, - GetV1CompaniesCompanyIdPricingPlansErrors, + (options.client ?? client).post< + PostV1IncentivesResponses, + PostV1IncentivesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/pricing-plans', + url: '/v1/incentives', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create a pricing plan for a company + * List Benefit Offers By Employment * - * Create a pricing plan for a company, in order to do that we have 2 ways: - * - * 1. Create a pricing plan from a partner template - * 2. Create a pricing plan from a product price - * - * The pricing plan is always created in the company's desired currency. + * List benefit offers by employment. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage pricing plans (`pricing_plan:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const postV1CompaniesCompanyIdPricingPlans = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1BenefitOffers = ( + options: Options, +) => + (options.client ?? client).get< + GetV1BenefitOffersResponses, + GetV1BenefitOffersErrors, + ThrowOnError + >({ url: '/v1/benefit-offers', ...options }); + +/** + * Complete onboarding + * + * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status + * + * @deprecated + */ +export const postV1Ready = ( + options: Options, ) => (options.client ?? client).post< - PostV1CompaniesCompanyIdPricingPlansResponses, - PostV1CompaniesCompanyIdPricingPlansErrors, + PostV1ReadyResponses, + PostV1ReadyErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}/pricing-plans', + url: '/v1/ready', ...options, headers: { 'Content-Type': 'application/json', @@ -1109,92 +1180,72 @@ export const postV1CompaniesCompanyIdPricingPlans = < }); /** - * Show probation completion letter - * - * Show a single probation completion letter. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | - * + * Creates a cost estimation of employments */ -export const getV1ProbationCompletionLetterId = < +export const postV1CostCalculatorEstimation = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetV1ProbationCompletionLetterIdResponses, - GetV1ProbationCompletionLetterIdErrors, + (options.client ?? client).post< + PostV1CostCalculatorEstimationResponses, + PostV1CostCalculatorEstimationErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/probation-completion-letter/{id}', + url: '/v1/cost-calculator/estimation', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show Contractor Invoice + * List Recurring Incentive + * + * List all Recurring Incentives of a company. * - * Shows a single Contractor Invoice record. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getV1ContractorInvoicesId = ( - options: Options, +export const getV1IncentivesRecurring = ( + options: Options, ) => (options.client ?? client).get< - GetV1ContractorInvoicesIdResponses, - GetV1ContractorInvoicesIdErrors, + GetV1IncentivesRecurringResponses, + GetV1IncentivesRecurringErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoices/{id}', - ...options, - }); + >({ url: '/v1/incentives/recurring', ...options }); /** - * Convert currency using flat rates + * Create Recurring Incentive + * + * Create a Recurring Incentive, that is, a monthly paid incentive. + * + * Incentives use the currency of the employment specified provided in the `employment_id` field. * - * Convert currency using FX rates used in Remote’s estimation tools. - * These rates are not guaranteed to match final onboarding or contract rates. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postV1CurrencyConverterRaw = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1IncentivesRecurring = ( + options: Options, ) => (options.client ?? client).post< - PostV1CurrencyConverterRawResponses, - PostV1CurrencyConverterRawErrors, + PostV1IncentivesRecurringResponses, + PostV1IncentivesRecurringErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/currency-converter/raw', + url: '/v1/incentives/recurring', ...options, headers: { 'Content-Type': 'application/json', @@ -1203,151 +1254,142 @@ export const postV1CurrencyConverterRaw = < }); /** - * Show contractor contract details + * List timesheets * - * Returns the contract details JSON Schema for contractors given a country + * Lists all timesheets. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const getV1CountriesCountryCodeContractorContractDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1CountriesCountryCodeContractorContractDetailsData, - ThrowOnError - >, +export const getV1Timesheets = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeContractorContractDetailsResponses, - GetV1CountriesCountryCodeContractorContractDetailsErrors, + (options?.client ?? client).get< + GetV1TimesheetsResponses, + GetV1TimesheetsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/countries/{country_code}/contractor-contract-details', - ...options, - }); + >({ url: '/v1/timesheets', ...options }); /** - * List incentives for the authenticated employee + * Create timesheet * - * Returns all incentives for the authenticated employee. + * Creates a new timesheet. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const getV1EmployeeIncentives = ( - options?: Options, +export const postV1Timesheets = ( + options?: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeIncentivesResponses, - GetV1EmployeeIncentivesErrors, + (options?.client ?? client).post< + PostV1TimesheetsResponses, + PostV1TimesheetsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/incentives', + url: '/v1/timesheets', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * List employments + * Approve timesheet * - * Lists all employments, except for the deleted ones. + * Approves the given timesheet. * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * ## Scopes * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + */ +export const postV1TimesheetsTimesheetIdApprove = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1TimesheetsTimesheetIdApproveResponses, + PostV1TimesheetsTimesheetIdApproveErrors, + ThrowOnError + >({ url: '/v1/timesheets/{timesheet_id}/approve', ...options }); + +/** + * Show probation completion letter * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Show a single probation completion letter. * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * ## Scopes * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | * */ -export const getV1Employments = ( - options: Options, +export const getV1ProbationCompletionLetterId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsResponses, - GetV1EmploymentsErrors, + GetV1ProbationCompletionLetterIdResponses, + GetV1ProbationCompletionLetterIdErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments', - ...options, - }); + >({ url: '/v1/probation-completion-letter/{id}', ...options }); /** - * Create employment - * - * Creates an employment. We support creating employees and contractors. - * - * ## Global Payroll Employees - * - * To create a Global Payroll employee, pass `global_payroll_employee` as the `type` parameter, - * and provide the slug of the specific legal entity that the employee will be engaged by and billed to as the `engaged_by_entity_slug` parameter. - * - * ## HRIS Employees - * - * To create a HRIS employee, pass `hris` as the `type` parameter. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Show the current SSO Configuration * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Shows the current SSO Configuration for the company. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ## Scopes * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View SSO configuration (`sso_configuration:read`) | Manage SSO (`sso_configuration:write`) | * + */ +export const getV1SsoConfiguration = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1SsoConfigurationResponses, + GetV1SsoConfigurationErrors, + ThrowOnError + >({ url: '/v1/sso-configuration', ...options }); + +/** + * Create the SSO Configuration * + * Creates the SSO Configuration for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | * */ -export const postV1Employments = ( - options: Options, +export const postV1SsoConfiguration = ( + options: Options, ) => (options.client ?? client).post< - PostV1EmploymentsResponses, - PostV1EmploymentsErrors, + PostV1SsoConfigurationResponses, + PostV1SsoConfigurationErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments', + url: '/v1/sso-configuration', ...options, headers: { 'Content-Type': 'application/json', @@ -1356,131 +1398,114 @@ export const postV1Employments = ( }); /** - * Get Onboarding Reserves Status for Employment - * - * Returns the onboarding reserves status for a specific employment. - * - * The status is the same as the credit risk status but takes the onboarding reserves policies into account. + * List Offboarding * + * Lists Offboarding requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const getV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus = - ( - options: Options< - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses, - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status', - ...options, - }); +export const getV1Offboardings = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1OffboardingsResponses, + GetV1OffboardingsErrors, + ThrowOnError + >({ url: '/v1/offboardings', ...options }); /** - * Get Help Center Article + * Create Offboarding + * + * Creates an Offboarding request. * - * Get a help center article by its ID * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View help articles (`help_center_article:read`) | - | + * | Manage employments (`employments`) | - | Manage offboarding (`offboarding:write`) | * */ -export const getV1HelpCenterArticlesId = ( - options: Options, +export const postV1Offboardings = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1HelpCenterArticlesIdResponses, - GetV1HelpCenterArticlesIdErrors, + (options?.client ?? client).post< + PostV1OffboardingsResponses, + PostV1OffboardingsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/help-center-articles/{id}', + url: '/v1/offboardings', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Get user by ID via SCIM v2.0 + * Create a contract document for a contractor * - * Retrieves a single user for the authenticated company by user ID - */ -export const getV1ScimV2UsersId = ( - options: Options, -) => - (options.client ?? client).get< - GetV1ScimV2UsersIdResponses, - GetV1ScimV2UsersIdErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Users/{id}', - ...options, - }); - -/** - * Get engagement agreement details + * Create a contract document for a contractor. * - * Returns the engagement agreement details for an employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV2EmploymentsEmploymentIdEngagementAgreementDetails = < +export const postV1ContractorsEmploymentsEmploymentIdContractDocuments = < ThrowOnError extends boolean = false, >( options: Options< - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/engagement-agreement-details', + url: '/v1/contractors/employments/{employment_id}/contract-documents', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Upsert engagement agreement details + * Update federal taxes * - * Creates or updates the engagement agreement details for an employment. + * Updates employment's federal taxes. * - * This endpoint requires country-specific data. The exact required fields will vary depending on - * which country the employment is in. To see the list of parameters for each country, see the - * **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * Requirements to update federal taxes successfully: + * * Employment should be Global Payroll + * * Employment should be in the post-enrollment state + * * Employment should belong to USA * - * Please note that compliance requirements for each country are subject to change according to local laws. - * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended - * to avoid compliance issues and to have the latest version of a country's requirements. + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * * * @@ -1491,24 +1516,17 @@ export const getV2EmploymentsEmploymentIdEngagementAgreementDetails = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV2EmploymentsEmploymentIdEngagementAgreementDetails = < +export const putV1EmploymentsEmploymentIdFederalTaxes = < ThrowOnError extends boolean = false, >( - options: Options< - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).post< - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdFederalTaxesResponses, + PutV1EmploymentsEmploymentIdFederalTaxesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/engagement-agreement-details', + url: '/v1/employments/{employment_id}/federal-taxes', ...options, headers: { 'Content-Type': 'application/json', @@ -1517,76 +1535,59 @@ export const postV2EmploymentsEmploymentIdEngagementAgreementDetails = < }); /** - * Download a document for the employee + * List pricing plans + * + * List all pricing plans for a company. + * Currently the endpoint only returns the pricing plans for the EOR monthly product and the contractor products (Standard, Plus and COR). + * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getV1EmployeeDocumentsId = ( - options: Options, +export const getV1CompaniesCompanyIdPricingPlans = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1EmployeeDocumentsIdResponses, - GetV1EmployeeDocumentsIdErrors, + GetV1CompaniesCompanyIdPricingPlansResponses, + GetV1CompaniesCompanyIdPricingPlansErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/documents/{id}', - ...options, - }); + >({ url: '/v1/companies/{company_id}/pricing-plans', ...options }); /** - * List Contractor Invoices + * Create a pricing plan for a company + * + * Create a pricing plan for a company, in order to do that we have 2 ways: + * + * 1. Create a pricing plan from a partner template + * 2. Create a pricing plan from a product price + * + * The pricing plan is always created in the company's desired currency. * - * Lists Contractor Invoice records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | - * - */ -export const getV1ContractorInvoices = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1ContractorInvoicesResponses, - GetV1ContractorInvoicesErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoices', - ...options, - }); - -/** - * Report SDK errors - * - * Receives error telemetry from the frontend SDK. - * Errors are logged to observability backend for monitoring and debugging. + * | Manage companies (`company_management`) | - | Manage pricing plans (`pricing_plan:write`) | * */ -export const postV1SdkTelemetryErrors = ( - options: Options, +export const postV1CompaniesCompanyIdPricingPlans = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1SdkTelemetryErrorsResponses, - PostV1SdkTelemetryErrorsErrors, + PostV1CompaniesCompanyIdPricingPlansResponses, + PostV1CompaniesCompanyIdPricingPlansErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sdk/telemetry-errors', + url: '/v1/companies/{company_id}/pricing-plans', ...options, headers: { 'Content-Type': 'application/json', @@ -1595,132 +1596,123 @@ export const postV1SdkTelemetryErrors = ( }); /** - * Show the SSO Configuration Details + * Show employee address + * + * Returns the authenticated employee's residential address. + * + * The employment is derived from the access token's subject — there is no + * employment id in the path. + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` + * as the form name to discover the schema for a given country. + * * - * Shows the SSO Configuration details for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | + * | Manage employments (`employments`) | View addresses (`address:read`) | Manage addresses (`address:write`) | * */ -export const getV1SsoConfigurationDetails = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getV1EmployeeAddress = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1SsoConfigurationDetailsResponses, - GetV1SsoConfigurationDetailsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sso-configuration/details', - ...options, - }); - -/** - * Creates a cost estimation of employments - */ -export const postV1CostCalculatorEstimation = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).post< - PostV1CostCalculatorEstimationResponses, - PostV1CostCalculatorEstimationErrors, + GetV1EmployeeAddressResponses, + GetV1EmployeeAddressErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cost-calculator/estimation', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/employee/address', ...options }); /** - * Show form schema + * Update employee address + * + * Updates the authenticated employee's residential address. + * + * The employment is derived from the access token's subject — there is no + * employment id in the path. The token must be an employee-role token + * (typically obtained via the OAuth2 assertion grant with subject + * `urn:remote-api:employee:employment:`). + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` + * as the form name to discover the schema for a given country. * - * Returns the json schema of the requested company form. - * Currently only supports the `address_details` form. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage employments (`employments`) | - | Manage addresses (`address:write`) | * */ -export const getV1CompaniesSchema = ( - options: Options, +export const putV1EmployeeAddress = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1CompaniesSchemaResponses, - GetV1CompaniesSchemaErrors, + (options?.client ?? client).put< + PutV1EmployeeAddressResponses, + PutV1EmployeeAddressErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/schema', + url: '/v1/employee/address', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Get employment benefit offers + * Update federal taxes + * + * Updates employment's federal taxes. + * + * Requirements to update federal taxes successfully: + * * Employment should be Global Payroll + * * Employment should be in the post-enrollment state + * * Employment should belong to USA + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * + * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdBenefitOffers = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdBenefitOffersResponses, - GetV1EmploymentsEmploymentIdBenefitOffersErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/benefit-offers', - ...options, - }); - -/** - * Upserts employment benefit offers - */ -export const putV1EmploymentsEmploymentIdBenefitOffers = < +export const putV2EmploymentsEmploymentIdFederalTaxes = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).put< - PutV1EmploymentsEmploymentIdBenefitOffersResponses, - PutV1EmploymentsEmploymentIdBenefitOffersErrors, + PutV2EmploymentsEmploymentIdFederalTaxesResponses, + PutV2EmploymentsEmploymentIdFederalTaxesErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments/{employment_id}/benefit-offers', + url: '/v2/employments/{employment_id}/federal-taxes', ...options, headers: { 'Content-Type': 'application/json', @@ -1729,41 +1721,30 @@ export const putV1EmploymentsEmploymentIdBenefitOffers = < }); /** - * Get Employment Profile - * - * Gets necessary information to perform the identity verification of an employee. + * List travel letter requests * + * List travel letter requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View identity verification (`identity_verification:read`) | Manage identity verification (`identity_verification:write`) | + * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | * */ -export const getV1IdentityVerificationEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1TravelLetterRequests = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1IdentityVerificationEmploymentIdResponses, - GetV1IdentityVerificationEmploymentIdErrors, + (options?.client ?? client).get< + GetV1TravelLetterRequestsResponses, + GetV1TravelLetterRequestsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/identity-verification/{employment_id}', - ...options, - }); + >({ url: '/v1/travel-letter-requests', ...options }); /** - * List contractor subscriptions - * - * Endpoint that can be used to list contractor subscriptions. + * Get engagement agreement details * + * Returns the engagement agreement details for an employment. * * ## Scopes * @@ -1772,325 +1753,196 @@ export const getV1IdentityVerificationEmploymentId = < * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions = < +export const getV2EmploymentsEmploymentIdEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( options: Options< - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData, + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData, ThrowOnError >, ) => (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses, - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors, + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions', + url: '/v2/employments/{employment_id}/engagement-agreement-details', ...options, }); /** - * List approved payslip files for the authenticated employee + * Upsert engagement agreement details * - * Returns a paginated list of payslip files belonging to the current employee. + * Creates or updates the engagement agreement details for an employment. * - * ## Scopes + * This endpoint requires country-specific data. The exact required fields will vary depending on + * which country the employment is in. To see the list of parameters for each country, see the + * **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * Please note that compliance requirements for each country are subject to change according to local laws. + * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended + * to avoid compliance issues and to have the latest version of a country's requirements. * - */ -export const getV1EmployeePayslips = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1EmployeePayslipsResponses, - GetV1EmployeePayslipsErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/payslips', - ...options, - }); - -/** - * List Webhook Events * - * List all webhook events * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | - * - */ -export const getV1WebhookEvents = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1WebhookEventsResponses, - GetV1WebhookEventsErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/webhook-events', - ...options, - }); - -/** - * Pass KYB - * - * Pass KYB and credit risk for a company without the intervention of a Remote admin. - * - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1SandboxCompaniesCompanyIdBypassEligibilityChecks = < +export const postV2EmploymentsEmploymentIdEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( options: Options< - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData, + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses, - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors, + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks', + url: '/v2/employments/{employment_id}/engagement-agreement-details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Approve risk reserve proof of payment - * - * Approves a risk reserve proof of payment without the intervention of a Remote admin. - * - * Triggers an `employment.cor_hiring.proof_of_payment_accepted` webhook event. - * - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. - * - */ -export const postV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove = - ( - options: Options< - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses, - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve', - ...options, - }); - -/** - * Get a mock JSON Schema + * Payroll processing summary API resource * - * Get a mock JSON Schema for testing purposes + * API to retrieve summary data for processing pay groups */ -export const getV1TestSchema = ( - options?: Options, +export const getV1WdGphPaySummary = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1TestSchemaResponses, - unknown, + GetV1WdGphPaySummaryResponses, + GetV1WdGphPaySummaryErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/test-schema', + url: '/v1/wd/gph/paySummary', ...options, }); /** - * List all holidays of a country + * Show employment job + * + * Shows an employment job details. * - * List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1CountriesCountryCodeHolidaysYear = < +export const getV1EmploymentsEmploymentIdJob = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1CountriesCountryCodeHolidaysYearResponses, - GetV1CountriesCountryCodeHolidaysYearErrors, + GetV1EmploymentsEmploymentIdJobResponses, + GetV1EmploymentsEmploymentIdJobErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/countries/{country_code}/holidays/{year}', - ...options, - }); + >({ url: '/v1/employments/{employment_id}/job', ...options }); /** - * Cancel Time Off + * Create bulk employment job * - * Cancel a time off request that was already approved. + * Creates a job to bulk-create employments for multiple employees at once. Each employee payload must match the employment schema for the selected country. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1TimeoffTimeoffIdCancel = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1BulkEmploymentJobs = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdCancelResponses, - PostV1TimeoffTimeoffIdCancelErrors, + (options?.client ?? client).post< + PostV1BulkEmploymentJobsResponses, + PostV1BulkEmploymentJobsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{timeoff_id}/cancel', + url: '/v1/bulk-employment-jobs', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Show employment job - * - * Shows an employment job details. + * List Contract Amendment * + * List Contract Amendment requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const getV1EmploymentsEmploymentIdJob = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1ContractAmendments = ( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdJobResponses, - GetV1EmploymentsEmploymentIdJobErrors, + GetV1ContractAmendmentsResponses, + GetV1ContractAmendmentsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/job', - ...options, - }); + >({ url: '/v1/contract-amendments', ...options }); /** - * List pricing plan partner templates - * - * List all pricing plan partner templates. - * + * Create Contract Amendment * - * ## Scopes + * Creates a Contract Amendment request. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. * - */ -export const getV1PricingPlanPartnerTemplates = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetV1PricingPlanPartnerTemplatesResponses, - GetV1PricingPlanPartnerTemplatesErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/pricing-plan-partner-templates', - ...options, - }); - -/** - * List EOR Payroll Calendar + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. * - * List all active payroll calendars for EOR. + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * ## Scopes + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - */ -export const getV1PayrollCalendars = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1PayrollCalendarsResponses, - GetV1PayrollCalendarsErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/payroll-calendars', - ...options, - }); - -/** - * Update Time Off as Employee * - * Updates a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | * */ -export const patchV1EmployeeTimeoffId2 = ( - options: Options, +export const postV1ContractAmendments = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1EmployeeTimeoffId2Responses, - PatchV1EmployeeTimeoffId2Errors, + (options.client ?? client).post< + PostV1ContractAmendmentsResponses, + PostV1ContractAmendmentsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff/{id}', + url: '/v1/contract-amendments', ...options, headers: { 'Content-Type': 'application/json', @@ -2099,120 +1951,91 @@ export const patchV1EmployeeTimeoffId2 = ( }); /** - * Update Time Off as Employee + * Delete a Recurring Incentive + * + * Delete a Recurring Incentive, that is, a monthly paid incentive. + * + * Internally, Remote schedules upcoming incentives. As such, when you attempt to + * delete a recurring incentive, Remote will **ONLY** delete scheduled incentives + * with the `pending` status. + * + * Incentives payments that are already scheduled and cannot be deleted will be + * included in the response, in case you need to reference them. * - * Updates a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const patchV1EmployeeTimeoffId = ( - options: Options, +export const deleteV1IncentivesRecurringId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).put< - PatchV1EmployeeTimeoffIdResponses, - PatchV1EmployeeTimeoffIdErrors, + (options.client ?? client).delete< + DeleteV1IncentivesRecurringIdResponses, + DeleteV1IncentivesRecurringIdErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/incentives/recurring/{id}', ...options }); /** - * List Recurring Incentive - * - * List all Recurring Incentives of a company. + * Show Benefit Renewal Request * + * Show Benefit Renewal Request details. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const getV1IncentivesRecurring = ( - options: Options, +export const getV1BenefitRenewalRequestsBenefitRenewalRequestId = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1IncentivesRecurringResponses, - GetV1IncentivesRecurringErrors, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/recurring', + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', ...options, }); /** - * Create Recurring Incentive - * - * Create a Recurring Incentive, that is, a monthly paid incentive. - * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * Updates a Benefit Renewal Request Response * + * Updates a Benefit Renewal Request with the given response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | - * - */ -export const postV1IncentivesRecurring = ( - options: Options, -) => - (options.client ?? client).post< - PostV1IncentivesRecurringResponses, - PostV1IncentivesRecurringErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/recurring', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * Creates a Benefit Renewal Request - * - * Creates a Benefit Renewal Request for a specific Benefit Group. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Manage company resources (`company_admin`) | - | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const postV1SandboxBenefitRenewalRequests = < +export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData, + ThrowOnError + >, ) => (options.client ?? client).post< - PostV1SandboxBenefitRenewalRequestsResponses, - PostV1SandboxBenefitRenewalRequestsErrors, + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/benefit-renewal-requests', + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -2221,122 +2044,116 @@ export const postV1SandboxBenefitRenewalRequests = < }); /** - * Return a base64 encoded version of the contract document + * List all holidays of a country + * + * List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | * */ -export const getV1ContractorsEmploymentsEmploymentIdContractDocumentsId = < +export const getV1CountriesCountryCodeHolidaysYear = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses, - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors, + GetV1CountriesCountryCodeHolidaysYearResponses, + GetV1CountriesCountryCodeHolidaysYearErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}', - ...options, - }); + >({ url: '/v1/countries/{country_code}/holidays/{year}', ...options }); /** - * List contract documents for an employment + * List custom field value for an employment * - * Only contractor employment types are supported. Lists contract documents for a specific employment with pagination, filtering by status, and sorted by updated_at descending (latest first). + * Returns a list of custom field values for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | * */ -export const getV1EmploymentsEmploymentIdContractDocuments = < +export const getV1EmploymentsEmploymentIdCustomFields = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1EmploymentsEmploymentIdContractDocumentsData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdContractDocumentsResponses, - GetV1EmploymentsEmploymentIdContractDocumentsErrors, + GetV1EmploymentsEmploymentIdCustomFieldsResponses, + GetV1EmploymentsEmploymentIdCustomFieldsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/contract-documents', - ...options, - }); + >({ url: '/v1/employments/{employment_id}/custom-fields', ...options }); /** - * List expenses + * Show timesheet * - * Lists all expenses records + * Shows a timesheet by its ID. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const getV1Expenses = ( - options: Options, +export const getV1TimesheetsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1ExpensesResponses, - GetV1ExpensesErrors, + GetV1TimesheetsIdResponses, + GetV1TimesheetsIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses', - ...options, - }); + >({ url: '/v1/timesheets/{id}', ...options }); /** - * Create expense + * List Company Managers + * + * List all company managers of an integration. If filtered by the company_id param, + * it lists only company managers belonging to the specified company. * - * Creates an **approved** expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | * */ -export const postV1Expenses = ( - options: Options, +export const getV1CompanyManagers = ( + options: Options, +) => + (options.client ?? client).get< + GetV1CompanyManagersResponses, + GetV1CompanyManagersErrors, + ThrowOnError + >({ url: '/v1/company-managers', ...options }); + +/** + * Create and invite a Company Manager + * + * Create a Company Manager and sends the invitation email for signing in to the Remote Platform. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | + * + */ +export const postV1CompanyManagers = ( + options: Options, ) => (options.client ?? client).post< - PostV1ExpensesResponses, - PostV1ExpensesErrors, + PostV1CompanyManagersResponses, + PostV1CompanyManagersErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses', + url: '/v1/company-managers', ...options, headers: { 'Content-Type': 'application/json', @@ -2345,58 +2162,52 @@ export const postV1Expenses = ( }); /** - * Show the current SSO Configuration + * List Employee Leave Policies Summary * - * Shows the current SSO Configuration for the company. + * List the leave policies summary (balances and entitlements) for the current employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View SSO configuration (`sso_configuration:read`) | Manage SSO (`sso_configuration:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1SsoConfiguration = ( - options?: Options, +export const getV1EmployeeLeavePoliciesSummary = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => (options?.client ?? client).get< - GetV1SsoConfigurationResponses, - GetV1SsoConfigurationErrors, + GetV1EmployeeLeavePoliciesSummaryResponses, + GetV1EmployeeLeavePoliciesSummaryErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sso-configuration', - ...options, - }); + >({ url: '/v1/employee/leave-policies/summary', ...options }); /** - * Create the SSO Configuration + * Bulk Create Pay Items + * + * Bulk creates pay items for employments. Supports up to 500 items per request. + * Integration-specific fields (shift code, currency, pay amount, etc.) go in the `provider_data` object. + * Only Global Payroll employments are supported. Non-GP employments are returned as `employment_not_global_payroll`. * - * Creates the SSO Configuration for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | + * | Manage payroll runs (`payroll`) | - | Manage pay items (`pay_item:write`) | * */ -export const postV1SsoConfiguration = ( - options: Options, +export const postV1PayItemsBulk = ( + options: Options, ) => (options.client ?? client).post< - PostV1SsoConfigurationResponses, - PostV1SsoConfigurationErrors, + PostV1PayItemsBulkResponses, + PostV1PayItemsBulkErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sso-configuration', + url: '/v1/pay-items/bulk', ...options, headers: { 'Content-Type': 'application/json', @@ -2405,42 +2216,81 @@ export const postV1SsoConfiguration = ( }); /** - * Create a contractor timesheet + * Show travel letter request * - * Creates a timesheet on behalf of a contractor employment. + * Show a single travel letter request. * - * The submitted hours are immediately available to the contractor in the Remote UI for - * self-serve invoice creation (Invoices → Create invoice → "Use Time Tracking"). + * ## Scopes * - * This endpoint is restricted to contractor employments. Calls against EOR or Global Payroll - * employments are rejected with `422`. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | + * + */ +export const getV1TravelLetterRequestsId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1TravelLetterRequestsIdResponses, + GetV1TravelLetterRequestsIdErrors, + ThrowOnError + >({ url: '/v1/travel-letter-requests/{id}', ...options }); + +/** + * Updates a travel letter request * + * Updates a travel letter request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdTimesheets = < +export const patchV1TravelLetterRequestsId2 = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdTimesheetsData, + options: Options, +) => + (options.client ?? client).patch< + PatchV1TravelLetterRequestsId2Responses, + PatchV1TravelLetterRequestsId2Errors, ThrowOnError - >, + >({ + url: '/v1/travel-letter-requests/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Updates a travel letter request + * + * Updates a travel letter request + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | + * + */ +export const patchV1TravelLetterRequestsId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses, - PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors, + (options.client ?? client).put< + PatchV1TravelLetterRequestsIdResponses, + PatchV1TravelLetterRequestsIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/timesheets', + url: '/v1/travel-letter-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -2449,33 +2299,27 @@ export const postV1ContractorsEmploymentsEmploymentIdTimesheets = < }); /** - * Approve Contract Amendment + * Pass KYB * - * Approves a contract amendment request without the intervention of a Remote admin. - * Approvals done via this endpoint are effective immediately, - * regardless of the effective date entered on the contract amendment creation. + * Pass KYB and credit risk for a company without the intervention of a Remote admin. * * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const putV1SandboxContractAmendmentsContractAmendmentRequestIdApprove = < +export const postV1SandboxCompaniesCompanyIdBypassEligibilityChecks = < ThrowOnError extends boolean = false, >( options: Options< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData, + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses, - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors, + (options.client ?? client).post< + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses, + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve', + url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks', ...options, }); @@ -2500,206 +2344,184 @@ export const getV1EmployeeLeavePolicies = < GetV1EmployeeLeavePoliciesResponses, GetV1EmployeeLeavePoliciesErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/leave-policies', - ...options, - }); + >({ url: '/v1/employee/leave-policies', ...options }); /** - * List all currencies for the contractor - * - * The currencies are listed in the following order: - * 1. billing currency of the company - * 2. currencies of contractor’s existing withdrawal methods - * 3. currency of the contractor’s country - * 4. the rest, alphabetical. + * List Webhook Callbacks * + * List callbacks for a given company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | * */ -export const getV1ContractorsEmploymentsEmploymentIdContractorCurrencies = < +export const getV1CompaniesCompanyIdWebhookCallbacks = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses, - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors, + GetV1CompaniesCompanyIdWebhookCallbacksResponses, + GetV1CompaniesCompanyIdWebhookCallbacksErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contractor-currencies', - ...options, - }); + >({ url: '/v1/companies/{company_id}/webhook-callbacks', ...options }); /** - * Replay Webhook Events + * Download a billing document PDF * - * Replay webhook events + * Downloads a billing document PDF * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postV1WebhookEventsReplay = ( - options: Options, +export const getV1BillingDocumentsBillingDocumentIdPdf = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostV1WebhookEventsReplayResponses, - PostV1WebhookEventsReplayErrors, + (options.client ?? client).get< + GetV1BillingDocumentsBillingDocumentIdPdfResponses, + GetV1BillingDocumentsBillingDocumentIdPdfErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/webhook-events/replay', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/billing-documents/{billing_document_id}/pdf', ...options }); /** - * Create a contractor of record (COR) termination request - * - * Initiates a termination request for a Contractor of Record employment. - * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. - * Currently, only Contractor of Record employments can be terminated. + * Delete a Webhook Callback * + * Delete a callback previously registered for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdCorTerminationRequests = < +export const deleteV1WebhookCallbacksId = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses, - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors, + (options.client ?? client).delete< + DeleteV1WebhookCallbacksIdResponses, + DeleteV1WebhookCallbacksIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests', - ...options, - }); + >({ url: '/v1/webhook-callbacks/{id}', ...options }); /** - * Show Background Check + * Update a Webhook Callback * - * Show Background Check details for a given employment and background check request. + * Update a callback previously registered for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View background checks (`background_check:read`) | - | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const getV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckId = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdData, - ThrowOnError - >, -) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses, - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors, +export const patchV1WebhookCallbacksId = ( + options: Options, +) => + (options.client ?? client).patch< + PatchV1WebhookCallbacksIdResponses, + PatchV1WebhookCallbacksIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments/{employment_id}/background-checks/{background_check_id}', + url: '/v1/webhook-callbacks/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show benefit renewal request schema + * List countries * - * Returns the json schema of the `benefit_renewal_request` form for a specific request. - * This endpoint requires a company access token, as forms are dependent on certain - * properties of companies and their current employments. + * Returns a list of all countries that are supported by Remote API alphabetically ordered. + * The supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema. + * The countries present in the list are the ones where creating a company is allowed. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | * */ -export const getV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData, - ThrowOnError - >, +export const getV1Countries = ( + options: Options, ) => (options.client ?? client).get< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses, - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors, + GetV1CountriesResponses, + GetV1CountriesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema', - ...options, - }); + >({ url: '/v1/countries', ...options }); /** - * Magic links generator + * Show contractor eligibility and COR-supported countries for legal entity * - * Generates a magic link for a passwordless authentication. - * To create a magic link for a company admin, you need to provide the `user_id` parameter. - * To create a magic link for an employee, you need to provide the `employment_id` parameter. + * Returns which contractor products (standard, plus, cor) the legal entity is eligible to use, + * and the list of country codes where COR is supported for this legal entity. + * COR-supported countries exclude sanctioned and signup-prevented countries and apply entity rules (same-country, local-to-local). + * When the legal entity is not COR-eligible, `cor_supported_country_codes` is an empty list. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Create magic links (`magic_link:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const postV1MagicLink = ( - options: Options, +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility = + ( + options: Options< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors, + ThrowOnError + >({ + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility', + ...options, + }); + +/** + * Convert currency using dynamic rates + * + * Convert currency using the rates Remote applies during employment creation and invoicing. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | + * + */ +export const postV1CurrencyConverterEffective = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1MagicLinkResponses, - PostV1MagicLinkErrors, + PostV1CurrencyConverterEffectiveResponses, + PostV1CurrencyConverterEffectiveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/magic-link', + url: '/v1/currency-converter/effective', ...options, headers: { 'Content-Type': 'application/json', @@ -2708,27 +2530,62 @@ export const postV1MagicLink = ( }); /** - * Update basic information + * Show personal information for the authenticated employee * - * Updates employment's basic information. + * Returns personal information for the authenticated employee. * - * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. + * ## Scopes * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + */ +export const getV1EmployeePersonalInformation = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeePersonalInformationResponses, + GetV1EmployeePersonalInformationErrors, + ThrowOnError + >({ url: '/v1/employee/personal-information', ...options }); + +/** + * Show form schema * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Returns the json schema of a supported form. Possible form names are: + * ``` + * - address_details + * - administrative_details + * - bank_account_details + * - employment_basic_information + * - contractor_basic_information + * - contractor_contract_details + * - billing_address_details + * - contract_details + * - emergency_contact + * - emergency_contact_details + * - employment_document_details + * - personal_details + * - pricing_plan_details + * - company_basic_information + * - global_payroll_administrative_details + * - global_payroll_bank_account_details + * - global_payroll_basic_information + * - global_payroll_contract_details + * - global_payroll_federal_taxes + * - global_payroll_personal_details + * - benefit_renewal_request + * - hris_personal_details * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ``` * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * Most forms require a company access token, as they are dependent on certain + * properties of companies and their current employments. However, the `address_details` + * and `company_basic_information` forms can be accessed using client_credentials + * authentication (without a company). * * * @@ -2736,128 +2593,84 @@ export const postV1MagicLink = ( * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const putV2EmploymentsEmploymentIdBasicInformation = < +export const getV1CountriesCountryCodeForm = < ThrowOnError extends boolean = false, >( - options: Options< - PutV2EmploymentsEmploymentIdBasicInformationData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdBasicInformationResponses, - PutV2EmploymentsEmploymentIdBasicInformationErrors, + (options.client ?? client).get< + GetV1CountriesCountryCodeFormResponses, + GetV1CountriesCountryCodeFormErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/basic_information', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/countries/{country_code}/{form}', ...options }); /** - * Delete a Recurring Incentive - * - * Delete a Recurring Incentive, that is, a monthly paid incentive. - * - * Internally, Remote schedules upcoming incentives. As such, when you attempt to - * delete a recurring incentive, Remote will **ONLY** delete scheduled incentives - * with the `pending` status. + * List Offboardings (v2) * - * Incentives payments that are already scheduled and cannot be deleted will be - * included in the response, in case you need to reference them. + * Lists offboardings for a company. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const deleteV1IncentivesRecurringId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV2Offboardings = ( + options?: Options, ) => - (options.client ?? client).delete< - DeleteV1IncentivesRecurringIdResponses, - DeleteV1IncentivesRecurringIdErrors, + (options?.client ?? client).get< + GetV2OffboardingsResponses, + GetV2OffboardingsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/recurring/{id}', - ...options, - }); + >({ url: '/v2/offboardings', ...options }); /** - * List Incentives + * List Time Off * - * Lists all Incentives of a company + * Lists all Time Off records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1Incentives = ( - options: Options, +export const getV1Timeoff = ( + options: Options, ) => (options.client ?? client).get< - GetV1IncentivesResponses, - GetV1IncentivesErrors, + GetV1TimeoffResponses, + GetV1TimeoffErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives', - ...options, - }); + >({ url: '/v1/timeoff', ...options }); /** - * Create Incentive - * - * Creates an Incentive. - * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * Create Time Off * + * Creates a Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1Incentives = ( - options: Options, +export const postV1Timeoff = ( + options: Options, ) => (options.client ?? client).post< - PostV1IncentivesResponses, - PostV1IncentivesErrors, + PostV1TimeoffResponses, + PostV1TimeoffErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives', + url: '/v1/timeoff', ...options, headers: { 'Content-Type': 'application/json', @@ -2866,226 +2679,157 @@ export const postV1Incentives = ( }); /** - * Create probation completion letter - * - * Create a new probation completion letter request. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | + * List countries for Cost Calculator * + * Lists active and processing countries */ -export const postV1ProbationCompletionLetter = < +export const getV1CostCalculatorCountries = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).post< - PostV1ProbationCompletionLetterResponses, - PostV1ProbationCompletionLetterErrors, + (options?.client ?? client).get< + GetV1CostCalculatorCountriesResponses, + unknown, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/probation-completion-letter', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/cost-calculator/countries', ...options }); /** - * Show Contractor Invoice Schedule + * Submit risk reserve proof of payment + * + * Submits a proof of payment document for a risk reserve associated with an employment. + * + * Triggers an `employment.cor_hiring.proof_of_payment_submitted` webhook event. * - * Shows a single Contractor Invoice Schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | * */ -export const getV1ContractorInvoiceSchedulesId = < +export const postV1EmploymentsEmploymentIdRiskReserveProofOfPayments = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1ContractorInvoiceSchedulesIdResponses, - GetV1ContractorInvoiceSchedulesIdErrors, + (options.client ?? client).post< + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses, + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoice-schedules/{id}', + ...formDataBodySerializer, + url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments', ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, }); /** - * Updates Contractor Invoice Schedule + * Show Background Check * - * Updates a contractor invoice schedule record + * Show Background Check details for a given employment and background check request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage employments (`employments`) | View background checks (`background_check:read`) | - | * */ -export const patchV1ContractorInvoiceSchedulesId2 = < +export const getV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdData, + ThrowOnError + >, ) => - (options.client ?? client).patch< - PatchV1ContractorInvoiceSchedulesId2Responses, - PatchV1ContractorInvoiceSchedulesId2Errors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses, + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoice-schedules/{id}', + url: '/v1/employments/{employment_id}/background-checks/{background_check_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Updates Contractor Invoice Schedule + * Show Time Off Balance + * + * Shows the time off balance for the given employment_id. + * + * Deprecated since February 2025 in favour of **[List Leave Policies Summary](#tag/Leave-Policies/operation/get_index_leave_policies_summary)** endpoint. * - * Updates a contractor invoice schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * + * + * @deprecated */ -export const patchV1ContractorInvoiceSchedulesId = < +export const getV1TimeoffBalancesEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchV1ContractorInvoiceSchedulesIdResponses, - PatchV1ContractorInvoiceSchedulesIdErrors, + (options.client ?? client).get< + GetV1TimeoffBalancesEmploymentIdResponses, + GetV1TimeoffBalancesEmploymentIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoice-schedules/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/timeoff-balances/{employment_id}', ...options }); /** - * List pre-onboarding document requirements for an employment - * - * Returns the list of pre-onboarding document requirements (e.g. master service agreements, - * individual labour agreements) that must be fulfilled before the given employment can be onboarded. + * List expenses for the authenticated employee * + * Returns a paginated list of expenses belonging to the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirements = - ( - options: Options< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses, - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements', - ...options, - }); +export const getV1EmployeeExpenses = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeExpensesResponses, + GetV1EmployeeExpensesErrors, + ThrowOnError + >({ url: '/v1/employee/expenses', ...options }); /** - * Show Billing Document - * - * Shows a billing document details. - * - * Please contact api-support@remote.com to request access to this endpoint. + * Create an expense for the authenticated employee * + * Creates a new expense record for the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | - * - */ -export const getV1BillingDocumentsBillingDocumentId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1BillingDocumentsBillingDocumentIdResponses, - GetV1BillingDocumentsBillingDocumentIdErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/billing-documents/{billing_document_id}', - ...options, - }); - -/** - * Creates PDF cost estimation of employments + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * - * Creates a PDF cost estimation of employments based on the provided parameters. */ -export const postV1CostCalculatorEstimationPdf = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const postV1EmployeeExpenses = ( + options?: Options, ) => (options?.client ?? client).post< - PostV1CostCalculatorEstimationPdfResponses, - PostV1CostCalculatorEstimationPdfErrors, + PostV1EmployeeExpensesResponses, + PostV1EmployeeExpensesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cost-calculator/estimation-pdf', + url: '/v1/employee/expenses', ...options, headers: { 'Content-Type': 'application/json', @@ -3094,143 +2838,116 @@ export const postV1CostCalculatorEstimationPdf = < }); /** - * Show work authorization request + * Download a resignation letter * - * Show a single work authorization request. + * Downloads a resignation letter from an employment request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | + * | Manage employment documents (`employment_documents`) | View resignation letters (`resignation_letter:read`) | - | * */ -export const getV1WorkAuthorizationRequestsId = < +export const getV1ResignationsOffboardingRequestIdResignationLetter = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1ResignationsOffboardingRequestIdResignationLetterData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1WorkAuthorizationRequestsIdResponses, - GetV1WorkAuthorizationRequestsIdErrors, + GetV1ResignationsOffboardingRequestIdResignationLetterResponses, + GetV1ResignationsOffboardingRequestIdResignationLetterErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/work-authorization-requests/{id}', + url: '/v1/resignations/{offboarding_request_id}/resignation-letter', ...options, }); /** - * Update work authorization request + * Deletes a Company Manager user * - * Updates a work authorization request. + * Deletes a Company Manager user * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | + * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | * */ -export const patchV1WorkAuthorizationRequestsId2 = < +export const deleteV1CompanyManagersUserId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).patch< - PatchV1WorkAuthorizationRequestsId2Responses, - PatchV1WorkAuthorizationRequestsId2Errors, + (options.client ?? client).delete< + DeleteV1CompanyManagersUserIdResponses, + DeleteV1CompanyManagersUserIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/work-authorization-requests/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/company-managers/{user_id}', ...options }); /** - * Update work authorization request + * Show company manager user * - * Updates a work authorization request. + * Shows a single company manager user * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | + * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | * */ -export const patchV1WorkAuthorizationRequestsId = < +export const getV1CompanyManagersUserId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchV1WorkAuthorizationRequestsIdResponses, - PatchV1WorkAuthorizationRequestsIdErrors, + (options.client ?? client).get< + GetV1CompanyManagersUserIdResponses, + GetV1CompanyManagersUserIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/work-authorization-requests/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/company-managers/{user_id}', ...options }); /** - * List Employee Leave Policies Summary + * Show onboarding steps for an employment * - * List the leave policies summary (balances and entitlements) for the current employee + * Returns onboarding steps and substeps in a hierarchical, ordered structure. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1EmployeeLeavePoliciesSummary = < +export const getV1EmploymentsEmploymentIdOnboardingSteps = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + GetV1EmploymentsEmploymentIdOnboardingStepsData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeeLeavePoliciesSummaryResponses, - GetV1EmployeeLeavePoliciesSummaryErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdOnboardingStepsResponses, + GetV1EmploymentsEmploymentIdOnboardingStepsErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/leave-policies/summary', - ...options, - }); + >({ url: '/v1/employments/{employment_id}/onboarding-steps', ...options }); /** - * Update federal taxes - * - * Updates employment's federal taxes. + * Automatable Contract Amendment * - * Requirements to update federal taxes successfully: - * * Employment should be Global Payroll - * * Employment should be in the post-enrollment state - * * Employment should belong to USA + * Check if a contract amendment request is automatable. + * If the contract amendment request is automatable, then after submission, it will instantly amend the employee's contract + * and send them an updated document. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. * * Please note that the compliance requirements for each country are subject to change according to local * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid @@ -3250,24 +2967,20 @@ export const getV1EmployeeLeavePoliciesSummary = < * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | * */ -export const putV2EmploymentsEmploymentIdFederalTaxes = < +export const postV1ContractAmendmentsAutomatable = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdFederalTaxesResponses, - PutV2EmploymentsEmploymentIdFederalTaxesErrors, + (options.client ?? client).post< + PostV1ContractAmendmentsAutomatableResponses, + PostV1ContractAmendmentsAutomatableErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/federal-taxes', + url: '/v1/contract-amendments/automatable', ...options, headers: { 'Content-Type': 'application/json', @@ -3276,30 +2989,70 @@ export const putV2EmploymentsEmploymentIdFederalTaxes = < }); /** - * Create Probation Extension + * List Company Payroll Runs * - * Create a probation extension request. + * Lists all payroll runs for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | + * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const postV1ProbationExtensions = ( - options: Options, +export const getV1PayrollRuns = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1ProbationExtensionsResponses, - PostV1ProbationExtensionsErrors, + (options?.client ?? client).get< + GetV1PayrollRunsResponses, + GetV1PayrollRunsErrors, + ThrowOnError + >({ url: '/v1/payroll-runs', ...options }); + +/** + * List incentives for the authenticated employee + * + * Returns all incentives for the authenticated employee. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * + */ +export const getV1EmployeeIncentives = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeIncentivesResponses, + GetV1EmployeeIncentivesErrors, + ThrowOnError + >({ url: '/v1/employee/incentives', ...options }); + +/** + * Update employment + * + * Updates an employment. Use this endpoint to: + * - modify employment states for testing + * - Backdate employment start dates + * + * This endpoint will respond with a 404 outside of the Sandbox environment. + * + * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). + * + */ +export const patchV1SandboxEmploymentsEmploymentId2 = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).patch< + PatchV1SandboxEmploymentsEmploymentId2Responses, + PatchV1SandboxEmploymentsEmploymentId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/probation-extensions', + url: '/v1/sandbox/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3308,64 +3061,71 @@ export const postV1ProbationExtensions = ( }); /** - * Update billing address details - * - * Updates employment's billing address details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * Update employment * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Updates an employment. Use this endpoint to: + * - modify employment states for testing + * - Backdate employment start dates * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * This endpoint will respond with a 404 outside of the Sandbox environment. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + */ +export const patchV1SandboxEmploymentsEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).put< + PatchV1SandboxEmploymentsEmploymentIdResponses, + PatchV1SandboxEmploymentsEmploymentIdErrors, + ThrowOnError + >({ + url: '/v1/sandbox/employments/{employment_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Show benefit renewal request schema * + * Returns the json schema of the `benefit_renewal_request` form for a specific request. + * This endpoint requires a company access token, as forms are dependent on certain + * properties of companies and their current employments. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const putV2EmploymentsEmploymentIdBillingAddressDetails = < +export const getV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdBillingAddressDetailsData, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses, - PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors, + (options.client ?? client).get< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/billing_address_details', + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update address details + * Update billing address details * - * Updates employment's address details. + * Updates employment's billing address details. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -3392,24 +3152,20 @@ export const putV2EmploymentsEmploymentIdBillingAddressDetails = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdAddressDetails = < +export const putV2EmploymentsEmploymentIdBillingAddressDetails = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdAddressDetailsData, + PutV2EmploymentsEmploymentIdBillingAddressDetailsData, ThrowOnError >, ) => (options.client ?? client).put< - PutV2EmploymentsEmploymentIdAddressDetailsResponses, - PutV2EmploymentsEmploymentIdAddressDetailsErrors, + PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses, + PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/address_details', + url: '/v2/employments/{employment_id}/billing_address_details', ...options, headers: { 'Content-Type': 'application/json', @@ -3418,212 +3174,224 @@ export const putV2EmploymentsEmploymentIdAddressDetails = < }); /** - * Create risk reserve + * Delete an Incentive + * + * Delete an incentive. + * + * `one_time` incentives that have the following status **CANNOT** be deleted: + * * `processing` + * * `paid` * - * Create a new risk reserve * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postV1RiskReserve = ( - options: Options, +export const deleteV1IncentivesId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1RiskReserveResponses, - PostV1RiskReserveErrors, + (options.client ?? client).delete< + DeleteV1IncentivesIdResponses, + DeleteV1IncentivesIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/risk-reserve', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/incentives/{id}', ...options }); /** - * Submit risk reserve proof of payment + * Show Incentive * - * Submits a proof of payment document for a risk reserve associated with an employment. + * Show an Incentive's details * - * Triggers an `employment.cor_hiring.proof_of_payment_submitted` webhook event. + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * + */ +export const getV1IncentivesId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1IncentivesIdResponses, + GetV1IncentivesIdErrors, + ThrowOnError + >({ url: '/v1/incentives/{id}', ...options }); + +/** + * Update Incentive + * + * Updates an Incentive. + * + * Incentives use the currency of the employment specified provided in the `employment_id` field. + * + * The API doesn't support updating paid incentives. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postV1EmploymentsEmploymentIdRiskReserveProofOfPayments = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData, - ThrowOnError - >, +export const patchV1IncentivesId2 = ( + options: Options, ) => - (options.client ?? client).post< - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses, - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors, + (options.client ?? client).patch< + PatchV1IncentivesId2Responses, + PatchV1IncentivesId2Errors, ThrowOnError >({ - ...formDataBodySerializer, - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments', + url: '/v1/incentives/{id}', ...options, headers: { - 'Content-Type': null, + 'Content-Type': 'application/json', ...options.headers, }, }); /** - * Get Company Compliance Profile + * Update Incentive * - * Returns the KYB and credit risk status for the company's default legal entity. + * Updates an Incentive. + * + * Incentives use the currency of the employment specified provided in the `employment_id` field. + * + * The API doesn't support updating paid incentives. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getV1CompaniesCompanyIdComplianceProfile = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchV1IncentivesId = ( + options: Options, ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdComplianceProfileResponses, - GetV1CompaniesCompanyIdComplianceProfileErrors, + (options.client ?? client).put< + PatchV1IncentivesIdResponses, + PatchV1IncentivesIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/compliance-profile', + url: '/v1/incentives/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show product prices in the company's desired currency + * Show Legal Entity Administrative details * - * list product prices in the company's desired currency. - * the endpoint currently only returns the product prices for the EOR monthly product and the contractor products (Standard, Plus and COR). - * the product prices are then used to create a pricing plan for the company. + * Show administrative details of legal entity for the authorized company specified in the request. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const getV1CompaniesCompanyIdProductPrices = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdProductPricesResponses, - GetV1CompaniesCompanyIdProductPricesErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}/product-prices', - ...options, - }); +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = + ( + options: Options< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, + ThrowOnError + >({ + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', + ...options, + }); /** - * Show a company - * - * Given an ID, shows a company. + * Update Legal Entity Administrative details * - * If the used access token was issued by the OAuth 2.0 Authorization Code flow, - * then only the associated company can be accessed through the endpoint. + * Update administrative details of legal entity for the authorized company specified in the request. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const getV1CompaniesCompanyId = ( - options: Options, -) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdResponses, - GetV1CompaniesCompanyIdErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}', - ...options, - }); +export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = + ( + options: Options< + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, + ThrowOnError + >, + ) => + (options.client ?? client).put< + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, + ThrowOnError + >({ + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Update a company + * Update bank account details * - * Given an ID and a request object with new information, updates a company. + * Updates employment's bank account details. * - * ### Getting a company and its owner to `active` status - * If you created a company using the - * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required - * request body parameters, you can use this endpoint to provide the missing data. Once the company - * and its owner have all the necessary data, both their statuses will be set to `active` and the company - * onboarding will be marked as "completed". + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * - * The following constitutes a company with "all the necessary data": - * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the - * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters - * are required). - * * Company `tax_number` or `registration_number` is not nil - * * Company `name` is not nil (already required when creating the company) - * * Company has a `desired_currency` in their bank account (already required when creating the company) - * * Company has accepted terms of service (already required when creating the company) * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const patchV1CompaniesCompanyId2 = < +export const putV2EmploymentsEmploymentIdBankAccountDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PutV2EmploymentsEmploymentIdBankAccountDetailsData, + ThrowOnError + >, ) => - (options.client ?? client).patch< - PatchV1CompaniesCompanyId2Responses, - PatchV1CompaniesCompanyId2Errors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdBankAccountDetailsResponses, + PutV2EmploymentsEmploymentIdBankAccountDetailsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}', + url: '/v2/employments/{employment_id}/bank_account_details', ...options, headers: { 'Content-Type': 'application/json', @@ -3632,288 +3400,206 @@ export const patchV1CompaniesCompanyId2 = < }); /** - * Update a company - * - * Given an ID and a request object with new information, updates a company. - * - * ### Getting a company and its owner to `active` status - * If you created a company using the - * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required - * request body parameters, you can use this endpoint to provide the missing data. Once the company - * and its owner have all the necessary data, both their statuses will be set to `active` and the company - * onboarding will be marked as "completed". - * - * The following constitutes a company with "all the necessary data": - * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the - * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters - * are required). - * * Company `tax_number` or `registration_number` is not nil - * * Company `name` is not nil (already required when creating the company) - * * Company has a `desired_currency` in their bank account (already required when creating the company) - * * Company has accepted terms of service (already required when creating the company) + * List Contractor Invoices * + * Lists Contractor Invoice records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const patchV1CompaniesCompanyId = ( - options: Options, +export const getV1ContractorInvoices = ( + options?: Options, ) => - (options.client ?? client).put< - PatchV1CompaniesCompanyIdResponses, - PatchV1CompaniesCompanyIdErrors, + (options?.client ?? client).get< + GetV1ContractorInvoicesResponses, + GetV1ContractorInvoicesErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/contractor-invoices', ...options }); /** - * Show employee address - * - * Returns the authenticated employee's residential address. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. - * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` - * as the form name to discover the schema for a given country. - * - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | View addresses (`address:read`) | Manage addresses (`address:write`) | + * List expense categories * + * Lists the effective hierarchy of expense categories. At least one of employment_id, expense_id, or country_code must be provided. */ -export const getV1EmployeeAddress = ( - options?: Options, +export const getV1ExpensesCategories = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1EmployeeAddressResponses, - GetV1EmployeeAddressErrors, + GetV1ExpensesCategoriesResponses, + GetV1ExpensesCategoriesErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/address', - ...options, - }); + >({ url: '/v1/expenses/categories', ...options }); /** - * Update employee address - * - * Updates the authenticated employee's residential address. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. The token must be an employee-role token - * (typically obtained via the OAuth2 assertion grant with subject - * `urn:remote-api:employee:employment:`). - * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` - * as the form name to discover the schema for a given country. - * + * List contract documents for an employment * + * Only contractor employment types are supported. Lists contract documents for a specific employment with pagination, filtering by status, and sorted by updated_at descending (latest first). * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage addresses (`address:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const putV1EmployeeAddress = ( - options?: Options, +export const getV1EmploymentsEmploymentIdContractDocuments = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentsEmploymentIdContractDocumentsData, + ThrowOnError + >, ) => - (options?.client ?? client).put< - PutV1EmployeeAddressResponses, - PutV1EmployeeAddressErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdContractDocumentsResponses, + GetV1EmploymentsEmploymentIdContractDocumentsErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/address', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, - }); + >({ url: '/v1/employments/{employment_id}/contract-documents', ...options }); /** - * Download a resignation letter + * Show contractor contract details * - * Downloads a resignation letter from an employment request. + * Returns the contract details JSON Schema for contractors given a country * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View resignation letters (`resignation_letter:read`) | - | + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const getV1ResignationsOffboardingRequestIdResignationLetter = < +export const getV1CountriesCountryCodeContractorContractDetails = < ThrowOnError extends boolean = false, >( options: Options< - GetV1ResignationsOffboardingRequestIdResignationLetterData, + GetV1CountriesCountryCodeContractorContractDetailsData, ThrowOnError >, ) => (options.client ?? client).get< - GetV1ResignationsOffboardingRequestIdResignationLetterResponses, - GetV1ResignationsOffboardingRequestIdResignationLetterErrors, + GetV1CountriesCountryCodeContractorContractDetailsResponses, + GetV1CountriesCountryCodeContractorContractDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/resignations/{offboarding_request_id}/resignation-letter', + url: '/v1/countries/{country_code}/contractor-contract-details', ...options, }); /** - * Update federal taxes - * - * Updates employment's federal taxes. - * - * Requirements to update federal taxes successfully: - * * Employment should be Global Payroll - * * Employment should be in the post-enrollment state - * * Employment should belong to USA - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Get user by ID via SCIM v2.0 * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Retrieves a single user for the authenticated company by user ID + */ +export const getV1ScimV2UsersId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1ScimV2UsersIdResponses, + GetV1ScimV2UsersIdErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/scim/v2/Users/{id}', + ...options, + }); + +/** + * List employment files * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * Lists files associated with a specific employment. * + * Supports filtering by file type and sub_type. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const putV1EmploymentsEmploymentIdFederalTaxes = < +export const getV1EmploymentsEmploymentIdFiles = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PutV1EmploymentsEmploymentIdFederalTaxesResponses, - PutV1EmploymentsEmploymentIdFederalTaxesErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdFilesResponses, + GetV1EmploymentsEmploymentIdFilesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/federal-taxes', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/employments/{employment_id}/files', ...options }); /** - * List Contract Amendment + * Manage contractor plus subscription + * + * Endpoint that can be used to upgrade, assign or downgrade a contractor's subscription. + * This can be used when company admins desire to assign someone to the Contractor Plus plan, + * but also to change the contractor's subscription between Plus and Standard. * - * List Contract Amendment requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1ContractAmendments = ( - options: Options, -) => - (options.client ?? client).get< - GetV1ContractAmendmentsResponses, - GetV1ContractAmendmentsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contract-amendments', - ...options, - }); +export const postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription = + ( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses, + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors, + ThrowOnError + >({ + url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Create Contract Amendment - * - * Creates a Contract Amendment request. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Submit eligibility questionnaire * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Submits an eligibility questionnaire for a contractor employment. * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * The questionnaire determines if the contractor is eligible for certain products or features. + * The responses are validated against the JSON schema for the questionnaire type. * + * **Requirements:** + * - Employment must be of type `contractor` + * - Employment must be in `created` status + * - Responses must conform to the questionnaire JSON schema * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1ContractAmendments = ( - options: Options, +export const postV1ContractorsEligibilityQuestionnaire = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1ContractAmendmentsResponses, - PostV1ContractAmendmentsErrors, + PostV1ContractorsEligibilityQuestionnaireResponses, + PostV1ContractorsEligibilityQuestionnaireErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contract-amendments', + url: '/v1/contractors/eligibility-questionnaire', ...options, headers: { 'Content-Type': 'application/json', @@ -3922,255 +3608,273 @@ export const postV1ContractAmendments = ( }); /** - * Show Company Payroll Runs + * Update basic information + * + * Updates employment's basic information. + * + * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - * Given an ID, shows a payroll run. - * `employee_details` field is deprecated in favour of the `employee_details` endpoint and will be removed in the future. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1PayrollRunsPayrollRunId = < +export const putV1EmploymentsEmploymentIdBasicInformation = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PutV1EmploymentsEmploymentIdBasicInformationData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1PayrollRunsPayrollRunIdResponses, - GetV1PayrollRunsPayrollRunIdErrors, + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdBasicInformationResponses, + PutV1EmploymentsEmploymentIdBasicInformationErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payroll-runs/{payroll_run_id}', + url: '/v1/employments/{employment_id}/basic_information', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Download a receipt - * - * Downloads an expense receipt. + * Show a contractor of record (COR) termination request * - * Deprecated since late February 2024 in favour of **[Download a receipt by id](#tag/Expenses/operation/get_download_by_id_expense_receipt)** endpoint. + * Retrieves a Contractor of Record termination request by ID. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * + */ +export const getV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId = + ( + options: Options< + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses, + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors, + ThrowOnError + >({ + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}', + ...options, + }); + +/** + * Create a legal entity + * + * Create a new legal entity for a company in a given country, with KYB automatically passed. * + * The entity is created with active status and can be set as the company's default + * using the reassign default entity endpoint. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * - * @deprecated */ -export const getV1ExpensesExpenseIdReceipt = < +export const postV1SandboxCompaniesCompanyIdLegalEntities = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1SandboxCompaniesCompanyIdLegalEntitiesData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1ExpensesExpenseIdReceiptResponses, - GetV1ExpensesExpenseIdReceiptErrors, + (options.client ?? client).post< + PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses, + PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/{expense_id}/receipt', + url: '/v1/sandbox/companies/{company_id}/legal-entities', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show travel letter request + * Show employee personal details + * + * Returns the authenticated employee's personal details. + * + * This endpoint requires country-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` + * as the form name to discover the schema for a given country. + * * - * Show a single travel letter request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | + * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | * */ -export const getV1TravelLetterRequestsId = < +export const getV1EmployeePersonalDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1TravelLetterRequestsIdResponses, - GetV1TravelLetterRequestsIdErrors, + (options?.client ?? client).get< + GetV1EmployeePersonalDetailsResponses, + GetV1EmployeePersonalDetailsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/travel-letter-requests/{id}', - ...options, - }); + >({ url: '/v1/employee/personal-details', ...options }); /** - * Updates a travel letter request + * Update employee personal details + * + * Updates the authenticated employee's personal details (date of birth, + * national ID, nationality, etc.). + * + * This endpoint requires country-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` + * as the form name to discover the schema for a given country. + * * - * Updates a travel letter request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | + * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | * */ -export const patchV1TravelLetterRequestsId2 = < +export const putV1EmployeePersonalDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).patch< - PatchV1TravelLetterRequestsId2Responses, - PatchV1TravelLetterRequestsId2Errors, + (options?.client ?? client).put< + PutV1EmployeePersonalDetailsResponses, + PutV1EmployeePersonalDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/travel-letter-requests/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/personal-details', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Updates a travel letter request - * - * Updates a travel letter request - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | + * Payroll processing details data API resource * + * API to retrieve the run details of a pay group */ -export const patchV1TravelLetterRequestsId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1WdGphPayDetailData = ( + options: Options, ) => - (options.client ?? client).put< - PatchV1TravelLetterRequestsIdResponses, - PatchV1TravelLetterRequestsIdErrors, + (options.client ?? client).get< + GetV1WdGphPayDetailDataResponses, + GetV1WdGphPayDetailDataErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/travel-letter-requests/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/wd/gph/payDetailData', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show Time Off Balance - * - * Shows the time off balance for the given employment_id. - * - * Deprecated since February 2025 in favour of **[List Leave Policies Summary](#tag/Leave-Policies/operation/get_index_leave_policies_summary)** endpoint. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | - * + * Show region fields * - * @deprecated + * Returns required fields JSON Schema for a given region. These are required in order to calculate + * the cost of employment for the region. These fields are based on employer contributions that are associated + * with the region or any of it's parent regions. */ -export const getV1TimeoffBalancesEmploymentId = < +export const getV1CostCalculatorRegionsSlugFields = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1TimeoffBalancesEmploymentIdResponses, - GetV1TimeoffBalancesEmploymentIdErrors, + GetV1CostCalculatorRegionsSlugFieldsResponses, + GetV1CostCalculatorRegionsSlugFieldsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff-balances/{employment_id}', - ...options, - }); + >({ url: '/v1/cost-calculator/regions/{slug}/fields', ...options }); /** - * Update basic information - * - * Updates employment's basic information. + * Cancel onboarding * - * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. + * Cancel onboarding. * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * Requirements for the cancellation to succeed: * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * * Employment has to be in `invited`, `created`, `created_awaiting_reserve`, `created_reserve_paid`, `pre_hire` status + * * Employee must not have signed the employment contract * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ## Scopes * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage onboarding (`onboarding:write`) | * + */ +export const postV1CancelOnboardingEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1CancelOnboardingEmploymentIdResponses, + PostV1CancelOnboardingEmploymentIdErrors, + ThrowOnError + >({ url: '/v1/cancel-onboarding/{employment_id}', ...options }); + +/** + * Cancel Time Off as Employee * + * Cancels a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const putV1EmploymentsEmploymentIdBasicInformation = < +export const postV1EmployeeTimeoffIdCancel = < ThrowOnError extends boolean = false, >( - options: Options< - PutV1EmploymentsEmploymentIdBasicInformationData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).put< - PutV1EmploymentsEmploymentIdBasicInformationResponses, - PutV1EmploymentsEmploymentIdBasicInformationErrors, + (options.client ?? client).post< + PostV1EmployeeTimeoffIdCancelResponses, + PostV1EmployeeTimeoffIdCancelErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/basic_information', + url: '/v1/employee/timeoff/{id}/cancel', ...options, headers: { 'Content-Type': 'application/json', @@ -4179,180 +3883,195 @@ export const putV1EmploymentsEmploymentIdBasicInformation = < }); /** - * List expense categories + * Download a receipt * - * Lists the effective hierarchy of expense categories. At least one of employment_id, expense_id, or country_code must be provided. + * Downloads an expense receipt. + * + * Deprecated since late February 2024 in favour of **[Download a receipt by id](#tag/Expenses/operation/get_download_by_id_expense_receipt)** endpoint. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * + * + * @deprecated */ -export const getV1ExpensesCategories = ( - options?: Options, +export const getV1ExpensesExpenseIdReceipt = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetV1ExpensesCategoriesResponses, - GetV1ExpensesCategoriesErrors, + (options.client ?? client).get< + GetV1ExpensesExpenseIdReceiptResponses, + GetV1ExpensesExpenseIdReceiptErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/categories', - ...options, - }); + >({ url: '/v1/expenses/{expense_id}/receipt', ...options }); /** - * Cancel Time Off as Employee + * List Benefit Offers + * + * List benefit offers for each country. * - * Cancels a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const postV1EmployeeTimeoffIdCancel = < +export const getV1BenefitOffersCountrySummaries = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1EmployeeTimeoffIdCancelResponses, - PostV1EmployeeTimeoffIdCancelErrors, + (options.client ?? client).get< + GetV1BenefitOffersCountrySummariesResponses, + GetV1BenefitOffersCountrySummariesErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff/{id}/cancel', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/benefit-offers/country-summaries', ...options }); /** - * Show form schema + * List Leave Policies Details * - * Returns the json schema of a supported form. Possible form names are: - * ``` - * - address_details - * - administrative_details - * - bank_account_details - * - employment_basic_information - * - contractor_basic_information - * - contractor_contract_details - * - billing_address_details - * - contract_details - * - emergency_contact - * - emergency_contact_details - * - employment_document_details - * - personal_details - * - pricing_plan_details - * - company_basic_information - * - global_payroll_administrative_details - * - global_payroll_basic_information - * - global_payroll_contract_details - * - global_payroll_federal_taxes - * - global_payroll_personal_details - * - benefit_renewal_request - * - hris_personal_details + * Describe the leave policies (custom or not) for a given employment * - * ``` + * ## Scopes * - * Most forms require a company access token, as they are dependent on certain - * properties of companies and their current employments. However, the `address_details` - * and `company_basic_information` forms can be accessed using client_credentials - * authentication (without a company). + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * + */ +export const getV1LeavePoliciesDetailsEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1LeavePoliciesDetailsEmploymentIdResponses, + GetV1LeavePoliciesDetailsEmploymentIdErrors, + ThrowOnError + >({ url: '/v1/leave-policies/details/{employment_id}', ...options }); + +/** + * List work authorization requests * + * List work authorization requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | * */ -export const getV1CountriesCountryCodeForm = < +export const getV1WorkAuthorizationRequests = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeFormResponses, - GetV1CountriesCountryCodeFormErrors, + (options?.client ?? client).get< + GetV1WorkAuthorizationRequestsResponses, + GetV1WorkAuthorizationRequestsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/countries/{country_code}/{form}', - ...options, - }); + >({ url: '/v1/work-authorization-requests', ...options }); /** - * Download file - * - * Downloads a file. - * + * Get employment benefit offers * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const getV1FilesId = ( - options: Options, +export const getV1EmploymentsEmploymentIdBenefitOffers = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1FilesIdResponses, - GetV1FilesIdErrors, + GetV1EmploymentsEmploymentIdBenefitOffersResponses, + GetV1EmploymentsEmploymentIdBenefitOffersErrors, + ThrowOnError + >({ url: '/v1/employments/{employment_id}/benefit-offers', ...options }); + +/** + * Upserts employment benefit offers + */ +export const putV1EmploymentsEmploymentIdBenefitOffers = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdBenefitOffersResponses, + PutV1EmploymentsEmploymentIdBenefitOffersErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/files/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employments/{employment_id}/benefit-offers', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show Contract Amendment + * List employments * - * Show a single Contract Amendment request. + * Lists all employments, except for the deleted ones. * - * ## Scopes + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const getV1ContractAmendmentsId = ( - options: Options, +export const getV1Employments = ( + options: Options, ) => (options.client ?? client).get< - GetV1ContractAmendmentsIdResponses, - GetV1ContractAmendmentsIdErrors, + GetV1EmploymentsResponses, + GetV1EmploymentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contract-amendments/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employments', ...options, }); /** - * Update bank account details + * Create employment * - * Updates employment's bank account details. + * Creates an employment. We support creating employees and contractors. + * + * ## Global Payroll Employees + * + * To create a Global Payroll employee, pass `global_payroll_employee` as the `type` parameter, + * and provide the slug of the specific legal entity that the employee will be engaged by and billed to as the `engaged_by_entity_slug` parameter. + * + * ## HRIS Employees + * + * To create a HRIS employee, pass `hris` as the `type` parameter. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -4368,7 +4087,7 @@ export const getV1ContractAmendmentsId = ( * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * * * @@ -4379,24 +4098,15 @@ export const getV1ContractAmendmentsId = ( * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdBankAccountDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV2EmploymentsEmploymentIdBankAccountDetailsData, - ThrowOnError - >, +export const postV1Employments = ( + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdBankAccountDetailsResponses, - PutV2EmploymentsEmploymentIdBankAccountDetailsErrors, + (options.client ?? client).post< + PostV1EmploymentsResponses, + PostV1EmploymentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/bank_account_details', + url: '/v1/employments', ...options, headers: { 'Content-Type': 'application/json', @@ -4405,60 +4115,81 @@ export const putV2EmploymentsEmploymentIdBankAccountDetails = < }); /** - * List Company Managers - * - * List all company managers of an integration. If filtered by the company_id param, - * it lists only company managers belonging to the specified company. + * Show Time Off * + * Shows a single Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1CompanyManagers = ( - options: Options, +export const getV1TimeoffId = ( + options: Options, ) => (options.client ?? client).get< - GetV1CompanyManagersResponses, - GetV1CompanyManagersErrors, + GetV1TimeoffIdResponses, + GetV1TimeoffIdErrors, + ThrowOnError + >({ url: '/v1/timeoff/{id}', ...options }); + +/** + * Update Time Off + * + * Updates a Time Off record. + * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. + * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * + */ +export const patchV1TimeoffId2 = ( + options: Options, +) => + (options.client ?? client).patch< + PatchV1TimeoffId2Responses, + PatchV1TimeoffId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-managers', + url: '/v1/timeoff/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create and invite a Company Manager + * Update Time Off + * + * Updates a Time Off record. + * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. + * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. * - * Create a Company Manager and sends the invitation email for signing in to the Remote Platform. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1CompanyManagers = ( - options: Options, +export const patchV1TimeoffId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1CompanyManagersResponses, - PostV1CompanyManagersErrors, + (options.client ?? client).put< + PatchV1TimeoffIdResponses, + PatchV1TimeoffIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-managers', + url: '/v1/timeoff/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -4467,335 +4198,383 @@ export const postV1CompanyManagers = ( }); /** - * List countries for Cost Calculator + * Get token identity + * + * Shows information about the entities that can be controlled by the current auth token. * - * Lists active and processing countries */ -export const getV1CostCalculatorCountries = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getV1IdentityCurrent = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1CostCalculatorCountriesResponses, - unknown, + (options.client ?? client).get< + GetV1IdentityCurrentResponses, + GetV1IdentityCurrentErrors, + ThrowOnError + >({ url: '/v1/identity/current', ...options }); + +/** + * Payroll Variance Analysis API resource + * + * API to retrieve the variance analysis data of a pay group + */ +export const getV1WdGphPayVariance = ( + options: Options, +) => + (options.client ?? client).get< + GetV1WdGphPayVarianceResponses, + GetV1WdGphPayVarianceErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cost-calculator/countries', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/wd/gph/payVariance', ...options, }); /** - * Decline Identity Verification - * - * Declines the identity verification of an employee. + * List Company Payroll Calendar * + * List all payroll calendars for the company within the requested cycle. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | + * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | * */ -export const postV1IdentityVerificationEmploymentIdDecline = < +export const getV1PayrollCalendarsCycle = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1IdentityVerificationEmploymentIdDeclineData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).post< - PostV1IdentityVerificationEmploymentIdDeclineResponses, - PostV1IdentityVerificationEmploymentIdDeclineErrors, + (options.client ?? client).get< + GetV1PayrollCalendarsCycleResponses, + GetV1PayrollCalendarsCycleErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/identity-verification/{employment_id}/decline', - ...options, - }); + >({ url: '/v1/payroll-calendars/{cycle}', ...options }); /** - * Retrieve a pre-onboarding document with its rendered PDF content + * Terminate contractor of record employment * - * Returns the rendered contract PDF (base64-encoded) and the list of signatories for the given - * pre-onboarding document. The `content` field is prefixed with `data:application/pdf;base64,` so - * it can be embedded directly in a document viewer. + * **Deprecated.** Use `POST /contractors/employments/{employment_id}/cor-termination-requests` instead. + * + * Initiates a termination request for a Contractor of Record employment. + * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. + * Currently, only Contractor of Record employments can be terminated. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * + * + * @deprecated */ -export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId = < +export const postV1ContractorsEmploymentsEmploymentIdTerminateCorEmployment = < ThrowOnError extends boolean = false, >( options: Options< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData, + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses, - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors, + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses, + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}', + url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment', ...options, }); /** - * Show engagement agreement details - * - * Returns the engagement agreement details JSON Schema for a country. Only DEU country is supported for now. + * Send back a timesheet for review or modification * + * Sends the given timesheet back to the employee for review or modification. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const getV1CountriesCountryCodeEngagementAgreementDetails = < +export const postV1TimesheetsTimesheetIdSendBack = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1CountriesCountryCodeEngagementAgreementDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeEngagementAgreementDetailsResponses, - GetV1CountriesCountryCodeEngagementAgreementDetailsErrors, + (options.client ?? client).post< + PostV1TimesheetsTimesheetIdSendBackResponses, + PostV1TimesheetsTimesheetIdSendBackErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/countries/{country_code}/engagement-agreement-details', + url: '/v1/timesheets/{timesheet_id}/send-back', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Billing Documents + * Sign a pre-onboarding document + * + * Signs the latest contract document associated with the given pre-onboarding document on behalf + * of the company signatory. * - * List billing documents for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV1BillingDocuments = ( - options: Options, -) => - (options.client ?? client).get< - GetV1BillingDocumentsResponses, - GetV1BillingDocumentsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/billing-documents', - ...options, - }); +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign = + ( + options: Options< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors, + ThrowOnError + >({ + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Delete a Webhook Callback + * List Benefit Renewal Requests * - * Delete a callback previously registered for webhooks + * List Benefit Renewal Requests for each country. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const deleteV1WebhookCallbacksId = < +export const getV1BenefitRenewalRequests = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).delete< - DeleteV1WebhookCallbacksIdResponses, - DeleteV1WebhookCallbacksIdErrors, + (options.client ?? client).get< + GetV1BenefitRenewalRequestsResponses, + GetV1BenefitRenewalRequestsErrors, + ThrowOnError + >({ url: '/v1/benefit-renewal-requests', ...options }); + +/** + * Reassign default legal entity + * + * Set a different legal entity as the company's default entity. + * + * The default entity is used when creating new employments without an explicit entity. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + */ +export const putV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData, + ThrowOnError + >, +) => + (options.client ?? client).put< + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses, + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/webhook-callbacks/{id}', + url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}', ...options, }); /** - * Update a Webhook Callback + * List Employment Contract. * - * Update a callback previously registered for webhooks + * Get the employment contract history for a given employment. If `only_active` is true, it will return only the active or last active contract. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage employments (`employments`) | View contracts (`contract:read`) | - | * */ -export const patchV1WebhookCallbacksId = ( - options: Options, +export const getV1EmploymentContracts = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1WebhookCallbacksIdResponses, - PatchV1WebhookCallbacksIdErrors, + (options.client ?? client).get< + GetV1EmploymentContractsResponses, + GetV1EmploymentContractsErrors, + ThrowOnError + >({ url: '/v1/employment-contracts', ...options }); + +/** + * Cancel Contract Amendment + * + * Use this endpoint to cancel an existing contract amendment request. + * + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + */ +export const putV1SandboxContractAmendmentsContractAmendmentRequestIdCancel = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData, + ThrowOnError + >, +) => + (options.client ?? client).put< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses, + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/webhook-callbacks/{id}', + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Submit employee federal taxes + * Download payslip in the PDF format * - * Submits the authenticated employee's US federal tax (W-4) details. + * Given a Payslip ID, downloads a payslip. + * It is important to note that each country has a different payslip format and they are not authored by Remote. * - * Available for US Global Payroll employees once they reach the - * post-enrollment state. Calls made before then return a 404. * - * This endpoint requires country-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_federal_taxes` - * as the form name to discover the schema for a given country. + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | * + */ +export const getV1PayslipsPayslipIdPdf = ( + options: Options, +) => + (options.client ?? client).get< + GetV1PayslipsPayslipIdPdfResponses, + GetV1PayslipsPayslipIdPdfErrors, + ThrowOnError + >({ url: '/v1/payslips/{payslip_id}/pdf', ...options }); + +/** + * Approve Time Off * + * Approve a time off request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const putV1EmployeeFederalTaxes = ( - options?: Options, +export const postV1TimeoffTimeoffIdApprove = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).put< - PutV1EmployeeFederalTaxesResponses, - PutV1EmployeeFederalTaxesErrors, + (options.client ?? client).post< + PostV1TimeoffTimeoffIdApproveResponses, + PostV1TimeoffTimeoffIdApproveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/federal-taxes', + url: '/v1/timeoff/{timeoff_id}/approve', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * List timesheets for the authenticated employee + * List all companies * - * Returns a paginated list of timesheets for the authenticated employee. + * List all companies that authorized your integration to act on their behalf. In other words, these are all the companies that your integration can manage. Any company that has completed the authorization flow for your integration will be included in the response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const getV1EmployeeTimesheets = ( - options?: Options, +export const getV1Companies = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeTimesheetsResponses, - GetV1EmployeeTimesheetsErrors, + (options.client ?? client).get< + GetV1CompaniesResponses, + GetV1CompaniesErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timesheets', - ...options, - }); + >({ url: '/v1/companies', ...options }); /** - * Update personal details + * Create a company * - * Updates employment's personal details. + * Creates a new company. * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * ### Creating a company with only the required request body parameters + * When you call this endpoint and omit all the optional parameters in the request body, + * the following resources get created upon a successful response: + * * A new company with status `pending`. + * * A company owner for the new company with status `initiated`. * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * See the [update a company endpoint](#tag/Companies/operation/patch_update_company) for + * more details on how to get your company and its owner to `active` status. * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * If you'd like to create a company and its owner with `active` status in a single request, + * please provide the optional `address_details` parameter as well. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ### Accepting the Terms of Service * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * A required step for creating a company in Remote is to accept our Terms of Service (ToS). + * + * Company managers need to be aware of our Terms of Service and Privacy Policy, + * hence **it's the responsibility of our partners to advise and ensure company managers read + * and accept the ToS**. The terms have to be accepted only once, before creating a company, + * and the Remote API will collect the acceptance timestamp as its confirmation. + * + * To ensure users read the most recent version of Remote's Terms of Service, their **acceptance + * must be done within the last fifteen minutes prior the company creation action**. * + * To retrieve this information, partners can provide an element with any text and a description + * explaining that by performing that action they are accepting Remote's Term of Service. For + * instance, the partner can add a checkbox or a "Create Remote Account" button followed by a + * description saying "By creating an account, you agree to + * [Remote's Terms of Service](https://remote.com/terms-of-service). Also see Remote's + * [Privacy Policy](https://remote.com/privacy-policy)". * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const putV1EmploymentsEmploymentIdPersonalDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV1EmploymentsEmploymentIdPersonalDetailsData, - ThrowOnError - >, +export const postV1Companies = ( + options: Options, ) => - (options.client ?? client).put< - PutV1EmploymentsEmploymentIdPersonalDetailsResponses, - PutV1EmploymentsEmploymentIdPersonalDetailsErrors, + (options.client ?? client).post< + PostV1CompaniesResponses, + PostV1CompaniesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/personal_details', + url: '/v1/companies', ...options, headers: { 'Content-Type': 'application/json', @@ -4804,88 +4583,102 @@ export const putV1EmploymentsEmploymentIdPersonalDetails = < }); /** - * List travel letter requests + * List company structure nodes + * + * Shows all the company structure nodes of an employment. * - * List travel letter requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | + * | Manage company resources (`company_admin`) | View company structure (`company_structure:read`) | - | * */ -export const getV1TravelLetterRequests = ( - options?: Options, +export const getV1EmploymentsEmploymentIdCompanyStructureNodes = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentsEmploymentIdCompanyStructureNodesData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1TravelLetterRequestsResponses, - GetV1TravelLetterRequestsErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses, + GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors, + ThrowOnError + >({ + url: '/v1/employments/{employment_id}/company-structure-nodes', + ...options, + }); + +/** + * Update employment + */ +export const patchV2EmploymentsEmploymentId2 = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).patch< + PatchV2EmploymentsEmploymentId2Responses, + PatchV2EmploymentsEmploymentId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/travel-letter-requests', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v2/employments/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Benefit Renewal Requests - * - * List Benefit Renewal Requests for each country. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | - * + * Update employment */ -export const getV1BenefitRenewalRequests = < +export const patchV2EmploymentsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetV1BenefitRenewalRequestsResponses, - GetV1BenefitRenewalRequestsErrors, + (options.client ?? client).put< + PatchV2EmploymentsEmploymentIdResponses, + PatchV2EmploymentsEmploymentIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/benefit-renewal-requests', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v2/employments/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create a Webhook Callback + * Create probation completion letter * - * Register a callback to be used for webhooks + * Create a new probation completion letter request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | * */ -export const postV1WebhookCallbacks = ( - options: Options, +export const postV1ProbationCompletionLetter = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1WebhookCallbacksResponses, - PostV1WebhookCallbacksErrors, + PostV1ProbationCompletionLetterResponses, + PostV1ProbationCompletionLetterErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/webhook-callbacks', + url: '/v1/probation-completion-letter', ...options, headers: { 'Content-Type': 'application/json', @@ -4894,177 +4687,190 @@ export const postV1WebhookCallbacks = ( }); /** - * Approve timesheet - * - * Approves the given timesheet. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * Creates PDF cost estimation of employments * + * Creates a PDF cost estimation of employments based on the provided parameters. */ -export const postV1TimesheetsTimesheetIdApprove = < +export const postV1CostCalculatorEstimationPdf = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).post< - PostV1TimesheetsTimesheetIdApproveResponses, - PostV1TimesheetsTimesheetIdApproveErrors, + (options?.client ?? client).post< + PostV1CostCalculatorEstimationPdfResponses, + PostV1CostCalculatorEstimationPdfErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timesheets/{timesheet_id}/approve', + url: '/v1/cost-calculator/estimation-pdf', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Show payslip + * Token * - * Given an ID, shows a payslip. + * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows + */ +export const postAuthOauth2Token2 = ( + options?: Options, +) => + (options?.client ?? client).post< + PostAuthOauth2Token2Responses, + PostAuthOauth2Token2Errors, + ThrowOnError + >({ + url: '/auth/oauth2/token', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Download a document for the employee * - * Please contact api-support@remote.com to request access to this endpoint. + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * + */ +export const getV1EmployeeDocumentsId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1EmployeeDocumentsIdResponses, + GetV1EmployeeDocumentsIdErrors, + ThrowOnError + >({ url: '/v1/employee/documents/{id}', ...options }); + +/** + * Replay Webhook Events * + * Replay webhook events * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const getV1PayslipsId = ( - options: Options, +export const postV1WebhookEventsReplay = ( + options: Options, ) => - (options.client ?? client).get< - GetV1PayslipsIdResponses, - GetV1PayslipsIdErrors, + (options.client ?? client).post< + PostV1WebhookEventsReplayResponses, + PostV1WebhookEventsReplayErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payslips/{id}', + url: '/v1/webhook-events/replay', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Leave Policies Summary - * - * List all the data related to time off for a given employment - * - * ## Scopes + * Trigger a Webhook * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * Triggers a callback previously registered for webhooks. Use this endpoint to + * emit a webhook for testing in the Sandbox environment. This endpoint will + * respond with a 404 outside of the Sandbox environment. * */ -export const getV1LeavePoliciesSummaryEmploymentId = < +export const postV1SandboxWebhookCallbacksTrigger = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1LeavePoliciesSummaryEmploymentIdResponses, - GetV1LeavePoliciesSummaryEmploymentIdErrors, + (options?.client ?? client).post< + PostV1SandboxWebhookCallbacksTriggerResponses, + PostV1SandboxWebhookCallbacksTriggerErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/leave-policies/summary/{employment_id}', + url: '/v1/sandbox/webhook-callbacks/trigger', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * List expense categories for the authenticated employee - * - * Returns the flat list of expense categories applicable to the current employee. Only active categories are returned, filtered by the employee's country / legal-entity visibility rules. Leaf nodes have `is_selectable: true`; parent nodes are excluded unless `include_parents=true`. + * Show bulk employment job * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1EmployeeExpenseCategories = < +export const getV1BulkEmploymentJobsJobId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeExpenseCategoriesResponses, - GetV1EmployeeExpenseCategoriesErrors, + (options.client ?? client).get< + GetV1BulkEmploymentJobsJobIdResponses, + GetV1BulkEmploymentJobsJobIdErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/expense-categories', - ...options, - }); + >({ url: '/v1/bulk-employment-jobs/{job_id}', ...options }); /** - * List Company Departments - * - * Lists all departments for the authorized company specified in the request. + * List bulk employment rows * + * Returns grouped bulk employment rows, including field-level validation errors in `errors`, row-level failures in `row_errors`, and submission-phase failures in `submission_errors`. If a row passes validation but later fails during Global Payroll activation, that failure is surfaced here after submission rather than in the initial create response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View departments (`company_department:read`) | Manage departments (`company_department:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1CompanyDepartments = ( - options: Options, +export const getV1BulkEmploymentJobsJobIdRows = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1CompanyDepartmentsResponses, - GetV1CompanyDepartmentsErrors, + GetV1BulkEmploymentJobsJobIdRowsResponses, + GetV1BulkEmploymentJobsJobIdRowsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-departments', - ...options, - }); + >({ url: '/v1/bulk-employment-jobs/{job_id}/rows', ...options }); /** - * Create New Department + * Magic links generator + * + * Generates a magic link for a passwordless authentication. + * To create a magic link for a company admin, you need to provide the `user_id` parameter. + * To create a magic link for an employee, you need to provide the `employment_id` parameter. * - * Creates a new department in the specified company. Department names may be non-unique and must be non-empty with no more than 255 characters (Unicode code points). * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage departments (`company_department:write`) | + * | Manage company resources (`company_admin`) | - | Create magic links (`magic_link:write`) | * */ -export const postV1CompanyDepartments = ( - options: Options, +export const postV1MagicLink = ( + options: Options, ) => (options.client ?? client).post< - PostV1CompanyDepartmentsResponses, - PostV1CompanyDepartmentsErrors, + PostV1MagicLinkResponses, + PostV1MagicLinkErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-departments', + url: '/v1/magic-link', ...options, headers: { 'Content-Type': 'application/json', @@ -5073,91 +4879,70 @@ export const postV1CompanyDepartments = ( }); /** - * Decline a time off cancellation request + * Show a company * - * Decline a time off cancellation request. + * Given an ID, shows a company. + * + * If the used access token was issued by the OAuth 2.0 Authorization Code flow, + * then only the associated company can be accessed through the endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const postV1TimeoffTimeoffIdCancelRequestDecline = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1TimeoffTimeoffIdCancelRequestDeclineData, - ThrowOnError - >, +export const getV1CompaniesCompanyId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdCancelRequestDeclineResponses, - PostV1TimeoffTimeoffIdCancelRequestDeclineErrors, + (options.client ?? client).get< + GetV1CompaniesCompanyIdResponses, + GetV1CompaniesCompanyIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{timeoff_id}/cancel-request/decline', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/companies/{company_id}', ...options }); /** - * Update administrative details - * - * Updates employment's administrative details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Update a company * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Given an ID and a request object with new information, updates a company. * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * ### Getting a company and its owner to `active` status + * If you created a company using the + * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required + * request body parameters, you can use this endpoint to provide the missing data. Once the company + * and its owner have all the necessary data, both their statuses will be set to `active` and the company + * onboarding will be marked as "completed". * + * The following constitutes a company with "all the necessary data": + * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the + * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters + * are required). + * * Company `tax_number` or `registration_number` is not nil + * * Company `name` is not nil (already required when creating the company) + * * Company has a `desired_currency` in their bank account (already required when creating the company) + * * Company has accepted terms of service (already required when creating the company) * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const putV2EmploymentsEmploymentIdAdministrativeDetails = < +export const patchV1CompaniesCompanyId2 = < ThrowOnError extends boolean = false, >( - options: Options< - PutV2EmploymentsEmploymentIdAdministrativeDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses, - PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors, + (options.client ?? client).patch< + PatchV1CompaniesCompanyId2Responses, + PatchV1CompaniesCompanyId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/administrative_details', + url: '/v1/companies/{company_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -5166,72 +4951,43 @@ export const putV2EmploymentsEmploymentIdAdministrativeDetails = < }); /** - * Get a employment benefit offers JSON schema - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | - * - */ -export const getV1EmploymentsEmploymentIdBenefitOffersSchema = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdBenefitOffersSchemaData, - ThrowOnError - >, -) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses, - GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/benefit-offers/schema', - ...options, - }); - -/** - * Submit eligibility questionnaire + * Update a company * - * Submits an eligibility questionnaire for a contractor employment. + * Given an ID and a request object with new information, updates a company. * - * The questionnaire determines if the contractor is eligible for certain products or features. - * The responses are validated against the JSON schema for the questionnaire type. + * ### Getting a company and its owner to `active` status + * If you created a company using the + * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required + * request body parameters, you can use this endpoint to provide the missing data. Once the company + * and its owner have all the necessary data, both their statuses will be set to `active` and the company + * onboarding will be marked as "completed". * - * **Requirements:** - * - Employment must be of type `contractor` - * - Employment must be in `created` status - * - Responses must conform to the questionnaire JSON schema + * The following constitutes a company with "all the necessary data": + * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the + * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters + * are required). + * * Company `tax_number` or `registration_number` is not nil + * * Company `name` is not nil (already required when creating the company) + * * Company has a `desired_currency` in their bank account (already required when creating the company) + * * Company has accepted terms of service (already required when creating the company) * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const postV1ContractorsEligibilityQuestionnaire = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchV1CompaniesCompanyId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1ContractorsEligibilityQuestionnaireResponses, - PostV1ContractorsEligibilityQuestionnaireErrors, + (options.client ?? client).put< + PatchV1CompaniesCompanyIdResponses, + PatchV1CompaniesCompanyIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/eligibility-questionnaire', + url: '/v1/companies/{company_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -5240,115 +4996,105 @@ export const postV1ContractorsEligibilityQuestionnaire = < }); /** - * Show personal information for the authenticated employee + * Show form schema + * + * Returns the json schema of the requested company form. + * Currently only supports the `address_details` form. * - * Returns personal information for the authenticated employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const getV1EmployeePersonalInformation = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getV1CompaniesSchema = ( + options: Options, +) => + (options.client ?? client).get< + GetV1CompaniesSchemaResponses, + GetV1CompaniesSchemaErrors, + ThrowOnError + >({ url: '/v1/companies/schema', ...options }); + +/** + * Get employee token identity + * + * Returns user and company information for the authenticated employee. + */ +export const getV1EmployeeCurrent = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1EmployeePersonalInformationResponses, - GetV1EmployeePersonalInformationErrors, + GetV1EmployeeCurrentResponses, + GetV1EmployeeCurrentErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/personal-information', - ...options, - }); + >({ url: '/v1/employee/current', ...options }); /** - * List timesheets + * List pricing plan partner templates + * + * List all pricing plan partner templates. * - * Lists all timesheets. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getV1Timesheets = ( - options?: Options, +export const getV1PricingPlanPartnerTemplates = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => (options?.client ?? client).get< - GetV1TimesheetsResponses, - GetV1TimesheetsErrors, + GetV1PricingPlanPartnerTemplatesResponses, + GetV1PricingPlanPartnerTemplatesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timesheets', - ...options, - }); + >({ url: '/v1/pricing-plan-partner-templates', ...options }); /** - * Create a legal entity + * Show engagement agreement details * - * Create a new legal entity for a company in a given country, with KYB automatically passed. + * Returns the engagement agreement details JSON Schema for a country. Only DEU country is supported for now. * - * The entity is created with active status and can be set as the company's default - * using the reassign default entity endpoint. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const postV1SandboxCompaniesCompanyIdLegalEntities = < +export const getV1CountriesCountryCodeEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( options: Options< - PostV1SandboxCompaniesCompanyIdLegalEntitiesData, + GetV1CountriesCountryCodeEngagementAgreementDetailsData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses, - PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors, + (options.client ?? client).get< + GetV1CountriesCountryCodeEngagementAgreementDetailsResponses, + GetV1CountriesCountryCodeEngagementAgreementDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/companies/{company_id}/legal-entities', + url: '/v1/countries/{country_code}/engagement-agreement-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show employment - * - * Shows all the information of an employment. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Show employee bank account * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Returns the authenticated employee's bank account details. * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * This endpoint requires and returns country-specific data. The exact fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` + * as the form name to discover the schema for a given country. * * * @@ -5356,54 +5102,58 @@ export const postV1SandboxCompaniesCompanyIdLegalEntities = < * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View bank accounts (`bank_account:read`) | Manage bank accounts (`bank_account:write`) | * */ -export const getV1EmploymentsEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1EmployeeBankAccount = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdResponses, - GetV1EmploymentsEmploymentIdErrors, + (options?.client ?? client).get< + GetV1EmployeeBankAccountResponses, + GetV1EmployeeBankAccountErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}', - ...options, - }); + >({ url: '/v1/employee/bank-account', ...options }); /** - * Update employment - * - * Updates an employment. + * Update employee bank account * - * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. - * - * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. - * - * **For `invited` employments:** You can update the work_email. + * Upserts the authenticated employee's bank account details. * - * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. - * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. - * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. - * Currently, these amendments can only be done through the Remote UI. + * This endpoint requires and returns country-specific data. The exact fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` + * as the form name to discover the schema for a given country. * - * It is possible to update the `external_id` of the employment for all employment statuses. * - * ## Global Payroll Employees * - * To update a Global Payment employment your input data must comply with the global payroll json schemas. + * ## Scopes * - * **For `active` employments:** In addition to the above list, you can update personal_details. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage bank accounts (`bank_account:write`) | * - * ## Direct Employees + */ +export const putV1EmployeeBankAccount = ( + options?: Options, +) => + (options?.client ?? client).put< + PutV1EmployeeBankAccountResponses, + PutV1EmployeeBankAccountErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/bank-account', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Update contract details * - * To update an HRIS employment your input data must comply with the HRIS json schemas. + * Updates employment's contract details. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -5419,10 +5169,8 @@ export const getV1EmploymentsEmploymentId = < * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. - * + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * - * Please contact Remote if you need to update contractors via API since it's currently not supported. * * * ## Scopes @@ -5432,21 +5180,20 @@ export const getV1EmploymentsEmploymentId = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const patchV1EmploymentsEmploymentId2 = < +export const putV2EmploymentsEmploymentIdContractDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PutV2EmploymentsEmploymentIdContractDetailsData, + ThrowOnError + >, ) => - (options.client ?? client).patch< - PatchV1EmploymentsEmploymentId2Responses, - PatchV1EmploymentsEmploymentId2Errors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdContractDetailsResponses, + PutV2EmploymentsEmploymentIdContractDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}', + url: '/v2/employments/{employment_id}/contract_details', ...options, headers: { 'Content-Type': 'application/json', @@ -5455,204 +5202,290 @@ export const patchV1EmploymentsEmploymentId2 = < }); /** - * Update employment - * - * Updates an employment. + * Show product prices in the company's desired currency * - * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. + * list product prices in the company's desired currency. + * the endpoint currently only returns the product prices for the EOR monthly product and the contractor products (Standard, Plus and COR). + * the product prices are then used to create a pricing plan for the company. * - * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. * - * **For `invited` employments:** You can update the work_email. + * ## Scopes * - * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. - * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. - * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. - * Currently, these amendments can only be done through the Remote UI. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * - * It is possible to update the `external_id` of the employment for all employment statuses. + */ +export const getV1CompaniesCompanyIdProductPrices = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdProductPricesResponses, + GetV1CompaniesCompanyIdProductPricesErrors, + ThrowOnError + >({ url: '/v1/companies/{company_id}/product-prices', ...options }); + +/** + * Create a new token for a company * - * ## Global Payroll Employees + * Creates new tokens for a given company + */ +export const postV1CompaniesCompanyIdCreateToken = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1CompaniesCompanyIdCreateTokenResponses, + PostV1CompaniesCompanyIdCreateTokenErrors, + ThrowOnError + >({ url: '/v1/companies/{company_id}/create-token', ...options }); + +/** + * Get Employment Profile * - * To update a Global Payment employment your input data must comply with the global payroll json schemas. + * Gets necessary information to perform the identity verification of an employee. * - * **For `active` employments:** In addition to the above list, you can update personal_details. * - * ## Direct Employees + * ## Scopes * - * To update an HRIS employment your input data must comply with the HRIS json schemas. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View identity verification (`identity_verification:read`) | Manage identity verification (`identity_verification:write`) | * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + */ +export const getV1IdentityVerificationEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1IdentityVerificationEmploymentIdResponses, + GetV1IdentityVerificationEmploymentIdErrors, + ThrowOnError + >({ url: '/v1/identity-verification/{employment_id}', ...options }); + +/** + * Download a receipt by id * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Download a receipt by id. * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * ## Scopes * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + */ +export const getV1ExpensesExpenseIdReceiptsReceiptId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1ExpensesExpenseIdReceiptsReceiptIdResponses, + GetV1ExpensesExpenseIdReceiptsReceiptIdErrors, + ThrowOnError + >({ url: '/v1/expenses/{expense_id}/receipts/{receipt_id}', ...options }); + +/** + * Preview the Employment Agreement for an employment * + * Returns a base64-encoded PDF preview of the auto-generated Employment Agreement for an employment. * - * Please contact Remote if you need to update contractors via API since it's currently not supported. + * The document is rendered as a draft (no signatures) and is not persisted. EA preview is only + * available for countries that have a published Employment Agreement automation template — see the + * `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const patchV1EmploymentsEmploymentId = < +export const getV1EmploymentsEmploymentIdEmploymentAgreementPreview = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData, + ThrowOnError + >, ) => - (options.client ?? client).put< - PatchV1EmploymentsEmploymentIdResponses, - PatchV1EmploymentsEmploymentIdErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}', + url: '/v1/employments/{employment_id}/employment-agreement/preview', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List users via SCIM v2.0 + * List groups via SCIM v2.0 * - * Retrieves a list of users for the authenticated company following SCIM 2.0 standard + * Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard */ -export const getV1ScimV2Users = ( - options?: Options, +export const getV1ScimV2Groups = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1ScimV2UsersResponses, - GetV1ScimV2UsersErrors, + GetV1ScimV2GroupsResponses, + GetV1ScimV2GroupsErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Users', + url: '/v1/scim/v2/Groups', ...options, }); /** - * List Company Payroll Calendar + * Show expense * - * List all payroll calendars for the company within the requested cycle. + * Shows a single expense record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1PayrollCalendarsCycle = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1ExpensesId = ( + options: Options, ) => (options.client ?? client).get< - GetV1PayrollCalendarsCycleResponses, - GetV1PayrollCalendarsCycleErrors, + GetV1ExpensesIdResponses, + GetV1ExpensesIdErrors, + ThrowOnError + >({ url: '/v1/expenses/{id}', ...options }); + +/** + * Update an expense + * + * Updates an expense + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * + */ +export const patchV1ExpensesId2 = ( + options: Options, +) => + (options.client ?? client).patch< + PatchV1ExpensesId2Responses, + PatchV1ExpensesId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payroll-calendars/{cycle}', + url: '/v1/expenses/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show Legal Entity Administrative details - * - * Show administrative details of legal entity for the authorized company specified in the request. + * Update an expense * + * Updates an expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * */ -export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = - ( - options: Options< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', - ...options, - }); +export const patchV1ExpensesId = ( + options: Options, +) => + (options.client ?? client).put< + PatchV1ExpensesIdResponses, + PatchV1ExpensesIdErrors, + ThrowOnError + >({ + url: '/v1/expenses/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Update Legal Entity Administrative details + * Update emergency contact * - * Update administrative details of legal entity for the authorized company specified in the request. + * Updates the employment's emergency contact details. + * + * This endpoint requires country-specific data. Query the **Show form schema** endpoint + * passing the country code and `emergency_contact_details` as path parameters to see + * the required fields for a given country. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = - ( - options: Options< - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, - ThrowOnError - >, - ) => - (options.client ?? client).put< - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); +export const putV2EmploymentsEmploymentIdEmergencyContact = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV2EmploymentsEmploymentIdEmergencyContactData, + ThrowOnError + >, +) => + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdEmergencyContactResponses, + PutV2EmploymentsEmploymentIdEmergencyContactErrors, + ThrowOnError + >({ + url: '/v2/employments/{employment_id}/emergency_contact', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Update contract details + * Creates a Benefit Renewal Request * - * Updates employment's contract details. + * Creates a Benefit Renewal Request for a specific Benefit Group. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + */ +export const postV1SandboxBenefitRenewalRequests = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1SandboxBenefitRenewalRequestsResponses, + PostV1SandboxBenefitRenewalRequestsErrors, + ThrowOnError + >({ + url: '/v1/sandbox/benefit-renewal-requests', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Get basic information + * + * Returns the employment's basic information. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -5668,7 +5501,7 @@ export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDeta * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * * * @@ -5676,302 +5509,251 @@ export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDeta * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdContractDetails = < +export const getV2EmploymentsEmploymentIdBasicInformation = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdContractDetailsData, + GetV2EmploymentsEmploymentIdBasicInformationData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdContractDetailsResponses, - PutV2EmploymentsEmploymentIdContractDetailsErrors, + (options.client ?? client).get< + GetV2EmploymentsEmploymentIdBasicInformationResponses, + GetV2EmploymentsEmploymentIdBasicInformationErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/contract_details', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v2/employments/{employment_id}/basic_information', ...options }); /** - * Show region fields + * Update basic information + * + * Updates employment's basic information. + * + * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * - * Returns required fields JSON Schema for a given region. These are required in order to calculate - * the cost of employment for the region. These fields are based on employer contributions that are associated - * with the region or any of it's parent regions. */ -export const getV1CostCalculatorRegionsSlugFields = < +export const putV2EmploymentsEmploymentIdBasicInformation = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PutV2EmploymentsEmploymentIdBasicInformationData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1CostCalculatorRegionsSlugFieldsResponses, - GetV1CostCalculatorRegionsSlugFieldsErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdBasicInformationResponses, + PutV2EmploymentsEmploymentIdBasicInformationErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cost-calculator/regions/{slug}/fields', + url: '/v2/employments/{employment_id}/basic_information', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show Offboarding + * List Leave Policies Summary * - * Shows an Offboarding request. + * List all the data related to time off for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1OffboardingsId = ( - options: Options, +export const getV1LeavePoliciesSummaryEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1OffboardingsIdResponses, - GetV1OffboardingsIdErrors, + GetV1LeavePoliciesSummaryEmploymentIdResponses, + GetV1LeavePoliciesSummaryEmploymentIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/offboardings/{id}', - ...options, - }); + >({ url: '/v1/leave-policies/summary/{employment_id}', ...options }); /** - * Get Employee Details for a Payroll Run + * Cancel Time Off * - * Gets the employee details for a payroll run + * Cancel a time off request that was already approved. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getV1PayrollRunsPayrollRunIdEmployeeDetails = < +export const postV1TimeoffTimeoffIdCancel = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1PayrollRunsPayrollRunIdEmployeeDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).get< - GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses, - GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors, + (options.client ?? client).post< + PostV1TimeoffTimeoffIdCancelResponses, + PostV1TimeoffTimeoffIdCancelErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payroll-runs/{payroll_run_id}/employee-details', + url: '/v1/timeoff/{timeoff_id}/cancel', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List bulk employment rows + * Get Help Center Article * - * Returns grouped bulk employment rows, including field-level validation errors in `errors`, row-level failures in `row_errors`, and submission-phase failures in `submission_errors`. If a row passes validation but later fails during Global Payroll activation, that failure is surfaced here after submission rather than in the initial create response. + * Get a help center article by its ID * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View help articles (`help_center_article:read`) | - | * */ -export const getV1BulkEmploymentJobsJobIdRows = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1HelpCenterArticlesId = ( + options: Options, ) => (options.client ?? client).get< - GetV1BulkEmploymentJobsJobIdRowsResponses, - GetV1BulkEmploymentJobsJobIdRowsErrors, + GetV1HelpCenterArticlesIdResponses, + GetV1HelpCenterArticlesIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/bulk-employment-jobs/{job_id}/rows', - ...options, - }); + >({ url: '/v1/help-center-articles/{id}', ...options }); /** - * Show employee emergency contact - * - * Returns the authenticated employee's emergency contact. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. + * Upload file * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` - * as the form name to discover the schema for a given country. + * Uploads a file associated with a specified employment. * + * Please contact api-support@remote.com to request access to this endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View emergency contacts (`emergency_contact:read`) | Manage emergency contacts (`emergency_contact:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV1EmployeeEmergencyContact = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const postV1Documents = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeEmergencyContactResponses, - GetV1EmployeeEmergencyContactErrors, + (options.client ?? client).post< + PostV1DocumentsResponses, + PostV1DocumentsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/emergency-contact', + ...formDataBodySerializer, + url: '/v1/documents', ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, }); /** - * Update employee emergency contact - * - * Updates the authenticated employee's emergency contact. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. The token must be an employee-role token - * (typically obtained via the OAuth2 assertion grant with subject - * `urn:remote-api:employee:employment:`). - * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` - * as the form name to discover the schema for a given country. + * Verify Employment Identity * + * Endpoint to confirms the employment profile is from the actual employee * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage emergency contacts (`emergency_contact:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | * */ -export const putV1EmployeeEmergencyContact = < +export const postV1IdentityVerificationEmploymentIdVerify = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + PostV1IdentityVerificationEmploymentIdVerifyData, + ThrowOnError + >, ) => - (options?.client ?? client).put< - PutV1EmployeeEmergencyContactResponses, - PutV1EmployeeEmergencyContactErrors, + (options.client ?? client).post< + PostV1IdentityVerificationEmploymentIdVerifyResponses, + PostV1IdentityVerificationEmploymentIdVerifyErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/emergency-contact', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, - }); + >({ url: '/v1/identity-verification/{employment_id}/verify', ...options }); /** - * Create employment - * - * Creates an employment without provisional_start_date validation. + * Lists custom fields definitions * - * This endpoint is only available in Sandbox and allows creating employments which - * `provisional_start_date` is in the past. This is especially helpful for: - * * Testing the Timeoff Balance endpoints - * * Testing the Offboarding endpoints - * * Testing features around probation periods + * Returns custom fields definitions * - * This endpoint will respond with a 404 outside of the Sandbox environment. + * ## Scopes * - * For creating an employment's parameters outside of testing purposes, use [this - * Employment create endpoint](#operation/post_create_employment) + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage custom fields (`custom_field:write`) | * */ -export const postV1SandboxEmployments = ( - options: Options, +export const getV1CustomFields = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1SandboxEmploymentsResponses, - PostV1SandboxEmploymentsErrors, + (options?.client ?? client).get< + GetV1CustomFieldsResponses, + GetV1CustomFieldsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/custom-fields', ...options }); /** - * Create contract eligibility - * - * Create contract eligibility for an employment. - * - * This will create a new contract eligibility for the employment. + * Create Custom Field Definition * + * Creates a new custom field definition. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage contract eligibility (`contract_eligibility:write`) | + * | Manage employments (`employments`) | View custom fields (`custom_field:read`) | Manage custom fields (`custom_field:write`) | * */ -export const postV1EmploymentsEmploymentIdContractEligibility = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1EmploymentsEmploymentIdContractEligibilityData, - ThrowOnError - >, +export const postV1CustomFields = ( + options: Options, ) => (options.client ?? client).post< - PostV1EmploymentsEmploymentIdContractEligibilityResponses, - PostV1EmploymentsEmploymentIdContractEligibilityErrors, + PostV1CustomFieldsResponses, + PostV1CustomFieldsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/contract-eligibility', + url: '/v1/custom-fields', ...options, headers: { 'Content-Type': 'application/json', @@ -5980,597 +5762,558 @@ export const postV1EmploymentsEmploymentIdContractEligibility = < }); /** - * List countries + * Approve risk reserve proof of payment * - * Returns a list of all countries that are supported by Remote API alphabetically ordered. - * The supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema. - * The countries present in the list are the ones where creating a company is allowed. + * Approves a risk reserve proof of payment without the intervention of a Remote admin. + * + * Triggers an `employment.cor_hiring.proof_of_payment_accepted` webhook event. + * + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + */ +export const postV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove = + ( + options: Options< + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses, + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors, + ThrowOnError + >({ + url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve', + ...options, + }); + +/** + * Create a Webhook Callback * + * Register a callback to be used for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const getV1Countries = ( - options: Options, +export const postV1WebhookCallbacks = ( + options: Options, ) => - (options.client ?? client).get< - GetV1CountriesResponses, - GetV1CountriesErrors, + (options.client ?? client).post< + PostV1WebhookCallbacksResponses, + PostV1WebhookCallbacksErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/countries', + url: '/v1/webhook-callbacks', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List payslip files for the authenticated employee + * List pre-onboarding document requirements for an employment + * + * Returns the list of pre-onboarding document requirements (e.g. master service agreements, + * individual labour agreements) that must be fulfilled before the given employment can be onboarded. * - * Returns a paginated list of payslip files belonging to the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | - * - */ -export const getV1EmployeePayslipFiles = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1EmployeePayslipFilesResponses, - GetV1EmployeePayslipFilesErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/payslip-files', - ...options, - }); - -/** - * Create a new token for a company + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * - * Creates new tokens for a given company */ -export const postV1CompaniesCompanyIdCreateToken = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).post< - PostV1CompaniesCompanyIdCreateTokenResponses, - PostV1CompaniesCompanyIdCreateTokenErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}/create-token', - ...options, - }); +export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirements = + ( + options: Options< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors, + ThrowOnError + >({ + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements', + ...options, + }); /** - * List Company Legal Entities - * - * Lists all active legal entities for the authorized company specified in the request. + * Show the SSO Configuration Details * + * Shows the SSO Configuration details for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | * */ -export const getV1CompaniesCompanyIdLegalEntities = < +export const getV1SsoConfigurationDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdLegalEntitiesResponses, - GetV1CompaniesCompanyIdLegalEntitiesErrors, + (options?.client ?? client).get< + GetV1SsoConfigurationDetailsResponses, + GetV1SsoConfigurationDetailsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/legal-entities', - ...options, - }); + >({ url: '/v1/sso-configuration/details', ...options }); /** - * Update personal details - * - * Updates employment's personal details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Sign a document for a contractor * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ## Scopes * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * + */ +export const postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign = + ( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors, + ThrowOnError + >({ + url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * List Pay Items * + * Lists pay items for a company with optional filtering by employment, date range, and pagination. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage payroll runs (`payroll`) | View pay items (`pay_item:read`) | Manage pay items (`pay_item:write`) | * */ -export const putV2EmploymentsEmploymentIdPersonalDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV2EmploymentsEmploymentIdPersonalDetailsData, - ThrowOnError - >, +export const getV1PayItems = ( + options?: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdPersonalDetailsResponses, - PutV2EmploymentsEmploymentIdPersonalDetailsErrors, + (options?.client ?? client).get< + GetV1PayItemsResponses, + GetV1PayItemsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/personal_details', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/pay-items', ...options }); /** - * Complete onboarding - * - * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status + * List users via SCIM v2.0 * - * @deprecated + * Retrieves a list of users for the authenticated company following SCIM 2.0 standard */ -export const postV1Ready = ( - options: Options, +export const getV1ScimV2Users = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1ReadyResponses, - PostV1ReadyErrors, + (options?.client ?? client).get< + GetV1ScimV2UsersResponses, + GetV1ScimV2UsersErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/ready', + url: '/v1/scim/v2/Users', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List Leave Policies Details + * Show Resignation * - * Describe the leave policies (custom or not) for a given employment + * Shows the details of a resignation with status `submitted`. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | View resignations (`resignation:read`) | Manage resignations (`resignation:write`) | * */ -export const getV1LeavePoliciesDetailsEmploymentId = < +export const getV1ResignationsOffboardingRequestId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1LeavePoliciesDetailsEmploymentIdResponses, - GetV1LeavePoliciesDetailsEmploymentIdErrors, + GetV1ResignationsOffboardingRequestIdResponses, + GetV1ResignationsOffboardingRequestIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/leave-policies/details/{employment_id}', - ...options, - }); + >({ url: '/v1/resignations/{offboarding_request_id}', ...options }); /** - * List Time Off Types - * - * Lists all time off types that can be used for the `timeoff_type` parameter. - * - * **Backward compatibility:** Calling this endpoint without the `type` query parameter returns the same response as before (time off types for full-time employments). Existing integrations do not need to change. - * - * Optionally, pass `type=contractor` to get time off types for contractor employments, or `type=full_time` for full-time employments (same as omitting the parameter). + * Get Billing Document Breakdown * + * Get billing document breakdown * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1TimeoffTypes = ( - options: Options, +export const getV1BillingDocumentsBillingDocumentIdBreakdown = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1BillingDocumentsBillingDocumentIdBreakdownData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1TimeoffTypesResponses, - GetV1TimeoffTypesErrors, + GetV1BillingDocumentsBillingDocumentIdBreakdownResponses, + GetV1BillingDocumentsBillingDocumentIdBreakdownErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/types', + url: '/v1/billing-documents/{billing_document_id}/breakdown', ...options, }); /** - * Creates a CSV cost estimation of employments + * Decline a time off cancellation request + * + * Decline a time off cancellation request. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * - * Creates CSV cost estimation of employments */ -export const postV1CostCalculatorEstimationCsv = < +export const postV1TimeoffTimeoffIdCancelRequestDecline = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + PostV1TimeoffTimeoffIdCancelRequestDeclineData, + ThrowOnError + >, ) => - (options?.client ?? client).post< - PostV1CostCalculatorEstimationCsvResponses, - PostV1CostCalculatorEstimationCsvErrors, + (options.client ?? client).post< + PostV1TimeoffTimeoffIdCancelRequestDeclineResponses, + PostV1TimeoffTimeoffIdCancelRequestDeclineErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cost-calculator/estimation-csv', + url: '/v1/timeoff/{timeoff_id}/cancel-request/decline', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Show employee personal details - * - * Returns the authenticated employee's personal details. - * - * This endpoint requires country-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` - * as the form name to discover the schema for a given country. - * + * List EOR Payroll Calendar * + * List all active payroll calendars for EOR. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | + * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | + * + */ +export const getV1PayrollCalendars = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1PayrollCalendarsResponses, + GetV1PayrollCalendarsErrors, + ThrowOnError + >({ url: '/v1/payroll-calendars', ...options }); + +/** + * Payroll processing details API resource * + * API to retrieve header details of a pay group */ -export const getV1EmployeePersonalDetails = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getV1WdGphPayDetail = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeePersonalDetailsResponses, - GetV1EmployeePersonalDetailsErrors, + (options.client ?? client).get< + GetV1WdGphPayDetailResponses, + GetV1WdGphPayDetailErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/personal-details', + url: '/v1/wd/gph/payDetail', ...options, }); /** - * Update employee personal details - * - * Updates the authenticated employee's personal details (date of birth, - * national ID, nationality, etc.). - * - * This endpoint requires country-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` - * as the form name to discover the schema for a given country. + * Show form schema * + * Returns the json schema of the `contract_amendment` form for a specific employment. + * This endpoint requires a company access token, as forms are dependent on certain + * properties of companies and their current employments. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const putV1EmployeePersonalDetails = < +export const getV1ContractAmendmentsSchema = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).put< - PutV1EmployeePersonalDetailsResponses, - PutV1EmployeePersonalDetailsErrors, + (options.client ?? client).get< + GetV1ContractAmendmentsSchemaResponses, + GetV1ContractAmendmentsSchemaErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/personal-details', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, - }); + >({ url: '/v1/contract-amendments/schema', ...options }); /** - * List groups via SCIM v2.0 + * Get a mock JSON Schema * - * Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard + * Get a mock JSON Schema for testing purposes */ -export const getV1ScimV2Groups = ( - options?: Options, +export const getV1TestSchema = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1ScimV2GroupsResponses, - GetV1ScimV2GroupsErrors, + GetV1TestSchemaResponses, + unknown, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Groups', - ...options, - }); + >({ url: '/v1/test-schema', ...options }); /** - * Create a contract document for a contractor + * Download the Employment Agreement for an employment * - * Create a contract document for a contractor. + * Downloads a PDF of the auto-generated Employment Agreement for an employment. + * + * The document is rendered as a draft (no signatures) and is not persisted. EA preview is only + * available for countries that have a published Employment Agreement automation template — see the + * `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdContractDocuments = < +export const getV1EmploymentsEmploymentIdEmploymentAgreementDownload = < ThrowOnError extends boolean = false, >( options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses, - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contract-documents', + url: '/v1/employments/{employment_id}/employment-agreement/download', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Trigger a Webhook + * Update Time Off as Employee * - * Triggers a callback previously registered for webhooks. Use this endpoint to - * emit a webhook for testing in the Sandbox environment. This endpoint will - * respond with a 404 outside of the Sandbox environment. + * Updates a Time Off record as Employee + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1SandboxWebhookCallbacksTrigger = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const patchV1EmployeeTimeoffId2 = ( + options: Options, ) => - (options?.client ?? client).post< - PostV1SandboxWebhookCallbacksTriggerResponses, - PostV1SandboxWebhookCallbacksTriggerErrors, + (options.client ?? client).patch< + PatchV1EmployeeTimeoffId2Responses, + PatchV1EmployeeTimeoffId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/webhook-callbacks/trigger', + url: '/v1/employee/timeoff/{id}', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Download payslip in the PDF format - * - * Given a Payslip ID, downloads a payslip. - * It is important to note that each country has a different payslip format and they are not authored by Remote. + * Update Time Off as Employee * + * Updates a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getV1PayslipsPayslipIdPdf = ( - options: Options, +export const patchV1EmployeeTimeoffId = ( + options: Options, +) => + (options.client ?? client).put< + PatchV1EmployeeTimeoffIdResponses, + PatchV1EmployeeTimeoffIdErrors, + ThrowOnError + >({ + url: '/v1/employee/timeoff/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Get group by ID via SCIM v2.0 + * + * Retrieves a single group (department) for the authenticated company by group ID + */ +export const getV1ScimV2GroupsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1PayslipsPayslipIdPdfResponses, - GetV1PayslipsPayslipIdPdfErrors, + GetV1ScimV2GroupsIdResponses, + GetV1ScimV2GroupsIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payslips/{payslip_id}/pdf', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/scim/v2/Groups/{id}', ...options, }); /** - * Convert currency using dynamic rates + * Show legal entity administrative details form schema + * + * Returns the json schema of a supported form. Possible form names are: + * ``` + * - administrative_details + * ``` + * + * Most forms require a company access token, as they are dependent on certain + * properties of companies and their current employments. + * * - * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const postV1CurrencyConverterEffective = < +export const getV1CountriesCountryCodeLegalEntityFormsForm = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1CountriesCountryCodeLegalEntityFormsFormData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1CurrencyConverterEffectiveResponses, - PostV1CurrencyConverterEffectiveErrors, + (options.client ?? client).get< + GetV1CountriesCountryCodeLegalEntityFormsFormResponses, + GetV1CountriesCountryCodeLegalEntityFormsFormErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/currency-converter/effective', + url: '/v1/countries/{country_code}/legal_entity_forms/{form}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show Time Off + * Get employment contract pending changes * - * Shows a single Time Off record + * Get all the pending changes (waiting for aproval or signature) for the employment contract. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | View contracts (`contract:read`) | - | * */ -export const getV1TimeoffId = ( - options: Options, +export const getV1EmploymentContractsEmploymentIdPendingChanges = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentContractsEmploymentIdPendingChangesData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1TimeoffIdResponses, - GetV1TimeoffIdErrors, + GetV1EmploymentContractsEmploymentIdPendingChangesResponses, + GetV1EmploymentContractsEmploymentIdPendingChangesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{id}', + url: '/v1/employment-contracts/{employment_id}/pending-changes', ...options, }); /** - * Update Time Off + * Show Offboarding (v2) * - * Updates a Time Off record. - * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. - * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. + * Returns a single offboarding by its ID. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const patchV1TimeoffId2 = ( - options: Options, +export const getV2OffboardingsId = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1TimeoffId2Responses, - PatchV1TimeoffId2Errors, + (options.client ?? client).get< + GetV2OffboardingsIdResponses, + GetV2OffboardingsIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v2/offboardings/{id}', ...options }); /** - * Update Time Off - * - * Updates a Time Off record. - * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. - * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. - * - * - * ## Scopes + * Report SDK errors * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * Receives error telemetry from the frontend SDK. + * Errors are logged to observability backend for monitoring and debugging. * */ -export const patchV1TimeoffId = ( - options: Options, +export const postV1SdkTelemetryErrors = ( + options: Options, ) => - (options.client ?? client).put< - PatchV1TimeoffIdResponses, - PatchV1TimeoffIdErrors, + (options.client ?? client).post< + PostV1SdkTelemetryErrorsResponses, + PostV1SdkTelemetryErrorsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{id}', + url: '/v1/sdk/telemetry-errors', ...options, headers: { 'Content-Type': 'application/json', @@ -6579,213 +6322,181 @@ export const patchV1TimeoffId = ( }); /** - * Decline Time Off + * Get Company Compliance Profile + * + * Returns the KYB and credit risk status for the company's default legal entity. * - * Decline a time off request. Please note that only time off requests on the `requested` status can be declined. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const postV1TimeoffTimeoffIdDecline = < +export const getV1CompaniesCompanyIdComplianceProfile = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdDeclineResponses, - PostV1TimeoffTimeoffIdDeclineErrors, + (options.client ?? client).get< + GetV1CompaniesCompanyIdComplianceProfileResponses, + GetV1CompaniesCompanyIdComplianceProfileErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{timeoff_id}/decline', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/companies/{company_id}/compliance-profile', ...options }); /** - * Automatable Contract Amendment + * Show payslip * - * Check if a contract amendment request is automatable. - * If the contract amendment request is automatable, then after submission, it will instantly amend the employee's contract - * and send them an updated document. + * Given an ID, shows a payslip. * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. + * Please contact api-support@remote.com to request access to this endpoint. * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * ## Scopes * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + */ +export const getV1PayslipsId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1PayslipsIdResponses, + GetV1PayslipsIdErrors, + ThrowOnError + >({ url: '/v1/payslips/{id}', ...options }); + +/** + * Approve a time off cancellation request * + * Approve a time off cancellation request. + * In order to approve a time off cancellation request, the timeoff status must be `cancel_requested`. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1ContractAmendmentsAutomatable = < +export const postV1TimeoffTimeoffIdCancelRequestApprove = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1TimeoffTimeoffIdCancelRequestApproveData, + ThrowOnError + >, ) => (options.client ?? client).post< - PostV1ContractAmendmentsAutomatableResponses, - PostV1ContractAmendmentsAutomatableErrors, + PostV1TimeoffTimeoffIdCancelRequestApproveResponses, + PostV1TimeoffTimeoffIdCancelRequestApproveErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contract-amendments/automatable', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/timeoff/{timeoff_id}/cancel-request/approve', ...options }); /** - * Approve Time Off + * List Webhook Events * - * Approve a time off request. + * List all webhook events * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | * */ -export const postV1TimeoffTimeoffIdApprove = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1WebhookEvents = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdApproveResponses, - PostV1TimeoffTimeoffIdApproveErrors, + (options?.client ?? client).get< + GetV1WebhookEventsResponses, + GetV1WebhookEventsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{timeoff_id}/approve', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/webhook-events', ...options }); /** - * List employment files + * List Time Off Types * - * Lists files associated with a specific employment. + * Lists all time off types that can be used for the `timeoff_type` parameter. * - * Supports filtering by file type and sub_type. + * **Backward compatibility:** Calling this endpoint without the `type` query parameter returns the same response as before (time off types for full-time employments). Existing integrations do not need to change. + * + * Optionally, pass `type=contractor` to get time off types for contractor employments, or `type=full_time` for full-time employments (same as omitting the parameter). * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1EmploymentsEmploymentIdFiles = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1TimeoffTypes = ( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdFilesResponses, - GetV1EmploymentsEmploymentIdFilesErrors, + GetV1TimeoffTypesResponses, + GetV1TimeoffTypesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/files', - ...options, - }); + >({ url: '/v1/timeoff/types', ...options }); /** - * Lists custom fields definitions + * List Company Legal Entities + * + * Lists all active legal entities for the authorized company specified in the request. * - * Returns custom fields definitions * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom fields (`custom_field:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const getV1CustomFields = ( - options?: Options, +export const getV1CompaniesCompanyIdLegalEntities = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetV1CustomFieldsResponses, - GetV1CustomFieldsErrors, + (options.client ?? client).get< + GetV1CompaniesCompanyIdLegalEntitiesResponses, + GetV1CompaniesCompanyIdLegalEntitiesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/custom-fields', - ...options, - }); + >({ url: '/v1/companies/{company_id}/legal-entities', ...options }); /** - * Create Custom Field Definition + * Create contract eligibility + * + * Create contract eligibility for an employment. + * + * This will create a new contract eligibility for the employment. * - * Creates a new custom field definition. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View custom fields (`custom_field:read`) | Manage custom fields (`custom_field:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage contract eligibility (`contract_eligibility:write`) | * */ -export const postV1CustomFields = ( - options: Options, +export const postV1EmploymentsEmploymentIdContractEligibility = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1EmploymentsEmploymentIdContractEligibilityData, + ThrowOnError + >, ) => (options.client ?? client).post< - PostV1CustomFieldsResponses, - PostV1CustomFieldsErrors, + PostV1EmploymentsEmploymentIdContractEligibilityResponses, + PostV1EmploymentsEmploymentIdContractEligibilityErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/custom-fields', + url: '/v1/employments/{employment_id}/contract-eligibility', ...options, headers: { 'Content-Type': 'application/json', @@ -6794,95 +6505,88 @@ export const postV1CustomFields = ( }); /** - * List company supported currencies + * List all currencies for the contractor + * + * The currencies are listed in the following order: + * 1. billing currency of the company + * 2. currencies of contractor’s existing withdrawal methods + * 3. currency of the contractor’s country + * 4. the rest, alphabetical. * - * List company supported currencies * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View company currencies (`company_currencies:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1CompanyCurrencies = ( - options?: Options, +export const getV1ContractorsEmploymentsEmploymentIdContractorCurrencies = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1CompanyCurrenciesResponses, - GetV1CompanyCurrenciesErrors, + (options.client ?? client).get< + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses, + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-currencies', + url: '/v1/contractors/employments/{employment_id}/contractor-currencies', ...options, }); /** - * Update employment + * List payslips * - * Updates an employment. Use this endpoint to: - * - modify employment states for testing - * - Backdate employment start dates + * Lists all payslips belonging to a company. Can also filter for a single employment belonging + * to that company. * - * This endpoint will respond with a 404 outside of the Sandbox environment. * - * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | * */ -export const patchV1SandboxEmploymentsEmploymentId2 = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1Payslips = ( + options?: Options, ) => - (options.client ?? client).patch< - PatchV1SandboxEmploymentsEmploymentId2Responses, - PatchV1SandboxEmploymentsEmploymentId2Errors, + (options?.client ?? client).get< + GetV1PayslipsResponses, + GetV1PayslipsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments/{employment_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/payslips', ...options }); /** - * Update employment + * Create employment * - * Updates an employment. Use this endpoint to: - * - modify employment states for testing - * - Backdate employment start dates + * Creates an employment without provisional_start_date validation. * - * This endpoint will respond with a 404 outside of the Sandbox environment. + * This endpoint is only available in Sandbox and allows creating employments which + * `provisional_start_date` is in the past. This is especially helpful for: + * * Testing the Timeoff Balance endpoints + * * Testing the Offboarding endpoints + * * Testing features around probation periods * - * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). + * This endpoint will respond with a 404 outside of the Sandbox environment. * - */ -export const patchV1SandboxEmploymentsEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, + * For creating an employment's parameters outside of testing purposes, use [this + * Employment create endpoint](#operation/post_create_employment) + * + */ +export const postV1SandboxEmployments = ( + options: Options, ) => - (options.client ?? client).put< - PatchV1SandboxEmploymentsEmploymentIdResponses, - PatchV1SandboxEmploymentsEmploymentIdErrors, + (options.client ?? client).post< + PostV1SandboxEmploymentsResponses, + PostV1SandboxEmploymentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments/{employment_id}', + url: '/v1/sandbox/employments', ...options, headers: { 'Content-Type': 'application/json', @@ -6891,153 +6595,130 @@ export const patchV1SandboxEmploymentsEmploymentId = < }); /** - * Get employment contract pending changes + * Show employee emergency contact + * + * Returns the authenticated employee's emergency contact. + * + * The employment is derived from the access token's subject — there is no + * employment id in the path. + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` + * as the form name to discover the schema for a given country. + * * - * Get all the pending changes (waiting for aproval or signature) for the employment contract. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contracts (`contract:read`) | - | + * | Manage employments (`employments`) | View emergency contacts (`emergency_contact:read`) | Manage emergency contacts (`emergency_contact:write`) | * */ -export const getV1EmploymentContractsEmploymentIdPendingChanges = < +export const getV1EmployeeEmergencyContact = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1EmploymentContractsEmploymentIdPendingChangesData, - ThrowOnError - >, + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentContractsEmploymentIdPendingChangesResponses, - GetV1EmploymentContractsEmploymentIdPendingChangesErrors, + (options?.client ?? client).get< + GetV1EmployeeEmergencyContactResponses, + GetV1EmployeeEmergencyContactErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employment-contracts/{employment_id}/pending-changes', - ...options, - }); + >({ url: '/v1/employee/emergency-contact', ...options }); /** - * Show Resignation + * Update employee emergency contact + * + * Updates the authenticated employee's emergency contact. + * + * The employment is derived from the access token's subject — there is no + * employment id in the path. The token must be an employee-role token + * (typically obtained via the OAuth2 assertion grant with subject + * `urn:remote-api:employee:employment:`). + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` + * as the form name to discover the schema for a given country. + * * - * Shows the details of a resignation with status `submitted`. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View resignations (`resignation:read`) | Manage resignations (`resignation:write`) | + * | Manage employments (`employments`) | - | Manage emergency contacts (`emergency_contact:write`) | * */ -export const getV1ResignationsOffboardingRequestId = < +export const putV1EmployeeEmergencyContact = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1ResignationsOffboardingRequestIdResponses, - GetV1ResignationsOffboardingRequestIdErrors, + (options?.client ?? client).put< + PutV1EmployeeEmergencyContactResponses, + PutV1EmployeeEmergencyContactErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/resignations/{offboarding_request_id}', + url: '/v1/employee/emergency-contact', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Upload file - * - * Uploads a file associated with a specified employment. + * Show Company Payroll Runs * - * Please contact api-support@remote.com to request access to this endpoint. + * Given an ID, shows a payroll run. + * `employee_details` field is deprecated in favour of the `employee_details` endpoint and will be removed in the future. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const postV1Documents = ( - options: Options, +export const getV1PayrollRunsPayrollRunId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostV1DocumentsResponses, - PostV1DocumentsErrors, + (options.client ?? client).get< + GetV1PayrollRunsPayrollRunIdResponses, + GetV1PayrollRunsPayrollRunIdErrors, ThrowOnError - >({ - ...formDataBodySerializer, - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/documents', - ...options, - headers: { - 'Content-Type': null, - ...options.headers, - }, - }); + >({ url: '/v1/payroll-runs/{payroll_run_id}', ...options }); /** - * Invite employment - * - * Invite an employment to start the self-enrollment. - * - * Requirements for the invitation to succeed: - * - * * Employment needs to have the following JSON Schema forms filled: `contract_details` and `pricing_plan_details` - * * `provisional_start_date` must consider the minimum onboarding time of the employment's country - * - * If there are validations errors, they are returned with a Conflict HTTP Status (409) and a descriptive message. - * HTTP Status OK (200) is returned in case of success. - * - * In case of the following error message: - * `"Please reselect benefits - the previous selection is no longer available"` - * it means that the benefit options have been updated and the employment's benefits are no longer compliant with the new schema. - * - * In this case, reselect benefits by updating `contract_details` JSON Schema form. + * Show Offboarding * + * Shows an Offboarding request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const postV1EmploymentsEmploymentIdInvite = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1OffboardingsId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1EmploymentsEmploymentIdInviteResponses, - PostV1EmploymentsEmploymentIdInviteErrors, + (options.client ?? client).get< + GetV1OffboardingsIdResponses, + GetV1OffboardingsIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/invite', - ...options, - }); + >({ url: '/v1/offboardings/{id}', ...options }); /** - * Show expense + * List expenses * - * Shows a single expense record + * Lists all expenses records * * ## Scopes * @@ -7046,26 +6727,19 @@ export const postV1EmploymentsEmploymentIdInvite = < * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1ExpensesId = ( - options: Options, +export const getV1Expenses = ( + options: Options, ) => (options.client ?? client).get< - GetV1ExpensesIdResponses, - GetV1ExpensesIdErrors, + GetV1ExpensesResponses, + GetV1ExpensesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/{id}', - ...options, - }); + >({ url: '/v1/expenses', ...options }); /** - * Update an expense + * Create expense * - * Updates an expense + * Creates an **approved** expense * * ## Scopes * @@ -7074,19 +6748,15 @@ export const getV1ExpensesId = ( * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * */ -export const patchV1ExpensesId2 = ( - options: Options, +export const postV1Expenses = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1ExpensesId2Responses, - PatchV1ExpensesId2Errors, + (options.client ?? client).post< + PostV1ExpensesResponses, + PostV1ExpensesErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/{id}', + url: '/v1/expenses', ...options, headers: { 'Content-Type': 'application/json', @@ -7095,100 +6765,85 @@ export const patchV1ExpensesId2 = ( }); /** - * Update an expense + * List payslip files for the authenticated employee * - * Updates an expense + * Returns a paginated list of payslip files belonging to the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | * */ -export const patchV1ExpensesId = ( - options: Options, +export const getV1EmployeePayslipFiles = ( + options?: Options, ) => - (options.client ?? client).put< - PatchV1ExpensesIdResponses, - PatchV1ExpensesIdErrors, + (options?.client ?? client).get< + GetV1EmployeePayslipFilesResponses, + GetV1EmployeePayslipFilesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/employee/payslip-files', ...options }); /** - * Show Benefit Renewal Request + * Invite employment + * + * Invite an employment to start the self-enrollment. + * + * Requirements for the invitation to succeed: + * + * * Employment needs to have the following JSON Schema forms filled: `contract_details` and `pricing_plan_details` + * * `provisional_start_date` must consider the minimum onboarding time of the employment's country + * + * If there are validations errors, they are returned with a Conflict HTTP Status (409) and a descriptive message. + * HTTP Status OK (200) is returned in case of success. + * + * In case of the following error message: + * `"Please reselect benefits - the previous selection is no longer available"` + * it means that the benefit options have been updated and the employment's benefits are no longer compliant with the new schema. + * + * In this case, reselect benefits by updating `contract_details` JSON Schema form. * - * Show Benefit Renewal Request details. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1BenefitRenewalRequestsBenefitRenewalRequestId = < +export const postV1EmploymentsEmploymentIdInvite = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).get< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, + (options.client ?? client).post< + PostV1EmploymentsEmploymentIdInviteResponses, + PostV1EmploymentsEmploymentIdInviteErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', - ...options, - }); + >({ url: '/v1/employments/{employment_id}/invite', ...options }); /** - * Updates a Benefit Renewal Request Response + * Create Probation Extension * - * Updates a Benefit Renewal Request with the given response. + * Create a probation extension request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | * */ -export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData, - ThrowOnError - >, +export const postV1ProbationExtensions = ( + options: Options, ) => (options.client ?? client).post< - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, + PostV1ProbationExtensionsResponses, + PostV1ProbationExtensionsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', + url: '/v1/probation-extensions', ...options, headers: { 'Content-Type': 'application/json', @@ -7197,9 +6852,11 @@ export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < }); /** - * Show onboarding steps for an employment + * List contractor of record (COR) termination requests + * + * Lists Contractor of Record termination requests for your company, + * optionally filtered by employment and status. * - * Returns onboarding steps and substeps in a hierarchical, ordered structure. * * ## Scopes * @@ -7208,305 +6865,283 @@ export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdOnboardingSteps = < +export const getV1ContractorsCorTerminationRequests = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1EmploymentsEmploymentIdOnboardingStepsData, - ThrowOnError - >, + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdOnboardingStepsResponses, - GetV1EmploymentsEmploymentIdOnboardingStepsErrors, + (options?.client ?? client).get< + GetV1ContractorsCorTerminationRequestsResponses, + GetV1ContractorsCorTerminationRequestsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/onboarding-steps', - ...options, - }); + >({ url: '/v1/contractors/cor-termination-requests', ...options }); /** - * Get employee token identity + * Approve Contract Amendment + * + * Approves a contract amendment request without the intervention of a Remote admin. + * Approvals done via this endpoint are effective immediately, + * regardless of the effective date entered on the contract amendment creation. + * + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * - * Returns user and company information for the authenticated employee. */ -export const getV1EmployeeCurrent = ( - options?: Options, +export const putV1SandboxContractAmendmentsContractAmendmentRequestIdApprove = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeeCurrentResponses, - GetV1EmployeeCurrentErrors, + (options.client ?? client).put< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses, + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/current', + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve', ...options, }); /** - * List company structure nodes + * Get Onboarding Reserves Status for Employment * - * Shows all the company structure nodes of an employment. + * Returns the onboarding reserves status for a specific employment. + * + * The status is the same as the credit risk status but takes the onboarding reserves policies into account. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View company structure (`company_structure:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdCompanyStructureNodes = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdCompanyStructureNodesData, - ThrowOnError - >, -) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses, - GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/company-structure-nodes', - ...options, - }); +export const getV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus = + ( + options: Options< + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses, + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors, + ThrowOnError + >({ + url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status', + ...options, + }); /** - * List custom field value for an employment + * Show Contractor Invoice * - * Returns a list of custom field values for a given employment + * Shows a single Contractor Invoice record. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1EmploymentsEmploymentIdCustomFields = < +export const getV1ContractorInvoicesId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1ContractorInvoicesIdResponses, + GetV1ContractorInvoicesIdErrors, + ThrowOnError + >({ url: '/v1/contractor-invoices/{id}', ...options }); + +/** + * Payroll Feature API resource + * + * API to retrieve feature properties from the vendor system + */ +export const getV1WdGphPayProcessingFeature = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, +) => + (options?.client ?? client).get< + GetV1WdGphPayProcessingFeatureResponses, + GetV1WdGphPayProcessingFeatureErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/wd/gph/payProcessingFeature', + ...options, + }); + +/** + * Payroll processing progress API resource + * + * API to retrieve the processing stages of a pay group + */ +export const getV1WdGphPayProgress = ( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdCustomFieldsResponses, - GetV1EmploymentsEmploymentIdCustomFieldsErrors, + GetV1WdGphPayProgressResponses, + GetV1WdGphPayProgressErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/custom-fields', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/wd/gph/payProgress', ...options, }); /** - * Validate resignation request + * List company supported currencies * - * Validates a resignation employment request + * List company supported currencies * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage resignations (`resignation:write`) | + * | Manage company resources (`company_admin`) | View company currencies (`company_currencies:read`) | - | * */ -export const putV1ResignationsOffboardingRequestIdValidate = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV1ResignationsOffboardingRequestIdValidateData, - ThrowOnError - >, +export const getV1CompanyCurrencies = ( + options?: Options, ) => - (options.client ?? client).put< - PutV1ResignationsOffboardingRequestIdValidateResponses, - PutV1ResignationsOffboardingRequestIdValidateErrors, + (options?.client ?? client).get< + GetV1CompanyCurrenciesResponses, + GetV1CompanyCurrenciesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/resignations/{offboarding_request_id}/validate', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/company-currencies', ...options }); /** - * Reassign default legal entity + * Get a employment benefit offers JSON schema * - * Set a different legal entity as the company's default entity. + * ## Scopes * - * The default entity is used when creating new employments without an explicit entity. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const putV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId = < +export const getV1EmploymentsEmploymentIdBenefitOffersSchema = < ThrowOnError extends boolean = false, >( options: Options< - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData, + GetV1EmploymentsEmploymentIdBenefitOffersSchemaData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses, - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses, + GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}', + url: '/v1/employments/{employment_id}/benefit-offers/schema', ...options, }); /** - * List Webhook Callbacks + * List Contractor Invoice Schedules * - * List callbacks for a given company + * Lists Contractor Invoice Schedule records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const getV1CompaniesCompanyIdWebhookCallbacks = < +export const getV1ContractorInvoiceSchedules = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdWebhookCallbacksResponses, - GetV1CompaniesCompanyIdWebhookCallbacksErrors, + (options?.client ?? client).get< + GetV1ContractorInvoiceSchedulesResponses, + GetV1ContractorInvoiceSchedulesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/webhook-callbacks', - ...options, - }); + >({ url: '/v1/contractor-invoice-schedules', ...options }); /** - * Show contractor eligibility and COR-supported countries for legal entity + * Create Contractor Invoice Schedules * - * Returns which contractor products (standard, plus, cor) the legal entity is eligible to use, - * and the list of country codes where COR is supported for this legal entity. - * COR-supported countries exclude sanctioned and signup-prevented countries and apply entity rules (same-country, local-to-local). - * When the legal entity is not COR-eligible, `cor_supported_country_codes` is an empty list. + * Creates many invoice schedules records. + * It's supposed to return two lists: one containing created records, and another one containing the schedules that failed to be inserted. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility = - ( - options: Options< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses, - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility', - ...options, - }); +export const postV1ContractorInvoiceSchedules = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1ContractorInvoiceSchedulesResponses, + PostV1ContractorInvoiceSchedulesErrors, + ThrowOnError + >({ + url: '/v1/contractor-invoice-schedules', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Show a custom field value + * Show work authorization request * - * Returns a custom field value for a given employment + * Show a single work authorization request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | + * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | * */ -export const getV1CustomFieldsCustomFieldIdValuesEmploymentId = < +export const getV1WorkAuthorizationRequestsId = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, + GetV1WorkAuthorizationRequestsIdResponses, + GetV1WorkAuthorizationRequestsIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', - ...options, - }); + >({ url: '/v1/work-authorization-requests/{id}', ...options }); /** - * Update a Custom Field Value + * Update work authorization request * - * Updates a custom field value for a given employment. + * Updates a work authorization request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | + * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | * */ -export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2 = < +export const patchV1WorkAuthorizationRequestsId2 = < ThrowOnError extends boolean = false, >( - options: Options< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).patch< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses, - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors, + PatchV1WorkAuthorizationRequestsId2Responses, + PatchV1WorkAuthorizationRequestsId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + url: '/v1/work-authorization-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7515,35 +7150,28 @@ export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2 = < }); /** - * Update a Custom Field Value + * Update work authorization request * - * Updates a custom field value for a given employment. + * Updates a work authorization request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | + * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | * */ -export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId = < +export const patchV1WorkAuthorizationRequestsId = < ThrowOnError extends boolean = false, >( - options: Options< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).put< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, + PatchV1WorkAuthorizationRequestsIdResponses, + PatchV1WorkAuthorizationRequestsIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + url: '/v1/work-authorization-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7552,263 +7180,192 @@ export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId = < }); /** - * Show a contractor of record (COR) termination request - * - * Retrieves a Contractor of Record termination request by ID. + * Decline Time Off * + * Decline a time off request. Please note that only time off requests on the `requested` status can be declined. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId = - ( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses, - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}', - ...options, - }); +export const postV1TimeoffTimeoffIdDecline = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1TimeoffTimeoffIdDeclineResponses, + PostV1TimeoffTimeoffIdDeclineErrors, + ThrowOnError + >({ + url: '/v1/timeoff/{timeoff_id}/decline', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Terminate contractor of record employment + * Get eligibility questionnaire schema * - * **Deprecated.** Use `POST /contractors/employments/{employment_id}/cor-termination-requests` instead. + * Returns the JSON schema for the eligibility questionnaire by type. * - * Initiates a termination request for a Contractor of Record employment. - * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. - * Currently, only Contractor of Record employments can be terminated. + * The schema defines the structure and validation rules for the questionnaire responses. + * Supports versioning to allow for schema evolution while maintaining backwards compatibility. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | - * + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * - * @deprecated */ -export const postV1ContractorsEmploymentsEmploymentIdTerminateCorEmployment = < +export const getV1ContractorsSchemasEligibilityQuestionnaire = < ThrowOnError extends boolean = false, >( options: Options< - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData, + GetV1ContractorsSchemasEligibilityQuestionnaireData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses, - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors, + (options.client ?? client).get< + GetV1ContractorsSchemasEligibilityQuestionnaireResponses, + GetV1ContractorsSchemasEligibilityQuestionnaireErrors, + ThrowOnError + >({ url: '/v1/contractors/schemas/eligibility-questionnaire', ...options }); + +/** + * Token + * + * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows + */ +export const postAuthOauth2Token = ( + options?: Options, +) => + (options?.client ?? client).post< + PostAuthOauth2TokenResponses, + PostAuthOauth2TokenErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment', + url: '/oauth2/token', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Sign a document for a contractor + * Delete contractor of record subscription intent + * + * Deletes Contractor of Record subscription intent. + * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign = +export const deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = ( options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData, + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses, - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors, + (options.client ?? client).delete< + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign', + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get token identity - * - * Shows information about the entities that can be controlled by the current auth token. - * - */ -export const getV1IdentityCurrent = ( - options: Options, -) => - (options.client ?? client).get< - GetV1IdentityCurrentResponses, - GetV1IdentityCurrentErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/identity/current', - ...options, - }); - -/** - * Delete an Incentive - * - * Delete an incentive. - * - * `one_time` incentives that have the following status **CANNOT** be deleted: - * * `processing` - * * `paid` - * - * - * ## Scopes + * Create contractor of record subscription intent * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * Assigns Contractor of Record subscription in pending state to employment. + * Once risk analysis is performed, subscription may start upon contract signing, + * or might be denied. * - */ -export const deleteV1IncentivesId = ( - options: Options, -) => - (options.client ?? client).delete< - DeleteV1IncentivesIdResponses, - DeleteV1IncentivesIdErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/{id}', - ...options, - }); - -/** - * Show Incentive + * Requires a non-blocking eligibility questionnaire to be submitted before creating the subscription intent. * - * Show an Incentive's details * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1IncentivesId = ( - options: Options, -) => - (options.client ?? client).get< - GetV1IncentivesIdResponses, - GetV1IncentivesIdErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/{id}', - ...options, - }); +export const postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = + ( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, + ThrowOnError + >({ + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', + ...options, + }); /** - * Update Incentive - * - * Updates an Incentive. - * - * Incentives use the currency of the employment specified provided in the `employment_id` field. - * - * The API doesn't support updating paid incentives. + * Update personal details * + * Updates employment's personal details. * - * ## Scopes + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. * - */ -export const patchV1IncentivesId2 = ( - options: Options, -) => - (options.client ?? client).patch< - PatchV1IncentivesId2Responses, - PatchV1IncentivesId2Errors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/{id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * Update Incentive + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * Updates an Incentive. + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * - * The API doesn't support updating paid incentives. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const patchV1IncentivesId = ( - options: Options, +export const putV2EmploymentsEmploymentIdPersonalDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV2EmploymentsEmploymentIdPersonalDetailsData, + ThrowOnError + >, ) => (options.client ?? client).put< - PatchV1IncentivesIdResponses, - PatchV1IncentivesIdErrors, + PutV2EmploymentsEmploymentIdPersonalDetailsResponses, + PutV2EmploymentsEmploymentIdPersonalDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/incentives/{id}', + url: '/v2/employments/{employment_id}/personal_details', ...options, headers: { 'Content-Type': 'application/json', @@ -7817,460 +7374,306 @@ export const patchV1IncentivesId = ( }); /** - * Get eligibility questionnaire schema - * - * Returns the JSON schema for the eligibility questionnaire by type. + * Find or create a pre-onboarding document for an employment * - * The schema defines the structure and validation rules for the questionnaire responses. - * Supports versioning to allow for schema evolution while maintaining backwards compatibility. + * Finds an existing unsigned pre-onboarding document for the given requirement, or creates a new one. + * Idempotent: repeated calls with the same `pre_onboarding_document_requirement_slug` return the same + * document until it is signed. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV1ContractorsSchemasEligibilityQuestionnaire = < +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocuments = < ThrowOnError extends boolean = false, >( options: Options< - GetV1ContractorsSchemasEligibilityQuestionnaireData, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV1ContractorsSchemasEligibilityQuestionnaireResponses, - GetV1ContractorsSchemasEligibilityQuestionnaireErrors, + (options.client ?? client).post< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/schemas/eligibility-questionnaire', + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List work authorization requests + * Show Contract Amendment * - * List work authorization requests. + * Show a single Contract Amendment request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const getV1WorkAuthorizationRequests = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getV1ContractAmendmentsId = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1WorkAuthorizationRequestsResponses, - GetV1WorkAuthorizationRequestsErrors, + (options.client ?? client).get< + GetV1ContractAmendmentsIdResponses, + GetV1ContractAmendmentsIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/work-authorization-requests', - ...options, - }); + >({ url: '/v1/contract-amendments/{id}', ...options }); /** - * Show bulk employment job + * Decline Identity Verification + * + * Declines the identity verification of an employee. + * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | * */ -export const getV1BulkEmploymentJobsJobId = < +export const postV1IdentityVerificationEmploymentIdDecline = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1IdentityVerificationEmploymentIdDeclineData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1BulkEmploymentJobsJobIdResponses, - GetV1BulkEmploymentJobsJobIdErrors, + (options.client ?? client).post< + PostV1IdentityVerificationEmploymentIdDeclineResponses, + PostV1IdentityVerificationEmploymentIdDeclineErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/bulk-employment-jobs/{job_id}', - ...options, - }); + >({ url: '/v1/identity-verification/{employment_id}/decline', ...options }); /** - * List Pay Items + * List expense categories for the authenticated employee * - * Lists pay items for a company with optional filtering by employment, date range, and pagination. + * Returns the flat list of expense categories applicable to the current employee. Only active categories are returned, filtered by the employee's country / legal-entity visibility rules. Leaf nodes have `is_selectable: true`; parent nodes are excluded unless `include_parents=true`. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View pay items (`pay_item:read`) | Manage pay items (`pay_item:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1PayItems = ( - options?: Options, +export const getV1EmployeeExpenseCategories = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => (options?.client ?? client).get< - GetV1PayItemsResponses, - GetV1PayItemsErrors, + GetV1EmployeeExpenseCategoriesResponses, + GetV1EmployeeExpenseCategoriesErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/pay-items', - ...options, - }); + >({ url: '/v1/employee/expense-categories', ...options }); /** - * List Benefit Offers - * - * List benefit offers for each country. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * Creates a CSV cost estimation of employments * + * Creates CSV cost estimation of employments */ -export const getV1BenefitOffersCountrySummaries = < +export const postV1CostCalculatorEstimationCsv = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1BenefitOffersCountrySummariesResponses, - GetV1BenefitOffersCountrySummariesErrors, + (options?.client ?? client).post< + PostV1CostCalculatorEstimationCsvResponses, + PostV1CostCalculatorEstimationCsvErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/benefit-offers/country-summaries', + url: '/v1/cost-calculator/estimation-csv', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * List Benefit Offers By Employment + * Retrieve a pre-onboarding document with its rendered PDF content * - * List benefit offers by employment. + * Returns the rendered contract PDF (base64-encoded) and the list of signatories for the given + * pre-onboarding document. The `content` field is prefixed with `data:application/pdf;base64,` so + * it can be embedded directly in a document viewer. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | - * - */ -export const getV1BenefitOffers = ( - options: Options, -) => - (options.client ?? client).get< - GetV1BenefitOffersResponses, - GetV1BenefitOffersErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/benefit-offers', - ...options, - }); - -/** - * Cancel Contract Amendment - * - * Use this endpoint to cancel an existing contract amendment request. - * - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const putV1SandboxContractAmendmentsContractAmendmentRequestIdCancel = < +export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId = < ThrowOnError extends boolean = false, >( options: Options< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses, - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel', - ...options, - }); - -/** - * List employee time offs - * - * Lists the current employee's time off records - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | - * - */ -export const getV1EmployeeTimeoff = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1EmployeeTimeoffResponses, - GetV1EmployeeTimeoffErrors, + (options.client ?? client).get< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff', + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}', ...options, }); /** - * Create a Pending Time Off + * List Billing Documents * - * Creates a pending Time Off record + * List billing documents for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postV1EmployeeTimeoff = ( - options: Options, -) => - (options.client ?? client).post< - PostV1EmployeeTimeoffResponses, - PostV1EmployeeTimeoffErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * Update employment - */ -export const patchV2EmploymentsEmploymentId2 = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).patch< - PatchV2EmploymentsEmploymentId2Responses, - PatchV2EmploymentsEmploymentId2Errors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v2/employments/{employment_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * Update employment - */ -export const patchV2EmploymentsEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).put< - PatchV2EmploymentsEmploymentIdResponses, - PatchV2EmploymentsEmploymentIdErrors, +export const getV1BillingDocuments = ( + options: Options, +) => + (options.client ?? client).get< + GetV1BillingDocumentsResponses, + GetV1BillingDocumentsErrors, ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v2/employments/{employment_id}', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/billing-documents', ...options }); /** - * Show Probation Extension + * Show Billing Document * - * Shows a Probation Extension Request. + * Shows a billing document details. + * + * Please contact api-support@remote.com to request access to this endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1ProbationExtensionsId = < +export const getV1BillingDocumentsBillingDocumentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1ProbationExtensionsIdResponses, - GetV1ProbationExtensionsIdErrors, + GetV1BillingDocumentsBillingDocumentIdResponses, + GetV1BillingDocumentsBillingDocumentIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/probation-extensions/{id}', - ...options, - }); + >({ url: '/v1/billing-documents/{billing_document_id}', ...options }); /** - * List payslips - * - * Lists all payslips belonging to a company. Can also filter for a single employment belonging - * to that company. - * + * Indexes all the documents for the employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getV1Payslips = ( - options?: Options, +export const getV1EmployeeDocuments = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1PayslipsResponses, - GetV1PayslipsErrors, + GetV1EmployeeDocumentsResponses, + GetV1EmployeeDocumentsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payslips', - ...options, - }); + >({ url: '/v1/employee/documents', ...options }); /** - * Download a receipt by id + * Upload employee file + * + * Uploads a file owned by the authenticated employee, for example + * identity documents or tax forms. * - * Download a receipt by id. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV1ExpensesExpenseIdReceiptsReceiptId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1EmployeeDocuments = ( + options: Options, ) => - (options.client ?? client).get< - GetV1ExpensesExpenseIdReceiptsReceiptIdResponses, - GetV1ExpensesExpenseIdReceiptsReceiptIdErrors, + (options.client ?? client).post< + PostV1EmployeeDocumentsResponses, + PostV1EmployeeDocumentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/{expense_id}/receipts/{receipt_id}', + ...formDataBodySerializer, + url: '/v1/employee/documents', ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, }); /** - * Token + * List employee time offs + * + * Lists the current employee's time off records + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * - * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows */ -export const postAuthOauth2Token = ( - options?: Options, +export const getV1EmployeeTimeoff = ( + options?: Options, ) => - (options?.client ?? client).post< - PostAuthOauth2TokenResponses, - PostAuthOauth2TokenErrors, + (options?.client ?? client).get< + GetV1EmployeeTimeoffResponses, + GetV1EmployeeTimeoffErrors, ThrowOnError - >({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/auth/oauth2/token', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, - }); + >({ url: '/v1/employee/timeoff', ...options }); /** - * Update pricing plan details - * - * Updates the pricing plan for an employment. The frequency determines how often Remote bills the - * employer for management fees. Annual billing typically offers a discount. + * Create a Pending Time Off * + * Creates a pending Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const putV2EmploymentsEmploymentIdPricingPlanDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV2EmploymentsEmploymentIdPricingPlanDetailsData, - ThrowOnError - >, +export const postV1EmployeeTimeoff = ( + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses, - PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors, + (options.client ?? client).post< + PostV1EmployeeTimeoffResponses, + PostV1EmployeeTimeoffErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/pricing_plan_details', + url: '/v1/employee/timeoff', ...options, headers: { 'Content-Type': 'application/json', @@ -8279,15 +7682,25 @@ export const putV2EmploymentsEmploymentIdPricingPlanDetails = < }); /** - * Show legal entity administrative details form schema + * Update personal details * - * Returns the json schema of a supported form. Possible form names are: - * ``` - * - administrative_details - * ``` + * Updates employment's personal details. * - * Most forms require a company access token, as they are dependent on certain - * properties of companies and their current employments. + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * * * @@ -8295,191 +7708,119 @@ export const putV2EmploymentsEmploymentIdPricingPlanDetails = < * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1CountriesCountryCodeLegalEntityFormsForm = < +export const putV1EmploymentsEmploymentIdPersonalDetails = < ThrowOnError extends boolean = false, >( options: Options< - GetV1CountriesCountryCodeLegalEntityFormsFormData, + PutV1EmploymentsEmploymentIdPersonalDetailsData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeLegalEntityFormsFormResponses, - GetV1CountriesCountryCodeLegalEntityFormsFormErrors, + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdPersonalDetailsResponses, + PutV1EmploymentsEmploymentIdPersonalDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/countries/{country_code}/legal_entity_forms/{form}', + url: '/v1/employments/{employment_id}/personal_details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Manage contractor plus subscription - * - * Endpoint that can be used to upgrade, assign or downgrade a contractor's subscription. - * This can be used when company admins desire to assign someone to the Contractor Plus plan, - * but also to change the contractor's subscription between Plus and Standard. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * Show Probation Extension * - */ -export const postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription = - ( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses, - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * List Time Off + * Shows a Probation Extension Request. * - * Lists all Time Off records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | * */ -export const getV1Timeoff = ( - options: Options, +export const getV1ProbationExtensionsId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1TimeoffResponses, - GetV1TimeoffErrors, + GetV1ProbationExtensionsIdResponses, + GetV1ProbationExtensionsIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff', - ...options, - }); + >({ url: '/v1/probation-extensions/{id}', ...options }); /** - * Create Time Off + * Download file + * + * Downloads a file. * - * Creates a Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const postV1Timeoff = ( - options: Options, +export const getV1FilesId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1TimeoffResponses, - PostV1TimeoffErrors, + (options.client ?? client).get< + GetV1FilesIdResponses, + GetV1FilesIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/files/{id}', ...options }); /** - * List Company Payroll Runs + * List Company Departments + * + * Lists all departments for the authorized company specified in the request. * - * Lists all payroll runs for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage company resources (`company_admin`) | View departments (`company_department:read`) | Manage departments (`company_department:write`) | * */ -export const getV1PayrollRuns = ( - options?: Options, +export const getV1CompanyDepartments = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1PayrollRunsResponses, - GetV1PayrollRunsErrors, + (options.client ?? client).get< + GetV1CompanyDepartmentsResponses, + GetV1CompanyDepartmentsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/payroll-runs', - ...options, - }); + >({ url: '/v1/company-departments', ...options }); /** - * Find or create a pre-onboarding document for an employment - * - * Finds an existing unsigned pre-onboarding document for the given requirement, or creates a new one. - * Idempotent: repeated calls with the same `pre_onboarding_document_requirement_slug` return the same - * document until it is signed. + * Create New Department * + * Creates a new department in the specified company. Department names may be non-unique and must be non-empty with no more than 255 characters (Unicode code points). * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage company resources (`company_admin`) | - | Manage departments (`company_department:write`) | * */ -export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocuments = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData, - ThrowOnError - >, +export const postV1CompanyDepartments = ( + options: Options, ) => (options.client ?? client).post< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses, - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors, + PostV1CompanyDepartmentsResponses, + PostV1CompanyDepartmentsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents', + url: '/v1/company-departments', ...options, headers: { 'Content-Type': 'application/json', @@ -8488,165 +7829,138 @@ export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocuments = < }); /** - * Get group by ID via SCIM v2.0 - * - * Retrieves a single group (department) for the authenticated company by group ID - */ -export const getV1ScimV2GroupsId = ( - options: Options, -) => - (options.client ?? client).get< - GetV1ScimV2GroupsIdResponses, - GetV1ScimV2GroupsIdErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Groups/{id}', - ...options, - }); - -/** - * List Employment Contract. + * Get Employee Details for a Payroll Run * - * Get the employment contract history for a given employment. If `only_active` is true, it will return only the active or last active contract. + * Gets the employee details for a payroll run * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contracts (`contract:read`) | - | + * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const getV1EmploymentContracts = ( - options: Options, +export const getV1PayrollRunsPayrollRunIdEmployeeDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1PayrollRunsPayrollRunIdEmployeeDetailsData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1EmploymentContractsResponses, - GetV1EmploymentContractsErrors, + GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses, + GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employment-contracts', - ...options, - }); + >({ url: '/v1/payroll-runs/{payroll_run_id}/employee-details', ...options }); /** - * Convert currency using dynamic rates + * Show employment + * + * Shows all the information of an employment. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * * - * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postV1CurrencyConverterEffective2 = < +export const getV1EmploymentsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1CurrencyConverterEffective2Responses, - PostV1CurrencyConverterEffective2Errors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdResponses, + GetV1EmploymentsEmploymentIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/currency-converter', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); + >({ url: '/v1/employments/{employment_id}', ...options }); /** - * List all companies + * Update employment * - * List all companies that authorized your integration to act on their behalf. In other words, these are all the companies that your integration can manage. Any company that has completed the authorization flow for your integration will be included in the response. + * Updates an employment. * - * ## Scopes + * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. * - */ -export const getV1Companies = ( - options: Options, -) => - (options.client ?? client).get< - GetV1CompaniesResponses, - GetV1CompaniesErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies', - ...options, - }); - -/** - * Create a company + * **For `invited` employments:** You can update the work_email. * - * Creates a new company. + * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. + * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. + * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. + * Currently, these amendments can only be done through the Remote UI. * - * ### Creating a company with only the required request body parameters - * When you call this endpoint and omit all the optional parameters in the request body, - * the following resources get created upon a successful response: - * * A new company with status `pending`. - * * A company owner for the new company with status `initiated`. + * It is possible to update the `external_id` of the employment for all employment statuses. * - * See the [update a company endpoint](#tag/Companies/operation/patch_update_company) for - * more details on how to get your company and its owner to `active` status. + * ## Global Payroll Employees * - * If you'd like to create a company and its owner with `active` status in a single request, - * please provide the optional `address_details` parameter as well. + * To update a Global Payment employment your input data must comply with the global payroll json schemas. * - * ### Accepting the Terms of Service + * **For `active` employments:** In addition to the above list, you can update personal_details. * - * A required step for creating a company in Remote is to accept our Terms of Service (ToS). + * ## Direct Employees * - * Company managers need to be aware of our Terms of Service and Privacy Policy, - * hence **it's the responsibility of our partners to advise and ensure company managers read - * and accept the ToS**. The terms have to be accepted only once, before creating a company, - * and the Remote API will collect the acceptance timestamp as its confirmation. + * To update an HRIS employment your input data must comply with the HRIS json schemas. * - * To ensure users read the most recent version of Remote's Terms of Service, their **acceptance - * must be done within the last fifteen minutes prior the company creation action**. + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - * To retrieve this information, partners can provide an element with any text and a description - * explaining that by performing that action they are accepting Remote's Term of Service. For - * instance, the partner can add a checkbox or a "Create Remote Account" button followed by a - * description saying "By creating an account, you agree to - * [Remote's Terms of Service](https://remote.com/terms-of-service). Also see Remote's - * [Privacy Policy](https://remote.com/privacy-policy)". + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * + * + * Please contact Remote if you need to update contractors via API since it's currently not supported. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1Companies = ( - options: Options, +export const patchV1EmploymentsEmploymentId2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostV1CompaniesResponses, - PostV1CompaniesErrors, + (options.client ?? client).patch< + PatchV1EmploymentsEmploymentId2Responses, + PatchV1EmploymentsEmploymentId2Errors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies', + url: '/v1/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -8655,64 +7969,71 @@ export const postV1Companies = ( }); /** - * Create bulk employment job + * Update employment + * + * Updates an employment. + * + * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. + * + * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. + * + * **For `invited` employments:** You can update the work_email. + * + * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. + * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. + * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. + * Currently, these amendments can only be done through the Remote UI. + * + * It is possible to update the `external_id` of the employment for all employment statuses. + * + * ## Global Payroll Employees + * + * To update a Global Payment employment your input data must comply with the global payroll json schemas. + * + * **For `active` employments:** In addition to the above list, you can update personal_details. + * + * ## Direct Employees + * + * To update an HRIS employment your input data must comply with the HRIS json schemas. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * Creates a job to bulk-create employments for multiple employees at once. Each employee payload must match the employment schema for the selected country. + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * - * ## Scopes + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * - */ -export const postV1BulkEmploymentJobs = ( - options?: Options, -) => - (options?.client ?? client).post< - PostV1BulkEmploymentJobsResponses, - PostV1BulkEmploymentJobsErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/bulk-employment-jobs', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, - }); - -/** - * Send back a timesheet for review or modification + * Please contact Remote if you need to update contractors via API since it's currently not supported. * - * Sends the given timesheet back to the employee for review or modification. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1TimesheetsTimesheetIdSendBack = < +export const patchV1EmploymentsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1TimesheetsTimesheetIdSendBackResponses, - PostV1TimesheetsTimesheetIdSendBackErrors, + (options.client ?? client).put< + PatchV1EmploymentsEmploymentIdResponses, + PatchV1EmploymentsEmploymentIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timesheets/{timesheet_id}/send-back', + url: '/v1/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -8721,100 +8042,81 @@ export const postV1TimesheetsTimesheetIdSendBack = < }); /** - * Deletes a Company Manager user + * List timesheets for the authenticated employee * - * Deletes a Company Manager user + * Returns a paginated list of timesheets for the authenticated employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const deleteV1CompanyManagersUserId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1EmployeeTimesheets = ( + options?: Options, ) => - (options.client ?? client).delete< - DeleteV1CompanyManagersUserIdResponses, - DeleteV1CompanyManagersUserIdErrors, + (options?.client ?? client).get< + GetV1EmployeeTimesheetsResponses, + GetV1EmployeeTimesheetsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-managers/{user_id}', - ...options, - }); + >({ url: '/v1/employee/timesheets', ...options }); /** - * Show company manager user + * Show a custom field value * - * Shows a single company manager user + * Returns a custom field value for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | + * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | * */ -export const getV1CompanyManagersUserId = < +export const getV1CustomFieldsCustomFieldIdValuesEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1CompanyManagersUserIdResponses, - GetV1CompanyManagersUserIdErrors, + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/company-managers/{user_id}', + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, }); /** - * Update emergency contact - * - * Updates the employment's emergency contact details. - * - * This endpoint requires country-specific data. Query the **Show form schema** endpoint - * passing the country code and `emergency_contact_details` as path parameters to see - * the required fields for a given country. + * Update a Custom Field Value * + * Updates a custom field value for a given employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | * */ -export const putV2EmploymentsEmploymentIdEmergencyContact = < +export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2 = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdEmergencyContactData, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data, ThrowOnError >, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdEmergencyContactResponses, - PutV2EmploymentsEmploymentIdEmergencyContactErrors, + (options.client ?? client).patch< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v2/employments/{employment_id}/emergency_contact', + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -8823,203 +8125,98 @@ export const putV2EmploymentsEmploymentIdEmergencyContact = < }); /** - * List expenses for the authenticated employee + * Update a Custom Field Value * - * Returns a paginated list of expenses belonging to the current employee. + * Updates a custom field value for a given employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | * */ -export const getV1EmployeeExpenses = ( - options?: Options, +export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeeExpensesResponses, - GetV1EmployeeExpensesErrors, + (options.client ?? client).put< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/expenses', + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create an expense for the authenticated employee + * Validate resignation request * - * Creates a new expense record for the current employee. + * Validates a resignation employment request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage employments (`employments`) | - | Manage resignations (`resignation:write`) | * */ -export const postV1EmployeeExpenses = ( - options?: Options, +export const putV1ResignationsOffboardingRequestIdValidate = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1ResignationsOffboardingRequestIdValidateData, + ThrowOnError + >, ) => - (options?.client ?? client).post< - PostV1EmployeeExpensesResponses, - PostV1EmployeeExpensesErrors, + (options.client ?? client).put< + PutV1ResignationsOffboardingRequestIdValidateResponses, + PutV1ResignationsOffboardingRequestIdValidateErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/expenses', + url: '/v1/resignations/{offboarding_request_id}/validate', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Delete contractor of record subscription intent - * - * Deletes Contractor of Record subscription intent. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | - * - */ -export const deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = - ( - options: Options< - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, - ThrowOnError - >, - ) => - (options.client ?? client).delete< - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', - ...options, - }); - -/** - * Create contractor of record subscription intent - * - * Assigns Contractor of Record subscription in pending state to employment. - * Once risk analysis is performed, subscription may start upon contract signing, - * or might be denied. - * - * Requires a non-blocking eligibility questionnaire to be submitted before creating the subscription intent. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | - * - */ -export const postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = - ( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', - ...options, - }); - -/** - * Sign a pre-onboarding document - * - * Signs the latest contract document associated with the given pre-onboarding document on behalf - * of the company signatory. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | - * - */ -export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign = - ( - options: Options< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses, - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * List Contractor Invoice Schedules + * Show Contractor Invoice Schedule * - * Lists Contractor Invoice Schedule records. + * Shows a single Contractor Invoice Schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1ContractorInvoiceSchedules = < +export const getV1ContractorInvoiceSchedulesId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetV1ContractorInvoiceSchedulesResponses, - GetV1ContractorInvoiceSchedulesErrors, + (options.client ?? client).get< + GetV1ContractorInvoiceSchedulesIdResponses, + GetV1ContractorInvoiceSchedulesIdErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoice-schedules', - ...options, - }); + >({ url: '/v1/contractor-invoice-schedules/{id}', ...options }); /** - * Create Contractor Invoice Schedules - * - * Creates many invoice schedules records. - * It's supposed to return two lists: one containing created records, and another one containing the schedules that failed to be inserted. + * Updates Contractor Invoice Schedule * + * Updates a contractor invoice schedule record * * ## Scopes * @@ -9028,21 +8225,17 @@ export const getV1ContractorInvoiceSchedules = < * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const postV1ContractorInvoiceSchedules = < +export const patchV1ContractorInvoiceSchedulesId2 = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1ContractorInvoiceSchedulesResponses, - PostV1ContractorInvoiceSchedulesErrors, + (options.client ?? client).patch< + PatchV1ContractorInvoiceSchedulesId2Responses, + PatchV1ContractorInvoiceSchedulesId2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractor-invoice-schedules', + url: '/v1/contractor-invoice-schedules/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -9051,51 +8244,40 @@ export const postV1ContractorInvoiceSchedules = < }); /** - * Get engagement agreement details + * Updates Contractor Invoice Schedule * - * Returns the engagement agreement details for an employment. + * Updates a contractor invoice schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const getV1EmploymentsEmploymentIdEngagementAgreementDetails = < +export const patchV1ContractorInvoiceSchedulesId = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + (options.client ?? client).put< + PatchV1ContractorInvoiceSchedulesIdResponses, + PatchV1ContractorInvoiceSchedulesIdErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/engagement-agreement-details', + url: '/v1/contractor-invoice-schedules/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Upsert engagement agreement details - * - * Creates or updates the engagement agreement details for an employment. - * - * This endpoint requires country-specific data. The exact required fields will vary depending on - * which country the employment is in. To see the list of parameters for each country, see the - * **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that compliance requirements for each country are subject to change according to local laws. - * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended - * to avoid compliance issues and to have the latest version of a country's requirements. + * Update pricing plan details * + * Updates the pricing plan for an employment. The frequency determines how often Remote bills the + * employer for management fees. Annual billing typically offers a discount. * * * ## Scopes @@ -9105,24 +8287,20 @@ export const getV1EmploymentsEmploymentIdEngagementAgreementDetails = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1EmploymentsEmploymentIdEngagementAgreementDetails = < +export const putV2EmploymentsEmploymentIdPricingPlanDetails = < ThrowOnError extends boolean = false, >( options: Options< - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData, + PutV2EmploymentsEmploymentIdPricingPlanDetailsData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses, + PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments/{employment_id}/engagement-agreement-details', + url: '/v2/employments/{employment_id}/pricing_plan_details', ...options, headers: { 'Content-Type': 'application/json', @@ -9131,188 +8309,200 @@ export const postV1EmploymentsEmploymentIdEngagementAgreementDetails = < }); /** - * Get Billing Document Breakdown + * Create risk reserve * - * Get billing document breakdown + * Create a new risk reserve * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | * */ -export const getV1BillingDocumentsBillingDocumentIdBreakdown = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1BillingDocumentsBillingDocumentIdBreakdownData, - ThrowOnError - >, +export const postV1RiskReserve = ( + options: Options, ) => - (options.client ?? client).get< - GetV1BillingDocumentsBillingDocumentIdBreakdownResponses, - GetV1BillingDocumentsBillingDocumentIdBreakdownErrors, + (options.client ?? client).post< + PostV1RiskReserveResponses, + PostV1RiskReserveErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/billing-documents/{billing_document_id}/breakdown', + url: '/v1/risk-reserve', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Indexes all the documents for the employee + * Update address details + * + * Updates employment's address details. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * + * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1EmployeeDocuments = ( - options?: Options, +export const putV2EmploymentsEmploymentIdAddressDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV2EmploymentsEmploymentIdAddressDetailsData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeeDocumentsResponses, - GetV1EmployeeDocumentsErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdAddressDetailsResponses, + PutV2EmploymentsEmploymentIdAddressDetailsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/documents', + url: '/v2/employments/{employment_id}/address_details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Upload employee file - * - * Uploads a file owned by the authenticated employee, for example - * identity documents or tax forms. - * + * Return a base64 encoded version of the contract document * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const postV1EmployeeDocuments = ( - options: Options, +export const getV1ContractorsEmploymentsEmploymentIdContractDocumentsId = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1EmployeeDocumentsResponses, - PostV1EmployeeDocumentsErrors, + (options.client ?? client).get< + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses, + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors, ThrowOnError >({ - ...formDataBodySerializer, - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/documents', + url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}', ...options, - headers: { - 'Content-Type': null, - ...options.headers, - }, }); /** - * Approve a time off cancellation request + * Create a contractor timesheet * - * Approve a time off cancellation request. - * In order to approve a time off cancellation request, the timeoff status must be `cancel_requested`. + * Creates a timesheet on behalf of a contractor employment. + * + * The submitted hours are immediately available to the contractor in the Remote UI for + * self-serve invoice creation (Invoices → Create invoice → "Use Time Tracking"). + * + * This endpoint is restricted to contractor employments. Calls against EOR or Global Payroll + * employments are rejected with `422`. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const postV1TimeoffTimeoffIdCancelRequestApprove = < +export const postV1ContractorsEmploymentsEmploymentIdTimesheets = < ThrowOnError extends boolean = false, >( options: Options< - PostV1TimeoffTimeoffIdCancelRequestApproveData, + PostV1ContractorsEmploymentsEmploymentIdTimesheetsData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1TimeoffTimeoffIdCancelRequestApproveResponses, - PostV1TimeoffTimeoffIdCancelRequestApproveErrors, + PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses, + PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff/{timeoff_id}/cancel-request/approve', + url: '/v1/contractors/employments/{employment_id}/timesheets', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Verify Employment Identity + * Create a contractor of record (COR) termination request * - * Endpoint to confirms the employment profile is from the actual employee + * Initiates a termination request for a Contractor of Record employment. + * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. + * Currently, only Contractor of Record employments can be terminated. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1IdentityVerificationEmploymentIdVerify = < +export const postV1ContractorsEmploymentsEmploymentIdCorTerminationRequests = < ThrowOnError extends boolean = false, >( options: Options< - PostV1IdentityVerificationEmploymentIdVerifyData, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1IdentityVerificationEmploymentIdVerifyResponses, - PostV1IdentityVerificationEmploymentIdVerifyErrors, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/identity-verification/{employment_id}/verify', + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests', ...options, }); /** - * Download a billing document PDF + * List approved payslip files for the authenticated employee * - * Downloads a billing document PDF + * Returns a paginated list of payslip files belonging to the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | * */ -export const getV1BillingDocumentsBillingDocumentIdPdf = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1EmployeePayslips = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1BillingDocumentsBillingDocumentIdPdfResponses, - GetV1BillingDocumentsBillingDocumentIdPdfErrors, + (options?.client ?? client).get< + GetV1EmployeePayslipsResponses, + GetV1EmployeePayslipsErrors, ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/billing-documents/{billing_document_id}/pdf', - ...options, - }); + >({ url: '/v1/employee/payslips', ...options }); diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts index d72313340..89cf32374 100644 --- a/src/client/types.gen.ts +++ b/src/client/types.gen.ts @@ -1,10 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: - | 'https://gateway.remote.com/' - | 'https://gateway.remote-sandbox.com/' - | (string & {}); + baseUrl: string; }; /** @@ -674,6 +671,48 @@ export type CompanyComplianceProfile = { | 'unresponsive'; }; +/** + * CorTerminationRequest + */ +export type CorTerminationRequest = { + /** + * Timestamp of when the termination was cancelled. Null if not cancelled. + */ + cancelled_at: string | null; + /** + * The date on which the contractor employment will be deactivated. + */ + employment_deactivation_date: string | null; + /** + * UuidSlug + * + * Identifier of the employment being terminated. + */ + employment_id: string; + /** + * Timestamp of when the termination was executed. Null if not yet executed. + */ + executed_at: string | null; + /** + * UuidSlug + * + * Unique identifier of the termination request. + */ + id: string; + /** + * Timestamp of when the termination request was initiated. + */ + initiated_at: string | null; + /** + * Current status of the termination request. + */ + status: 'initiated' | 'executed' | 'cancelled'; + /** + * The date when the termination was initiated. + */ + termination_date: string | null; +}; + /** * ResignationOrTerminationOffboarding */ @@ -2354,6 +2393,10 @@ export type Country = { * Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services. */ country_subdivisions?: Array | null; + /** + * Whether an Employment Agreement preview is available for this country. + */ + employment_agreement_preview_available?: boolean; /** * Whether EOR (Employer of Record) onboarding is available in this country. */ @@ -3452,9 +3495,13 @@ export type CostCalculatorCountryLevelRegion = { /** * CreateWebhookCallbackParams * - * Webhook callback creation params + * Webhook callback creation params. Provide either `subscribed_events` or `subscribe_to_all_events: true` (they are mutually exclusive). */ export type CreateWebhookCallbackParams = { + /** + * When true, subscribe this callback to all current and future event types. Cannot be combined with `subscribed_events`. + */ + subscribe_to_all_events?: boolean; subscribed_events?: Array< | 'background_check.status.updated' | 'benefit_renewal_request.created' @@ -5275,7 +5322,11 @@ export type BillingDocumentsResponse = { | 'reconciliation_invoice' | 'prefunding_invoice' | 'supplemental_service_invoice' - | 'reconciliation_credit_note'; + | 'reconciliation_credit_note' + | 'peo_payroll_invoice' + | 'contractor_management_invoice' + | 'remote_plan_invoice' + | 'credit_note'; /** * The unique identifier (UUID) of the billing document. */ @@ -6782,6 +6833,10 @@ export type NullableCountry = { * Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services. */ country_subdivisions?: Array | null; + /** + * Whether an Employment Agreement preview is available for this country. + */ + employment_agreement_preview_available?: boolean; /** * Whether EOR (Employer of Record) onboarding is available in this country. */ @@ -7554,7 +7609,7 @@ export type ListCompanyPricingPlansResponse = { /** * UuidSlug * - * Unique identifier of the termination request. + * Identifier of the employment being terminated. */ export type UuidSlug = string; @@ -7717,6 +7772,20 @@ export type Timesheet = { weekend_hours: HoursAndMinutes; }; +/** + * EmploymentAgreementPreviewResponse + * + * Return a base64 encoded Employment Agreement preview document + */ +export type EmploymentAgreementPreviewResponse = { + data: { + employment_agreement: { + content: Blob | File; + name: string; + }; + }; +}; + /** * Benefit * @@ -9052,6 +9121,10 @@ export type WebhookCallback = { * */ signing_key?: string; + /** + * When true, this callback is subscribed to all current and future event types. `subscribed_events` then lists every currently supported event. + */ + subscribe_to_all_events?: boolean; subscribed_events?: Array< | 'background_check.status.updated' | 'benefit_renewal_request.created' @@ -9382,6 +9455,29 @@ export type UnauthorizedResponse = { message: string; }; +/** + * IndexCorTerminationRequestsResponse + * + * Response schema listing many termination_requests + */ +export type IndexCorTerminationRequestsResponse = { + data?: { + /** + * The current page among all of the total_pages + */ + current_page?: number; + termination_requests?: Array; + /** + * The total number of records in the result + */ + total_count?: number; + /** + * The total number of pages the user can go through + */ + total_pages?: number; + }; +}; + /** * PricingPlanDetails * @@ -10785,10 +10881,14 @@ export type CreateContractEligibilityParams = { /** * UpdateWebhookCallbackParams * - * Webhook callback update params + * Webhook callback update params. Provide either `subscribed_events` or `subscribe_to_all_events` (they are mutually exclusive). Omitting `subscribe_to_all_events` leaves the current subscription mode unchanged, so resending an event list does not disable all-events delivery. Setting `subscribe_to_all_events: false` requires a non-empty `subscribed_events`. */ export type UpdateWebhookCallbackParams = { - subscribed_events: Array< + /** + * When true, subscribe this callback to all current and future event types. Cannot be combined with `subscribed_events`. + */ + subscribe_to_all_events?: boolean; + subscribed_events?: Array< | 'background_check.status.updated' | 'benefit_renewal_request.created' | 'billing_document.issued' @@ -11910,6 +12010,13 @@ export type EmploymentDetailsOnlyResponse = { contract_details?: { [key: string]: unknown; }; + /** + * Origin of the employment contract. Returned by the basic information endpoint. + */ + contract_origin?: + | 'remote_contract' + | 'custom_remote_contract' + | 'provided_by_customer'; /** * Emergency contact information. Its properties may vary depending on the country. Null if the employee has not submitted their emergency contact yet. */ @@ -12123,38 +12230,7 @@ export type PayDifference = { * CorTerminationRequestResponse */ export type CorTerminationRequestResponse = { - data: { - /** - * Timestamp of when the termination was cancelled. Null if not cancelled. - */ - cancelled_at: string | null; - /** - * The date on which the contractor employment will be deactivated. - */ - employment_deactivation_date: string | null; - /** - * Timestamp of when the termination was executed. Null if not yet executed. - */ - executed_at: string | null; - /** - * UuidSlug - * - * Unique identifier of the termination request. - */ - id: string; - /** - * Timestamp of when the termination request was initiated. - */ - initiated_at: string | null; - /** - * Current status of the termination request. - */ - status: 'initiated' | 'executed' | 'cancelled'; - /** - * The date when the termination was initiated. - */ - termination_date: string | null; - }; + data: CorTerminationRequest; }; /** @@ -12383,37 +12459,22 @@ export type ContractorInvoiceScheduleCreateResponseSuccess = { start_date: string; }; -export type GetV1OffboardingsData = { - body?: never; - path?: never; - query?: { - /** - * Filter by Employment ID - */ - employment_id?: string; - /** - * Filter by offboarding type - */ - type?: string; - /** - * By default, the results do not include confidential termination requests. - * Send `include_confidential=true` to include confidential requests in the response. - * - */ - include_confidential?: string; - /** - * Starts fetching records after the given page - */ - page?: number; +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsData = { + /** + * Employment administrative details params + */ + body?: EmploymentAdministrativeDetailsParams; + path: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v1/offboardings'; + query?: never; + url: '/v2/employments/{employment_id}/administrative_details'; }; -export type GetV1OffboardingsErrors = { +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors = { /** * Bad Request */ @@ -12422,52 +12483,62 @@ export type GetV1OffboardingsErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1OffboardingsError = - GetV1OffboardingsErrors[keyof GetV1OffboardingsErrors]; +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsError = + PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors]; -export type GetV1OffboardingsResponses = { +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses = { /** * Success */ - 200: ListOffboardingResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1OffboardingsResponse = - GetV1OffboardingsResponses[keyof GetV1OffboardingsResponses]; +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponse = + PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses]; -export type PostV1OffboardingsData = { - /** - * Offboarding - */ - body?: CreateOffboardingParams; - path?: never; +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/offboardings'; + url: '/v1/employments/{employment_id}/engagement-agreement-details'; }; -export type PostV1OffboardingsErrors = { +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ @@ -12477,107 +12548,90 @@ export type PostV1OffboardingsErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; - /** - * Internal Server Error - */ - 500: RequestError; }; -export type PostV1OffboardingsError = - PostV1OffboardingsErrors[keyof PostV1OffboardingsErrors]; +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError = + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type PostV1OffboardingsResponses = { +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ - 201: OffboardingResponse; + 200: EmploymentEngagementAgreementDetailsResponse; }; -export type PostV1OffboardingsResponse = - PostV1OffboardingsResponses[keyof PostV1OffboardingsResponses]; +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type GetV2OffboardingsData = { - body?: never; - path?: never; - query?: { - /** - * Filter by Employment ID - */ - employment_id?: string; - /** - * Filter by offboarding type. Only `termination` and `resignation` offboardings are supported. - */ - type?: 'termination' | 'resignation'; - /** - * By default, the results do not include confidential termination requests. - * Send `include_confidential=true` to include confidential requests in the response. - * - */ - include_confidential?: boolean; - /** - * Starts fetching records after the given page - */ - page?: number; +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { + /** + * Employment engagement agreement details params + */ + body?: EmploymentEngagementAgreementDetailsParams; + path: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v2/offboardings'; + query?: never; + url: '/v1/employments/{employment_id}/engagement-agreement-details'; }; -export type GetV2OffboardingsErrors = { +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV2OffboardingsError = - GetV2OffboardingsErrors[keyof GetV2OffboardingsErrors]; +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsError = + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type GetV2OffboardingsResponses = { +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ - 200: V2ListOffboardingResponse; + 200: SuccessResponse; }; -export type GetV2OffboardingsResponse = - GetV2OffboardingsResponses[keyof GetV2OffboardingsResponses]; +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type GetV1TimesheetsIdData = { - body?: never; - path: { - /** - * Timesheet ID - */ - id: string; - }; +export type PostV1CurrencyConverterEffective2Data = { + /** + * Convert currency parameters + */ + body: ConvertCurrencyParams; + path?: never; query?: never; - url: '/v1/timesheets/{id}'; + url: '/v1/currency-converter'; }; -export type GetV1TimesheetsIdErrors = { +export type PostV1CurrencyConverterEffective2Errors = { /** * Unauthorized */ @@ -12592,42 +12646,46 @@ export type GetV1TimesheetsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1TimesheetsIdError = - GetV1TimesheetsIdErrors[keyof GetV1TimesheetsIdErrors]; +export type PostV1CurrencyConverterEffective2Error = + PostV1CurrencyConverterEffective2Errors[keyof PostV1CurrencyConverterEffective2Errors]; -export type GetV1TimesheetsIdResponses = { +export type PostV1CurrencyConverterEffective2Responses = { /** * Success */ - 200: TimesheetResponse; + 200: ConvertCurrencyResponse; }; -export type GetV1TimesheetsIdResponse = - GetV1TimesheetsIdResponses[keyof GetV1TimesheetsIdResponses]; +export type PostV1CurrencyConverterEffective2Response = + PostV1CurrencyConverterEffective2Responses[keyof PostV1CurrencyConverterEffective2Responses]; -export type PostV1CancelOnboardingEmploymentIdData = { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Whether the request should be performed async - * - */ - async?: boolean; - }; - url: '/v1/cancel-onboarding/{employment_id}'; +export type PutV1EmployeeFederalTaxesData = { + /** + * Employee federal taxes params + */ + body?: EmploymentFederalTaxesParams; + path?: never; + query?: never; + url: '/v1/employee/federal-taxes'; }; -export type PostV1CancelOnboardingEmploymentIdErrors = { +export type PutV1EmployeeFederalTaxesErrors = { /** * Bad Request */ 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -12638,53 +12696,73 @@ export type PostV1CancelOnboardingEmploymentIdErrors = { 429: TooManyRequestsResponse; }; -export type PostV1CancelOnboardingEmploymentIdError = - PostV1CancelOnboardingEmploymentIdErrors[keyof PostV1CancelOnboardingEmploymentIdErrors]; +export type PutV1EmployeeFederalTaxesError = + PutV1EmployeeFederalTaxesErrors[keyof PutV1EmployeeFederalTaxesErrors]; -export type PostV1CancelOnboardingEmploymentIdResponses = { +export type PutV1EmployeeFederalTaxesResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostV1CancelOnboardingEmploymentIdResponse = - PostV1CancelOnboardingEmploymentIdResponses[keyof PostV1CancelOnboardingEmploymentIdResponses]; +export type PutV1EmployeeFederalTaxesResponse = + PutV1EmployeeFederalTaxesResponses[keyof PutV1EmployeeFederalTaxesResponses]; -export type GetV1ContractAmendmentsSchemaData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions'; }; - path?: never; - query: { + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors = + { /** - * The ID of the employment concerned by the contract amendment request. + * Unauthorized */ - employment_id: string; + 401: UnauthorizedResponse; /** - * Country code according to ISO 3-digit alphabetic codes. + * Forbidden */ - country_code: string; + 403: ForbiddenResponse; /** - * Name of the desired form + * Not Found */ - form?: 'contract_amendment'; + 404: NotFoundResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsError = + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors]; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses = + { /** - * Version of the form schema + * Success */ - json_schema_version?: number | 'latest'; + 200: ContractorSubscriptionSummariesResponse; }; - url: '/v1/contract-amendments/schema'; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponse = + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses]; + +export type PostV1CurrencyConverterRawData = { + /** + * Convert currency parameters + */ + body: ConvertCurrencyParams; + path?: never; + query?: never; + url: '/v1/currency-converter/raw'; }; -export type GetV1ContractAmendmentsSchemaErrors = { +export type PostV1CurrencyConverterRawErrors = { /** * Unauthorized */ @@ -12699,78 +12777,112 @@ export type GetV1ContractAmendmentsSchemaErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ContractAmendmentsSchemaError = - GetV1ContractAmendmentsSchemaErrors[keyof GetV1ContractAmendmentsSchemaErrors]; +export type PostV1CurrencyConverterRawError = + PostV1CurrencyConverterRawErrors[keyof PostV1CurrencyConverterRawErrors]; -export type GetV1ContractAmendmentsSchemaResponses = { +export type PostV1CurrencyConverterRawResponses = { /** * Success */ - 200: ContractAmendmentFormResponse; + 200: ConvertCurrencyResponse; }; -export type GetV1ContractAmendmentsSchemaResponse = - GetV1ContractAmendmentsSchemaResponses[keyof GetV1ContractAmendmentsSchemaResponses]; +export type PostV1CurrencyConverterRawResponse = + PostV1CurrencyConverterRawResponses[keyof PostV1CurrencyConverterRawResponses]; -export type PostV1PayItemsBulkData = { - /** - * Pay Items - */ - body: BulkCreatePayItemsParams; +export type GetV1IncentivesData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; - query?: never; - url: '/v1/pay-items/bulk'; + query?: { + /** + * Filter by Employment ID + */ + employment_id?: string; + /** + * Filter by Incentive status + */ + status?: string; + /** + * Filter by Recurring Incentive id + */ + recurring_incentive_id?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; + }; + url: '/v1/incentives'; }; -export type PostV1PayItemsBulkErrors = { +export type GetV1IncentivesErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1PayItemsBulkError = - PostV1PayItemsBulkErrors[keyof PostV1PayItemsBulkErrors]; +export type GetV1IncentivesError = + GetV1IncentivesErrors[keyof GetV1IncentivesErrors]; -export type PostV1PayItemsBulkResponses = { +export type GetV1IncentivesResponses = { /** * Success */ - 200: BulkCreatePayItemsResponse; + 200: ListIncentivesResponse; }; -export type PostV1PayItemsBulkResponse = - PostV1PayItemsBulkResponses[keyof PostV1PayItemsBulkResponses]; +export type GetV1IncentivesResponse = + GetV1IncentivesResponses[keyof GetV1IncentivesResponses]; -export type GetV2OffboardingsIdData = { - body?: never; - path: { +export type PostV1IncentivesData = { + /** + * Incentive + */ + body?: CreateOneTimeIncentiveParams; + headers: { /** - * Offboarding ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - id: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v2/offboardings/{id}'; + url: '/v1/incentives'; }; -export type GetV2OffboardingsIdErrors = { +export type PostV1IncentivesErrors = { /** * Bad Request */ @@ -12793,119 +12905,120 @@ export type GetV2OffboardingsIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV2OffboardingsIdError = - GetV2OffboardingsIdErrors[keyof GetV2OffboardingsIdErrors]; +export type PostV1IncentivesError = + PostV1IncentivesErrors[keyof PostV1IncentivesErrors]; -export type GetV2OffboardingsIdResponses = { +export type PostV1IncentivesResponses = { /** * Success */ - 200: V2OffboardingResponse; + 201: IncentiveResponse; }; -export type GetV2OffboardingsIdResponse = - GetV2OffboardingsIdResponses[keyof GetV2OffboardingsIdResponses]; +export type PostV1IncentivesResponse = + PostV1IncentivesResponses[keyof PostV1IncentivesResponses]; -export type GetV1CompaniesCompanyIdPricingPlansData = { +export type GetV1BenefitOffersData = { body?: never; - path: { + headers: { /** - * Company ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - company_id: UuidSlug; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/companies/{company_id}/pricing-plans'; + url: '/v1/benefit-offers'; }; -export type GetV1CompaniesCompanyIdPricingPlansErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1BenefitOffersErrors = { /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetV1CompaniesCompanyIdPricingPlansError = - GetV1CompaniesCompanyIdPricingPlansErrors[keyof GetV1CompaniesCompanyIdPricingPlansErrors]; +export type GetV1BenefitOffersError = + GetV1BenefitOffersErrors[keyof GetV1BenefitOffersErrors]; -export type GetV1CompaniesCompanyIdPricingPlansResponses = { +export type GetV1BenefitOffersResponses = { /** * Success */ - 200: ListCompanyPricingPlansResponse; + 200: BenefitOfferByEmploymentResponse; }; -export type GetV1CompaniesCompanyIdPricingPlansResponse = - GetV1CompaniesCompanyIdPricingPlansResponses[keyof GetV1CompaniesCompanyIdPricingPlansResponses]; +export type GetV1BenefitOffersResponse = + GetV1BenefitOffersResponses[keyof GetV1BenefitOffersResponses]; -export type PostV1CompaniesCompanyIdPricingPlansData = { +export type PostV1ReadyData = { /** - * Create Pricing Plan parameters + * Employment slug */ - body: CreatePricingPlanParams; - path: { + body?: CompleteOnboarding; + headers: { /** - * Company ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - company_id: UuidSlug; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/companies/{company_id}/pricing-plans'; + url: '/v1/ready'; }; -export type PostV1CompaniesCompanyIdPricingPlansErrors = { +export type PostV1ReadyErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1CompaniesCompanyIdPricingPlansError = - PostV1CompaniesCompanyIdPricingPlansErrors[keyof PostV1CompaniesCompanyIdPricingPlansErrors]; +export type PostV1ReadyError = PostV1ReadyErrors[keyof PostV1ReadyErrors]; -export type PostV1CompaniesCompanyIdPricingPlansResponses = { +export type PostV1ReadyResponses = { /** * Success */ - 200: CreatePricingPlanResponse; + 200: EmploymentResponse; }; -export type PostV1CompaniesCompanyIdPricingPlansResponse = - PostV1CompaniesCompanyIdPricingPlansResponses[keyof PostV1CompaniesCompanyIdPricingPlansResponses]; +export type PostV1ReadyResponse = + PostV1ReadyResponses[keyof PostV1ReadyResponses]; -export type GetV1ProbationCompletionLetterIdData = { - body?: never; - path: { - /** - * probation completion letter ID - */ - id: string; - }; +export type PostV1CostCalculatorEstimationData = { + /** + * Estimate params + */ + body: CostCalculatorEstimateParams; + path?: never; query?: never; - url: '/v1/probation-completion-letter/{id}'; + url: '/v1/cost-calculator/estimation'; }; -export type GetV1ProbationCompletionLetterIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostV1CostCalculatorEstimationErrors = { /** * Not Found */ @@ -12916,40 +13029,65 @@ export type GetV1ProbationCompletionLetterIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ProbationCompletionLetterIdError = - GetV1ProbationCompletionLetterIdErrors[keyof GetV1ProbationCompletionLetterIdErrors]; +export type PostV1CostCalculatorEstimationError = + PostV1CostCalculatorEstimationErrors[keyof PostV1CostCalculatorEstimationErrors]; -export type GetV1ProbationCompletionLetterIdResponses = { +export type PostV1CostCalculatorEstimationResponses = { /** * Success */ - 200: ProbationCompletionLetterResponse; + 200: CostCalculatorEstimateResponse; }; -export type GetV1ProbationCompletionLetterIdResponse = - GetV1ProbationCompletionLetterIdResponses[keyof GetV1ProbationCompletionLetterIdResponses]; +export type PostV1CostCalculatorEstimationResponse = + PostV1CostCalculatorEstimationResponses[keyof PostV1CostCalculatorEstimationResponses]; -export type GetV1ContractorInvoicesIdData = { +export type GetV1IncentivesRecurringData = { body?: never; - path: { + headers: { /** - * Resource unique identifier + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - id: UuidSlug; + Authorization: string; }; - query?: never; - url: '/v1/contractor-invoices/{id}'; + path?: never; + query?: { + /** + * Filter by recurring incentive status: active or deactive. + */ + status?: string; + /** + * Filter by recurring incentive type. + */ + type?: string; + /** + * Filter by recurring incentives that contain the value in their notes. + */ + note?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; + }; + url: '/v1/incentives/recurring'; }; -export type GetV1ContractorInvoicesIdErrors = { +export type GetV1IncentivesRecurringErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -12958,32 +13096,49 @@ export type GetV1ContractorInvoicesIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoicesIdError = - GetV1ContractorInvoicesIdErrors[keyof GetV1ContractorInvoicesIdErrors]; +export type GetV1IncentivesRecurringError = + GetV1IncentivesRecurringErrors[keyof GetV1IncentivesRecurringErrors]; -export type GetV1ContractorInvoicesIdResponses = { +export type GetV1IncentivesRecurringResponses = { /** * Success */ - 200: ContractorInvoiceResponse; + 201: ListRecurringIncentivesResponse; }; -export type GetV1ContractorInvoicesIdResponse = - GetV1ContractorInvoicesIdResponses[keyof GetV1ContractorInvoicesIdResponses]; +export type GetV1IncentivesRecurringResponse = + GetV1IncentivesRecurringResponses[keyof GetV1IncentivesRecurringResponses]; -export type PostV1CurrencyConverterRawData = { +export type PostV1IncentivesRecurringData = { /** - * Convert currency parameters + * RecurringIncentive */ - body: ConvertCurrencyParams; + body?: CreateRecurringIncentiveParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; query?: never; - url: '/v1/currency-converter/raw'; + url: '/v1/incentives/recurring'; }; -export type PostV1CurrencyConverterRawErrors = { +export type PostV1IncentivesRecurringErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -12996,47 +13151,54 @@ export type PostV1CurrencyConverterRawErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1CurrencyConverterRawError = - PostV1CurrencyConverterRawErrors[keyof PostV1CurrencyConverterRawErrors]; +export type PostV1IncentivesRecurringError = + PostV1IncentivesRecurringErrors[keyof PostV1IncentivesRecurringErrors]; -export type PostV1CurrencyConverterRawResponses = { +export type PostV1IncentivesRecurringResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 201: RecurringIncentiveResponse; }; -export type PostV1CurrencyConverterRawResponse = - PostV1CurrencyConverterRawResponses[keyof PostV1CurrencyConverterRawResponses]; +export type PostV1IncentivesRecurringResponse = + PostV1IncentivesRecurringResponses[keyof PostV1IncentivesRecurringResponses]; -export type GetV1CountriesCountryCodeContractorContractDetailsData = { +export type GetV1TimesheetsData = { body?: never; - path: { + path?: never; + query?: { /** - * Country code according to ISO 3-digit alphabetic codes + * Filter timesheets by their status */ - country_code: string; - }; - query?: { + status?: TimesheetStatus; /** - * Employment ID + * Sort order */ - employment_id?: string; + order?: 'asc' | 'desc'; /** - * Version of the form schema + * Field to sort by */ - json_schema_version?: number | 'latest'; + sort_by?: 'submitted_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/countries/{country_code}/contractor-contract-details'; + url: '/v1/timesheets'; }; -export type GetV1CountriesCountryCodeContractorContractDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1TimesheetsErrors = { /** * Unauthorized */ @@ -13049,183 +13211,205 @@ export type GetV1CountriesCountryCodeContractorContractDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeContractorContractDetailsError = - GetV1CountriesCountryCodeContractorContractDetailsErrors[keyof GetV1CountriesCountryCodeContractorContractDetailsErrors]; +export type GetV1TimesheetsError = + GetV1TimesheetsErrors[keyof GetV1TimesheetsErrors]; -export type GetV1CountriesCountryCodeContractorContractDetailsResponses = { +export type GetV1TimesheetsResponses = { /** * Success */ - 200: ContractorContractDetailsResponse; + 200: ListTimesheetsResponse; }; -export type GetV1CountriesCountryCodeContractorContractDetailsResponse = - GetV1CountriesCountryCodeContractorContractDetailsResponses[keyof GetV1CountriesCountryCodeContractorContractDetailsResponses]; +export type GetV1TimesheetsResponse = + GetV1TimesheetsResponses[keyof GetV1TimesheetsResponses]; -export type GetV1EmployeeIncentivesData = { - body?: never; +export type PostV1TimesheetsData = { + /** + * Timesheet + */ + body?: CreateTimesheetParams; path?: never; query?: never; - url: '/v1/employee/incentives'; + url: '/v1/timesheets'; }; -export type GetV1EmployeeIncentivesErrors = { +export type PostV1TimesheetsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeIncentivesError = - GetV1EmployeeIncentivesErrors[keyof GetV1EmployeeIncentivesErrors]; +export type PostV1TimesheetsError = + PostV1TimesheetsErrors[keyof PostV1TimesheetsErrors]; -export type GetV1EmployeeIncentivesResponses = { +export type PostV1TimesheetsResponses = { /** * Success */ - 200: SuccessResponse; + 200: TimesheetResponse; }; -export type GetV1EmployeeIncentivesResponse = - GetV1EmployeeIncentivesResponses[keyof GetV1EmployeeIncentivesResponses]; +export type PostV1TimesheetsResponse = + PostV1TimesheetsResponses[keyof PostV1TimesheetsResponses]; -export type GetV1EmploymentsData = { +export type PostV1TimesheetsTimesheetIdApproveData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Timesheet ID */ - Authorization: string; + timesheet_id: string; }; - path?: never; - query?: { - /** - * Company ID - */ - company_id?: string; - /** - * Filters the results by employments whose login email matches the value - */ - email?: string; - /** - * Filters the results by employments whose status matches the value. - * Supports multiple values separated by commas. - * Also supports the value `incomplete` to get all employments that are not onboarded yet. - * - */ - status?: string; - /** - * Filters the results by employments whose employment product type matches the value - */ - employment_type?: string; - /** - * Filters the results by employments whose employment model matches the value. - * Possible values: `global_payroll`, `peo`, `eor` - * - */ - employment_model?: 'global_payroll' | 'peo' | 'eor'; - /** - * Filters the results by the employment's short ID. Returns at most one result. - */ - short_id?: string; - /** - * Starts fetching records after the given page - */ - page?: number; + query?: never; + url: '/v1/timesheets/{timesheet_id}/approve'; +}; + +export type PostV1TimesheetsTimesheetIdApproveErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostV1TimesheetsTimesheetIdApproveError = + PostV1TimesheetsTimesheetIdApproveErrors[keyof PostV1TimesheetsTimesheetIdApproveErrors]; + +export type PostV1TimesheetsTimesheetIdApproveResponses = { + /** + * Success + */ + 200: MinimalTimesheetResponse; +}; + +export type PostV1TimesheetsTimesheetIdApproveResponse = + PostV1TimesheetsTimesheetIdApproveResponses[keyof PostV1TimesheetsTimesheetIdApproveResponses]; + +export type GetV1ProbationCompletionLetterIdData = { + body?: never; + path: { /** - * Number of items per page + * probation completion letter ID */ - page_size?: number; + id: string; }; - url: '/v1/employments'; + query?: never; + url: '/v1/probation-completion-letter/{id}'; }; -export type GetV1EmploymentsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ProbationCompletionLetterIdErrors = { /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; +}; + +export type GetV1ProbationCompletionLetterIdError = + GetV1ProbationCompletionLetterIdErrors[keyof GetV1ProbationCompletionLetterIdErrors]; + +export type GetV1ProbationCompletionLetterIdResponses = { + /** + * Success + */ + 200: ProbationCompletionLetterResponse; +}; + +export type GetV1ProbationCompletionLetterIdResponse = + GetV1ProbationCompletionLetterIdResponses[keyof GetV1ProbationCompletionLetterIdResponses]; + +export type GetV1SsoConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/v1/sso-configuration'; +}; + +export type GetV1SsoConfigurationErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsError = - GetV1EmploymentsErrors[keyof GetV1EmploymentsErrors]; +export type GetV1SsoConfigurationError = + GetV1SsoConfigurationErrors[keyof GetV1SsoConfigurationErrors]; -export type GetV1EmploymentsResponses = { +export type GetV1SsoConfigurationResponses = { /** * Success */ - 200: ListEmploymentsResponse; + 200: SsoConfigurationResponse; }; -export type GetV1EmploymentsResponse = - GetV1EmploymentsResponses[keyof GetV1EmploymentsResponses]; +export type GetV1SsoConfigurationResponse = + GetV1SsoConfigurationResponses[keyof GetV1SsoConfigurationResponses]; -export type PostV1EmploymentsData = { +export type PostV1SsoConfigurationData = { /** - * Employment params + * CreateSSOConfiguration */ - body?: EmploymentCreateParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; + body: CreateSsoConfigurationParams; path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/employments'; + query?: never; + url: '/v1/sso-configuration'; }; -export type PostV1EmploymentsErrors = { +export type PostV1SsoConfigurationErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Conflict */ @@ -13240,140 +13424,140 @@ export type PostV1EmploymentsErrors = { 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsError = - PostV1EmploymentsErrors[keyof PostV1EmploymentsErrors]; +export type PostV1SsoConfigurationError = + PostV1SsoConfigurationErrors[keyof PostV1SsoConfigurationErrors]; -export type PostV1EmploymentsResponses = { +export type PostV1SsoConfigurationResponses = { /** - * Success + * Created */ - 200: EmploymentCreationResponse; + 201: CreateSsoConfigurationResponse; }; -export type PostV1EmploymentsResponse = - PostV1EmploymentsResponses[keyof PostV1EmploymentsResponses]; - -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData = - { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - /** - * Employment ID - */ - employment_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status'; - }; +export type PostV1SsoConfigurationResponse = + PostV1SsoConfigurationResponses[keyof PostV1SsoConfigurationResponses]; -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors = - { +export type GetV1OffboardingsData = { + body?: never; + path?: never; + query?: { /** - * Unauthorized + * Filter by Employment ID */ - 401: UnauthorizedResponse; + employment_id?: string; /** - * Forbidden + * Filter by offboarding type */ - 403: ForbiddenResponse; + type?: string; /** - * Not Found + * By default, the results do not include confidential termination requests. + * Send `include_confidential=true` to include confidential requests in the response. + * */ - 404: NotFoundResponse; - }; - -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusError = - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors]; - -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses = - { + include_confidential?: string; /** - * Success + * Starts fetching records after the given page */ - 200: OnboardingReservesStatusResponse; - }; - -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponse = - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses]; - -export type GetV1HelpCenterArticlesIdData = { - body?: never; - path: { + page?: number; /** - * Help Center Article Zendesk ID + * Change the amount of records returned per page, defaults to 20, limited to 100 */ - id: number; + page_size?: number; }; - query?: never; - url: '/v1/help-center-articles/{id}'; + url: '/v1/offboardings'; }; -export type GetV1HelpCenterArticlesIdErrors = { +export type GetV1OffboardingsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1HelpCenterArticlesIdError = - GetV1HelpCenterArticlesIdErrors[keyof GetV1HelpCenterArticlesIdErrors]; +export type GetV1OffboardingsError = + GetV1OffboardingsErrors[keyof GetV1OffboardingsErrors]; -export type GetV1HelpCenterArticlesIdResponses = { +export type GetV1OffboardingsResponses = { /** * Success */ - 200: HelpCenterArticleResponse; + 200: ListOffboardingResponse; }; -export type GetV1HelpCenterArticlesIdResponse = - GetV1HelpCenterArticlesIdResponses[keyof GetV1HelpCenterArticlesIdResponses]; +export type GetV1OffboardingsResponse = + GetV1OffboardingsResponses[keyof GetV1OffboardingsResponses]; -export type GetV1ScimV2UsersIdData = { - body?: never; - path: { - /** - * User ID (slug) - */ - id: string; - }; +export type PostV1OffboardingsData = { + /** + * Offboarding + */ + body?: CreateOffboardingParams; + path?: never; query?: never; - url: '/v1/scim/v2/Users/{id}'; + url: '/v1/offboardings'; }; -export type GetV1ScimV2UsersIdErrors = { +export type PostV1OffboardingsErrors = { /** - * Unauthorized + * Bad Request */ - 401: IntegrationsScimErrorResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** * Not Found */ - 404: IntegrationsScimErrorResponse; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; + /** + * Internal Server Error + */ + 500: RequestError; }; -export type GetV1ScimV2UsersIdError = - GetV1ScimV2UsersIdErrors[keyof GetV1ScimV2UsersIdErrors]; +export type PostV1OffboardingsError = + PostV1OffboardingsErrors[keyof PostV1OffboardingsErrors]; -export type GetV1ScimV2UsersIdResponses = { +export type PostV1OffboardingsResponses = { /** * Success */ - 200: IntegrationsScimUser; + 201: OffboardingResponse; }; -export type GetV1ScimV2UsersIdResponse = - GetV1ScimV2UsersIdResponses[keyof GetV1ScimV2UsersIdResponses]; +export type PostV1OffboardingsResponse = + PostV1OffboardingsResponses[keyof PostV1OffboardingsResponses]; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { - body?: never; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData = { + /** + * CreateContractDocumentParams + */ + body: CreateContractDocument; path: { /** * Employment ID @@ -13381,18 +13565,14 @@ export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { employment_id: string; }; query?: never; - url: '/v2/employments/{employment_id}/engagement-agreement-details'; + url: '/v1/contractors/employments/{employment_id}/contract-documents'; }; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors = { /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -13401,30 +13581,27 @@ export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError = - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsError = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors]; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { - /** - * Success - */ - 200: EmploymentEngagementAgreementDetailsResponse; -}; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses = + { + /** + * Success + */ + 200: CreateContractDocumentResponse; + }; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponse = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses]; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { +export type PutV1EmploymentsEmploymentIdFederalTaxesData = { /** - * Employment engagement agreement details params + * Employment federal taxes params */ - body?: EmploymentEngagementAgreementDetailsParams; + body?: EmploymentFederalTaxesParams; path: { /** * Employment ID @@ -13432,10 +13609,10 @@ export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { employment_id: string; }; query?: never; - url: '/v2/employments/{employment_id}/engagement-agreement-details'; + url: '/v1/employments/{employment_id}/federal-taxes'; }; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { +export type PutV1EmploymentsEmploymentIdFederalTaxesErrors = { /** * Bad Request */ @@ -13462,32 +13639,32 @@ export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsError = - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type PutV1EmploymentsEmploymentIdFederalTaxesError = + PutV1EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV1EmploymentsEmploymentIdFederalTaxesErrors]; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type PutV1EmploymentsEmploymentIdFederalTaxesResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type PutV1EmploymentsEmploymentIdFederalTaxesResponse = + PutV1EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV1EmploymentsEmploymentIdFederalTaxesResponses]; -export type GetV1EmployeeDocumentsIdData = { +export type GetV1CompaniesCompanyIdPricingPlansData = { body?: never; path: { /** - * Document ID + * Company ID */ - id: string; + company_id: UuidSlug; }; query?: never; - url: '/v1/employee/documents/{id}'; + url: '/v1/companies/{company_id}/pricing-plans'; }; -export type GetV1EmployeeDocumentsIdErrors = { +export type GetV1CompaniesCompanyIdPricingPlansErrors = { /** * Unauthorized */ @@ -13502,84 +13679,79 @@ export type GetV1EmployeeDocumentsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeDocumentsIdError = - GetV1EmployeeDocumentsIdErrors[keyof GetV1EmployeeDocumentsIdErrors]; +export type GetV1CompaniesCompanyIdPricingPlansError = + GetV1CompaniesCompanyIdPricingPlansErrors[keyof GetV1CompaniesCompanyIdPricingPlansErrors]; -export type GetV1EmployeeDocumentsIdResponses = { +export type GetV1CompaniesCompanyIdPricingPlansResponses = { /** * Success */ - 200: DownloadDocumentResponse; + 200: ListCompanyPricingPlansResponse; }; -export type GetV1EmployeeDocumentsIdResponse = - GetV1EmployeeDocumentsIdResponses[keyof GetV1EmployeeDocumentsIdResponses]; +export type GetV1CompaniesCompanyIdPricingPlansResponse = + GetV1CompaniesCompanyIdPricingPlansResponses[keyof GetV1CompaniesCompanyIdPricingPlansResponses]; -export type GetV1ContractorInvoicesData = { +export type PostV1CompaniesCompanyIdPricingPlansData = { + /** + * Create Pricing Plan parameters + */ + body: CreatePricingPlanParams; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/pricing-plans'; +}; + +export type PostV1CompaniesCompanyIdPricingPlansErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostV1CompaniesCompanyIdPricingPlansError = + PostV1CompaniesCompanyIdPricingPlansErrors[keyof PostV1CompaniesCompanyIdPricingPlansErrors]; + +export type PostV1CompaniesCompanyIdPricingPlansResponses = { + /** + * Success + */ + 200: CreatePricingPlanResponse; +}; + +export type PostV1CompaniesCompanyIdPricingPlansResponse = + PostV1CompaniesCompanyIdPricingPlansResponses[keyof PostV1CompaniesCompanyIdPricingPlansResponses]; + +export type GetV1EmployeeAddressData = { body?: never; path?: never; query?: { /** - * Filters contractor invoices by status matching the value. - */ - status?: ContractorInvoiceStatus; - /** - * Filters contractor invoices by invoice schedule ID matching the value. + * Version of the address_details form schema */ - contractor_invoice_schedule_id?: UuidSlug; - /** - * Filters contractor invoices by date greater than or equal to the value. - */ - date_from?: Date; - /** - * Filters contractor invoices by date less than or equal to the value. - */ - date_to?: Date; - /** - * Filters contractor invoices by due date greater than or equal to the value. - */ - due_date_from?: Date; - /** - * Filters contractor invoices by due date less than or equal to the value. - */ - due_date_to?: Date; - /** - * Filters contractor invoices by approved date greater than or equal to the value. - */ - approved_date_from?: Date; - /** - * Filters contractor invoices by approved date less than or equal to the value. - */ - approved_date_to?: Date; - /** - * Filters contractor invoices by paid out date greater than or equal to the value. - */ - paid_out_date_from?: Date; - /** - * Filters contractor invoices by paid out date less than or equal to the value. - */ - paid_out_date_to?: Date; - /** - * Field to sort by - */ - sort_by?: 'date' | 'due_date' | 'approved_at' | 'paid_out_at'; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; + address_details_json_schema_version?: number | 'latest'; }; - url: '/v1/contractor-invoices'; + url: '/v1/employee/address'; }; -export type GetV1ContractorInvoicesErrors = { +export type GetV1EmployeeAddressErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -13595,61 +13767,38 @@ export type GetV1ContractorInvoicesErrors = { /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoicesError = - GetV1ContractorInvoicesErrors[keyof GetV1ContractorInvoicesErrors]; +export type GetV1EmployeeAddressError = + GetV1EmployeeAddressErrors[keyof GetV1EmployeeAddressErrors]; -export type GetV1ContractorInvoicesResponses = { +export type GetV1EmployeeAddressResponses = { /** * Success */ - 200: ListContractorInvoicesResponse; -}; - -export type GetV1ContractorInvoicesResponse = - GetV1ContractorInvoicesResponses[keyof GetV1ContractorInvoicesResponses]; - -export type PostV1SdkTelemetryErrorsData = { - /** - * SDK Error Report - */ - body: SdkErrorPayload; - path?: never; - query?: never; - url: '/v1/sdk/telemetry-errors'; -}; - -export type PostV1SdkTelemetryErrorsErrors = { - /** - * Bad Request - */ - 400: ErrorResponse; - /** - * Too Many Requests - */ - 429: RateLimitResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1SdkTelemetryErrorsError = - PostV1SdkTelemetryErrorsErrors[keyof PostV1SdkTelemetryErrorsErrors]; +export type GetV1EmployeeAddressResponse = + GetV1EmployeeAddressResponses[keyof GetV1EmployeeAddressResponses]; -export type PostV1SdkTelemetryErrorsResponses = { +export type PutV1EmployeeAddressData = { /** - * No Content + * Employee address details params */ - 204: unknown; -}; - -export type GetV1SsoConfigurationDetailsData = { - body?: never; + body?: EmploymentAddressDetailsParams; path?: never; - query?: never; - url: '/v1/sso-configuration/details'; + query?: { + /** + * Version of the address_details form schema + */ + address_details_json_schema_version?: number | 'latest'; + }; + url: '/v1/employee/address'; }; -export type GetV1SsoConfigurationDetailsErrors = { +export type PutV1EmployeeAddressErrors = { /** * Bad Request */ @@ -13658,88 +13807,135 @@ export type GetV1SsoConfigurationDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1SsoConfigurationDetailsError = - GetV1SsoConfigurationDetailsErrors[keyof GetV1SsoConfigurationDetailsErrors]; +export type PutV1EmployeeAddressError = + PutV1EmployeeAddressErrors[keyof PutV1EmployeeAddressErrors]; -export type GetV1SsoConfigurationDetailsResponses = { +export type PutV1EmployeeAddressResponses = { /** * Success */ - 200: SsoConfigurationDetailsResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1SsoConfigurationDetailsResponse = - GetV1SsoConfigurationDetailsResponses[keyof GetV1SsoConfigurationDetailsResponses]; +export type PutV1EmployeeAddressResponse = + PutV1EmployeeAddressResponses[keyof PutV1EmployeeAddressResponses]; -export type PostV1CostCalculatorEstimationData = { +export type PutV2EmploymentsEmploymentIdFederalTaxesData = { /** - * Estimate params + * Employment federal taxes params */ - body: CostCalculatorEstimateParams; - path?: never; + body?: EmploymentFederalTaxesParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/cost-calculator/estimation'; + url: '/v2/employments/{employment_id}/federal-taxes'; }; -export type PostV1CostCalculatorEstimationErrors = { +export type PutV2EmploymentsEmploymentIdFederalTaxesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1CostCalculatorEstimationError = - PostV1CostCalculatorEstimationErrors[keyof PostV1CostCalculatorEstimationErrors]; +export type PutV2EmploymentsEmploymentIdFederalTaxesError = + PutV2EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV2EmploymentsEmploymentIdFederalTaxesErrors]; -export type PostV1CostCalculatorEstimationResponses = { +export type PutV2EmploymentsEmploymentIdFederalTaxesResponses = { /** * Success */ - 200: CostCalculatorEstimateResponse; + 200: SuccessResponse; }; -export type PostV1CostCalculatorEstimationResponse = - PostV1CostCalculatorEstimationResponses[keyof PostV1CostCalculatorEstimationResponses]; +export type PutV2EmploymentsEmploymentIdFederalTaxesResponse = + PutV2EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV2EmploymentsEmploymentIdFederalTaxesResponses]; -export type GetV1CompaniesSchemaData = { +export type GetV1TravelLetterRequestsData = { body?: never; path?: never; - query: { + query?: { /** - * Country code according to ISO 3-digit alphabetic codes. + * Filter results on the given status */ - country_code: string; + status?: + | 'pending' + | 'cancelled' + | 'declined_by_manager' + | 'declined_by_remote' + | 'approved_by_manager' + | 'approved_by_remote'; /** - * Name of the desired form + * Filter results on the given employment slug */ - form: 'address_details'; + employment_id?: string; /** - * Version of the form schema + * Filter results on the given employee name */ - json_schema_version?: number | 'latest'; + employee_name?: string; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'submitted_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/companies/schema'; + url: '/v1/travel-letter-requests'; }; -export type GetV1CompaniesSchemaErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1TravelLetterRequestsErrors = { /** * Not Found */ @@ -13750,45 +13946,36 @@ export type GetV1CompaniesSchemaErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1CompaniesSchemaError = - GetV1CompaniesSchemaErrors[keyof GetV1CompaniesSchemaErrors]; +export type GetV1TravelLetterRequestsError = + GetV1TravelLetterRequestsErrors[keyof GetV1TravelLetterRequestsErrors]; -export type GetV1CompaniesSchemaResponses = { +export type GetV1TravelLetterRequestsResponses = { /** * Success */ - 200: CompanyFormResponse; + 200: ListTravelLettersResponse; }; -export type GetV1CompaniesSchemaResponse = - GetV1CompaniesSchemaResponses[keyof GetV1CompaniesSchemaResponses]; +export type GetV1TravelLetterRequestsResponse = + GetV1TravelLetterRequestsResponses[keyof GetV1TravelLetterRequestsResponses]; -export type GetV1EmploymentsEmploymentIdBenefitOffersData = { +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { body?: never; path: { /** - * Unique identifier of the employment - */ - employment_id: UuidSlug; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v1/employments/{employment_id}/benefit-offers'; -}; + query?: never; + url: '/v2/employments/{employment_id}/engagement-agreement-details'; +}; -export type GetV1EmploymentsEmploymentIdBenefitOffersErrors = { +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ @@ -13801,46 +13988,45 @@ export type GetV1EmploymentsEmploymentIdBenefitOffersErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersError = - GetV1EmploymentsEmploymentIdBenefitOffersErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersErrors]; +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError = + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type GetV1EmploymentsEmploymentIdBenefitOffersResponses = { +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ - 200: EmploymentsBenefitOffersListBenefitOffers; + 200: EmploymentEngagementAgreementDetailsResponse; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersResponse = - GetV1EmploymentsEmploymentIdBenefitOffersResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersResponses]; +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type PutV1EmploymentsEmploymentIdBenefitOffersData = { +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { /** - * Upsert employment benefit offers request + * Employment engagement agreement details params */ - body: UnifiedEmploymentUpsertBenefitOffersRequest; + body?: EmploymentEngagementAgreementDetailsParams; path: { /** - * Unique identifier of the employment - */ - employment_id: UuidSlug; - }; - query?: { - /** - * Version of the form schema + * Employment ID */ - json_schema_version?: number | 'latest'; + employment_id: string; }; - url: '/v1/employments/{employment_id}/benefit-offers'; + query?: never; + url: '/v2/employments/{employment_id}/engagement-agreement-details'; }; -export type PutV1EmploymentsEmploymentIdBenefitOffersErrors = { +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ @@ -13849,26 +14035,84 @@ export type PutV1EmploymentsEmploymentIdBenefitOffersErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PutV1EmploymentsEmploymentIdBenefitOffersError = - PutV1EmploymentsEmploymentIdBenefitOffersErrors[keyof PutV1EmploymentsEmploymentIdBenefitOffersErrors]; +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsError = + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type PutV1EmploymentsEmploymentIdBenefitOffersResponses = { +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ 200: SuccessResponse; }; -export type PutV1EmploymentsEmploymentIdBenefitOffersResponse = - PutV1EmploymentsEmploymentIdBenefitOffersResponses[keyof PutV1EmploymentsEmploymentIdBenefitOffersResponses]; +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type GetV1IdentityVerificationEmploymentIdData = { +export type GetV1WdGphPaySummaryData = { + body?: never; + headers?: { + /** + * The preferred language of the inquiring user in Workday + */ + accept_language?: string; + }; + path?: never; + query?: { + /** + * The pay group ids to lookup (comma separated). Returns all pay groups if not provided + */ + payGroupExternalId?: string; + /** + * Optional country filter (ISO 3166 alpha-2, comma separated) + */ + countryCode?: string; + }; + url: '/v1/wd/gph/paySummary'; +}; + +export type GetV1WdGphPaySummaryErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1WdGphPaySummaryError = + GetV1WdGphPaySummaryErrors[keyof GetV1WdGphPaySummaryErrors]; + +export type GetV1WdGphPaySummaryResponses = { + /** + * Success + */ + 200: PaySummaryResponse; +}; + +export type GetV1WdGphPaySummaryResponse = + GetV1WdGphPaySummaryResponses[keyof GetV1WdGphPaySummaryResponses]; + +export type GetV1EmploymentsEmploymentIdJobData = { body?: never; path: { /** @@ -13877,10 +14121,10 @@ export type GetV1IdentityVerificationEmploymentIdData = { employment_id: string; }; query?: never; - url: '/v1/identity-verification/{employment_id}'; + url: '/v1/employments/{employment_id}/job'; }; -export type GetV1IdentityVerificationEmploymentIdErrors = { +export type GetV1EmploymentsEmploymentIdJobErrors = { /** * Unauthorized */ @@ -13895,138 +14139,82 @@ export type GetV1IdentityVerificationEmploymentIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1IdentityVerificationEmploymentIdError = - GetV1IdentityVerificationEmploymentIdErrors[keyof GetV1IdentityVerificationEmploymentIdErrors]; +export type GetV1EmploymentsEmploymentIdJobError = + GetV1EmploymentsEmploymentIdJobErrors[keyof GetV1EmploymentsEmploymentIdJobErrors]; -export type GetV1IdentityVerificationEmploymentIdResponses = { +export type GetV1EmploymentsEmploymentIdJobResponses = { /** * Success */ - 200: IdentityVerificationResponse; + 200: EmploymentJobResponse; }; -export type GetV1IdentityVerificationEmploymentIdResponse = - GetV1IdentityVerificationEmploymentIdResponses[keyof GetV1IdentityVerificationEmploymentIdResponses]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions'; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsError = - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses = - { - /** - * Success - */ - 200: ContractorSubscriptionSummariesResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponse = - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses]; +export type GetV1EmploymentsEmploymentIdJobResponse = + GetV1EmploymentsEmploymentIdJobResponses[keyof GetV1EmploymentsEmploymentIdJobResponses]; -export type GetV1EmployeePayslipsData = { - body?: never; +export type PostV1BulkEmploymentJobsData = { + /** + * Bulk employment params + */ + body?: BulkEmploymentCreateParams; path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/employee/payslips'; + query?: never; + url: '/v1/bulk-employment-jobs'; }; -export type GetV1EmployeePayslipsErrors = { +export type PostV1BulkEmploymentJobsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmployeePayslipsError = - GetV1EmployeePayslipsErrors[keyof GetV1EmployeePayslipsErrors]; +export type PostV1BulkEmploymentJobsError = + PostV1BulkEmploymentJobsErrors[keyof PostV1BulkEmploymentJobsErrors]; -export type GetV1EmployeePayslipsResponses = { +export type PostV1BulkEmploymentJobsResponses = { /** - * Success + * Accepted */ - 200: ListEmployeePayslipsResponse; + 202: BulkEmploymentImportJobResponse; }; -export type GetV1EmployeePayslipsResponse = - GetV1EmployeePayslipsResponses[keyof GetV1EmployeePayslipsResponses]; +export type PostV1BulkEmploymentJobsResponse = + PostV1BulkEmploymentJobsResponses[keyof PostV1BulkEmploymentJobsResponses]; -export type GetV1WebhookEventsData = { +export type GetV1ContractAmendmentsData = { body?: never; - path?: never; - query?: { - /** - * Filter by webhook event type - */ - event_type?: string; - /** - * Filter by delivery status (true = 200, false = 4xx/5xx) - */ - successfully_delivered?: boolean; - /** - * Filter by company ID - */ - company_id?: string; - /** - * Filter by date before (ISO 8601 format) - */ - before?: string; + headers: { /** - * Filter by date after (ISO 8601 format) + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - after?: string; + Authorization: string; + }; + path?: never; + query?: { /** - * Sort order + * Employment ID */ - order?: 'asc' | 'desc'; + employment_id?: string; /** - * Field to sort by + * Contract Amendment status */ - sort_by?: 'first_triggered_at'; + status?: ContractAmendmentStatus; /** * Starts fetching records after the given page */ @@ -14036,10 +14224,10 @@ export type GetV1WebhookEventsData = { */ page_size?: number; }; - url: '/v1/webhook-events'; + url: '/v1/contract-amendments'; }; -export type GetV1WebhookEventsErrors = { +export type GetV1ContractAmendmentsErrors = { /** * Unauthorized */ @@ -14054,20 +14242,72 @@ export type GetV1WebhookEventsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1WebhookEventsError = - GetV1WebhookEventsErrors[keyof GetV1WebhookEventsErrors]; +export type GetV1ContractAmendmentsError = + GetV1ContractAmendmentsErrors[keyof GetV1ContractAmendmentsErrors]; -export type GetV1WebhookEventsResponses = { +export type GetV1ContractAmendmentsResponses = { /** * Success */ - 200: ListWebhookEventsResponse; + 200: ListContractAmendmentResponse; }; -export type GetV1WebhookEventsResponse = - GetV1WebhookEventsResponses[keyof GetV1WebhookEventsResponses]; +export type GetV1ContractAmendmentsResponse = + GetV1ContractAmendmentsResponses[keyof GetV1ContractAmendmentsResponses]; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData = { +export type PostV1ContractAmendmentsData = { + /** + * Contract Amendment + */ + body?: CreateContractAmendmentParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path?: never; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/contract-amendments'; +}; + +export type PostV1ContractAmendmentsErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostV1ContractAmendmentsError = + PostV1ContractAmendmentsErrors[keyof PostV1ContractAmendmentsErrors]; + +export type PostV1ContractAmendmentsResponses = { + /** + * Success + */ + 200: ContractAmendmentResponse; +}; + +export type PostV1ContractAmendmentsResponse = + PostV1ContractAmendmentsResponses[keyof PostV1ContractAmendmentsResponses]; + +export type DeleteV1IncentivesRecurringIdData = { body?: never; headers: { /** @@ -14080,15 +14320,15 @@ export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData = { }; path: { /** - * Company ID + * Recurring Incentive ID */ - company_id: string; + id: string; }; query?: never; - url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks'; + url: '/v1/incentives/recurring/{id}'; }; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors = { +export type DeleteV1IncentivesRecurringIdErrors = { /** * Bad Request */ @@ -14111,91 +14351,124 @@ export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors = { 429: TooManyRequestsResponse; }; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksError = - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors]; +export type DeleteV1IncentivesRecurringIdError = + DeleteV1IncentivesRecurringIdErrors[keyof DeleteV1IncentivesRecurringIdErrors]; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses = { +export type DeleteV1IncentivesRecurringIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: DeleteRecurringIncentiveResponse; }; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponse = - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses]; - -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve'; - }; +export type DeleteV1IncentivesRecurringIdResponse = + DeleteV1IncentivesRecurringIdResponses[keyof DeleteV1IncentivesRecurringIdResponses]; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { + body?: never; + headers: { /** - * Unprocessable Entity + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - 422: UnprocessableEntityResponse; + Authorization: string; + }; + path: { /** - * Too many requests + * Benefit Renewal Request Id */ - 429: TooManyRequestsResponse; + benefit_renewal_request_id: UuidSlug; }; + query?: never; + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; +}; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveError = - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors]; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses = - { +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdError = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { + /** + * Success + */ + 200: BenefitRenewalRequestsBenefitRenewalRequestResponse; +}; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; + +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { + /** + * Benefit Renewal Request Response + */ + body?: BenefitRenewalRequestsUpdateBenefitRenewalRequest; + headers: { /** - * Success + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - 200: RiskReserveProofOfPaymentResponse; + Authorization: string; + }; + path: { + /** + * Benefit Renewal Request Id + */ + benefit_renewal_request_id: UuidSlug; }; - -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponse = - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses]; - -export type GetV1TestSchemaData = { - body?: never; - path?: never; query?: { /** * Version of the form schema */ json_schema_version?: number | 'latest'; }; - url: '/v1/test-schema'; + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; }; -export type GetV1TestSchemaResponses = { +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdError = + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; + +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { /** * Success */ - 200: CompanyFormResponse; + 200: SuccessResponse; }; -export type GetV1TestSchemaResponse = - GetV1TestSchemaResponses[keyof GetV1TestSchemaResponses]; +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; export type GetV1CountriesCountryCodeHolidaysYearData = { body?: never; @@ -14255,26 +14528,28 @@ export type GetV1CountriesCountryCodeHolidaysYearResponses = { export type GetV1CountriesCountryCodeHolidaysYearResponse = GetV1CountriesCountryCodeHolidaysYearResponses[keyof GetV1CountriesCountryCodeHolidaysYearResponses]; -export type PostV1TimeoffTimeoffIdCancelData = { - /** - * CancelTimeoff - */ - body: CancelTimeoffParams; +export type GetV1EmploymentsEmploymentIdCustomFieldsData = { + body?: never; path: { /** - * Time Off ID + * Employment ID */ - timeoff_id: string; + employment_id: string; }; - query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/employments/{employment_id}/custom-fields'; }; -export type PostV1TimeoffTimeoffIdCancelErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdCustomFieldsErrors = { /** * Unauthorized */ @@ -14287,73 +14562,34 @@ export type PostV1TimeoffTimeoffIdCancelErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdCancelError = - PostV1TimeoffTimeoffIdCancelErrors[keyof PostV1TimeoffTimeoffIdCancelErrors]; +export type GetV1EmploymentsEmploymentIdCustomFieldsError = + GetV1EmploymentsEmploymentIdCustomFieldsErrors[keyof GetV1EmploymentsEmploymentIdCustomFieldsErrors]; -export type PostV1TimeoffTimeoffIdCancelResponses = { +export type GetV1EmploymentsEmploymentIdCustomFieldsResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ListEmploymentCustomFieldValuePaginatedResponse; }; -export type PostV1TimeoffTimeoffIdCancelResponse = - PostV1TimeoffTimeoffIdCancelResponses[keyof PostV1TimeoffTimeoffIdCancelResponses]; +export type GetV1EmploymentsEmploymentIdCustomFieldsResponse = + GetV1EmploymentsEmploymentIdCustomFieldsResponses[keyof GetV1EmploymentsEmploymentIdCustomFieldsResponses]; -export type GetV1EmploymentsEmploymentIdJobData = { +export type GetV1TimesheetsIdData = { body?: never; path: { /** - * Employment ID + * Timesheet ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employments/{employment_id}/job'; -}; - -export type GetV1EmploymentsEmploymentIdJobErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1EmploymentsEmploymentIdJobError = - GetV1EmploymentsEmploymentIdJobErrors[keyof GetV1EmploymentsEmploymentIdJobErrors]; - -export type GetV1EmploymentsEmploymentIdJobResponses = { - /** - * Success - */ - 200: EmploymentJobResponse; -}; - -export type GetV1EmploymentsEmploymentIdJobResponse = - GetV1EmploymentsEmploymentIdJobResponses[keyof GetV1EmploymentsEmploymentIdJobResponses]; - -export type GetV1PricingPlanPartnerTemplatesData = { - body?: never; - path?: never; - query?: never; - url: '/v1/pricing-plan-partner-templates'; + url: '/v1/timesheets/{id}'; }; -export type GetV1PricingPlanPartnerTemplatesErrors = { +export type GetV1TimesheetsIdErrors = { /** * Unauthorized */ @@ -14368,44 +14604,53 @@ export type GetV1PricingPlanPartnerTemplatesErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1PricingPlanPartnerTemplatesError = - GetV1PricingPlanPartnerTemplatesErrors[keyof GetV1PricingPlanPartnerTemplatesErrors]; +export type GetV1TimesheetsIdError = + GetV1TimesheetsIdErrors[keyof GetV1TimesheetsIdErrors]; -export type GetV1PricingPlanPartnerTemplatesResponses = { +export type GetV1TimesheetsIdResponses = { /** * Success */ - 200: ListPricingPlanPartnerTemplatesResponse; + 200: TimesheetResponse; }; -export type GetV1PricingPlanPartnerTemplatesResponse = - GetV1PricingPlanPartnerTemplatesResponses[keyof GetV1PricingPlanPartnerTemplatesResponses]; +export type GetV1TimesheetsIdResponse = + GetV1TimesheetsIdResponses[keyof GetV1TimesheetsIdResponses]; -export type GetV1PayrollCalendarsData = { +export type GetV1CompanyManagersData = { body?: never; - path?: never; - query?: { + headers: { /** - * Filter payroll calendars by country code + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - country_code?: string; + Authorization: string; + }; + path?: never; + query?: { /** - * Filter payroll calendars by year + * A Company ID to filter the results (only applicable for Integration Partners). */ - year?: string; + company_id?: string; /** * Starts fetching records after the given page */ page?: number; /** - * Number of items per page + * Change the amount of records returned per page, defaults to 20, limited to 100 */ page_size?: number; }; - url: '/v1/payroll-calendars'; + url: '/v1/company-managers'; }; -export type GetV1PayrollCalendarsErrors = { +export type GetV1CompanyManagersErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -14418,37 +14663,53 @@ export type GetV1PayrollCalendarsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1PayrollCalendarsError = - GetV1PayrollCalendarsErrors[keyof GetV1PayrollCalendarsErrors]; +export type GetV1CompanyManagersError = + GetV1CompanyManagersErrors[keyof GetV1CompanyManagersErrors]; -export type GetV1PayrollCalendarsResponses = { +export type GetV1CompanyManagersResponses = { /** * Success */ - 200: PayrollCalendarsEorResponse; + 200: CompanyManagersResponse; }; -export type GetV1PayrollCalendarsResponse = - GetV1PayrollCalendarsResponses[keyof GetV1PayrollCalendarsResponses]; +export type GetV1CompanyManagersResponse = + GetV1CompanyManagersResponses[keyof GetV1CompanyManagersResponses]; -export type PatchV1EmployeeTimeoffId2Data = { +export type PostV1CompanyManagersData = { /** - * UpdateTimeoff + * Company Manager params */ - body: UpdateEmployeeTimeoffParams; - path: { + body?: CompanyManagerParams; + headers: { /** - * Timeoff ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - id: string; + Authorization: string; }; - query?: never; - url: '/v1/employee/timeoff/{id}'; + path?: never; + query?: { + /** + * Complementary action(s) to perform when creating a company manager: + * + * - `no_invite` skips the email invitation step + * + */ + actions?: string; + }; + url: '/v1/company-managers'; }; -export type PatchV1EmployeeTimeoffId2Errors = { +export type PostV1CompanyManagersErrors = { /** * Bad Request */ @@ -14466,44 +14727,32 @@ export type PatchV1EmployeeTimeoffId2Errors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PatchV1EmployeeTimeoffId2Error = - PatchV1EmployeeTimeoffId2Errors[keyof PatchV1EmployeeTimeoffId2Errors]; +export type PostV1CompanyManagersError = + PostV1CompanyManagersErrors[keyof PostV1CompanyManagersErrors]; -export type PatchV1EmployeeTimeoffId2Responses = { +export type PostV1CompanyManagersResponses = { /** * Success */ - 200: TimeoffResponse; + 201: CompanyManagerData; }; -export type PatchV1EmployeeTimeoffId2Response = - PatchV1EmployeeTimeoffId2Responses[keyof PatchV1EmployeeTimeoffId2Responses]; +export type PostV1CompanyManagersResponse = + PostV1CompanyManagersResponses[keyof PostV1CompanyManagersResponses]; -export type PatchV1EmployeeTimeoffIdData = { - /** - * UpdateTimeoff - */ - body: UpdateEmployeeTimeoffParams; - path: { - /** - * Timeoff ID - */ - id: string; - }; +export type GetV1EmployeeLeavePoliciesSummaryData = { + body?: never; + path?: never; query?: never; - url: '/v1/employee/timeoff/{id}'; + url: '/v1/employee/leave-policies/summary'; }; -export type PatchV1EmployeeTimeoffIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmployeeLeavePoliciesSummaryErrors = { /** * Unauthorized */ @@ -14512,126 +14761,80 @@ export type PatchV1EmployeeTimeoffIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchV1EmployeeTimeoffIdError = - PatchV1EmployeeTimeoffIdErrors[keyof PatchV1EmployeeTimeoffIdErrors]; +export type GetV1EmployeeLeavePoliciesSummaryError = + GetV1EmployeeLeavePoliciesSummaryErrors[keyof GetV1EmployeeLeavePoliciesSummaryErrors]; -export type PatchV1EmployeeTimeoffIdResponses = { +export type GetV1EmployeeLeavePoliciesSummaryResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ListLeavePoliciesSummaryResponse; }; -export type PatchV1EmployeeTimeoffIdResponse = - PatchV1EmployeeTimeoffIdResponses[keyof PatchV1EmployeeTimeoffIdResponses]; +export type GetV1EmployeeLeavePoliciesSummaryResponse = + GetV1EmployeeLeavePoliciesSummaryResponses[keyof GetV1EmployeeLeavePoliciesSummaryResponses]; -export type GetV1IncentivesRecurringData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type PostV1PayItemsBulkData = { + /** + * Pay Items + */ + body: BulkCreatePayItemsParams; path?: never; - query?: { - /** - * Filter by recurring incentive status: active or deactive. - */ - status?: string; - /** - * Filter by recurring incentive type. - */ - type?: string; - /** - * Filter by recurring incentives that contain the value in their notes. - */ - note?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 - */ - page_size?: number; - }; - url: '/v1/incentives/recurring'; + query?: never; + url: '/v1/pay-items/bulk'; }; -export type GetV1IncentivesRecurringErrors = { +export type PostV1PayItemsBulkErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1IncentivesRecurringError = - GetV1IncentivesRecurringErrors[keyof GetV1IncentivesRecurringErrors]; +export type PostV1PayItemsBulkError = + PostV1PayItemsBulkErrors[keyof PostV1PayItemsBulkErrors]; -export type GetV1IncentivesRecurringResponses = { +export type PostV1PayItemsBulkResponses = { /** * Success */ - 201: ListRecurringIncentivesResponse; + 200: BulkCreatePayItemsResponse; }; -export type GetV1IncentivesRecurringResponse = - GetV1IncentivesRecurringResponses[keyof GetV1IncentivesRecurringResponses]; +export type PostV1PayItemsBulkResponse = + PostV1PayItemsBulkResponses[keyof PostV1PayItemsBulkResponses]; -export type PostV1IncentivesRecurringData = { - /** - * RecurringIncentive - */ - body?: CreateRecurringIncentiveParams; - headers: { +export type GetV1TravelLetterRequestsIdData = { + body?: never; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * travel letter request ID */ - Authorization: string; + id: UuidSlug; }; - path?: never; query?: never; - url: '/v1/incentives/recurring'; + url: '/v1/travel-letter-requests/{id}'; }; -export type PostV1IncentivesRecurringErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1TravelLetterRequestsIdErrors = { /** * Unauthorized */ @@ -14644,151 +14847,80 @@ export type PostV1IncentivesRecurringErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1IncentivesRecurringError = - PostV1IncentivesRecurringErrors[keyof PostV1IncentivesRecurringErrors]; +export type GetV1TravelLetterRequestsIdError = + GetV1TravelLetterRequestsIdErrors[keyof GetV1TravelLetterRequestsIdErrors]; -export type PostV1IncentivesRecurringResponses = { +export type GetV1TravelLetterRequestsIdResponses = { /** * Success */ - 201: RecurringIncentiveResponse; + 200: TravelLetterResponse; }; -export type PostV1IncentivesRecurringResponse = - PostV1IncentivesRecurringResponses[keyof PostV1IncentivesRecurringResponses]; +export type GetV1TravelLetterRequestsIdResponse = + GetV1TravelLetterRequestsIdResponses[keyof GetV1TravelLetterRequestsIdResponses]; -export type PostV1SandboxBenefitRenewalRequestsData = { +export type PatchV1TravelLetterRequestsId2Data = { /** - * Benefit Renewal Request + * Travel letter Request */ - body: BenefitRenewalRequestsCreateBenefitRenewalRequest; - headers: { + body: UpdateTravelLetterRequestParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Travel letter Request ID */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/sandbox/benefit-renewal-requests'; + url: '/v1/travel-letter-requests/{id}'; }; -export type PostV1SandboxBenefitRenewalRequestsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1TravelLetterRequestsId2Errors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type PostV1SandboxBenefitRenewalRequestsError = - PostV1SandboxBenefitRenewalRequestsErrors[keyof PostV1SandboxBenefitRenewalRequestsErrors]; +export type PatchV1TravelLetterRequestsId2Error = + PatchV1TravelLetterRequestsId2Errors[keyof PatchV1TravelLetterRequestsId2Errors]; -export type PostV1SandboxBenefitRenewalRequestsResponses = { +export type PatchV1TravelLetterRequestsId2Responses = { /** * Success */ - 200: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse; + 200: TravelLetterResponse; }; -export type PostV1SandboxBenefitRenewalRequestsResponse = - PostV1SandboxBenefitRenewalRequestsResponses[keyof PostV1SandboxBenefitRenewalRequestsResponses]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData = { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Document ID - */ - id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}'; -}; +export type PatchV1TravelLetterRequestsId2Response = + PatchV1TravelLetterRequestsId2Responses[keyof PatchV1TravelLetterRequestsId2Responses]; -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; +export type PatchV1TravelLetterRequestsIdData = { /** - * Unprocessable Entity + * Travel letter Request */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError = - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses = - { - /** - * Success - */ - 200: ContractDocumentResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponse = - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses]; - -export type GetV1EmploymentsEmploymentIdContractDocumentsData = { - body?: never; + body: UpdateTravelLetterRequestParams; path: { /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Filter by contract document statuses - */ - statuses?: Array; - /** - * Exclude contract documents with specific statuses - */ - except_statuses?: Array; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Travel letter Request ID */ - page_size?: number; + id: string; }; - url: '/v1/employments/{employment_id}/contract-documents'; + query?: never; + url: '/v1/travel-letter-requests/{id}'; }; -export type GetV1EmploymentsEmploymentIdContractDocumentsErrors = { +export type PatchV1TravelLetterRequestsIdErrors = { /** * Unauthorized */ @@ -14803,20 +14935,20 @@ export type GetV1EmploymentsEmploymentIdContractDocumentsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentsEmploymentIdContractDocumentsError = - GetV1EmploymentsEmploymentIdContractDocumentsErrors[keyof GetV1EmploymentsEmploymentIdContractDocumentsErrors]; +export type PatchV1TravelLetterRequestsIdError = + PatchV1TravelLetterRequestsIdErrors[keyof PatchV1TravelLetterRequestsIdErrors]; -export type GetV1EmploymentsEmploymentIdContractDocumentsResponses = { +export type PatchV1TravelLetterRequestsIdResponses = { /** * Success */ - 200: IndexContractDocumentsResponse; + 200: TravelLetterResponse; }; -export type GetV1EmploymentsEmploymentIdContractDocumentsResponse = - GetV1EmploymentsEmploymentIdContractDocumentsResponses[keyof GetV1EmploymentsEmploymentIdContractDocumentsResponses]; +export type PatchV1TravelLetterRequestsIdResponse = + PatchV1TravelLetterRequestsIdResponses[keyof PatchV1TravelLetterRequestsIdResponses]; -export type GetV1ExpensesData = { +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData = { body?: never; headers: { /** @@ -14827,21 +14959,17 @@ export type GetV1ExpensesData = { */ Authorization: string; }; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Company ID */ - page_size?: number; + company_id: string; }; - url: '/v1/expenses'; + query?: never; + url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks'; }; -export type GetV1ExpensesErrors = { +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors = { /** * Bad Request */ @@ -14864,42 +14992,27 @@ export type GetV1ExpensesErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ExpensesError = GetV1ExpensesErrors[keyof GetV1ExpensesErrors]; +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksError = + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors]; -export type GetV1ExpensesResponses = { +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses = { /** * Success */ - 201: ListExpenseResponse; + 200: SuccessResponse; }; -export type GetV1ExpensesResponse = - GetV1ExpensesResponses[keyof GetV1ExpensesResponses]; +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponse = + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses]; -export type PostV1ExpensesData = { - /** - * Expenses - */ - body?: ParamsToCreateExpense; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type GetV1EmployeeLeavePoliciesData = { + body?: never; path?: never; query?: never; - url: '/v1/expenses'; + url: '/v1/employee/leave-policies'; }; -export type PostV1ExpensesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmployeeLeavePoliciesErrors = { /** * Unauthorized */ @@ -14908,41 +15021,79 @@ export type PostV1ExpensesErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1ExpensesError = - PostV1ExpensesErrors[keyof PostV1ExpensesErrors]; +export type GetV1EmployeeLeavePoliciesError = + GetV1EmployeeLeavePoliciesErrors[keyof GetV1EmployeeLeavePoliciesErrors]; -export type PostV1ExpensesResponses = { +export type GetV1EmployeeLeavePoliciesResponses = { /** * Success */ - 201: ExpenseResponse; + 200: ListLeavePoliciesDetailsResponse; }; -export type PostV1ExpensesResponse = - PostV1ExpensesResponses[keyof PostV1ExpensesResponses]; +export type GetV1EmployeeLeavePoliciesResponse = + GetV1EmployeeLeavePoliciesResponses[keyof GetV1EmployeeLeavePoliciesResponses]; -export type GetV1SsoConfigurationData = { +export type GetV1CompaniesCompanyIdWebhookCallbacksData = { body?: never; - path?: never; + path: { + /** + * Company ID + */ + company_id: string; + }; query?: never; - url: '/v1/sso-configuration'; + url: '/v1/companies/{company_id}/webhook-callbacks'; }; -export type GetV1SsoConfigurationErrors = { +export type GetV1CompaniesCompanyIdWebhookCallbacksErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1CompaniesCompanyIdWebhookCallbacksError = + GetV1CompaniesCompanyIdWebhookCallbacksErrors[keyof GetV1CompaniesCompanyIdWebhookCallbacksErrors]; + +export type GetV1CompaniesCompanyIdWebhookCallbacksResponses = { + /** + * Success + */ + 200: ListWebhookCallbacksResponse; +}; + +export type GetV1CompaniesCompanyIdWebhookCallbacksResponse = + GetV1CompaniesCompanyIdWebhookCallbacksResponses[keyof GetV1CompaniesCompanyIdWebhookCallbacksResponses]; + +export type GetV1BillingDocumentsBillingDocumentIdPdfData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * The billing document's ID + */ + billing_document_id: string; + }; + query?: never; + url: '/v1/billing-documents/{billing_document_id}/pdf'; +}; + +export type GetV1BillingDocumentsBillingDocumentIdPdfErrors = { /** * Unauthorized */ @@ -14954,37 +15105,44 @@ export type GetV1SsoConfigurationErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1SsoConfigurationError = - GetV1SsoConfigurationErrors[keyof GetV1SsoConfigurationErrors]; +export type GetV1BillingDocumentsBillingDocumentIdPdfError = + GetV1BillingDocumentsBillingDocumentIdPdfErrors[keyof GetV1BillingDocumentsBillingDocumentIdPdfErrors]; -export type GetV1SsoConfigurationResponses = { +export type GetV1BillingDocumentsBillingDocumentIdPdfResponses = { /** * Success */ - 200: SsoConfigurationResponse; + 200: GenericFile; }; -export type GetV1SsoConfigurationResponse = - GetV1SsoConfigurationResponses[keyof GetV1SsoConfigurationResponses]; +export type GetV1BillingDocumentsBillingDocumentIdPdfResponse = + GetV1BillingDocumentsBillingDocumentIdPdfResponses[keyof GetV1BillingDocumentsBillingDocumentIdPdfResponses]; -export type PostV1SsoConfigurationData = { - /** - * CreateSSOConfiguration - */ - body: CreateSsoConfigurationParams; - path?: never; +export type DeleteV1WebhookCallbacksIdData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Webhook Callback ID + */ + id: string; + }; query?: never; - url: '/v1/sso-configuration'; + url: '/v1/webhook-callbacks/{id}'; }; -export type PostV1SsoConfigurationErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type DeleteV1WebhookCallbacksIdErrors = { /** * Unauthorized */ @@ -14993,49 +15151,84 @@ export type PostV1SsoConfigurationErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; +}; + +export type DeleteV1WebhookCallbacksIdError = + DeleteV1WebhookCallbacksIdErrors[keyof DeleteV1WebhookCallbacksIdErrors]; + +export type DeleteV1WebhookCallbacksIdResponses = { /** - * Unprocessable Entity + * Success */ - 429: TooManyRequestsResponse; + 200: SuccessResponse; }; -export type PostV1SsoConfigurationError = - PostV1SsoConfigurationErrors[keyof PostV1SsoConfigurationErrors]; +export type DeleteV1WebhookCallbacksIdResponse = + DeleteV1WebhookCallbacksIdResponses[keyof DeleteV1WebhookCallbacksIdResponses]; -export type PostV1SsoConfigurationResponses = { +export type PatchV1WebhookCallbacksIdData = { /** - * Created + * WebhookCallback */ - 201: CreateSsoConfigurationResponse; + body?: UpdateWebhookCallbackParams; + path: { + /** + * Webhook Callback ID + */ + id: string; + }; + query?: never; + url: '/v1/webhook-callbacks/{id}'; }; -export type PostV1SsoConfigurationResponse = - PostV1SsoConfigurationResponses[keyof PostV1SsoConfigurationResponses]; +export type PatchV1WebhookCallbacksIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsData = { +export type PatchV1WebhookCallbacksIdError = + PatchV1WebhookCallbacksIdErrors[keyof PatchV1WebhookCallbacksIdErrors]; + +export type PatchV1WebhookCallbacksIdResponses = { /** - * ContractorCreateTimesheetParams + * Success */ - body: ContractorCreateTimesheetParams; - path: { + 200: WebhookCallbackResponse; +}; + +export type PatchV1WebhookCallbacksIdResponse = + PatchV1WebhookCallbacksIdResponses[keyof PatchV1WebhookCallbacksIdResponses]; + +export type GetV1CountriesData = { + body?: never; + headers: { /** - * Contractor employment ID + * This endpoint works with any of the access tokens provided. You can use an access + * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. + * */ - employment_id: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/contractors/employments/{employment_id}/timesheets'; + url: '/v1/countries'; }; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { +export type GetV1CountriesErrors = { /** * Bad Request */ @@ -15044,10 +15237,6 @@ export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -15056,40 +15245,44 @@ export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsError = - PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors]; +export type GetV1CountriesError = + GetV1CountriesErrors[keyof GetV1CountriesErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses = { +export type GetV1CountriesResponses = { /** * Success */ - 200: ContractorTimesheetResponse; + 200: CountriesResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponse = - PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses]; +export type GetV1CountriesResponse = + GetV1CountriesResponses[keyof GetV1CountriesResponses]; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData = +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData = { body?: never; path: { /** - * Contract amendment request ID + * Company ID */ - contract_amendment_request_id: string; + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; }; query?: never; - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve'; + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility'; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors = +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; /** * Unauthorized */ @@ -15098,38 +15291,33 @@ export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors]; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityError = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors]; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses = +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: ContractorEligibilityResponse; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponse = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses]; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponse = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses]; -export type GetV1EmployeeLeavePoliciesData = { - body?: never; +export type PostV1CurrencyConverterEffectiveData = { + /** + * Convert currency parameters + */ + body: ConvertCurrencyParams; path?: never; query?: never; - url: '/v1/employee/leave-policies'; + url: '/v1/currency-converter/effective'; }; -export type GetV1EmployeeLeavePoliciesErrors = { +export type PostV1CurrencyConverterEffectiveErrors = { /** * Unauthorized */ @@ -15138,83 +15326,107 @@ export type GetV1EmployeeLeavePoliciesErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeLeavePoliciesError = - GetV1EmployeeLeavePoliciesErrors[keyof GetV1EmployeeLeavePoliciesErrors]; +export type PostV1CurrencyConverterEffectiveError = + PostV1CurrencyConverterEffectiveErrors[keyof PostV1CurrencyConverterEffectiveErrors]; -export type GetV1EmployeeLeavePoliciesResponses = { +export type PostV1CurrencyConverterEffectiveResponses = { /** * Success */ - 200: ListLeavePoliciesDetailsResponse; + 200: ConvertCurrencyResponse; }; -export type GetV1EmployeeLeavePoliciesResponse = - GetV1EmployeeLeavePoliciesResponses[keyof GetV1EmployeeLeavePoliciesResponses]; +export type PostV1CurrencyConverterEffectiveResponse = + PostV1CurrencyConverterEffectiveResponses[keyof PostV1CurrencyConverterEffectiveResponses]; -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData = { +export type GetV1EmployeePersonalInformationData = { body?: never; - path: { + path?: never; + query?: never; + url: '/v1/employee/personal-information'; +}; + +export type GetV1EmployeePersonalInformationErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1EmployeePersonalInformationError = + GetV1EmployeePersonalInformationErrors[keyof GetV1EmployeePersonalInformationErrors]; + +export type GetV1EmployeePersonalInformationResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type GetV1EmployeePersonalInformationResponse = + GetV1EmployeePersonalInformationResponses[keyof GetV1EmployeePersonalInformationResponses]; + +export type GetV1CountriesCountryCodeFormData = { + body?: never; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: { + path: { /** - * Restrict to currencies which payout is guaranteed (default: true) + * Country code according to ISO 3-digit alphabetic codes */ - restrict_to_guaranteed_pay_out_currencies?: boolean; - }; - url: '/v1/contractors/employments/{employment_id}/contractor-currencies'; -}; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors = - { + country_code: string; /** - * Unauthorized + * Name of the desired form */ - 401: UnauthorizedResponse; + form: string; + }; + query?: { /** - * Forbidden + * Required for `contract_amendment` form */ - 403: ForbiddenResponse; + employment_id?: string; /** - * Not Found + * FOR TESTING PURPOSES ONLY: Include scheduled benefit groups. */ - 404: NotFoundResponse; + only_for_testing_include_scheduled_benefit_groups?: boolean; /** - * Internal Server Error + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ - 500: InternalServerErrorResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesError = - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses = - { + skip_benefits?: boolean; /** - * Success + * Version of the form schema */ - 200: ContractorCurrencyResponse; + json_schema_version?: number | 'latest'; }; + url: '/v1/countries/{country_code}/{form}'; +}; -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponse = - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses]; - -export type PostV1WebhookEventsReplayData = { +export type GetV1CountriesCountryCodeFormErrors = { /** - * WebhookEvent + * Bad Request */ - body: ReplayWebhookEventsParams; - path?: never; - query?: never; - url: '/v1/webhook-events/replay'; -}; - -export type PostV1WebhookEventsReplayErrors = { + 400: BadRequestResponse; /** * Unauthorized */ @@ -15227,142 +15439,60 @@ export type PostV1WebhookEventsReplayErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1WebhookEventsReplayError = - PostV1WebhookEventsReplayErrors[keyof PostV1WebhookEventsReplayErrors]; +export type GetV1CountriesCountryCodeFormError = + GetV1CountriesCountryCodeFormErrors[keyof GetV1CountriesCountryCodeFormErrors]; -export type PostV1WebhookEventsReplayResponses = { +export type GetV1CountriesCountryCodeFormResponses = { /** * Success */ - 200: SuccessResponse; + 200: CountryFormResponse; }; -export type PostV1WebhookEventsReplayResponse = - PostV1WebhookEventsReplayResponses[keyof PostV1WebhookEventsReplayResponses]; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsError = - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors]; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses = - { - /** - * Created - */ - 201: CorTerminationRequestCreatedResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponse = - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses]; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdData = - { - body?: never; - path: { - /** - * Employment Id - */ - employment_id: UuidSlug; - /** - * Background Check Id - */ - background_check_id: UuidSlug; - }; - query?: never; - url: '/v1/employments/{employment_id}/background-checks/{background_check_id}'; - }; +export type GetV1CountriesCountryCodeFormResponse = + GetV1CountriesCountryCodeFormResponses[keyof GetV1CountriesCountryCodeFormResponses]; -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; +export type GetV2OffboardingsData = { + body?: never; + path?: never; + query?: { /** - * Unprocessable Entity + * Filter by Employment ID */ - 422: UnprocessableEntityResponse; - }; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdError = - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors]; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses = - { + employment_id?: string; /** - * Success + * Filter by offboarding type. Only `termination` and `resignation` offboardings are supported. */ - 200: BackgroundChecksBackgroundCheckResponse; - }; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponse = - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses]; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData = { - body?: never; - headers: { + type?: 'termination' | 'resignation'; /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. + * By default, the results do not include confidential termination requests. + * Send `include_confidential=true` to include confidential requests in the response. * */ - Authorization: string; - }; - path: { + include_confidential?: boolean; /** - * Benefit Renewal Request Id + * Starts fetching records after the given page */ - benefit_renewal_request_id: UuidSlug; - }; - query?: { + page?: number; /** - * Version of the form schema + * Change the amount of records returned per page, defaults to 20, limited to 100 */ - json_schema_version?: number | 'latest'; + page_size?: number; }; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema'; + url: '/v2/offboardings'; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors = { +export type GetV2OffboardingsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15375,27 +15505,27 @@ export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaError = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors]; +export type GetV2OffboardingsError = + GetV2OffboardingsErrors[keyof GetV2OffboardingsErrors]; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses = - { - /** - * Success - */ - 200: BenefitRenewalRequestsBenefitRenewalRequestFormResponse; - }; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponse = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses]; - -export type PostV1MagicLinkData = { +export type GetV2OffboardingsResponses = { /** - * Magic links generator body + * Success */ - body: MagicLinkParams; + 200: V2ListOffboardingResponse; +}; + +export type GetV2OffboardingsResponse = + GetV2OffboardingsResponses[keyof GetV2OffboardingsResponses]; + +export type GetV1TimeoffData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -15406,63 +15536,52 @@ export type PostV1MagicLinkData = { Authorization: string; }; path?: never; - query?: never; - url: '/v1/magic-link'; -}; - -export type PostV1MagicLinkErrors = { - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type PostV1MagicLinkError = - PostV1MagicLinkErrors[keyof PostV1MagicLinkErrors]; - -export type PostV1MagicLinkResponses = { - /** - * Success - */ - 200: MagicLinkResponse; -}; - -export type PostV1MagicLinkResponse = - PostV1MagicLinkResponses[keyof PostV1MagicLinkResponses]; - -export type PutV2EmploymentsEmploymentIdBasicInformationData = { - /** - * Employment basic information params - */ - body?: EmploymentBasicInformationParams; - path: { + query?: { /** - * Employment ID + * Only show time off for a specific employment */ - employment_id: string; - }; - query?: { + employment_id?: string; /** - * Version of the employment_basic_information form schema + * Filter time off by its type */ - employment_basic_information_json_schema_version?: number | 'latest'; + timeoff_type?: TimeoffType; + /** + * Filter time off by its status + */ + status?: TimeoffStatus; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'timeoff_type' | 'status'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v2/employments/{employment_id}/basic_information'; + url: '/v1/timeoff'; }; -export type PutV2EmploymentsEmploymentIdBasicInformationErrors = { +export type GetV1TimeoffErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -15473,21 +15592,23 @@ export type PutV2EmploymentsEmploymentIdBasicInformationErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdBasicInformationError = - PutV2EmploymentsEmploymentIdBasicInformationErrors[keyof PutV2EmploymentsEmploymentIdBasicInformationErrors]; +export type GetV1TimeoffError = GetV1TimeoffErrors[keyof GetV1TimeoffErrors]; -export type PutV2EmploymentsEmploymentIdBasicInformationResponses = { +export type GetV1TimeoffResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ListTimeoffResponse; }; -export type PutV2EmploymentsEmploymentIdBasicInformationResponse = - PutV2EmploymentsEmploymentIdBasicInformationResponses[keyof PutV2EmploymentsEmploymentIdBasicInformationResponses]; +export type GetV1TimeoffResponse = + GetV1TimeoffResponses[keyof GetV1TimeoffResponses]; -export type DeleteV1IncentivesRecurringIdData = { - body?: never; +export type PostV1TimeoffData = { + /** + * Timeoff + */ + body: CreateApprovedTimeoffParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -15497,17 +15618,12 @@ export type DeleteV1IncentivesRecurringIdData = { */ Authorization: string; }; - path: { - /** - * Recurring Incentive ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/incentives/recurring/{id}'; + url: '/v1/timeoff'; }; -export type DeleteV1IncentivesRecurringIdErrors = { +export type PostV1TimeoffErrors = { /** * Bad Request */ @@ -15525,121 +15641,61 @@ export type DeleteV1IncentivesRecurringIdErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type DeleteV1IncentivesRecurringIdError = - DeleteV1IncentivesRecurringIdErrors[keyof DeleteV1IncentivesRecurringIdErrors]; +export type PostV1TimeoffError = PostV1TimeoffErrors[keyof PostV1TimeoffErrors]; -export type DeleteV1IncentivesRecurringIdResponses = { +export type PostV1TimeoffResponses = { /** - * Success + * Created */ - 200: DeleteRecurringIncentiveResponse; + 201: TimeoffResponse; }; -export type DeleteV1IncentivesRecurringIdResponse = - DeleteV1IncentivesRecurringIdResponses[keyof DeleteV1IncentivesRecurringIdResponses]; +export type PostV1TimeoffResponse = + PostV1TimeoffResponses[keyof PostV1TimeoffResponses]; -export type GetV1IncentivesData = { +export type GetV1CostCalculatorCountriesData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path?: never; query?: { /** - * Filter by Employment ID - */ - employment_id?: string; - /** - * Filter by Incentive status - */ - status?: string; - /** - * Filter by Recurring Incentive id - */ - recurring_incentive_id?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * If the premium benefits should be included in the response */ - page_size?: number; + include_premium_benefits?: boolean; }; - url: '/v1/incentives'; -}; - -export type GetV1IncentivesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; + url: '/v1/cost-calculator/countries'; }; -export type GetV1IncentivesError = - GetV1IncentivesErrors[keyof GetV1IncentivesErrors]; - -export type GetV1IncentivesResponses = { +export type GetV1CostCalculatorCountriesResponses = { /** * Success */ - 200: ListIncentivesResponse; + 200: CostCalculatorListCountryResponse; }; -export type GetV1IncentivesResponse = - GetV1IncentivesResponses[keyof GetV1IncentivesResponses]; +export type GetV1CostCalculatorCountriesResponse = + GetV1CostCalculatorCountriesResponses[keyof GetV1CostCalculatorCountriesResponses]; -export type PostV1IncentivesData = { +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData = { /** - * Incentive + * Proof of Payment */ - body?: CreateOneTimeIncentiveParams; - headers: { + body: CreateRiskReserveProofOfPaymentParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; query?: never; - url: '/v1/incentives'; + url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments'; }; -export type PostV1IncentivesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors = { /** * Unauthorized */ @@ -15652,76 +15708,90 @@ export type PostV1IncentivesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1IncentivesError = - PostV1IncentivesErrors[keyof PostV1IncentivesErrors]; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsError = + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors]; -export type PostV1IncentivesResponses = { +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses = { /** * Success */ - 201: IncentiveResponse; + 200: RiskReserveProofOfPaymentResponse; }; -export type PostV1IncentivesResponse = - PostV1IncentivesResponses[keyof PostV1IncentivesResponses]; - -export type PostV1ProbationCompletionLetterData = { - /** - * Work Authorization Request - */ - body: CreateProbationCompletionLetterParams; - path?: never; - query?: never; - url: '/v1/probation-completion-letter'; -}; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponse = + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses]; -export type PostV1ProbationCompletionLetterErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdData = + { + body?: never; + path: { + /** + * Employment Id + */ + employment_id: UuidSlug; + /** + * Background Check Id + */ + background_check_id: UuidSlug; + }; + query?: never; + url: '/v1/employments/{employment_id}/background-checks/{background_check_id}'; + }; -export type PostV1ProbationCompletionLetterError = - PostV1ProbationCompletionLetterErrors[keyof PostV1ProbationCompletionLetterErrors]; +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + }; -export type PostV1ProbationCompletionLetterResponses = { - /** - * Success - */ - 200: ProbationCompletionLetterResponse; -}; +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdError = + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors]; -export type PostV1ProbationCompletionLetterResponse = - PostV1ProbationCompletionLetterResponses[keyof PostV1ProbationCompletionLetterResponses]; +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses = + { + /** + * Success + */ + 200: BackgroundChecksBackgroundCheckResponse; + }; -export type GetV1ContractorInvoiceSchedulesIdData = { +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponse = + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses]; + +export type GetV1TimeoffBalancesEmploymentIdData = { body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Resource unique identifier + * Employment ID for which to show the time off balance */ - id: UuidSlug; + employment_id: string; }; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/v1/timeoff-balances/{employment_id}'; }; -export type GetV1ContractorInvoiceSchedulesIdErrors = { +export type GetV1TimeoffBalancesEmploymentIdErrors = { /** * Bad Request */ @@ -15731,52 +15801,40 @@ export type GetV1ContractorInvoiceSchedulesIdErrors = { */ 401: UnauthorizedResponse; /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found + * TimeoffBalanceNotFoundResponse */ - 404: NotFoundResponse; + 404: TimeoffBalanceNotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoiceSchedulesIdError = - GetV1ContractorInvoiceSchedulesIdErrors[keyof GetV1ContractorInvoiceSchedulesIdErrors]; +export type GetV1TimeoffBalancesEmploymentIdError = + GetV1TimeoffBalancesEmploymentIdErrors[keyof GetV1TimeoffBalancesEmploymentIdErrors]; -export type GetV1ContractorInvoiceSchedulesIdResponses = { +export type GetV1TimeoffBalancesEmploymentIdResponses = { /** * Success */ - 200: ContractorInvoiceScheduleResponse; + 200: TimeoffBalanceResponse; }; -export type GetV1ContractorInvoiceSchedulesIdResponse = - GetV1ContractorInvoiceSchedulesIdResponses[keyof GetV1ContractorInvoiceSchedulesIdResponses]; +export type GetV1TimeoffBalancesEmploymentIdResponse = + GetV1TimeoffBalancesEmploymentIdResponses[keyof GetV1TimeoffBalancesEmploymentIdResponses]; -export type PatchV1ContractorInvoiceSchedulesId2Data = { - /** - * Update parameters - */ - body: UpdateScheduleContractorInvoiceParams; - path: { - /** - * Resource unique identifier - */ - id: UuidSlug; - }; +export type GetV1EmployeeExpensesData = { + body?: never; + path?: never; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/v1/employee/expenses'; }; -export type PatchV1ContractorInvoiceSchedulesId2Errors = { +export type GetV1EmployeeExpensesErrors = { /** * Unauthorized */ @@ -15789,41 +15847,36 @@ export type PatchV1ContractorInvoiceSchedulesId2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PatchV1ContractorInvoiceSchedulesId2Error = - PatchV1ContractorInvoiceSchedulesId2Errors[keyof PatchV1ContractorInvoiceSchedulesId2Errors]; +export type GetV1EmployeeExpensesError = + GetV1EmployeeExpensesErrors[keyof GetV1EmployeeExpensesErrors]; -export type PatchV1ContractorInvoiceSchedulesId2Responses = { +export type GetV1EmployeeExpensesResponses = { /** * Success */ - 200: ContractorInvoiceScheduleResponse; + 200: SuccessResponse; }; -export type PatchV1ContractorInvoiceSchedulesId2Response = - PatchV1ContractorInvoiceSchedulesId2Responses[keyof PatchV1ContractorInvoiceSchedulesId2Responses]; +export type GetV1EmployeeExpensesResponse = + GetV1EmployeeExpensesResponses[keyof GetV1EmployeeExpensesResponses]; -export type PatchV1ContractorInvoiceSchedulesIdData = { +export type PostV1EmployeeExpensesData = { /** - * Update parameters + * Expense params */ - body: UpdateScheduleContractorInvoiceParams; - path: { - /** - * Resource unique identifier - */ - id: UuidSlug; - }; + body?: ParamsToCreateEmployeeExpense; + path?: never; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/v1/employee/expenses'; }; -export type PatchV1ContractorInvoiceSchedulesIdErrors = { +export type PostV1EmployeeExpensesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15832,99 +15885,38 @@ export type PatchV1ContractorInvoiceSchedulesIdErrors = { * Forbidden */ 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type PatchV1ContractorInvoiceSchedulesIdError = - PatchV1ContractorInvoiceSchedulesIdErrors[keyof PatchV1ContractorInvoiceSchedulesIdErrors]; +export type PostV1EmployeeExpensesError = + PostV1EmployeeExpensesErrors[keyof PostV1EmployeeExpensesErrors]; -export type PatchV1ContractorInvoiceSchedulesIdResponses = { +export type PostV1EmployeeExpensesResponses = { /** - * Success + * Created */ - 200: ContractorInvoiceScheduleResponse; + 201: SuccessResponse; }; -export type PatchV1ContractorInvoiceSchedulesIdResponse = - PatchV1ContractorInvoiceSchedulesIdResponses[keyof PatchV1ContractorInvoiceSchedulesIdResponses]; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements'; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsError = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors]; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses = - { - /** - * Success - */ - 200: IndexPreOnboardingDocumentRequirementsResponse; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponse = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses]; +export type PostV1EmployeeExpensesResponse = + PostV1EmployeeExpensesResponses[keyof PostV1EmployeeExpensesResponses]; -export type GetV1BillingDocumentsBillingDocumentIdData = { +export type GetV1ResignationsOffboardingRequestIdResignationLetterData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path: { /** - * The billing document's ID - */ - billing_document_id: string; - }; - query?: { - /** - * When true, includes billing document items whose type is not part of the standard set for the invoice type. + * Offboarding request ID */ - include_unrecognized_types?: boolean; + offboarding_request_id: string; }; - url: '/v1/billing-documents/{billing_document_id}'; + query?: never; + url: '/v1/resignations/{offboarding_request_id}/resignation-letter'; }; -export type GetV1BillingDocumentsBillingDocumentIdErrors = { +export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { /** * Bad Request */ @@ -15933,6 +15925,10 @@ export type GetV1BillingDocumentsBillingDocumentIdErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -15947,30 +15943,49 @@ export type GetV1BillingDocumentsBillingDocumentIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdError = - GetV1BillingDocumentsBillingDocumentIdErrors[keyof GetV1BillingDocumentsBillingDocumentIdErrors]; +export type GetV1ResignationsOffboardingRequestIdResignationLetterError = + GetV1ResignationsOffboardingRequestIdResignationLetterErrors[keyof GetV1ResignationsOffboardingRequestIdResignationLetterErrors]; -export type GetV1BillingDocumentsBillingDocumentIdResponses = { +export type GetV1ResignationsOffboardingRequestIdResignationLetterResponses = { /** * Success */ - 200: BillingDocumentResponse; + 200: GenericFile; }; -export type GetV1BillingDocumentsBillingDocumentIdResponse = - GetV1BillingDocumentsBillingDocumentIdResponses[keyof GetV1BillingDocumentsBillingDocumentIdResponses]; +export type GetV1ResignationsOffboardingRequestIdResignationLetterResponse = + GetV1ResignationsOffboardingRequestIdResignationLetterResponses[keyof GetV1ResignationsOffboardingRequestIdResignationLetterResponses]; -export type PostV1CostCalculatorEstimationPdfData = { - /** - * Estimate params - */ - body?: CostCalculatorEstimateParams; - path?: never; +export type DeleteV1CompanyManagersUserIdData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * User ID + */ + user_id: string; + }; query?: never; - url: '/v1/cost-calculator/estimation-pdf'; + url: '/v1/company-managers/{user_id}'; }; -export type PostV1CostCalculatorEstimationPdfErrors = { +export type DeleteV1CompanyManagersUserIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -15979,34 +15994,46 @@ export type PostV1CostCalculatorEstimationPdfErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1CostCalculatorEstimationPdfError = - PostV1CostCalculatorEstimationPdfErrors[keyof PostV1CostCalculatorEstimationPdfErrors]; +export type DeleteV1CompanyManagersUserIdError = + DeleteV1CompanyManagersUserIdErrors[keyof DeleteV1CompanyManagersUserIdErrors]; -export type PostV1CostCalculatorEstimationPdfResponses = { +export type DeleteV1CompanyManagersUserIdResponses = { /** * Success */ - 200: CostCalculatorEstimatePdfResponse; + 200: SuccessResponse; }; -export type PostV1CostCalculatorEstimationPdfResponse = - PostV1CostCalculatorEstimationPdfResponses[keyof PostV1CostCalculatorEstimationPdfResponses]; +export type DeleteV1CompanyManagersUserIdResponse = + DeleteV1CompanyManagersUserIdResponses[keyof DeleteV1CompanyManagersUserIdResponses]; -export type GetV1WorkAuthorizationRequestsIdData = { +export type GetV1CompanyManagersUserIdData = { body?: never; path: { /** - * work authorization request ID + * User ID */ - id: string; + user_id: string; }; query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/v1/company-managers/{user_id}'; }; -export type GetV1WorkAuthorizationRequestsIdErrors = { +export type GetV1CompanyManagersUserIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -16015,37 +16042,86 @@ export type GetV1WorkAuthorizationRequestsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1WorkAuthorizationRequestsIdError = - GetV1WorkAuthorizationRequestsIdErrors[keyof GetV1WorkAuthorizationRequestsIdErrors]; +export type GetV1CompanyManagersUserIdError = + GetV1CompanyManagersUserIdErrors[keyof GetV1CompanyManagersUserIdErrors]; -export type GetV1WorkAuthorizationRequestsIdResponses = { +export type GetV1CompanyManagersUserIdResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: CompanyManagerResponse; }; -export type GetV1WorkAuthorizationRequestsIdResponse = - GetV1WorkAuthorizationRequestsIdResponses[keyof GetV1WorkAuthorizationRequestsIdResponses]; +export type GetV1CompanyManagersUserIdResponse = + GetV1CompanyManagersUserIdResponses[keyof GetV1CompanyManagersUserIdResponses]; -export type PatchV1WorkAuthorizationRequestsId2Data = { - /** - * Work Authorization Request - */ - body: UpdateWorkAuthorizationRequestParams; +export type GetV1EmploymentsEmploymentIdOnboardingStepsData = { + body?: never; path: { /** - * work authorization request ID + * Employment ID */ - id: string; + employment_id: UuidSlug; }; query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/v1/employments/{employment_id}/onboarding-steps'; }; -export type PatchV1WorkAuthorizationRequestsId2Errors = { +export type GetV1EmploymentsEmploymentIdOnboardingStepsErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1EmploymentsEmploymentIdOnboardingStepsError = + GetV1EmploymentsEmploymentIdOnboardingStepsErrors[keyof GetV1EmploymentsEmploymentIdOnboardingStepsErrors]; + +export type GetV1EmploymentsEmploymentIdOnboardingStepsResponses = { + /** + * Success + */ + 200: EmploymentOnboardingStepsResponse; +}; + +export type GetV1EmploymentsEmploymentIdOnboardingStepsResponse = + GetV1EmploymentsEmploymentIdOnboardingStepsResponses[keyof GetV1EmploymentsEmploymentIdOnboardingStepsResponses]; + +export type PostV1ContractAmendmentsAutomatableData = { + /** + * Contract Amendment + */ + body?: CreateContractAmendmentParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path?: never; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/contract-amendments/automatable'; +}; + +export type PostV1ContractAmendmentsAutomatableErrors = { /** * Unauthorized */ @@ -16060,35 +16136,40 @@ export type PatchV1WorkAuthorizationRequestsId2Errors = { 422: UnprocessableEntityResponse; }; -export type PatchV1WorkAuthorizationRequestsId2Error = - PatchV1WorkAuthorizationRequestsId2Errors[keyof PatchV1WorkAuthorizationRequestsId2Errors]; +export type PostV1ContractAmendmentsAutomatableError = + PostV1ContractAmendmentsAutomatableErrors[keyof PostV1ContractAmendmentsAutomatableErrors]; -export type PatchV1WorkAuthorizationRequestsId2Responses = { +export type PostV1ContractAmendmentsAutomatableResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: ContractAmendmentAutomatableResponse; }; -export type PatchV1WorkAuthorizationRequestsId2Response = - PatchV1WorkAuthorizationRequestsId2Responses[keyof PatchV1WorkAuthorizationRequestsId2Responses]; +export type PostV1ContractAmendmentsAutomatableResponse = + PostV1ContractAmendmentsAutomatableResponses[keyof PostV1ContractAmendmentsAutomatableResponses]; -export type PatchV1WorkAuthorizationRequestsIdData = { - /** - * Work Authorization Request - */ - body: UpdateWorkAuthorizationRequestParams; - path: { +export type GetV1PayrollRunsData = { + body?: never; + path?: never; + query?: { /** - * work authorization request ID + * Filters payroll runs where period_start or period_end match the given date */ - id: string; + payroll_period?: Date; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/v1/payroll-runs'; }; -export type PatchV1WorkAuthorizationRequestsIdErrors = { +export type GetV1PayrollRunsErrors = { /** * Unauthorized */ @@ -16103,55 +16184,68 @@ export type PatchV1WorkAuthorizationRequestsIdErrors = { 422: UnprocessableEntityResponse; }; -export type PatchV1WorkAuthorizationRequestsIdError = - PatchV1WorkAuthorizationRequestsIdErrors[keyof PatchV1WorkAuthorizationRequestsIdErrors]; +export type GetV1PayrollRunsError = + GetV1PayrollRunsErrors[keyof GetV1PayrollRunsErrors]; -export type PatchV1WorkAuthorizationRequestsIdResponses = { +export type GetV1PayrollRunsResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: ListPayrollRunResponse; }; -export type PatchV1WorkAuthorizationRequestsIdResponse = - PatchV1WorkAuthorizationRequestsIdResponses[keyof PatchV1WorkAuthorizationRequestsIdResponses]; +export type GetV1PayrollRunsResponse = + GetV1PayrollRunsResponses[keyof GetV1PayrollRunsResponses]; -export type GetV1EmployeeLeavePoliciesSummaryData = { +export type GetV1EmployeeIncentivesData = { body?: never; path?: never; query?: never; - url: '/v1/employee/leave-policies/summary'; + url: '/v1/employee/incentives'; }; -export type GetV1EmployeeLeavePoliciesSummaryErrors = { +export type GetV1EmployeeIncentivesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; }; -export type GetV1EmployeeLeavePoliciesSummaryError = - GetV1EmployeeLeavePoliciesSummaryErrors[keyof GetV1EmployeeLeavePoliciesSummaryErrors]; +export type GetV1EmployeeIncentivesError = + GetV1EmployeeIncentivesErrors[keyof GetV1EmployeeIncentivesErrors]; -export type GetV1EmployeeLeavePoliciesSummaryResponses = { +export type GetV1EmployeeIncentivesResponses = { /** * Success */ - 200: ListLeavePoliciesSummaryResponse; + 200: SuccessResponse; }; -export type GetV1EmployeeLeavePoliciesSummaryResponse = - GetV1EmployeeLeavePoliciesSummaryResponses[keyof GetV1EmployeeLeavePoliciesSummaryResponses]; +export type GetV1EmployeeIncentivesResponse = + GetV1EmployeeIncentivesResponses[keyof GetV1EmployeeIncentivesResponses]; -export type PutV2EmploymentsEmploymentIdFederalTaxesData = { +export type PatchV1SandboxEmploymentsEmploymentId2Data = { /** - * Employment federal taxes params + * Employment params */ - body?: EmploymentFederalTaxesParams; + body?: EmploymentUpdateParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** * Employment ID @@ -16159,18 +16253,18 @@ export type PutV2EmploymentsEmploymentIdFederalTaxesData = { employment_id: string; }; query?: never; - url: '/v2/employments/{employment_id}/federal-taxes'; + url: '/v1/sandbox/employments/{employment_id}'; }; -export type PutV2EmploymentsEmploymentIdFederalTaxesErrors = { +export type PatchV1SandboxEmploymentsEmploymentId2Errors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -16184,35 +16278,49 @@ export type PutV2EmploymentsEmploymentIdFederalTaxesErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdFederalTaxesError = - PutV2EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV2EmploymentsEmploymentIdFederalTaxesErrors]; +export type PatchV1SandboxEmploymentsEmploymentId2Error = + PatchV1SandboxEmploymentsEmploymentId2Errors[keyof PatchV1SandboxEmploymentsEmploymentId2Errors]; -export type PutV2EmploymentsEmploymentIdFederalTaxesResponses = { +export type PatchV1SandboxEmploymentsEmploymentId2Responses = { /** * Success */ - 200: SuccessResponse; + 200: EmploymentResponse; }; -export type PutV2EmploymentsEmploymentIdFederalTaxesResponse = - PutV2EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV2EmploymentsEmploymentIdFederalTaxesResponses]; +export type PatchV1SandboxEmploymentsEmploymentId2Response = + PatchV1SandboxEmploymentsEmploymentId2Responses[keyof PatchV1SandboxEmploymentsEmploymentId2Responses]; -export type PostV1ProbationExtensionsData = { +export type PatchV1SandboxEmploymentsEmploymentIdData = { /** - * ProbationExtension + * Employment params */ - body: CreateProbationExtensionParams; - path?: never; + body?: EmploymentUpdateParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/probation-extensions'; + url: '/v1/sandbox/employments/{employment_id}'; }; -export type PostV1ProbationExtensionsErrors = { +export type PatchV1SandboxEmploymentsEmploymentIdErrors = { /** * Bad Request */ @@ -16225,24 +16333,87 @@ export type PostV1ProbationExtensionsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1ProbationExtensionsError = - PostV1ProbationExtensionsErrors[keyof PostV1ProbationExtensionsErrors]; +export type PatchV1SandboxEmploymentsEmploymentIdError = + PatchV1SandboxEmploymentsEmploymentIdErrors[keyof PatchV1SandboxEmploymentsEmploymentIdErrors]; -export type PostV1ProbationExtensionsResponses = { +export type PatchV1SandboxEmploymentsEmploymentIdResponses = { /** * Success */ - 200: ProbationExtensionResponse; + 200: EmploymentResponse; }; -export type PostV1ProbationExtensionsResponse = - PostV1ProbationExtensionsResponses[keyof PostV1ProbationExtensionsResponses]; +export type PatchV1SandboxEmploymentsEmploymentIdResponse = + PatchV1SandboxEmploymentsEmploymentIdResponses[keyof PatchV1SandboxEmploymentsEmploymentIdResponses]; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Benefit Renewal Request Id + */ + benefit_renewal_request_id: UuidSlug; + }; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema'; +}; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaError = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors]; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses = + { + /** + * Success + */ + 200: BenefitRenewalRequestsBenefitRenewalRequestFormResponse; + }; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponse = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses]; export type PutV2EmploymentsEmploymentIdBillingAddressDetailsData = { /** @@ -16308,27 +16479,28 @@ export type PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses = { export type PutV2EmploymentsEmploymentIdBillingAddressDetailsResponse = PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses]; -export type PutV2EmploymentsEmploymentIdAddressDetailsData = { - /** - * Employment address details params - */ - body?: EmploymentAddressDetailsParams; - path: { +export type DeleteV1IncentivesIdData = { + body?: never; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: { + path: { /** - * Version of the address_details form schema + * Incentive ID */ - address_details_json_schema_version?: number | 'latest'; + id: string; }; - url: '/v2/employments/{employment_id}/address_details'; + query?: never; + url: '/v1/incentives/{id}'; }; -export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { +export type DeleteV1IncentivesIdErrors = { /** * Bad Request */ @@ -16337,10 +16509,6 @@ export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -16354,35 +16522,50 @@ export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdAddressDetailsError = - PutV2EmploymentsEmploymentIdAddressDetailsErrors[keyof PutV2EmploymentsEmploymentIdAddressDetailsErrors]; +export type DeleteV1IncentivesIdError = + DeleteV1IncentivesIdErrors[keyof DeleteV1IncentivesIdErrors]; -export type PutV2EmploymentsEmploymentIdAddressDetailsResponses = { +export type DeleteV1IncentivesIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: SuccessResponse; }; -export type PutV2EmploymentsEmploymentIdAddressDetailsResponse = - PutV2EmploymentsEmploymentIdAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdAddressDetailsResponses]; +export type DeleteV1IncentivesIdResponse = + DeleteV1IncentivesIdResponses[keyof DeleteV1IncentivesIdResponses]; -export type PostV1RiskReserveData = { - /** - * Risk Reserve - */ - body: CreateRiskReserveParams; - path?: never; +export type GetV1IncentivesIdData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Incentive ID + */ + id: string; + }; query?: never; - url: '/v1/risk-reserve'; + url: '/v1/incentives/{id}'; }; -export type PostV1RiskReserveErrors = { +export type GetV1IncentivesIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -16395,37 +16578,54 @@ export type PostV1RiskReserveErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1RiskReserveError = - PostV1RiskReserveErrors[keyof PostV1RiskReserveErrors]; +export type GetV1IncentivesIdError = + GetV1IncentivesIdErrors[keyof GetV1IncentivesIdErrors]; -export type PostV1RiskReserveResponses = { +export type GetV1IncentivesIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: IncentiveResponse; }; -export type PostV1RiskReserveResponse = - PostV1RiskReserveResponses[keyof PostV1RiskReserveResponses]; +export type GetV1IncentivesIdResponse = + GetV1IncentivesIdResponses[keyof GetV1IncentivesIdResponses]; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData = { +export type PatchV1IncentivesId2Data = { /** - * Proof of Payment + * Incentive */ - body: CreateRiskReserveProofOfPaymentParams; + body?: UpdateIncentiveParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Employment ID + * Incentive ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments'; + url: '/v1/incentives/{id}'; }; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors = { +export type PatchV1IncentivesId2Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -16434,107 +16634,38 @@ export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsError = - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors]; +export type PatchV1IncentivesId2Error = + PatchV1IncentivesId2Errors[keyof PatchV1IncentivesId2Errors]; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses = { +export type PatchV1IncentivesId2Responses = { /** * Success */ - 200: RiskReserveProofOfPaymentResponse; + 200: IncentiveResponse; }; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponse = - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses]; +export type PatchV1IncentivesId2Response = + PatchV1IncentivesId2Responses[keyof PatchV1IncentivesId2Responses]; -export type GetV1CompaniesCompanyIdComplianceProfileData = { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/compliance-profile'; -}; - -export type GetV1CompaniesCompanyIdComplianceProfileErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1CompaniesCompanyIdComplianceProfileError = - GetV1CompaniesCompanyIdComplianceProfileErrors[keyof GetV1CompaniesCompanyIdComplianceProfileErrors]; - -export type GetV1CompaniesCompanyIdComplianceProfileResponses = { - /** - * Success - */ - 200: CompanyComplianceProfileResponse; -}; - -export type GetV1CompaniesCompanyIdComplianceProfileResponse = - GetV1CompaniesCompanyIdComplianceProfileResponses[keyof GetV1CompaniesCompanyIdComplianceProfileResponses]; - -export type GetV1CompaniesCompanyIdProductPricesData = { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/product-prices'; -}; - -export type GetV1CompaniesCompanyIdProductPricesErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1CompaniesCompanyIdProductPricesError = - GetV1CompaniesCompanyIdProductPricesErrors[keyof GetV1CompaniesCompanyIdProductPricesErrors]; - -export type GetV1CompaniesCompanyIdProductPricesResponses = { +export type PatchV1IncentivesIdData = { /** - * Success + * Incentive */ - 200: ListProductPricesResponse; -}; - -export type GetV1CompaniesCompanyIdProductPricesResponse = - GetV1CompaniesCompanyIdProductPricesResponses[keyof GetV1CompaniesCompanyIdProductPricesResponses]; - -export type GetV1CompaniesCompanyIdData = { - body?: never; + body?: UpdateIncentiveParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -16546,15 +16677,15 @@ export type GetV1CompaniesCompanyIdData = { }; path: { /** - * Company ID + * Incentive ID */ - company_id: string; + id: string; }; query?: never; - url: '/v1/companies/{company_id}'; + url: '/v1/incentives/{id}'; }; -export type GetV1CompaniesCompanyIdErrors = { +export type PatchV1IncentivesIdErrors = { /** * Bad Request */ @@ -16567,6 +16698,10 @@ export type GetV1CompaniesCompanyIdErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -16577,54 +16712,153 @@ export type GetV1CompaniesCompanyIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1CompaniesCompanyIdError = - GetV1CompaniesCompanyIdErrors[keyof GetV1CompaniesCompanyIdErrors]; +export type PatchV1IncentivesIdError = + PatchV1IncentivesIdErrors[keyof PatchV1IncentivesIdErrors]; -export type GetV1CompaniesCompanyIdResponses = { +export type PatchV1IncentivesIdResponses = { /** * Success */ - 200: CompanyResponse; + 200: IncentiveResponse; }; -export type GetV1CompaniesCompanyIdResponse = - GetV1CompaniesCompanyIdResponses[keyof GetV1CompaniesCompanyIdResponses]; +export type PatchV1IncentivesIdResponse = + PatchV1IncentivesIdResponses[keyof PatchV1IncentivesIdResponses]; -export type PatchV1CompaniesCompanyId2Data = { - /** - * Update Company params - */ - body?: UpdateCompanyParams; - headers: { +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = + { + body?: never; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; + }; + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = + { + /** + * ShowLegalEntityAdministrativeDetailsResponse * + * Country specific json schema driven administrative details for legal entities */ - Authorization: string; + 200: { + data: { + [key: string]: unknown; + }; + }; }; - path: { + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = + { /** - * Company ID + * Legal entity administrative details params + */ + body?: AdministrativeDetailsParams; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; + }; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; + }; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = + { + /** + * ShowLegalEntityAdministrativeDetailsResponse * + * Country specific json schema driven administrative details for legal entities */ - company_id: string; + 200: { + data: { + [key: string]: unknown; + }; + }; }; - query?: { + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; + +export type PutV2EmploymentsEmploymentIdBankAccountDetailsData = { + /** + * Employment bank account details params + */ + body?: EmploymentBankAccountDetailsParams; + path: { /** - * Version of the address_details form schema + * Employment ID */ - address_details_json_schema_version?: number | 'latest'; + employment_id: string; + }; + query?: { /** * Version of the bank_account_details form schema */ bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v1/companies/{company_id}'; + url: '/v2/employments/{employment_id}/bank_account_details'; }; -export type PatchV1CompaniesCompanyId2Errors = { +export type PutV2EmploymentsEmploymentIdBankAccountDetailsErrors = { /** * Bad Request */ @@ -16633,76 +16867,114 @@ export type PatchV1CompaniesCompanyId2Errors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PatchV1CompaniesCompanyId2Error = - PatchV1CompaniesCompanyId2Errors[keyof PatchV1CompaniesCompanyId2Errors]; +export type PutV2EmploymentsEmploymentIdBankAccountDetailsError = + PutV2EmploymentsEmploymentIdBankAccountDetailsErrors[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsErrors]; -export type PatchV1CompaniesCompanyId2Responses = { +export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponses = { /** * Success */ - 200: CompanyResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PatchV1CompaniesCompanyId2Response = - PatchV1CompaniesCompanyId2Responses[keyof PatchV1CompaniesCompanyId2Responses]; +export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponse = + PutV2EmploymentsEmploymentIdBankAccountDetailsResponses[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsResponses]; -export type PatchV1CompaniesCompanyIdData = { - /** - * Update Company params - */ - body?: UpdateCompanyParams; - headers: { +export type GetV1ContractorInvoicesData = { + body?: never; + path?: never; + query?: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Filters contractor invoices by status matching the value. */ - Authorization: string; - }; - path: { + status?: ContractorInvoiceStatus; /** - * Company ID - * + * Filters contractor invoices by invoice schedule ID matching the value. */ - company_id: string; - }; - query?: { + contractor_invoice_schedule_id?: UuidSlug; /** - * Version of the address_details form schema + * Filters contractor invoices by date greater than or equal to the value. */ - address_details_json_schema_version?: number | 'latest'; + date_from?: Date; /** - * Version of the bank_account_details form schema + * Filters contractor invoices by date less than or equal to the value. */ - bank_account_details_json_schema_version?: number | 'latest'; + date_to?: Date; + /** + * Filters contractor invoices by due date greater than or equal to the value. + */ + due_date_from?: Date; + /** + * Filters contractor invoices by due date less than or equal to the value. + */ + due_date_to?: Date; + /** + * Filters contractor invoices by approved date greater than or equal to the value. + */ + approved_date_from?: Date; + /** + * Filters contractor invoices by approved date less than or equal to the value. + */ + approved_date_to?: Date; + /** + * Filters contractor invoices by paid out date greater than or equal to the value. + */ + paid_out_date_from?: Date; + /** + * Filters contractor invoices by paid out date less than or equal to the value. + */ + paid_out_date_to?: Date; + /** + * Field to sort by + */ + sort_by?: 'date' | 'due_date' | 'approved_at' | 'paid_out_at'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/companies/{company_id}'; + url: '/v1/contractor-invoices'; }; -export type PatchV1CompaniesCompanyIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ContractorInvoicesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -16711,38 +16983,46 @@ export type PatchV1CompaniesCompanyIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1CompaniesCompanyIdError = - PatchV1CompaniesCompanyIdErrors[keyof PatchV1CompaniesCompanyIdErrors]; +export type GetV1ContractorInvoicesError = + GetV1ContractorInvoicesErrors[keyof GetV1ContractorInvoicesErrors]; -export type PatchV1CompaniesCompanyIdResponses = { +export type GetV1ContractorInvoicesResponses = { /** * Success */ - 200: CompanyResponse; + 200: ListContractorInvoicesResponse; }; -export type PatchV1CompaniesCompanyIdResponse = - PatchV1CompaniesCompanyIdResponses[keyof PatchV1CompaniesCompanyIdResponses]; +export type GetV1ContractorInvoicesResponse = + GetV1ContractorInvoicesResponses[keyof GetV1ContractorInvoicesResponses]; -export type GetV1EmployeeAddressData = { +export type GetV1ExpensesCategoriesData = { body?: never; path?: never; query?: { /** - * Version of the address_details form schema + * The employment ID for which to list categories. Required if neither expense_id nor country_code is provided. */ - address_details_json_schema_version?: number | 'latest'; + employment_id?: string; + /** + * The expense ID for which to list categories (includes the expense's category, even if it is not selectable by default). If provided without employment_id, will use the expense's employment context. + */ + expense_id?: string; + /** + * Include un-selectable intermediate categories in the response + */ + include_parents?: boolean; + /** + * Filter categories by country (ISO 3166-1 alpha-3 code, e.g. "GBR"). Only used when neither employment_id nor expense_id is provided. + */ + country_code?: string; }; - url: '/v1/employee/address'; + url: '/v1/expenses/categories'; }; -export type GetV1EmployeeAddressErrors = { +export type GetV1ExpensesCategoriesErrors = { /** * Bad Request */ @@ -16751,10 +17031,6 @@ export type GetV1EmployeeAddressErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -16762,50 +17038,60 @@ export type GetV1EmployeeAddressErrors = { /** * Unprocessable Entity */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ 429: TooManyRequestsResponse; }; -export type GetV1EmployeeAddressError = - GetV1EmployeeAddressErrors[keyof GetV1EmployeeAddressErrors]; +export type GetV1ExpensesCategoriesError = + GetV1ExpensesCategoriesErrors[keyof GetV1ExpensesCategoriesErrors]; -export type GetV1EmployeeAddressResponses = { +export type GetV1ExpensesCategoriesResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ListExpenseCategoriesResponse; }; -export type GetV1EmployeeAddressResponse = - GetV1EmployeeAddressResponses[keyof GetV1EmployeeAddressResponses]; +export type GetV1ExpensesCategoriesResponse = + GetV1ExpensesCategoriesResponses[keyof GetV1ExpensesCategoriesResponses]; -export type PutV1EmployeeAddressData = { - /** - * Employee address details params - */ - body?: EmploymentAddressDetailsParams; - path?: never; +export type GetV1EmploymentsEmploymentIdContractDocumentsData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: { /** - * Version of the address_details form schema + * Filter by contract document statuses */ - address_details_json_schema_version?: number | 'latest'; + statuses?: Array; + /** + * Exclude contract documents with specific statuses + */ + except_statuses?: Array; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/employee/address'; + url: '/v1/employments/{employment_id}/contract-documents'; }; -export type PutV1EmployeeAddressErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdContractDocumentsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -16814,38 +17100,43 @@ export type PutV1EmployeeAddressErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV1EmployeeAddressError = - PutV1EmployeeAddressErrors[keyof PutV1EmployeeAddressErrors]; +export type GetV1EmploymentsEmploymentIdContractDocumentsError = + GetV1EmploymentsEmploymentIdContractDocumentsErrors[keyof GetV1EmploymentsEmploymentIdContractDocumentsErrors]; -export type PutV1EmployeeAddressResponses = { +export type GetV1EmploymentsEmploymentIdContractDocumentsResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: IndexContractDocumentsResponse; }; -export type PutV1EmployeeAddressResponse = - PutV1EmployeeAddressResponses[keyof PutV1EmployeeAddressResponses]; +export type GetV1EmploymentsEmploymentIdContractDocumentsResponse = + GetV1EmploymentsEmploymentIdContractDocumentsResponses[keyof GetV1EmploymentsEmploymentIdContractDocumentsResponses]; -export type GetV1ResignationsOffboardingRequestIdResignationLetterData = { +export type GetV1CountriesCountryCodeContractorContractDetailsData = { body?: never; path: { /** - * Offboarding request ID + * Country code according to ISO 3-digit alphabetic codes */ - offboarding_request_id: string; + country_code: string; }; - query?: never; - url: '/v1/resignations/{offboarding_request_id}/resignation-letter'; + query?: { + /** + * Employment ID + */ + employment_id?: string; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/countries/{country_code}/contractor-contract-details'; }; -export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { +export type GetV1CountriesCountryCodeContractorContractDetailsErrors = { /** * Bad Request */ @@ -16854,10 +17145,6 @@ export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -16872,95 +17159,76 @@ export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ResignationsOffboardingRequestIdResignationLetterError = - GetV1ResignationsOffboardingRequestIdResignationLetterErrors[keyof GetV1ResignationsOffboardingRequestIdResignationLetterErrors]; +export type GetV1CountriesCountryCodeContractorContractDetailsError = + GetV1CountriesCountryCodeContractorContractDetailsErrors[keyof GetV1CountriesCountryCodeContractorContractDetailsErrors]; -export type GetV1ResignationsOffboardingRequestIdResignationLetterResponses = { +export type GetV1CountriesCountryCodeContractorContractDetailsResponses = { /** * Success */ - 200: GenericFile; + 200: ContractorContractDetailsResponse; }; -export type GetV1ResignationsOffboardingRequestIdResignationLetterResponse = - GetV1ResignationsOffboardingRequestIdResignationLetterResponses[keyof GetV1ResignationsOffboardingRequestIdResignationLetterResponses]; +export type GetV1CountriesCountryCodeContractorContractDetailsResponse = + GetV1CountriesCountryCodeContractorContractDetailsResponses[keyof GetV1CountriesCountryCodeContractorContractDetailsResponses]; -export type PutV1EmploymentsEmploymentIdFederalTaxesData = { - /** - * Employment federal taxes params - */ - body?: EmploymentFederalTaxesParams; +export type GetV1ScimV2UsersIdData = { + body?: never; path: { /** - * Employment ID + * User ID (slug) */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employments/{employment_id}/federal-taxes'; + url: '/v1/scim/v2/Users/{id}'; }; -export type PutV1EmploymentsEmploymentIdFederalTaxesErrors = { +export type GetV1ScimV2UsersIdErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: IntegrationsScimErrorResponse; /** * Forbidden */ - 403: ForbiddenResponse; + 403: IntegrationsScimErrorResponse; /** * Not Found */ - 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; + 404: IntegrationsScimErrorResponse; }; -export type PutV1EmploymentsEmploymentIdFederalTaxesError = - PutV1EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV1EmploymentsEmploymentIdFederalTaxesErrors]; +export type GetV1ScimV2UsersIdError = + GetV1ScimV2UsersIdErrors[keyof GetV1ScimV2UsersIdErrors]; -export type PutV1EmploymentsEmploymentIdFederalTaxesResponses = { +export type GetV1ScimV2UsersIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: IntegrationsScimUser; }; -export type PutV1EmploymentsEmploymentIdFederalTaxesResponse = - PutV1EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV1EmploymentsEmploymentIdFederalTaxesResponses]; +export type GetV1ScimV2UsersIdResponse = + GetV1ScimV2UsersIdResponses[keyof GetV1ScimV2UsersIdResponses]; -export type GetV1ContractAmendmentsData = { +export type GetV1EmploymentsEmploymentIdFilesData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; query?: { /** - * Employment ID + * Filter by file type (optional) */ - employment_id?: string; + type?: string; /** - * Contract Amendment status + * Filter by file sub_type (optional) */ - status?: ContractAmendmentStatus; + sub_type?: string; /** * Starts fetching records after the given page */ @@ -16970,10 +17238,10 @@ export type GetV1ContractAmendmentsData = { */ page_size?: number; }; - url: '/v1/contract-amendments'; + url: '/v1/employments/{employment_id}/files'; }; -export type GetV1ContractAmendmentsErrors = { +export type GetV1EmploymentsEmploymentIdFilesErrors = { /** * Unauthorized */ @@ -16988,140 +17256,136 @@ export type GetV1ContractAmendmentsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ContractAmendmentsError = - GetV1ContractAmendmentsErrors[keyof GetV1ContractAmendmentsErrors]; +export type GetV1EmploymentsEmploymentIdFilesError = + GetV1EmploymentsEmploymentIdFilesErrors[keyof GetV1EmploymentsEmploymentIdFilesErrors]; -export type GetV1ContractAmendmentsResponses = { +export type GetV1EmploymentsEmploymentIdFilesResponses = { /** * Success */ - 200: ListContractAmendmentResponse; + 200: ListFilesResponse; }; -export type GetV1ContractAmendmentsResponse = - GetV1ContractAmendmentsResponses[keyof GetV1ContractAmendmentsResponses]; +export type GetV1EmploymentsEmploymentIdFilesResponse = + GetV1EmploymentsEmploymentIdFilesResponses[keyof GetV1EmploymentsEmploymentIdFilesResponses]; -export type PostV1ContractAmendmentsData = { - /** - * Contract Amendment - */ - body?: CreateContractAmendmentParams; - headers: { +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Manage Contractor Plus subscription params */ - Authorization: string; + body: ManageContractorPlusSubscriptionOperationsParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription'; }; - path?: never; - query?: { + +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors = + { /** - * Version of the form schema + * Bad Request */ - json_schema_version?: number | 'latest'; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; }; - url: '/v1/contract-amendments'; -}; -export type PostV1ContractAmendmentsErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionError = + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors]; -export type PostV1ContractAmendmentsError = - PostV1ContractAmendmentsErrors[keyof PostV1ContractAmendmentsErrors]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses = + { + /** + * Success + */ + 200: SuccessResponse; + }; -export type PostV1ContractAmendmentsResponses = { +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponse = + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses]; + +export type PostV1ContractorsEligibilityQuestionnaireData = { /** - * Success + * Eligibility questionnaire submission */ - 200: ContractAmendmentResponse; -}; - -export type PostV1ContractAmendmentsResponse = - PostV1ContractAmendmentsResponses[keyof PostV1ContractAmendmentsResponses]; - -export type GetV1PayrollRunsPayrollRunIdData = { - body?: never; - path: { + body: SubmitEligibilityQuestionnaireRequest; + path?: never; + query?: { /** - * Payroll run ID + * Version of the form schema */ - payroll_run_id: string; + json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/payroll-runs/{payroll_run_id}'; + url: '/v1/contractors/eligibility-questionnaire'; }; -export type GetV1PayrollRunsPayrollRunIdErrors = { +export type PostV1ContractorsEligibilityQuestionnaireErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictErrorResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type GetV1PayrollRunsPayrollRunIdError = - GetV1PayrollRunsPayrollRunIdErrors[keyof GetV1PayrollRunsPayrollRunIdErrors]; +export type PostV1ContractorsEligibilityQuestionnaireError = + PostV1ContractorsEligibilityQuestionnaireErrors[keyof PostV1ContractorsEligibilityQuestionnaireErrors]; -export type GetV1PayrollRunsPayrollRunIdResponses = { +export type PostV1ContractorsEligibilityQuestionnaireResponses = { /** - * Success + * Questionnaire submitted successfully */ - 200: PayrollRunResponse; + 201: EligibilityQuestionnaireResponse; }; -export type GetV1PayrollRunsPayrollRunIdResponse = - GetV1PayrollRunsPayrollRunIdResponses[keyof GetV1PayrollRunsPayrollRunIdResponses]; +export type PostV1ContractorsEligibilityQuestionnaireResponse = + PostV1ContractorsEligibilityQuestionnaireResponses[keyof PostV1ContractorsEligibilityQuestionnaireResponses]; -export type GetV1ExpensesExpenseIdReceiptData = { - body?: never; +export type PutV1EmploymentsEmploymentIdBasicInformationData = { + /** + * Employment basic information params + */ + body?: EmploymentBasicInformationParams; path: { /** - * The expense ID + * Employment ID */ - expense_id: string; + employment_id: string; }; query?: never; - url: '/v1/expenses/{expense_id}/receipt'; + url: '/v1/employments/{employment_id}/basic_information'; }; -export type GetV1ExpensesExpenseIdReceiptErrors = { +export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -17132,118 +17396,96 @@ export type GetV1ExpensesExpenseIdReceiptErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ExpensesExpenseIdReceiptError = - GetV1ExpensesExpenseIdReceiptErrors[keyof GetV1ExpensesExpenseIdReceiptErrors]; +export type PutV1EmploymentsEmploymentIdBasicInformationError = + PutV1EmploymentsEmploymentIdBasicInformationErrors[keyof PutV1EmploymentsEmploymentIdBasicInformationErrors]; -export type GetV1ExpensesExpenseIdReceiptResponses = { +export type PutV1EmploymentsEmploymentIdBasicInformationResponses = { /** * Success */ - 200: GenericFile; + 200: EmploymentResponse; }; -export type GetV1ExpensesExpenseIdReceiptResponse = - GetV1ExpensesExpenseIdReceiptResponses[keyof GetV1ExpensesExpenseIdReceiptResponses]; +export type PutV1EmploymentsEmploymentIdBasicInformationResponse = + PutV1EmploymentsEmploymentIdBasicInformationResponses[keyof PutV1EmploymentsEmploymentIdBasicInformationResponses]; -export type GetV1TravelLetterRequestsIdData = { - body?: never; - path: { +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Termination Request ID + */ + termination_request_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}'; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors = + { /** - * travel letter request ID + * Forbidden */ - id: UuidSlug; + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; }; - query?: never; - url: '/v1/travel-letter-requests/{id}'; -}; -export type GetV1TravelLetterRequestsIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1TravelLetterRequestsIdError = - GetV1TravelLetterRequestsIdErrors[keyof GetV1TravelLetterRequestsIdErrors]; - -export type GetV1TravelLetterRequestsIdResponses = { - /** - * Success - */ - 200: TravelLetterResponse; -}; - -export type GetV1TravelLetterRequestsIdResponse = - GetV1TravelLetterRequestsIdResponses[keyof GetV1TravelLetterRequestsIdResponses]; +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdError = + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors]; -export type PatchV1TravelLetterRequestsId2Data = { - /** - * Travel letter Request - */ - body: UpdateTravelLetterRequestParams; - path: { +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses = + { /** - * Travel letter Request ID + * Success */ - id: string; + 200: CorTerminationRequestResponse; }; - query?: never; - url: '/v1/travel-letter-requests/{id}'; -}; - -export type PatchV1TravelLetterRequestsId2Errors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type PatchV1TravelLetterRequestsId2Error = - PatchV1TravelLetterRequestsId2Errors[keyof PatchV1TravelLetterRequestsId2Errors]; - -export type PatchV1TravelLetterRequestsId2Responses = { - /** - * Success - */ - 200: TravelLetterResponse; -}; -export type PatchV1TravelLetterRequestsId2Response = - PatchV1TravelLetterRequestsId2Responses[keyof PatchV1TravelLetterRequestsId2Responses]; +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponse = + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses]; -export type PatchV1TravelLetterRequestsIdData = { +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesData = { /** - * Travel letter Request + * Create legal entity params */ - body: UpdateTravelLetterRequestParams; + body?: { + /** + * ISO 3166-1 alpha-3 country code + */ + country_code: string; + }; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Travel letter Request ID + * Company ID */ - id: string; + company_id: string; }; query?: never; - url: '/v1/travel-letter-requests/{id}'; + url: '/v1/sandbox/companies/{company_id}/legal-entities'; }; -export type PatchV1TravelLetterRequestsIdErrors = { +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -17256,43 +17498,53 @@ export type PatchV1TravelLetterRequestsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PatchV1TravelLetterRequestsIdError = - PatchV1TravelLetterRequestsIdErrors[keyof PatchV1TravelLetterRequestsIdErrors]; +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesError = + PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors]; -export type PatchV1TravelLetterRequestsIdResponses = { +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses = { /** - * Success + * Legal entity created */ - 200: TravelLetterResponse; + 201: { + data?: { + /** + * Legal entity slug + */ + legal_entity_id?: string; + /** + * Legal entity name + */ + name?: string; + /** + * Legal entity status + */ + status?: string; + }; + }; }; -export type PatchV1TravelLetterRequestsIdResponse = - PatchV1TravelLetterRequestsIdResponses[keyof PatchV1TravelLetterRequestsIdResponses]; +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse = + PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses]; -export type GetV1TimeoffBalancesEmploymentIdData = { +export type GetV1EmployeePersonalDetailsData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { + path?: never; + query?: { /** - * Employment ID for which to show the time off balance + * Version of the personal_details form schema */ - employment_id: string; + personal_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/timeoff-balances/{employment_id}'; + url: '/v1/employee/personal-details'; }; -export type GetV1TimeoffBalancesEmploymentIdErrors = { +export type GetV1EmployeePersonalDetailsErrors = { /** * Bad Request */ @@ -17302,60 +17554,64 @@ export type GetV1TimeoffBalancesEmploymentIdErrors = { */ 401: UnauthorizedResponse; /** - * TimeoffBalanceNotFoundResponse + * Forbidden */ - 404: TimeoffBalanceNotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1TimeoffBalancesEmploymentIdError = - GetV1TimeoffBalancesEmploymentIdErrors[keyof GetV1TimeoffBalancesEmploymentIdErrors]; +export type GetV1EmployeePersonalDetailsError = + GetV1EmployeePersonalDetailsErrors[keyof GetV1EmployeePersonalDetailsErrors]; -export type GetV1TimeoffBalancesEmploymentIdResponses = { +export type GetV1EmployeePersonalDetailsResponses = { /** * Success */ - 200: TimeoffBalanceResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1TimeoffBalancesEmploymentIdResponse = - GetV1TimeoffBalancesEmploymentIdResponses[keyof GetV1TimeoffBalancesEmploymentIdResponses]; +export type GetV1EmployeePersonalDetailsResponse = + GetV1EmployeePersonalDetailsResponses[keyof GetV1EmployeePersonalDetailsResponses]; -export type PutV1EmploymentsEmploymentIdBasicInformationData = { +export type PutV1EmployeePersonalDetailsData = { /** - * Employment basic information params + * Employee personal details params */ - body?: EmploymentBasicInformationParams; - path: { + body?: EmploymentPersonalDetailsParams; + path?: never; + query?: { /** - * Employment ID + * Version of the personal_details form schema */ - employment_id: string; + personal_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/employments/{employment_id}/basic_information'; + url: '/v1/employee/personal-details'; }; -export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { +export type PutV1EmployeePersonalDetailsErrors = { /** * Bad Request */ 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -17366,44 +17622,50 @@ export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmploymentsEmploymentIdBasicInformationError = - PutV1EmploymentsEmploymentIdBasicInformationErrors[keyof PutV1EmploymentsEmploymentIdBasicInformationErrors]; +export type PutV1EmployeePersonalDetailsError = + PutV1EmployeePersonalDetailsErrors[keyof PutV1EmployeePersonalDetailsErrors]; -export type PutV1EmploymentsEmploymentIdBasicInformationResponses = { +export type PutV1EmployeePersonalDetailsResponses = { /** * Success */ - 200: EmploymentResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PutV1EmploymentsEmploymentIdBasicInformationResponse = - PutV1EmploymentsEmploymentIdBasicInformationResponses[keyof PutV1EmploymentsEmploymentIdBasicInformationResponses]; +export type PutV1EmployeePersonalDetailsResponse = + PutV1EmployeePersonalDetailsResponses[keyof PutV1EmployeePersonalDetailsResponses]; -export type GetV1ExpensesCategoriesData = { +export type GetV1WdGphPayDetailDataData = { body?: never; + headers?: { + /** + * The preferred language of the inquiring user in Workday + */ + accept_language?: string; + }; path?: never; - query?: { + query: { /** - * The employment ID for which to list categories. Required if neither expense_id nor country_code is provided. + * The pay group ID for identifying the pay group at the vendor system */ - employment_id?: string; + payGroupExternalId: string; /** - * The expense ID for which to list categories (includes the expense's category, even if it is not selectable by default). If provided without employment_id, will use the expense's employment context. + * The run type id provided in the paySummary API */ - expense_id?: string; + runTypeId: string; /** - * Include un-selectable intermediate categories in the response + * The cycle type id, defaults to the main run if not provided */ - include_parents?: boolean; + cycleTypeId?: string; /** - * Filter categories by country (ISO 3166-1 alpha-3 code, e.g. "GBR"). Only used when neither employment_id nor expense_id is provided. + * The period end date in question, defaults to current period if not provided */ - country_code?: string; + periodEndDate?: Date; }; - url: '/v1/expenses/categories'; + url: '/v1/wd/gph/payDetailData'; }; -export type GetV1ExpensesCategoriesErrors = { +export type GetV1WdGphPayDetailDataErrors = { /** * Bad Request */ @@ -17416,57 +17678,85 @@ export type GetV1ExpensesCategoriesErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1ExpensesCategoriesError = - GetV1ExpensesCategoriesErrors[keyof GetV1ExpensesCategoriesErrors]; +export type GetV1WdGphPayDetailDataError = + GetV1WdGphPayDetailDataErrors[keyof GetV1WdGphPayDetailDataErrors]; -export type GetV1ExpensesCategoriesResponses = { +export type GetV1WdGphPayDetailDataResponses = { /** * Success */ - 200: ListExpenseCategoriesResponse; + 200: PayDetailDataResponse; }; -export type GetV1ExpensesCategoriesResponse = - GetV1ExpensesCategoriesResponses[keyof GetV1ExpensesCategoriesResponses]; +export type GetV1WdGphPayDetailDataResponse = + GetV1WdGphPayDetailDataResponses[keyof GetV1WdGphPayDetailDataResponses]; -export type PostV1EmployeeTimeoffIdCancelData = { - /** - * CancelTimeoff - */ - body: CancelTimeoffParams; +export type GetV1CostCalculatorRegionsSlugFieldsData = { + body?: never; path: { /** - * Timeoff ID + * Slug */ - id: string; + slug: string; }; - query?: never; - url: '/v1/employee/timeoff/{id}/cancel'; + query?: { + /** + * If the premium benefits should be included in the response + */ + include_premium_benefits?: boolean; + }; + url: '/v1/cost-calculator/regions/{slug}/fields'; }; -export type PostV1EmployeeTimeoffIdCancelErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CostCalculatorRegionsSlugFieldsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Internal Server Error */ - 404: NotFoundResponse; + 500: InternalServerErrorResponse; +}; + +export type GetV1CostCalculatorRegionsSlugFieldsError = + GetV1CostCalculatorRegionsSlugFieldsErrors[keyof GetV1CostCalculatorRegionsSlugFieldsErrors]; + +export type GetV1CostCalculatorRegionsSlugFieldsResponses = { + /** + * Success + */ + 200: JsonSchemaResponse; +}; + +export type GetV1CostCalculatorRegionsSlugFieldsResponse = + GetV1CostCalculatorRegionsSlugFieldsResponses[keyof GetV1CostCalculatorRegionsSlugFieldsResponses]; + +export type PostV1CancelOnboardingEmploymentIdData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Whether the request should be performed async + * + */ + async?: boolean; + }; + url: '/v1/cancel-onboarding/{employment_id}'; +}; + +export type PostV1CancelOnboardingEmploymentIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unprocessable Entity */ @@ -17477,62 +17767,35 @@ export type PostV1EmployeeTimeoffIdCancelErrors = { 429: TooManyRequestsResponse; }; -export type PostV1EmployeeTimeoffIdCancelError = - PostV1EmployeeTimeoffIdCancelErrors[keyof PostV1EmployeeTimeoffIdCancelErrors]; +export type PostV1CancelOnboardingEmploymentIdError = + PostV1CancelOnboardingEmploymentIdErrors[keyof PostV1CancelOnboardingEmploymentIdErrors]; -export type PostV1EmployeeTimeoffIdCancelResponses = { +export type PostV1CancelOnboardingEmploymentIdResponses = { /** * Success */ - 200: TimeoffResponse; + 200: SuccessResponse; }; -export type PostV1EmployeeTimeoffIdCancelResponse = - PostV1EmployeeTimeoffIdCancelResponses[keyof PostV1EmployeeTimeoffIdCancelResponses]; +export type PostV1CancelOnboardingEmploymentIdResponse = + PostV1CancelOnboardingEmploymentIdResponses[keyof PostV1CancelOnboardingEmploymentIdResponses]; -export type GetV1CountriesCountryCodeFormData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type PostV1EmployeeTimeoffIdCancelData = { + /** + * CancelTimeoff + */ + body: CancelTimeoffParams; path: { /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; - /** - * Name of the desired form - */ - form: string; - }; - query?: { - /** - * Required for `contract_amendment` form - */ - employment_id?: string; - /** - * FOR TESTING PURPOSES ONLY: Include scheduled benefit groups. - */ - only_for_testing_include_scheduled_benefit_groups?: boolean; - /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. - */ - skip_benefits?: boolean; - /** - * Version of the form schema + * Timeoff ID */ - json_schema_version?: number | 'latest'; + id: string; }; - url: '/v1/countries/{country_code}/{form}'; + query?: never; + url: '/v1/employee/timeoff/{id}/cancel'; }; -export type GetV1CountriesCountryCodeFormErrors = { +export type PostV1EmployeeTimeoffIdCancelErrors = { /** * Bad Request */ @@ -17555,36 +17818,44 @@ export type GetV1CountriesCountryCodeFormErrors = { 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeFormError = - GetV1CountriesCountryCodeFormErrors[keyof GetV1CountriesCountryCodeFormErrors]; +export type PostV1EmployeeTimeoffIdCancelError = + PostV1EmployeeTimeoffIdCancelErrors[keyof PostV1EmployeeTimeoffIdCancelErrors]; -export type GetV1CountriesCountryCodeFormResponses = { +export type PostV1EmployeeTimeoffIdCancelResponses = { /** * Success */ - 200: CountryFormResponse; + 200: TimeoffResponse; }; -export type GetV1CountriesCountryCodeFormResponse = - GetV1CountriesCountryCodeFormResponses[keyof GetV1CountriesCountryCodeFormResponses]; +export type PostV1EmployeeTimeoffIdCancelResponse = + PostV1EmployeeTimeoffIdCancelResponses[keyof PostV1EmployeeTimeoffIdCancelResponses]; -export type GetV1FilesIdData = { +export type GetV1ExpensesExpenseIdReceiptData = { body?: never; path: { /** - * File ID + * The expense ID */ - id: string; + expense_id: string; }; query?: never; - url: '/v1/files/{id}'; + url: '/v1/expenses/{expense_id}/receipt'; }; -export type GetV1FilesIdErrors = { +export type GetV1ExpensesExpenseIdReceiptErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -17593,21 +17864,26 @@ export type GetV1FilesIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1FilesIdError = GetV1FilesIdErrors[keyof GetV1FilesIdErrors]; +export type GetV1ExpensesExpenseIdReceiptError = + GetV1ExpensesExpenseIdReceiptErrors[keyof GetV1ExpensesExpenseIdReceiptErrors]; -export type GetV1FilesIdResponses = { +export type GetV1ExpensesExpenseIdReceiptResponses = { /** * Success */ - 200: DownloadFileResponse; + 200: GenericFile; }; -export type GetV1FilesIdResponse = - GetV1FilesIdResponses[keyof GetV1FilesIdResponses]; +export type GetV1ExpensesExpenseIdReceiptResponse = + GetV1ExpensesExpenseIdReceiptResponses[keyof GetV1ExpensesExpenseIdReceiptResponses]; -export type GetV1ContractAmendmentsIdData = { +export type GetV1BenefitOffersCountrySummariesData = { body?: never; headers: { /** @@ -17618,21 +17894,12 @@ export type GetV1ContractAmendmentsIdData = { */ Authorization: string; }; - path: { - /** - * Contract amendment request ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/contract-amendments/{id}'; + url: '/v1/benefit-offers/country-summaries'; }; -export type GetV1ContractAmendmentsIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1BenefitOffersCountrySummariesErrors = { /** * Not Found */ @@ -17643,121 +17910,102 @@ export type GetV1ContractAmendmentsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ContractAmendmentsIdError = - GetV1ContractAmendmentsIdErrors[keyof GetV1ContractAmendmentsIdErrors]; +export type GetV1BenefitOffersCountrySummariesError = + GetV1BenefitOffersCountrySummariesErrors[keyof GetV1BenefitOffersCountrySummariesErrors]; -export type GetV1ContractAmendmentsIdResponses = { +export type GetV1BenefitOffersCountrySummariesResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: CountrySummariesResponse; }; -export type GetV1ContractAmendmentsIdResponse = - GetV1ContractAmendmentsIdResponses[keyof GetV1ContractAmendmentsIdResponses]; +export type GetV1BenefitOffersCountrySummariesResponse = + GetV1BenefitOffersCountrySummariesResponses[keyof GetV1BenefitOffersCountrySummariesResponses]; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsData = { - /** - * Employment bank account details params - */ - body?: EmploymentBankAccountDetailsParams; +export type GetV1LeavePoliciesDetailsEmploymentIdData = { + body?: never; path: { /** * Employment ID */ employment_id: string; }; - query?: { - /** - * Version of the bank_account_details form schema - */ - bank_account_details_json_schema_version?: number | 'latest'; - }; - url: '/v2/employments/{employment_id}/bank_account_details'; + query?: never; + url: '/v1/leave-policies/details/{employment_id}'; }; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1LeavePoliciesDetailsEmploymentIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsError = - PutV2EmploymentsEmploymentIdBankAccountDetailsErrors[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsErrors]; +export type GetV1LeavePoliciesDetailsEmploymentIdError = + GetV1LeavePoliciesDetailsEmploymentIdErrors[keyof GetV1LeavePoliciesDetailsEmploymentIdErrors]; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponses = { +export type GetV1LeavePoliciesDetailsEmploymentIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ListLeavePoliciesDetailsResponse; }; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponse = - PutV2EmploymentsEmploymentIdBankAccountDetailsResponses[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsResponses]; +export type GetV1LeavePoliciesDetailsEmploymentIdResponse = + GetV1LeavePoliciesDetailsEmploymentIdResponses[keyof GetV1LeavePoliciesDetailsEmploymentIdResponses]; -export type GetV1CompanyManagersData = { +export type GetV1WorkAuthorizationRequestsData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path?: never; query?: { /** - * A Company ID to filter the results (only applicable for Integration Partners). - */ - company_id?: string; - /** - * Starts fetching records after the given page + * Filter results on the given status */ - page?: number; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + status?: + | 'pending' + | 'cancelled' + | 'declined_by_manager' + | 'declined_by_remote' + | 'approved_by_manager' + | 'approved_by_remote'; + /** + * Filter results on the given employment slug + */ + employment_id?: string; + /** + * Filter results on the given employee name + */ + employee_name?: string; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'submitted_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page */ page_size?: number; }; - url: '/v1/company-managers'; + url: '/v1/work-authorization-requests'; }; -export type GetV1CompanyManagersErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1WorkAuthorizationRequestsErrors = { /** * Not Found */ @@ -17766,61 +18014,51 @@ export type GetV1CompanyManagersErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1CompanyManagersError = - GetV1CompanyManagersErrors[keyof GetV1CompanyManagersErrors]; +export type GetV1WorkAuthorizationRequestsError = + GetV1WorkAuthorizationRequestsErrors[keyof GetV1WorkAuthorizationRequestsErrors]; -export type GetV1CompanyManagersResponses = { +export type GetV1WorkAuthorizationRequestsResponses = { /** * Success */ - 200: CompanyManagersResponse; + 200: ListWorkAuthorizationRequestsResponse; }; -export type GetV1CompanyManagersResponse = - GetV1CompanyManagersResponses[keyof GetV1CompanyManagersResponses]; +export type GetV1WorkAuthorizationRequestsResponse = + GetV1WorkAuthorizationRequestsResponses[keyof GetV1WorkAuthorizationRequestsResponses]; -export type PostV1CompanyManagersData = { - /** - * Company Manager params - */ - body?: CompanyManagerParams; - headers: { +export type GetV1EmploymentsEmploymentIdBenefitOffersData = { + body?: never; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Unique identifier of the employment */ - Authorization: string; + employment_id: UuidSlug; }; - path?: never; query?: { /** - * Complementary action(s) to perform when creating a company manager: - * - * - `no_invite` skips the email invitation step - * + * Starts fetching records after the given page */ - actions?: string; + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/company-managers'; + url: '/v1/employments/{employment_id}/benefit-offers'; }; -export type PostV1CompanyManagersErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdBenefitOffersErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -17829,64 +18067,50 @@ export type PostV1CompanyManagersErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1CompanyManagersError = - PostV1CompanyManagersErrors[keyof PostV1CompanyManagersErrors]; +export type GetV1EmploymentsEmploymentIdBenefitOffersError = + GetV1EmploymentsEmploymentIdBenefitOffersErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersErrors]; -export type PostV1CompanyManagersResponses = { +export type GetV1EmploymentsEmploymentIdBenefitOffersResponses = { /** * Success */ - 201: CompanyManagerData; + 200: EmploymentsBenefitOffersListBenefitOffers; }; -export type PostV1CompanyManagersResponse = - PostV1CompanyManagersResponses[keyof PostV1CompanyManagersResponses]; - -export type GetV1CostCalculatorCountriesData = { - body?: never; - path?: never; - query?: { - /** - * If the premium benefits should be included in the response - */ - include_premium_benefits?: boolean; - }; - url: '/v1/cost-calculator/countries'; -}; +export type GetV1EmploymentsEmploymentIdBenefitOffersResponse = + GetV1EmploymentsEmploymentIdBenefitOffersResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersResponses]; -export type GetV1CostCalculatorCountriesResponses = { +export type PutV1EmploymentsEmploymentIdBenefitOffersData = { /** - * Success + * Upsert employment benefit offers request */ - 200: CostCalculatorListCountryResponse; -}; - -export type GetV1CostCalculatorCountriesResponse = - GetV1CostCalculatorCountriesResponses[keyof GetV1CostCalculatorCountriesResponses]; - -export type PostV1IdentityVerificationEmploymentIdDeclineData = { - body?: never; + body: UnifiedEmploymentUpsertBenefitOffersRequest; path: { /** - * Employment ID + * Unique identifier of the employment */ - employment_id: string; + employment_id: UuidSlug; }; - query?: never; - url: '/v1/identity-verification/{employment_id}/decline'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/employments/{employment_id}/benefit-offers'; }; -export type PostV1IdentityVerificationEmploymentIdDeclineErrors = { +export type PutV1EmploymentsEmploymentIdBenefitOffersErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -17897,91 +18121,86 @@ export type PostV1IdentityVerificationEmploymentIdDeclineErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1IdentityVerificationEmploymentIdDeclineError = - PostV1IdentityVerificationEmploymentIdDeclineErrors[keyof PostV1IdentityVerificationEmploymentIdDeclineErrors]; +export type PutV1EmploymentsEmploymentIdBenefitOffersError = + PutV1EmploymentsEmploymentIdBenefitOffersErrors[keyof PutV1EmploymentsEmploymentIdBenefitOffersErrors]; -export type PostV1IdentityVerificationEmploymentIdDeclineResponses = { +export type PutV1EmploymentsEmploymentIdBenefitOffersResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostV1IdentityVerificationEmploymentIdDeclineResponse = - PostV1IdentityVerificationEmploymentIdDeclineResponses[keyof PostV1IdentityVerificationEmploymentIdDeclineResponses]; +export type PutV1EmploymentsEmploymentIdBenefitOffersResponse = + PutV1EmploymentsEmploymentIdBenefitOffersResponses[keyof PutV1EmploymentsEmploymentIdBenefitOffersResponses]; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Pre-onboarding document ID - */ - id: string; - }; - query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}'; +export type GetV1EmploymentsData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors = - { + path?: never; + query?: { /** - * Unauthorized + * Company ID */ - 401: UnauthorizedResponse; + company_id?: string; /** - * Forbidden + * Filters the results by employments whose login email matches the value */ - 403: ForbiddenResponse; + email?: string; /** - * Not Found + * Filters the results by employments whose status matches the value. + * Supports multiple values separated by commas. + * Also supports the value `incomplete` to get all employments that are not onboarded yet. + * */ - 404: NotFoundResponse; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdError = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors]; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses = - { + status?: string; /** - * Success + * Filters the results by employments whose employment product type matches the value */ - 200: ShowPreOnboardingDocumentResponse; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponse = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses]; - -export type GetV1CountriesCountryCodeEngagementAgreementDetailsData = { - body?: never; - path: { + employment_type?: string; /** - * Country code according to ISO 3-digit alphabetic codes + * Filters the results by employments whose employment model matches the value. + * Possible values: `global_payroll`, `peo`, `eor` + * */ - country_code: string; + employment_model?: 'global_payroll' | 'peo' | 'eor'; + /** + * Filters the results by the employment's short ID. Returns at most one result. + */ + short_id?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/countries/{country_code}/engagement-agreement-details'; + url: '/v1/employments'; }; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsErrors = { +export type GetV1EmploymentsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -17992,21 +18211,24 @@ export type GetV1CountriesCountryCodeEngagementAgreementDetailsErrors = { 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsError = - GetV1CountriesCountryCodeEngagementAgreementDetailsErrors[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsErrors]; +export type GetV1EmploymentsError = + GetV1EmploymentsErrors[keyof GetV1EmploymentsErrors]; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponses = { +export type GetV1EmploymentsResponses = { /** * Success */ - 200: EngagementAgreementDetailsResponse; + 200: ListEmploymentsResponse; }; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponse = - GetV1CountriesCountryCodeEngagementAgreementDetailsResponses[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsResponses]; +export type GetV1EmploymentsResponse = + GetV1EmploymentsResponses[keyof GetV1EmploymentsResponses]; -export type GetV1BillingDocumentsData = { - body?: never; +export type PostV1EmploymentsData = { + /** + * Employment params + */ + body?: EmploymentCreateParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -18019,50 +18241,50 @@ export type GetV1BillingDocumentsData = { path?: never; query?: { /** - * The month for the billing documents (in ISO-8601 format) - */ - period?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Version of the form schema */ - page_size?: number; + json_schema_version?: number | 'latest'; }; - url: '/v1/billing-documents'; + url: '/v1/employments'; }; -export type GetV1BillingDocumentsErrors = { +export type PostV1EmploymentsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1BillingDocumentsError = - GetV1BillingDocumentsErrors[keyof GetV1BillingDocumentsErrors]; +export type PostV1EmploymentsError = + PostV1EmploymentsErrors[keyof PostV1EmploymentsErrors]; -export type GetV1BillingDocumentsResponses = { +export type PostV1EmploymentsResponses = { /** * Success */ - 200: BillingDocumentsResponse; + 200: EmploymentCreationResponse; }; -export type GetV1BillingDocumentsResponse = - GetV1BillingDocumentsResponses[keyof GetV1BillingDocumentsResponses]; +export type PostV1EmploymentsResponse = + PostV1EmploymentsResponses[keyof PostV1EmploymentsResponses]; -export type DeleteV1WebhookCallbacksIdData = { +export type GetV1TimeoffIdData = { body?: never; headers: { /** @@ -18075,15 +18297,19 @@ export type DeleteV1WebhookCallbacksIdData = { }; path: { /** - * Webhook Callback ID + * Timeoff ID */ id: string; }; query?: never; - url: '/v1/webhook-callbacks/{id}'; + url: '/v1/timeoff/{id}'; }; -export type DeleteV1WebhookCallbacksIdErrors = { +export type GetV1TimeoffIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -18096,37 +18322,54 @@ export type DeleteV1WebhookCallbacksIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type DeleteV1WebhookCallbacksIdError = - DeleteV1WebhookCallbacksIdErrors[keyof DeleteV1WebhookCallbacksIdErrors]; +export type GetV1TimeoffIdError = + GetV1TimeoffIdErrors[keyof GetV1TimeoffIdErrors]; -export type DeleteV1WebhookCallbacksIdResponses = { +export type GetV1TimeoffIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: TimeoffResponse; }; -export type DeleteV1WebhookCallbacksIdResponse = - DeleteV1WebhookCallbacksIdResponses[keyof DeleteV1WebhookCallbacksIdResponses]; +export type GetV1TimeoffIdResponse = + GetV1TimeoffIdResponses[keyof GetV1TimeoffIdResponses]; -export type PatchV1WebhookCallbacksIdData = { +export type PatchV1TimeoffId2Data = { /** - * WebhookCallback + * UpdateTimeoff */ - body?: UpdateWebhookCallbackParams; + body: UpdateApprovedTimeoffParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Webhook Callback ID + * Timeoff ID */ id: string; }; query?: never; - url: '/v1/webhook-callbacks/{id}'; + url: '/v1/timeoff/{id}'; }; -export type PatchV1WebhookCallbacksIdErrors = { +export type PatchV1TimeoffId2Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -18139,32 +18382,50 @@ export type PatchV1WebhookCallbacksIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PatchV1WebhookCallbacksIdError = - PatchV1WebhookCallbacksIdErrors[keyof PatchV1WebhookCallbacksIdErrors]; +export type PatchV1TimeoffId2Error = + PatchV1TimeoffId2Errors[keyof PatchV1TimeoffId2Errors]; -export type PatchV1WebhookCallbacksIdResponses = { +export type PatchV1TimeoffId2Responses = { /** * Success */ - 200: WebhookCallbackResponse; + 200: TimeoffResponse; }; -export type PatchV1WebhookCallbacksIdResponse = - PatchV1WebhookCallbacksIdResponses[keyof PatchV1WebhookCallbacksIdResponses]; +export type PatchV1TimeoffId2Response = + PatchV1TimeoffId2Responses[keyof PatchV1TimeoffId2Responses]; -export type PutV1EmployeeFederalTaxesData = { +export type PatchV1TimeoffIdData = { /** - * Employee federal taxes params + * UpdateTimeoff */ - body?: EmploymentFederalTaxesParams; - path?: never; + body: UpdateApprovedTimeoffParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Timeoff ID + */ + id: string; + }; query?: never; - url: '/v1/employee/federal-taxes'; + url: '/v1/timeoff/{id}'; }; -export type PutV1EmployeeFederalTaxesErrors = { +export type PatchV1TimeoffIdErrors = { /** * Bad Request */ @@ -18173,10 +18434,6 @@ export type PutV1EmployeeFederalTaxesErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -18191,157 +18448,244 @@ export type PutV1EmployeeFederalTaxesErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmployeeFederalTaxesError = - PutV1EmployeeFederalTaxesErrors[keyof PutV1EmployeeFederalTaxesErrors]; +export type PatchV1TimeoffIdError = + PatchV1TimeoffIdErrors[keyof PatchV1TimeoffIdErrors]; -export type PutV1EmployeeFederalTaxesResponses = { +export type PatchV1TimeoffIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: TimeoffResponse; }; -export type PutV1EmployeeFederalTaxesResponse = - PutV1EmployeeFederalTaxesResponses[keyof PutV1EmployeeFederalTaxesResponses]; +export type PatchV1TimeoffIdResponse = + PatchV1TimeoffIdResponses[keyof PatchV1TimeoffIdResponses]; -export type GetV1EmployeeTimesheetsData = { +export type GetV1IdentityCurrentData = { body?: never; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; + headers: { /** - * Number of items per page + * This endpoint works with any of the access tokens provided. You can use an access + * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. + * */ - page_size?: number; + Authorization: string; }; - url: '/v1/employee/timesheets'; + path?: never; + query?: never; + url: '/v1/identity/current'; }; -export type GetV1EmployeeTimesheetsErrors = { +export type GetV1IdentityCurrentErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmployeeTimesheetsError = - GetV1EmployeeTimesheetsErrors[keyof GetV1EmployeeTimesheetsErrors]; +export type GetV1IdentityCurrentError = + GetV1IdentityCurrentErrors[keyof GetV1IdentityCurrentErrors]; -export type GetV1EmployeeTimesheetsResponses = { +export type GetV1IdentityCurrentResponses = { /** * Success */ - 200: SuccessResponse; + 201: IdentityCurrentResponse; }; -export type GetV1EmployeeTimesheetsResponse = - GetV1EmployeeTimesheetsResponses[keyof GetV1EmployeeTimesheetsResponses]; +export type GetV1IdentityCurrentResponse = + GetV1IdentityCurrentResponses[keyof GetV1IdentityCurrentResponses]; -export type PutV1EmploymentsEmploymentIdPersonalDetailsData = { - /** - * Employment personal details params - */ - body?: EmploymentPersonalDetailsParams; - path: { +export type GetV1WdGphPayVarianceData = { + body?: never; + headers?: { /** - * Employment ID + * The preferred language of the inquiring user in Workday */ - employment_id: string; + accept_language?: string; }; - query?: never; - url: '/v1/employments/{employment_id}/personal_details'; + path?: never; + query: { + /** + * The pay group ID for identifying the pay group at the vendor system + */ + payGroupExternalId: string; + /** + * The run type id provided in the paySummary API + */ + runTypeId: string; + /** + * The cycle type id, defaults to the main run if not provided + */ + cycleTypeId?: string; + /** + * The period end date in question, defaults to current period if not provided + */ + periodEndDate?: Date; + }; + url: '/v1/wd/gph/payVariance'; }; -export type PutV1EmploymentsEmploymentIdPersonalDetailsErrors = { +export type GetV1WdGphPayVarianceErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; +}; + +export type GetV1WdGphPayVarianceError = + GetV1WdGphPayVarianceErrors[keyof GetV1WdGphPayVarianceErrors]; + +export type GetV1WdGphPayVarianceResponses = { /** - * Unprocessable Entity + * Success */ - 422: UnprocessableEntityResponse; + 200: PayVarianceResponse; +}; + +export type GetV1WdGphPayVarianceResponse = + GetV1WdGphPayVarianceResponses[keyof GetV1WdGphPayVarianceResponses]; + +export type GetV1PayrollCalendarsCycleData = { + body?: never; + path: { + /** + * The cycle for which to list the payroll calendars. Format: YYYY-MM + */ + cycle: string; + }; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/payroll-calendars/{cycle}'; +}; + +export type GetV1PayrollCalendarsCycleErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type PutV1EmploymentsEmploymentIdPersonalDetailsError = - PutV1EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV1EmploymentsEmploymentIdPersonalDetailsErrors]; +export type GetV1PayrollCalendarsCycleError = + GetV1PayrollCalendarsCycleErrors[keyof GetV1PayrollCalendarsCycleErrors]; -export type PutV1EmploymentsEmploymentIdPersonalDetailsResponses = { +export type GetV1PayrollCalendarsCycleResponses = { /** * Success */ - 200: EmploymentResponse; + 200: PayrollCalendarsResponse; }; -export type PutV1EmploymentsEmploymentIdPersonalDetailsResponse = - PutV1EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV1EmploymentsEmploymentIdPersonalDetailsResponses]; +export type GetV1PayrollCalendarsCycleResponse = + GetV1PayrollCalendarsCycleResponses[keyof GetV1PayrollCalendarsCycleResponses]; -export type GetV1TravelLetterRequestsData = { - body?: never; - path?: never; - query?: { - /** - * Filter results on the given status - */ - status?: - | 'pending' - | 'cancelled' - | 'declined_by_manager' - | 'declined_by_remote' - | 'approved_by_manager' - | 'approved_by_remote'; +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors = + { /** - * Filter results on the given employment slug + * Bad Request */ - employment_id?: string; + 400: BadRequestResponse; /** - * Filter results on the given employee name + * Forbidden */ - employee_name?: string; + 403: ForbiddenResponse; /** - * Sort order + * Not Found */ - order?: 'asc' | 'desc'; + 404: NotFoundResponse; /** - * Field to sort by + * Unprocessable Entity */ - sort_by?: 'submitted_at'; + 422: UnprocessableEntityResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentError = + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors]; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses = + { /** - * Starts fetching records after the given page + * Success */ - page?: number; + 200: SuccessResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponse = + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses]; + +export type PostV1TimesheetsTimesheetIdSendBackData = { + /** + * SendBackTimesheetParams + */ + body?: SendBackTimesheetParams; + path: { /** - * Number of items per page + * Timesheet ID */ - page_size?: number; + timesheet_id: string; }; - url: '/v1/travel-letter-requests'; + query?: never; + url: '/v1/timesheets/{timesheet_id}/send-back'; }; -export type GetV1TravelLetterRequestsErrors = { +export type PostV1TimesheetsTimesheetIdSendBackErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -18352,18 +18696,76 @@ export type GetV1TravelLetterRequestsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1TravelLetterRequestsError = - GetV1TravelLetterRequestsErrors[keyof GetV1TravelLetterRequestsErrors]; +export type PostV1TimesheetsTimesheetIdSendBackError = + PostV1TimesheetsTimesheetIdSendBackErrors[keyof PostV1TimesheetsTimesheetIdSendBackErrors]; -export type GetV1TravelLetterRequestsResponses = { +export type PostV1TimesheetsTimesheetIdSendBackResponses = { /** * Success */ - 200: ListTravelLettersResponse; + 200: SentBackTimesheetResponse; }; -export type GetV1TravelLetterRequestsResponse = - GetV1TravelLetterRequestsResponses[keyof GetV1TravelLetterRequestsResponses]; +export type PostV1TimesheetsTimesheetIdSendBackResponse = + PostV1TimesheetsTimesheetIdSendBackResponses[keyof PostV1TimesheetsTimesheetIdSendBackResponses]; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData = + { + /** + * SignContractDocument + */ + body: SignContractDocument; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Pre-onboarding document ID + */ + id: string; + }; + query?: never; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign'; + }; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + }; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignError = + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors]; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses = + { + /** + * Success + */ + 200: SuccessResponse; + }; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponse = + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses]; export type GetV1BenefitRenewalRequestsData = { body?: never; @@ -18426,70 +18828,104 @@ export type GetV1BenefitRenewalRequestsResponses = { export type GetV1BenefitRenewalRequestsResponse = GetV1BenefitRenewalRequestsResponses[keyof GetV1BenefitRenewalRequestsResponses]; -export type PostV1WebhookCallbacksData = { - /** - * WebhookCallback - */ - body?: CreateWebhookCallbackParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData = + { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Company ID + */ + company_id: string; + /** + * Legal Entity ID to set as the new default + */ + legal_entity_id: string; + }; + query?: never; + url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}'; }; - path?: never; - query?: never; - url: '/v1/webhook-callbacks'; -}; -export type PostV1WebhookCallbacksErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; + }; -export type PostV1WebhookCallbacksError = - PostV1WebhookCallbacksErrors[keyof PostV1WebhookCallbacksErrors]; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdError = + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors]; -export type PostV1WebhookCallbacksResponses = { - /** - * Success - */ - 200: WebhookCallbackResponse; -}; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses = + { + /** + * Success + */ + 200: SuccessResponse; + }; -export type PostV1WebhookCallbacksResponse = - PostV1WebhookCallbacksResponses[keyof PostV1WebhookCallbacksResponses]; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponse = + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses]; -export type PostV1TimesheetsTimesheetIdApproveData = { +export type GetV1EmploymentContractsData = { body?: never; - path: { + headers: { /** - * Timesheet ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - timesheet_id: string; + Authorization: string; }; - query?: never; - url: '/v1/timesheets/{timesheet_id}/approve'; + path?: never; + query: { + /** + * Employment ID + */ + employment_id: string; + /** + * Only Active + */ + only_active?: boolean; + }; + url: '/v1/employment-contracts'; }; -export type PostV1TimesheetsTimesheetIdApproveErrors = { +export type GetV1EmploymentContractsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -18500,20 +18936,71 @@ export type PostV1TimesheetsTimesheetIdApproveErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1TimesheetsTimesheetIdApproveError = - PostV1TimesheetsTimesheetIdApproveErrors[keyof PostV1TimesheetsTimesheetIdApproveErrors]; +export type GetV1EmploymentContractsError = + GetV1EmploymentContractsErrors[keyof GetV1EmploymentContractsErrors]; -export type PostV1TimesheetsTimesheetIdApproveResponses = { +export type GetV1EmploymentContractsResponses = { /** * Success */ - 200: MinimalTimesheetResponse; + 200: ListEmploymentContractResponse; }; -export type PostV1TimesheetsTimesheetIdApproveResponse = - PostV1TimesheetsTimesheetIdApproveResponses[keyof PostV1TimesheetsTimesheetIdApproveResponses]; +export type GetV1EmploymentContractsResponse = + GetV1EmploymentContractsResponses[keyof GetV1EmploymentContractsResponses]; -export type GetV1PayslipsIdData = { +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData = + { + body?: never; + path: { + /** + * Contract amendment request ID + */ + contract_amendment_request_id: string; + }; + query?: never; + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel'; + }; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; + }; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelError = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors]; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses = + { + /** + * Success + */ + 200: SuccessResponse; + }; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponse = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses]; + +export type GetV1PayslipsPayslipIdPdfData = { body?: never; headers: { /** @@ -18528,13 +19015,13 @@ export type GetV1PayslipsIdData = { /** * Payslip ID */ - id: string; + payslip_id: string; }; query?: never; - url: '/v1/payslips/{id}'; + url: '/v1/payslips/{payslip_id}/pdf'; }; -export type GetV1PayslipsIdErrors = { +export type GetV1PayslipsPayslipIdPdfErrors = { /** * Bad Request */ @@ -18557,32 +19044,39 @@ export type GetV1PayslipsIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1PayslipsIdError = - GetV1PayslipsIdErrors[keyof GetV1PayslipsIdErrors]; +export type GetV1PayslipsPayslipIdPdfError = + GetV1PayslipsPayslipIdPdfErrors[keyof GetV1PayslipsPayslipIdPdfErrors]; -export type GetV1PayslipsIdResponses = { +export type GetV1PayslipsPayslipIdPdfResponses = { /** * Success */ - 200: PayslipResponse; + 200: PayslipDownloadResponse; }; -export type GetV1PayslipsIdResponse = - GetV1PayslipsIdResponses[keyof GetV1PayslipsIdResponses]; +export type GetV1PayslipsPayslipIdPdfResponse = + GetV1PayslipsPayslipIdPdfResponses[keyof GetV1PayslipsPayslipIdPdfResponses]; -export type GetV1LeavePoliciesSummaryEmploymentIdData = { - body?: never; +export type PostV1TimeoffTimeoffIdApproveData = { + /** + * ApproveTimeoff + */ + body: ApproveTimeoffParams; path: { /** - * Employment ID + * Time Off ID */ - employment_id: string; + timeoff_id: string; }; query?: never; - url: '/v1/leave-policies/summary/{employment_id}'; + url: '/v1/timeoff/{timeoff_id}/approve'; }; -export type GetV1LeavePoliciesSummaryEmploymentIdErrors = { +export type PostV1TimeoffTimeoffIdApproveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -18595,124 +19089,175 @@ export type GetV1LeavePoliciesSummaryEmploymentIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1LeavePoliciesSummaryEmploymentIdError = - GetV1LeavePoliciesSummaryEmploymentIdErrors[keyof GetV1LeavePoliciesSummaryEmploymentIdErrors]; +export type PostV1TimeoffTimeoffIdApproveError = + PostV1TimeoffTimeoffIdApproveErrors[keyof PostV1TimeoffTimeoffIdApproveErrors]; -export type GetV1LeavePoliciesSummaryEmploymentIdResponses = { +export type PostV1TimeoffTimeoffIdApproveResponses = { /** * Success */ - 200: ListLeavePoliciesSummaryResponse; + 200: TimeoffResponse; }; -export type GetV1LeavePoliciesSummaryEmploymentIdResponse = - GetV1LeavePoliciesSummaryEmploymentIdResponses[keyof GetV1LeavePoliciesSummaryEmploymentIdResponses]; +export type PostV1TimeoffTimeoffIdApproveResponse = + PostV1TimeoffTimeoffIdApproveResponses[keyof PostV1TimeoffTimeoffIdApproveResponses]; -export type GetV1EmployeeExpenseCategoriesData = { +export type GetV1CompaniesData = { body?: never; - path?: never; - query?: { + headers: { /** - * Include parent (non-selectable) categories in addition to selectable leaves + * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Client Credentials flow. + * */ - include_parents?: boolean; + Authorization: string; + }; + path?: never; + query?: { /** - * Expense ID (slug) whose category should be included in the result, even if it is not selectable by default + * External ID */ - expense_id?: string; + external_id?: string; }; - url: '/v1/employee/expense-categories'; + url: '/v1/companies'; }; -export type GetV1EmployeeExpenseCategoriesErrors = { +export type GetV1CompaniesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeExpenseCategoriesError = - GetV1EmployeeExpenseCategoriesErrors[keyof GetV1EmployeeExpenseCategoriesErrors]; +export type GetV1CompaniesError = + GetV1CompaniesErrors[keyof GetV1CompaniesErrors]; -export type GetV1EmployeeExpenseCategoriesResponses = { +export type GetV1CompaniesResponses = { /** * Success */ - 200: ListExpenseCategoriesResponse; + 200: CompaniesResponse; }; -export type GetV1EmployeeExpenseCategoriesResponse = - GetV1EmployeeExpenseCategoriesResponses[keyof GetV1EmployeeExpenseCategoriesResponses]; +export type GetV1CompaniesResponse = + GetV1CompaniesResponses[keyof GetV1CompaniesResponses]; -export type GetV1CompanyDepartmentsData = { - body?: never; - path?: never; - query: { +export type PostV1CompaniesData = { + /** + * Create Company params + */ + body?: CreateCompanyParams; + headers: { /** - * Company ID - */ - company_id: string; + * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Client Credentials flow. + * + */ + Authorization: string; + }; + path?: never; + query?: { /** - * Paginate option. Default: true. When true, paginates response; otherwise, does not. + * Version of the address_details form schema */ - paginate?: boolean; + address_details_json_schema_version?: number | 'latest'; /** - * Starts fetching records after the given page + * Version of the bank_account_details form schema */ - page?: number; + bank_account_details_json_schema_version?: number | 'latest'; /** - * Number of items per page + * Complementary action(s) to perform when creating a company: + * + * - `get_oauth_access_tokens` returns the user's access and refresh tokens + * - `send_create_password_email ` sends a reset password token to the company owner's email so they can log in using Remote UI (not needed if integration plans to use SSO only) + * + * If `action` contains `send_create_password_email` you can redirect the user to [https://employ.remote.com/api-integration-new-password-send](https://employ.remote.com/api-integration-new-password-send) + * */ - page_size?: number; + action?: string; + /** + * Whether the request should be performed async + * + */ + async?: boolean; + /** + * Scope of the access token + * + */ + scope?: string; }; - url: '/v1/company-departments'; + url: '/v1/companies'; }; -export type GetV1CompanyDepartmentsErrors = { +export type PostV1CompaniesErrors = { /** - * Not Found + * Bad Request */ - 404: NotFoundResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: CompanyCreationConflictErrorResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1CompanyDepartmentsError = - GetV1CompanyDepartmentsErrors[keyof GetV1CompanyDepartmentsErrors]; +export type PostV1CompaniesError = + PostV1CompaniesErrors[keyof PostV1CompaniesErrors]; -export type GetV1CompanyDepartmentsResponses = { +export type PostV1CompaniesResponses = { /** - * Success + * Created */ - 200: ListCompanyDepartmentsPaginatedResponse; + 201: CompanyCreationResponse; }; -export type GetV1CompanyDepartmentsResponse = - GetV1CompanyDepartmentsResponses[keyof GetV1CompanyDepartmentsResponses]; +export type PostV1CompaniesResponse = + PostV1CompaniesResponses[keyof PostV1CompaniesResponses]; -export type PostV1CompanyDepartmentsData = { - /** - * Create Company Department request params - */ - body: CreateCompanyDepartmentParams; - path?: never; +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/company-departments'; + url: '/v1/employments/{employment_id}/company-structure-nodes'; }; -export type PostV1CompanyDepartmentsErrors = { +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -18723,39 +19268,43 @@ export type PostV1CompanyDepartmentsErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CompanyDepartmentsError = - PostV1CompanyDepartmentsErrors[keyof PostV1CompanyDepartmentsErrors]; +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesError = + GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors]; -export type PostV1CompanyDepartmentsResponses = { +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses = { /** - * Created + * Success */ - 201: CompanyDepartmentCreatedResponse; + 200: CompanyStructureNodesResponse; }; -export type PostV1CompanyDepartmentsResponse = - PostV1CompanyDepartmentsResponses[keyof PostV1CompanyDepartmentsResponses]; +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponse = + GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses]; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineData = { +export type PatchV2EmploymentsEmploymentId2Data = { /** - * Timeoff + * Employment params */ - body: DeclineTimeoffParams; + body?: EmploymentV2UpdateParams; path: { /** - * Time Off ID + * Employment ID */ - timeoff_id: string; + employment_id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel-request/decline'; + url: '/v2/employments/{employment_id}'; }; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineErrors = { +export type PatchV2EmploymentsEmploymentId2Errors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Conflict */ @@ -18770,24 +19319,24 @@ export type PostV1TimeoffTimeoffIdCancelRequestDeclineErrors = { 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineError = - PostV1TimeoffTimeoffIdCancelRequestDeclineErrors[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineErrors]; +export type PatchV2EmploymentsEmploymentId2Error = + PatchV2EmploymentsEmploymentId2Errors[keyof PatchV2EmploymentsEmploymentId2Errors]; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponses = { +export type PatchV2EmploymentsEmploymentId2Responses = { /** * Success */ - 200: SuccessResponse; + 200: EmploymentResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponse = - PostV1TimeoffTimeoffIdCancelRequestDeclineResponses[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineResponses]; +export type PatchV2EmploymentsEmploymentId2Response = + PatchV2EmploymentsEmploymentId2Responses[keyof PatchV2EmploymentsEmploymentId2Responses]; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsData = { +export type PatchV2EmploymentsEmploymentIdData = { /** - * Employment administrative details params + * Employment params */ - body?: EmploymentAdministrativeDetailsParams; + body?: EmploymentV2UpdateParams; path: { /** * Employment ID @@ -18795,26 +19344,18 @@ export type PutV2EmploymentsEmploymentIdAdministrativeDetailsData = { employment_id: string; }; query?: never; - url: '/v2/employments/{employment_id}/administrative_details'; + url: '/v2/employments/{employment_id}'; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors = { +export type PatchV2EmploymentsEmploymentIdErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Conflict */ @@ -18829,41 +19370,34 @@ export type PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsError = - PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors]; +export type PatchV2EmploymentsEmploymentIdError = + PatchV2EmploymentsEmploymentIdErrors[keyof PatchV2EmploymentsEmploymentIdErrors]; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses = { +export type PatchV2EmploymentsEmploymentIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: EmploymentResponse; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponse = - PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses]; +export type PatchV2EmploymentsEmploymentIdResponse = + PatchV2EmploymentsEmploymentIdResponses[keyof PatchV2EmploymentsEmploymentIdResponses]; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaData = { - body?: never; - path: { - /** - * Unique identifier of the employment - */ - employment_id: UuidSlug; - }; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/employments/{employment_id}/benefit-offers/schema'; +export type PostV1ProbationCompletionLetterData = { + /** + * Work Authorization Request + */ + body: CreateProbationCompletionLetterParams; + path?: never; + query?: never; + url: '/v1/probation-completion-letter'; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors = { +export type PostV1ProbationCompletionLetterErrors = { /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -18874,130 +19408,112 @@ export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaError = - GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors]; +export type PostV1ProbationCompletionLetterError = + PostV1ProbationCompletionLetterErrors[keyof PostV1ProbationCompletionLetterErrors]; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses = { +export type PostV1ProbationCompletionLetterResponses = { /** * Success */ - 200: UnifiedEmploymentsBenefitOffersJsonSchemaResponse; + 200: ProbationCompletionLetterResponse; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponse = - GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses]; +export type PostV1ProbationCompletionLetterResponse = + PostV1ProbationCompletionLetterResponses[keyof PostV1ProbationCompletionLetterResponses]; -export type PostV1ContractorsEligibilityQuestionnaireData = { +export type PostV1CostCalculatorEstimationPdfData = { /** - * Eligibility questionnaire submission + * Estimate params */ - body: SubmitEligibilityQuestionnaireRequest; + body?: CostCalculatorEstimateParams; path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/contractors/eligibility-questionnaire'; + query?: never; + url: '/v1/cost-calculator/estimation-pdf'; }; -export type PostV1ContractorsEligibilityQuestionnaireErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; +export type PostV1CostCalculatorEstimationPdfErrors = { /** - * Conflict + * Not Found */ - 409: ConflictErrorResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type PostV1ContractorsEligibilityQuestionnaireError = - PostV1ContractorsEligibilityQuestionnaireErrors[keyof PostV1ContractorsEligibilityQuestionnaireErrors]; +export type PostV1CostCalculatorEstimationPdfError = + PostV1CostCalculatorEstimationPdfErrors[keyof PostV1CostCalculatorEstimationPdfErrors]; -export type PostV1ContractorsEligibilityQuestionnaireResponses = { +export type PostV1CostCalculatorEstimationPdfResponses = { /** - * Questionnaire submitted successfully + * Success */ - 201: EligibilityQuestionnaireResponse; + 200: CostCalculatorEstimatePdfResponse; }; -export type PostV1ContractorsEligibilityQuestionnaireResponse = - PostV1ContractorsEligibilityQuestionnaireResponses[keyof PostV1ContractorsEligibilityQuestionnaireResponses]; +export type PostV1CostCalculatorEstimationPdfResponse = + PostV1CostCalculatorEstimationPdfResponses[keyof PostV1CostCalculatorEstimationPdfResponses]; -export type GetV1EmployeePersonalInformationData = { - body?: never; +export type PostAuthOauth2Token2Data = { + /** + * OAuth2Token + */ + body?: OAuth2TokenParams; path?: never; query?: never; - url: '/v1/employee/personal-information'; + url: '/auth/oauth2/token'; }; -export type GetV1EmployeePersonalInformationErrors = { +export type PostAuthOauth2Token2Errors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmployeePersonalInformationError = - GetV1EmployeePersonalInformationErrors[keyof GetV1EmployeePersonalInformationErrors]; +export type PostAuthOauth2Token2Error = + PostAuthOauth2Token2Errors[keyof PostAuthOauth2Token2Errors]; -export type GetV1EmployeePersonalInformationResponses = { +export type PostAuthOauth2Token2Responses = { /** * Success */ - 200: SuccessResponse; + 200: OAuth2Tokens; }; -export type GetV1EmployeePersonalInformationResponse = - GetV1EmployeePersonalInformationResponses[keyof GetV1EmployeePersonalInformationResponses]; +export type PostAuthOauth2Token2Response = + PostAuthOauth2Token2Responses[keyof PostAuthOauth2Token2Responses]; -export type GetV1TimesheetsData = { +export type GetV1EmployeeDocumentsIdData = { body?: never; - path?: never; - query?: { - /** - * Filter timesheets by their status - */ - status?: TimesheetStatus; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Field to sort by - */ - sort_by?: 'submitted_at'; - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Number of items per page + * Document ID */ - page_size?: number; + id: string; }; - url: '/v1/timesheets'; + query?: never; + url: '/v1/employee/documents/{id}'; }; -export type GetV1TimesheetsErrors = { +export type GetV1EmployeeDocumentsIdErrors = { /** * Unauthorized */ @@ -19012,53 +19528,30 @@ export type GetV1TimesheetsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1TimesheetsError = - GetV1TimesheetsErrors[keyof GetV1TimesheetsErrors]; +export type GetV1EmployeeDocumentsIdError = + GetV1EmployeeDocumentsIdErrors[keyof GetV1EmployeeDocumentsIdErrors]; -export type GetV1TimesheetsResponses = { +export type GetV1EmployeeDocumentsIdResponses = { /** * Success */ - 200: ListTimesheetsResponse; + 200: DownloadDocumentResponse; }; -export type GetV1TimesheetsResponse = - GetV1TimesheetsResponses[keyof GetV1TimesheetsResponses]; +export type GetV1EmployeeDocumentsIdResponse = + GetV1EmployeeDocumentsIdResponses[keyof GetV1EmployeeDocumentsIdResponses]; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesData = { +export type PostV1WebhookEventsReplayData = { /** - * Create legal entity params + * WebhookEvent */ - body?: { - /** - * ISO 3166-1 alpha-3 country code - */ - country_code: string; - }; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Company ID - */ - company_id: string; - }; + body: ReplayWebhookEventsParams; + path?: never; query?: never; - url: '/v1/sandbox/companies/{company_id}/legal-entities'; + url: '/v1/webhook-events/replay'; }; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1WebhookEventsReplayErrors = { /** * Unauthorized */ @@ -19071,67 +19564,72 @@ export type PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; +}; + +export type PostV1WebhookEventsReplayError = + PostV1WebhookEventsReplayErrors[keyof PostV1WebhookEventsReplayErrors]; + +export type PostV1WebhookEventsReplayResponses = { /** - * Too many requests + * Success */ - 429: TooManyRequestsResponse; + 200: SuccessResponse; }; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesError = - PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors]; +export type PostV1WebhookEventsReplayResponse = + PostV1WebhookEventsReplayResponses[keyof PostV1WebhookEventsReplayResponses]; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses = { +export type PostV1SandboxWebhookCallbacksTriggerData = { /** - * Legal entity created + * Webhook Trigger Params */ - 201: { - data?: { - /** - * Legal entity slug - */ - legal_entity_id?: string; - /** - * Legal entity name - */ - name?: string; - /** - * Legal entity status - */ - status?: string; - }; - }; + body?: WebhookTriggerParams; + path?: never; + query?: never; + url: '/v1/sandbox/webhook-callbacks/trigger'; }; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse = - PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses]; +export type PostV1SandboxWebhookCallbacksTriggerErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; -export type GetV1EmploymentsEmploymentIdData = { +export type PostV1SandboxWebhookCallbacksTriggerError = + PostV1SandboxWebhookCallbacksTriggerErrors[keyof PostV1SandboxWebhookCallbacksTriggerErrors]; + +export type PostV1SandboxWebhookCallbacksTriggerResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type PostV1SandboxWebhookCallbacksTriggerResponse = + PostV1SandboxWebhookCallbacksTriggerResponses[keyof PostV1SandboxWebhookCallbacksTriggerResponses]; + +export type GetV1BulkEmploymentJobsJobIdData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path: { /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Wether files should be excluded + * Bulk employment job id */ - exclude_files?: boolean; + job_id: string; }; - url: '/v1/employments/{employment_id}'; + query?: never; + url: '/v1/bulk-employment-jobs/{job_id}'; }; -export type GetV1EmploymentsEmploymentIdErrors = { +export type GetV1BulkEmploymentJobsJobIdErrors = { /** * Bad Request */ @@ -19141,102 +19639,50 @@ export type GetV1EmploymentsEmploymentIdErrors = { */ 403: ForbiddenResponse; /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdError = - GetV1EmploymentsEmploymentIdErrors[keyof GetV1EmploymentsEmploymentIdErrors]; +export type GetV1BulkEmploymentJobsJobIdError = + GetV1BulkEmploymentJobsJobIdErrors[keyof GetV1BulkEmploymentJobsJobIdErrors]; -export type GetV1EmploymentsEmploymentIdResponses = { +export type GetV1BulkEmploymentJobsJobIdResponses = { /** * Success */ - 200: EmploymentShowResponse; + 200: BulkEmploymentImportJobResponse; }; -export type GetV1EmploymentsEmploymentIdResponse = - GetV1EmploymentsEmploymentIdResponses[keyof GetV1EmploymentsEmploymentIdResponses]; +export type GetV1BulkEmploymentJobsJobIdResponse = + GetV1BulkEmploymentJobsJobIdResponses[keyof GetV1BulkEmploymentJobsJobIdResponses]; -export type PatchV1EmploymentsEmploymentId2Data = { - /** - * Employment params - */ - body?: EmploymentFullParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type GetV1BulkEmploymentJobsJobIdRowsData = { + body?: never; path: { /** - * Employment ID + * Bulk employment job id */ - employment_id: string; + job_id: string; }; query?: { /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the administrative_details form schema - */ - administrative_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema + * Starts fetching records after the given page */ - bank_account_details_json_schema_version?: number | 'latest'; + page?: number; /** - * Version of the employment_basic_information form schema + * Number of items per page */ - employment_basic_information_json_schema_version?: number | 'latest'; - /** - * Version of the billing_address_details form schema - */ - billing_address_details_json_schema_version?: number | 'latest'; - /** - * Version of the contract_details form schema - */ - contract_details_json_schema_version?: number | 'latest'; - /** - * Version of the emergency_contact_details form schema - */ - emergency_contact_details_json_schema_version?: number | 'latest'; - /** - * Version of the personal_details form schema - */ - personal_details_json_schema_version?: number | 'latest'; - /** - * Version of the pricing_plan_details form schema - */ - pricing_plan_details_json_schema_version?: number | 'latest'; - /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. - */ - skip_benefits?: boolean; - /** - * Complementary action(s) to perform when creating an employment. - */ - actions?: string; + page_size?: number; }; - url: '/v1/employments/{employment_id}'; + url: '/v1/bulk-employment-jobs/{job_id}/rows'; }; -export type PatchV1EmploymentsEmploymentId2Errors = { +export type GetV1BulkEmploymentJobsJobIdRowsErrors = { /** * Bad Request */ @@ -19246,37 +19692,33 @@ export type PatchV1EmploymentsEmploymentId2Errors = { */ 403: ForbiddenResponse; /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PatchV1EmploymentsEmploymentId2Error = - PatchV1EmploymentsEmploymentId2Errors[keyof PatchV1EmploymentsEmploymentId2Errors]; +export type GetV1BulkEmploymentJobsJobIdRowsError = + GetV1BulkEmploymentJobsJobIdRowsErrors[keyof GetV1BulkEmploymentJobsJobIdRowsErrors]; -export type PatchV1EmploymentsEmploymentId2Responses = { +export type GetV1BulkEmploymentJobsJobIdRowsResponses = { /** * Success */ - 200: EmploymentResponse; + 200: ImportJobRowsResponse; }; -export type PatchV1EmploymentsEmploymentId2Response = - PatchV1EmploymentsEmploymentId2Responses[keyof PatchV1EmploymentsEmploymentId2Responses]; +export type GetV1BulkEmploymentJobsJobIdRowsResponse = + GetV1BulkEmploymentJobsJobIdRowsResponses[keyof GetV1BulkEmploymentJobsJobIdRowsResponses]; -export type PatchV1EmploymentsEmploymentIdData = { +export type PostV1MagicLinkData = { /** - * Employment params + * Magic links generator body */ - body?: EmploymentFullParams; + body: MagicLinkParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -19286,171 +19728,127 @@ export type PatchV1EmploymentsEmploymentIdData = { */ Authorization: string; }; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the administrative_details form schema - */ - administrative_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema - */ - bank_account_details_json_schema_version?: number | 'latest'; - /** - * Version of the employment_basic_information form schema - */ - employment_basic_information_json_schema_version?: number | 'latest'; - /** - * Version of the billing_address_details form schema - */ - billing_address_details_json_schema_version?: number | 'latest'; - /** - * Version of the contract_details form schema - */ - contract_details_json_schema_version?: number | 'latest'; - /** - * Version of the emergency_contact_details form schema - */ - emergency_contact_details_json_schema_version?: number | 'latest'; - /** - * Version of the personal_details form schema - */ - personal_details_json_schema_version?: number | 'latest'; - /** - * Version of the pricing_plan_details form schema - */ - pricing_plan_details_json_schema_version?: number | 'latest'; - /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. - */ - skip_benefits?: boolean; - /** - * Complementary action(s) to perform when creating an employment. - */ - actions?: string; - }; - url: '/v1/employments/{employment_id}'; + path?: never; + query?: never; + url: '/v1/magic-link'; }; -export type PatchV1EmploymentsEmploymentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; +export type PostV1MagicLinkErrors = { /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchV1EmploymentsEmploymentIdError = - PatchV1EmploymentsEmploymentIdErrors[keyof PatchV1EmploymentsEmploymentIdErrors]; +export type PostV1MagicLinkError = + PostV1MagicLinkErrors[keyof PostV1MagicLinkErrors]; -export type PatchV1EmploymentsEmploymentIdResponses = { +export type PostV1MagicLinkResponses = { /** * Success */ - 200: EmploymentResponse; + 200: MagicLinkResponse; }; -export type PatchV1EmploymentsEmploymentIdResponse = - PatchV1EmploymentsEmploymentIdResponses[keyof PatchV1EmploymentsEmploymentIdResponses]; +export type PostV1MagicLinkResponse = + PostV1MagicLinkResponses[keyof PostV1MagicLinkResponses]; -export type GetV1ScimV2UsersData = { +export type GetV1CompaniesCompanyIdData = { body?: never; - path?: never; - query?: { - /** - * 1-based index of the first result - */ - startIndex?: number; + headers: { /** - * Maximum number of results per page + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - count?: number; + Authorization: string; + }; + path: { /** - * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + * Company ID */ - filter?: string; + company_id: string; }; - url: '/v1/scim/v2/Users'; + query?: never; + url: '/v1/companies/{company_id}'; }; -export type GetV1ScimV2UsersErrors = { +export type GetV1CompaniesCompanyIdErrors = { /** * Bad Request */ - 400: IntegrationsScimErrorResponse; + 400: BadRequestResponse; /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1ScimV2UsersError = - GetV1ScimV2UsersErrors[keyof GetV1ScimV2UsersErrors]; +export type GetV1CompaniesCompanyIdError = + GetV1CompaniesCompanyIdErrors[keyof GetV1CompaniesCompanyIdErrors]; -export type GetV1ScimV2UsersResponses = { +export type GetV1CompaniesCompanyIdResponses = { /** * Success */ - 200: IntegrationsScimUserListResponse; + 200: CompanyResponse; }; -export type GetV1ScimV2UsersResponse = - GetV1ScimV2UsersResponses[keyof GetV1ScimV2UsersResponses]; +export type GetV1CompaniesCompanyIdResponse = + GetV1CompaniesCompanyIdResponses[keyof GetV1CompaniesCompanyIdResponses]; -export type GetV1PayrollCalendarsCycleData = { - body?: never; +export type PatchV1CompaniesCompanyId2Data = { + /** + * Update Company params + */ + body?: UpdateCompanyParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * The cycle for which to list the payroll calendars. Format: YYYY-MM + * Company ID + * */ - cycle: string; + company_id: string; }; query?: { /** - * Starts fetching records after the given page + * Version of the address_details form schema */ - page?: number; + address_details_json_schema_version?: number | 'latest'; /** - * Number of items per page + * Version of the bank_account_details form schema */ - page_size?: number; + bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v1/payroll-calendars/{cycle}'; + url: '/v1/companies/{company_id}'; }; -export type GetV1PayrollCalendarsCycleErrors = { +export type PatchV1CompaniesCompanyId2Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -19463,159 +19861,60 @@ export type GetV1PayrollCalendarsCycleErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1PayrollCalendarsCycleError = - GetV1PayrollCalendarsCycleErrors[keyof GetV1PayrollCalendarsCycleErrors]; +export type PatchV1CompaniesCompanyId2Error = + PatchV1CompaniesCompanyId2Errors[keyof PatchV1CompaniesCompanyId2Errors]; -export type GetV1PayrollCalendarsCycleResponses = { +export type PatchV1CompaniesCompanyId2Responses = { /** * Success */ - 200: PayrollCalendarsResponse; + 200: CompanyResponse; }; -export type GetV1PayrollCalendarsCycleResponse = - GetV1PayrollCalendarsCycleResponses[keyof GetV1PayrollCalendarsCycleResponses]; +export type PatchV1CompaniesCompanyId2Response = + PatchV1CompaniesCompanyId2Responses[keyof PatchV1CompaniesCompanyId2Responses]; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = - { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID - */ - legal_entity_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; - }; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = - { +export type PatchV1CompaniesCompanyIdData = { + /** + * Update Company params + */ + body?: UpdateCompanyParams; + headers: { /** - * ShowLegalEntityAdministrativeDetailsResponse + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. * - * Country specific json schema driven administrative details for legal entities - */ - 200: { - data: { - [key: string]: unknown; - }; - }; - }; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; - -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = - { - /** - * Legal entity administrative details params - */ - body?: AdministrativeDetailsParams; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID - */ - legal_entity_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; - }; - -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; - }; - -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; - -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = - { - /** - * ShowLegalEntityAdministrativeDetailsResponse + * The refresh token needs to have been obtained through the Authorization Code flow. * - * Country specific json schema driven administrative details for legal entities */ - 200: { - data: { - [key: string]: unknown; - }; - }; + Authorization: string; }; - -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; - -export type PutV2EmploymentsEmploymentIdContractDetailsData = { - /** - * Employment contract details params - */ - body?: EmploymentContractDetailsParams; path: { /** - * Employment ID + * Company ID + * */ - employment_id: string; + company_id: string; }; query?: { /** - * Version of the contract_details form schema + * Version of the address_details form schema */ - contract_details_json_schema_version?: number | 'latest'; + address_details_json_schema_version?: number | 'latest'; /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + * Version of the bank_account_details form schema */ - skip_benefits?: boolean; + bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v2/employments/{employment_id}/contract_details'; + url: '/v1/companies/{company_id}'; }; -export type PutV2EmploymentsEmploymentIdContractDetailsErrors = { +export type PatchV1CompaniesCompanyIdErrors = { /** * Bad Request */ @@ -19624,99 +19923,120 @@ export type PutV2EmploymentsEmploymentIdContractDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdContractDetailsError = - PutV2EmploymentsEmploymentIdContractDetailsErrors[keyof PutV2EmploymentsEmploymentIdContractDetailsErrors]; +export type PatchV1CompaniesCompanyIdError = + PatchV1CompaniesCompanyIdErrors[keyof PatchV1CompaniesCompanyIdErrors]; -export type PutV2EmploymentsEmploymentIdContractDetailsResponses = { +export type PatchV1CompaniesCompanyIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: CompanyResponse; }; -export type PutV2EmploymentsEmploymentIdContractDetailsResponse = - PutV2EmploymentsEmploymentIdContractDetailsResponses[keyof PutV2EmploymentsEmploymentIdContractDetailsResponses]; +export type PatchV1CompaniesCompanyIdResponse = + PatchV1CompaniesCompanyIdResponses[keyof PatchV1CompaniesCompanyIdResponses]; -export type GetV1CostCalculatorRegionsSlugFieldsData = { +export type GetV1CompaniesSchemaData = { body?: never; - path: { + path?: never; + query: { /** - * Slug + * Country code according to ISO 3-digit alphabetic codes. */ - slug: string; - }; - query?: { + country_code: string; /** - * If the premium benefits should be included in the response + * Name of the desired form */ - include_premium_benefits?: boolean; + form: 'address_details'; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; }; - url: '/v1/cost-calculator/regions/{slug}/fields'; + url: '/v1/companies/schema'; }; -export type GetV1CostCalculatorRegionsSlugFieldsErrors = { +export type GetV1CompaniesSchemaErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Internal Server Error + * Not Found */ - 500: InternalServerErrorResponse; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1CostCalculatorRegionsSlugFieldsError = - GetV1CostCalculatorRegionsSlugFieldsErrors[keyof GetV1CostCalculatorRegionsSlugFieldsErrors]; +export type GetV1CompaniesSchemaError = + GetV1CompaniesSchemaErrors[keyof GetV1CompaniesSchemaErrors]; -export type GetV1CostCalculatorRegionsSlugFieldsResponses = { +export type GetV1CompaniesSchemaResponses = { /** * Success */ - 200: JsonSchemaResponse; + 200: CompanyFormResponse; }; -export type GetV1CostCalculatorRegionsSlugFieldsResponse = - GetV1CostCalculatorRegionsSlugFieldsResponses[keyof GetV1CostCalculatorRegionsSlugFieldsResponses]; +export type GetV1CompaniesSchemaResponse = + GetV1CompaniesSchemaResponses[keyof GetV1CompaniesSchemaResponses]; -export type GetV1OffboardingsIdData = { +export type GetV1EmployeeCurrentData = { body?: never; - path: { - /** - * Offboarding request ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/offboardings/{id}'; + url: '/v1/employee/current'; }; -export type GetV1OffboardingsIdErrors = { +export type GetV1EmployeeCurrentErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; +}; + +export type GetV1EmployeeCurrentError = + GetV1EmployeeCurrentErrors[keyof GetV1EmployeeCurrentErrors]; + +export type GetV1EmployeeCurrentResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type GetV1EmployeeCurrentResponse = + GetV1EmployeeCurrentResponses[keyof GetV1EmployeeCurrentResponses]; + +export type GetV1PricingPlanPartnerTemplatesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/pricing-plan-partner-templates'; +}; + +export type GetV1PricingPlanPartnerTemplatesErrors = { /** * Unauthorized */ @@ -19729,47 +20049,38 @@ export type GetV1OffboardingsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1OffboardingsIdError = - GetV1OffboardingsIdErrors[keyof GetV1OffboardingsIdErrors]; +export type GetV1PricingPlanPartnerTemplatesError = + GetV1PricingPlanPartnerTemplatesErrors[keyof GetV1PricingPlanPartnerTemplatesErrors]; -export type GetV1OffboardingsIdResponses = { +export type GetV1PricingPlanPartnerTemplatesResponses = { /** * Success */ - 200: OffboardingResponse; + 200: ListPricingPlanPartnerTemplatesResponse; }; -export type GetV1OffboardingsIdResponse = - GetV1OffboardingsIdResponses[keyof GetV1OffboardingsIdResponses]; +export type GetV1PricingPlanPartnerTemplatesResponse = + GetV1PricingPlanPartnerTemplatesResponses[keyof GetV1PricingPlanPartnerTemplatesResponses]; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsData = { +export type GetV1CountriesCountryCodeEngagementAgreementDetailsData = { body?: never; path: { /** - * Payroll run ID - */ - payroll_run_id: string; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Country code according to ISO 3-digit alphabetic codes */ - page_size?: number; + country_code: string; }; - url: '/v1/payroll-runs/{payroll_run_id}/employee-details'; + query?: never; + url: '/v1/countries/{country_code}/engagement-agreement-details'; }; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors = { +export type GetV1CountriesCountryCodeEngagementAgreementDetailsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -19782,47 +20093,46 @@ export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsError = - GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors]; +export type GetV1CountriesCountryCodeEngagementAgreementDetailsError = + GetV1CountriesCountryCodeEngagementAgreementDetailsErrors[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsErrors]; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses = { +export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponses = { /** * Success */ - 200: EmployeeDetailsResponse; + 200: EngagementAgreementDetailsResponse; }; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponse = - GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses]; +export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponse = + GetV1CountriesCountryCodeEngagementAgreementDetailsResponses[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsResponses]; -export type GetV1BulkEmploymentJobsJobIdRowsData = { +export type GetV1EmployeeBankAccountData = { body?: never; - path: { - /** - * Bulk employment job id - */ - job_id: string; - }; + path?: never; query?: { /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Version of the bank_account_details form schema */ - page_size?: number; + bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v1/bulk-employment-jobs/{job_id}/rows'; + url: '/v1/employee/bank-account'; }; -export type GetV1BulkEmploymentJobsJobIdRowsErrors = { +export type GetV1EmployeeBankAccountErrors = { /** * Bad Request */ 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Forbidden */ @@ -19837,32 +20147,35 @@ export type GetV1BulkEmploymentJobsJobIdRowsErrors = { 429: TooManyRequestsResponse; }; -export type GetV1BulkEmploymentJobsJobIdRowsError = - GetV1BulkEmploymentJobsJobIdRowsErrors[keyof GetV1BulkEmploymentJobsJobIdRowsErrors]; +export type GetV1EmployeeBankAccountError = + GetV1EmployeeBankAccountErrors[keyof GetV1EmployeeBankAccountErrors]; -export type GetV1BulkEmploymentJobsJobIdRowsResponses = { +export type GetV1EmployeeBankAccountResponses = { /** * Success */ - 200: ImportJobRowsResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1BulkEmploymentJobsJobIdRowsResponse = - GetV1BulkEmploymentJobsJobIdRowsResponses[keyof GetV1BulkEmploymentJobsJobIdRowsResponses]; +export type GetV1EmployeeBankAccountResponse = + GetV1EmployeeBankAccountResponses[keyof GetV1EmployeeBankAccountResponses]; -export type GetV1EmployeeEmergencyContactData = { - body?: never; +export type PutV1EmployeeBankAccountData = { + /** + * Employee bank account details params + */ + body?: EmploymentBankAccountDetailsParams; path?: never; query?: { /** - * Version of the emergency_contact_details form schema + * Version of the bank_account_details form schema */ - emergency_contact_details_json_schema_version?: number | 'latest'; + bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v1/employee/emergency-contact'; + url: '/v1/employee/bank-account'; }; -export type GetV1EmployeeEmergencyContactErrors = { +export type PutV1EmployeeBankAccountErrors = { /** * Bad Request */ @@ -19879,41 +20192,54 @@ export type GetV1EmployeeEmergencyContactErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1EmployeeEmergencyContactError = - GetV1EmployeeEmergencyContactErrors[keyof GetV1EmployeeEmergencyContactErrors]; +export type PutV1EmployeeBankAccountError = + PutV1EmployeeBankAccountErrors[keyof PutV1EmployeeBankAccountErrors]; -export type GetV1EmployeeEmergencyContactResponses = { +export type PutV1EmployeeBankAccountResponses = { /** * Success */ 200: EmploymentDetailsOnlyResponse; }; -export type GetV1EmployeeEmergencyContactResponse = - GetV1EmployeeEmergencyContactResponses[keyof GetV1EmployeeEmergencyContactResponses]; +export type PutV1EmployeeBankAccountResponse = + PutV1EmployeeBankAccountResponses[keyof PutV1EmployeeBankAccountResponses]; -export type PutV1EmployeeEmergencyContactData = { +export type PutV2EmploymentsEmploymentIdContractDetailsData = { /** - * Employee emergency contact params + * Employment contract details params */ - body?: EmploymentEmergencyContactParams; - path?: never; + body?: EmploymentContractDetailsParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: { /** - * Version of the emergency_contact_details form schema + * Version of the contract_details form schema */ - emergency_contact_details_json_schema_version?: number | 'latest'; + contract_details_json_schema_version?: number | 'latest'; + /** + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + */ + skip_benefits?: boolean; }; - url: '/v1/employee/emergency-contact'; + url: '/v2/employments/{employment_id}/contract_details'; }; -export type PutV1EmployeeEmergencyContactErrors = { +export type PutV2EmploymentsEmploymentIdContractDetailsErrors = { /** * Bad Request */ @@ -19930,6 +20256,10 @@ export type PutV1EmployeeEmergencyContactErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -19940,43 +20270,32 @@ export type PutV1EmployeeEmergencyContactErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmployeeEmergencyContactError = - PutV1EmployeeEmergencyContactErrors[keyof PutV1EmployeeEmergencyContactErrors]; +export type PutV2EmploymentsEmploymentIdContractDetailsError = + PutV2EmploymentsEmploymentIdContractDetailsErrors[keyof PutV2EmploymentsEmploymentIdContractDetailsErrors]; -export type PutV1EmployeeEmergencyContactResponses = { +export type PutV2EmploymentsEmploymentIdContractDetailsResponses = { /** * Success */ 200: EmploymentDetailsOnlyResponse; }; -export type PutV1EmployeeEmergencyContactResponse = - PutV1EmployeeEmergencyContactResponses[keyof PutV1EmployeeEmergencyContactResponses]; +export type PutV2EmploymentsEmploymentIdContractDetailsResponse = + PutV2EmploymentsEmploymentIdContractDetailsResponses[keyof PutV2EmploymentsEmploymentIdContractDetailsResponses]; -export type PostV1SandboxEmploymentsData = { - /** - * Employment params - */ - body?: EmploymentCreateParams; - headers: { +export type GetV1CompaniesCompanyIdProductPricesData = { + body?: never; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Company ID */ - Authorization: string; + company_id: UuidSlug; }; - path?: never; query?: never; - url: '/v1/sandbox/employments'; + url: '/v1/companies/{company_id}/product-prices'; }; -export type PostV1SandboxEmploymentsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CompaniesCompanyIdProductPricesErrors = { /** * Unauthorized */ @@ -19989,88 +20308,79 @@ export type PostV1SandboxEmploymentsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1SandboxEmploymentsError = - PostV1SandboxEmploymentsErrors[keyof PostV1SandboxEmploymentsErrors]; +export type GetV1CompaniesCompanyIdProductPricesError = + GetV1CompaniesCompanyIdProductPricesErrors[keyof GetV1CompaniesCompanyIdProductPricesErrors]; -export type PostV1SandboxEmploymentsResponses = { +export type GetV1CompaniesCompanyIdProductPricesResponses = { /** * Success */ - 201: EmploymentCreationResponse; + 200: ListProductPricesResponse; }; -export type PostV1SandboxEmploymentsResponse = - PostV1SandboxEmploymentsResponses[keyof PostV1SandboxEmploymentsResponses]; +export type GetV1CompaniesCompanyIdProductPricesResponse = + GetV1CompaniesCompanyIdProductPricesResponses[keyof GetV1CompaniesCompanyIdProductPricesResponses]; -export type PostV1EmploymentsEmploymentIdContractEligibilityData = { - /** - * Contract Eligibility Create Parameters - */ - body: CreateContractEligibilityParams; +export type PostV1CompaniesCompanyIdCreateTokenData = { + body?: never; path: { /** - * Employment ID + * The ID of the company */ - employment_id: string; + company_id: string; }; - query?: never; - url: '/v1/employments/{employment_id}/contract-eligibility'; + query?: { + /** + * The scope of the token + */ + scope?: string; + }; + url: '/v1/companies/{company_id}/create-token'; }; -export type PostV1EmploymentsEmploymentIdContractEligibilityErrors = { +export type PostV1CompaniesCompanyIdCreateTokenErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type PostV1EmploymentsEmploymentIdContractEligibilityError = - PostV1EmploymentsEmploymentIdContractEligibilityErrors[keyof PostV1EmploymentsEmploymentIdContractEligibilityErrors]; +export type PostV1CompaniesCompanyIdCreateTokenError = + PostV1CompaniesCompanyIdCreateTokenErrors[keyof PostV1CompaniesCompanyIdCreateTokenErrors]; -export type PostV1EmploymentsEmploymentIdContractEligibilityResponses = { +export type PostV1CompaniesCompanyIdCreateTokenResponses = { /** * Success */ - 200: SuccessResponse; + 200: CompanyTokenResponse; }; -export type PostV1EmploymentsEmploymentIdContractEligibilityResponse = - PostV1EmploymentsEmploymentIdContractEligibilityResponses[keyof PostV1EmploymentsEmploymentIdContractEligibilityResponses]; +export type PostV1CompaniesCompanyIdCreateTokenResponse = + PostV1CompaniesCompanyIdCreateTokenResponses[keyof PostV1CompaniesCompanyIdCreateTokenResponses]; -export type GetV1CountriesData = { +export type GetV1IdentityVerificationEmploymentIdData = { body?: never; - headers: { + path: { /** - * This endpoint works with any of the access tokens provided. You can use an access - * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; query?: never; - url: '/v1/countries'; + url: '/v1/identity-verification/{employment_id}'; }; -export type GetV1CountriesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1IdentityVerificationEmploymentIdErrors = { /** * Unauthorized */ @@ -20083,42 +20393,42 @@ export type GetV1CountriesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1CountriesError = - GetV1CountriesErrors[keyof GetV1CountriesErrors]; +export type GetV1IdentityVerificationEmploymentIdError = + GetV1IdentityVerificationEmploymentIdErrors[keyof GetV1IdentityVerificationEmploymentIdErrors]; -export type GetV1CountriesResponses = { +export type GetV1IdentityVerificationEmploymentIdResponses = { /** * Success */ - 200: CountriesResponse; + 200: IdentityVerificationResponse; }; -export type GetV1CountriesResponse = - GetV1CountriesResponses[keyof GetV1CountriesResponses]; +export type GetV1IdentityVerificationEmploymentIdResponse = + GetV1IdentityVerificationEmploymentIdResponses[keyof GetV1IdentityVerificationEmploymentIdResponses]; -export type GetV1EmployeePayslipFilesData = { +export type GetV1ExpensesExpenseIdReceiptsReceiptIdData = { body?: never; - path?: never; - query?: { + path: { /** - * Starts fetching records after the given page + * The expense ID */ - page?: number; + expense_id: string; /** - * Number of items per page + * The receipt ID */ - page_size?: number; + receipt_id: string; }; - url: '/v1/employee/payslip-files'; + query?: never; + url: '/v1/expenses/{expense_id}/receipts/{receipt_id}'; }; -export type GetV1EmployeePayslipFilesErrors = { +export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -20131,39 +20441,42 @@ export type GetV1EmployeePayslipFilesErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmployeePayslipFilesError = - GetV1EmployeePayslipFilesErrors[keyof GetV1EmployeePayslipFilesErrors]; +export type GetV1ExpensesExpenseIdReceiptsReceiptIdError = + GetV1ExpensesExpenseIdReceiptsReceiptIdErrors[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdErrors]; -export type GetV1EmployeePayslipFilesResponses = { +export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponses = { /** * Success */ - 200: ListPayslipFilesResponse; + 200: GenericFile; }; -export type GetV1EmployeePayslipFilesResponse = - GetV1EmployeePayslipFilesResponses[keyof GetV1EmployeePayslipFilesResponses]; +export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponse = + GetV1ExpensesExpenseIdReceiptsReceiptIdResponses[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdResponses]; -export type PostV1CompaniesCompanyIdCreateTokenData = { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData = { body?: never; path: { /** - * The ID of the company - */ - company_id: string; - }; - query?: { - /** - * The scope of the token + * Employment ID */ - scope?: string; + employment_id: string; }; - url: '/v1/companies/{company_id}/create-token'; + query?: never; + url: '/v1/employments/{employment_id}/employment-agreement/preview'; }; -export type PostV1CompaniesCompanyIdCreateTokenErrors = { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors = { /** * Unauthorized */ @@ -20178,85 +20491,93 @@ export type PostV1CompaniesCompanyIdCreateTokenErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CompaniesCompanyIdCreateTokenError = - PostV1CompaniesCompanyIdCreateTokenErrors[keyof PostV1CompaniesCompanyIdCreateTokenErrors]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewError = + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors]; -export type PostV1CompaniesCompanyIdCreateTokenResponses = { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses = { /** * Success */ - 200: CompanyTokenResponse; + 200: EmploymentAgreementPreviewResponse; }; -export type PostV1CompaniesCompanyIdCreateTokenResponse = - PostV1CompaniesCompanyIdCreateTokenResponses[keyof PostV1CompaniesCompanyIdCreateTokenResponses]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponse = + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses]; -export type GetV1CompaniesCompanyIdLegalEntitiesData = { +export type GetV1ScimV2GroupsData = { body?: never; - path: { + path?: never; + query?: { /** - * Company ID + * 1-based index of the first result */ - company_id: UuidSlug; - }; - query?: { + startIndex?: number; /** - * Starts fetching records after the given page + * Maximum number of results per page */ - page?: number; + count?: number; /** - * Number of items per page + * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) */ - page_size?: number; + filter?: string; }; - url: '/v1/companies/{company_id}/legal-entities'; + url: '/v1/scim/v2/Groups'; }; -export type GetV1CompaniesCompanyIdLegalEntitiesErrors = { +export type GetV1ScimV2GroupsErrors = { + /** + * Bad Request + */ + 400: IntegrationsScimErrorResponse; /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; + /** + * Forbidden + */ + 403: IntegrationsScimErrorResponse; /** * Not Found */ - 404: NotFoundResponse; + 404: IntegrationsScimErrorResponse; }; -export type GetV1CompaniesCompanyIdLegalEntitiesError = - GetV1CompaniesCompanyIdLegalEntitiesErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesErrors]; +export type GetV1ScimV2GroupsError = + GetV1ScimV2GroupsErrors[keyof GetV1ScimV2GroupsErrors]; -export type GetV1CompaniesCompanyIdLegalEntitiesResponses = { +export type GetV1ScimV2GroupsResponses = { /** * Success */ - 200: ListCompanyLegalEntitiesResponse; + 200: IntegrationsScimGroupListResponse; }; -export type GetV1CompaniesCompanyIdLegalEntitiesResponse = - GetV1CompaniesCompanyIdLegalEntitiesResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesResponses]; +export type GetV1ScimV2GroupsResponse = + GetV1ScimV2GroupsResponses[keyof GetV1ScimV2GroupsResponses]; -export type PutV2EmploymentsEmploymentIdPersonalDetailsData = { - /** - * Employment personal details params - */ - body?: EmploymentPersonalDetailsParams; - path: { +export type GetV1ExpensesIdData = { + body?: never; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: { + path: { /** - * Version of the personal_details form schema + * Expense ID */ - personal_details_json_schema_version?: number | 'latest'; + id: string; }; - url: '/v2/employments/{employment_id}/personal_details'; + query?: never; + url: '/v1/expenses/{id}'; }; -export type PutV2EmploymentsEmploymentIdPersonalDetailsErrors = { +export type GetV1ExpensesIdErrors = { /** * Bad Request */ @@ -20265,69 +20586,61 @@ export type PutV2EmploymentsEmploymentIdPersonalDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdPersonalDetailsError = - PutV2EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV2EmploymentsEmploymentIdPersonalDetailsErrors]; +export type GetV1ExpensesIdError = + GetV1ExpensesIdErrors[keyof GetV1ExpensesIdErrors]; -export type PutV2EmploymentsEmploymentIdPersonalDetailsResponses = { +export type GetV1ExpensesIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ExpenseResponse; }; -export type PutV2EmploymentsEmploymentIdPersonalDetailsResponse = - PutV2EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV2EmploymentsEmploymentIdPersonalDetailsResponses]; +export type GetV1ExpensesIdResponse = + GetV1ExpensesIdResponses[keyof GetV1ExpensesIdResponses]; -export type PostV1ReadyData = { +export type PatchV1ExpensesId2Data = { /** - * Employment slug + * Expenses */ - body?: CompleteOnboarding; - headers: { + body?: UpdateExpenseParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Expense ID */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/ready'; + url: '/v1/expenses/{id}'; }; -export type PostV1ReadyErrors = { +export type PatchV1ExpensesId2Errors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Conflict */ @@ -20337,36 +20650,44 @@ export type PostV1ReadyErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1ReadyError = PostV1ReadyErrors[keyof PostV1ReadyErrors]; +export type PatchV1ExpensesId2Error = + PatchV1ExpensesId2Errors[keyof PatchV1ExpensesId2Errors]; -export type PostV1ReadyResponses = { +export type PatchV1ExpensesId2Responses = { /** * Success */ - 200: EmploymentResponse; + 200: ExpenseResponse; }; -export type PostV1ReadyResponse = - PostV1ReadyResponses[keyof PostV1ReadyResponses]; +export type PatchV1ExpensesId2Response = + PatchV1ExpensesId2Responses[keyof PatchV1ExpensesId2Responses]; -export type GetV1LeavePoliciesDetailsEmploymentIdData = { - body?: never; +export type PatchV1ExpensesIdData = { + /** + * Expenses + */ + body?: UpdateExpenseParams; path: { /** - * Employment ID + * Expense ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/leave-policies/details/{employment_id}'; + url: '/v1/expenses/{id}'; }; -export type GetV1LeavePoliciesDetailsEmploymentIdErrors = { +export type PatchV1ExpensesIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -20375,47 +20696,54 @@ export type GetV1LeavePoliciesDetailsEmploymentIdErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1LeavePoliciesDetailsEmploymentIdError = - GetV1LeavePoliciesDetailsEmploymentIdErrors[keyof GetV1LeavePoliciesDetailsEmploymentIdErrors]; +export type PatchV1ExpensesIdError = + PatchV1ExpensesIdErrors[keyof PatchV1ExpensesIdErrors]; -export type GetV1LeavePoliciesDetailsEmploymentIdResponses = { +export type PatchV1ExpensesIdResponses = { /** * Success */ - 200: ListLeavePoliciesDetailsResponse; + 200: ExpenseResponse; }; -export type GetV1LeavePoliciesDetailsEmploymentIdResponse = - GetV1LeavePoliciesDetailsEmploymentIdResponses[keyof GetV1LeavePoliciesDetailsEmploymentIdResponses]; +export type PatchV1ExpensesIdResponse = + PatchV1ExpensesIdResponses[keyof PatchV1ExpensesIdResponses]; -export type GetV1TimeoffTypesData = { - body?: never; - headers: { +export type PutV2EmploymentsEmploymentIdEmergencyContactData = { + /** + * Employment emergency contact params + */ + body?: EmploymentEmergencyContactParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; query?: { /** - * Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types). + * Version of the emergency_contact_details form schema */ - type?: TimeoffTypesEmploymentType; + emergency_contact_details_json_schema_version?: number | 'latest'; }; - url: '/v1/timeoff/types'; + url: '/v2/employments/{employment_id}/emergency_contact'; }; -export type GetV1TimeoffTypesErrors = { +export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { /** * Bad Request */ @@ -20424,10 +20752,18 @@ export type GetV1TimeoffTypesErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -20438,74 +20774,92 @@ export type GetV1TimeoffTypesErrors = { 429: TooManyRequestsResponse; }; -export type GetV1TimeoffTypesError = - GetV1TimeoffTypesErrors[keyof GetV1TimeoffTypesErrors]; +export type PutV2EmploymentsEmploymentIdEmergencyContactError = + PutV2EmploymentsEmploymentIdEmergencyContactErrors[keyof PutV2EmploymentsEmploymentIdEmergencyContactErrors]; -export type GetV1TimeoffTypesResponses = { +export type PutV2EmploymentsEmploymentIdEmergencyContactResponses = { /** * Success */ - 200: ListTimeoffTypesResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1TimeoffTypesResponse = - GetV1TimeoffTypesResponses[keyof GetV1TimeoffTypesResponses]; +export type PutV2EmploymentsEmploymentIdEmergencyContactResponse = + PutV2EmploymentsEmploymentIdEmergencyContactResponses[keyof PutV2EmploymentsEmploymentIdEmergencyContactResponses]; -export type PostV1CostCalculatorEstimationCsvData = { +export type PostV1SandboxBenefitRenewalRequestsData = { /** - * Estimate params + * Benefit Renewal Request */ - body?: CostCalculatorEstimateParams; + body: BenefitRenewalRequestsCreateBenefitRenewalRequest; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; query?: never; - url: '/v1/cost-calculator/estimation-csv'; + url: '/v1/sandbox/benefit-renewal-requests'; }; -export type PostV1CostCalculatorEstimationCsvErrors = { +export type PostV1SandboxBenefitRenewalRequestsErrors = { /** - * Not Found + * Bad Request */ - 404: NotFoundResponse; + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1CostCalculatorEstimationCsvError = - PostV1CostCalculatorEstimationCsvErrors[keyof PostV1CostCalculatorEstimationCsvErrors]; +export type PostV1SandboxBenefitRenewalRequestsError = + PostV1SandboxBenefitRenewalRequestsErrors[keyof PostV1SandboxBenefitRenewalRequestsErrors]; -export type PostV1CostCalculatorEstimationCsvResponses = { +export type PostV1SandboxBenefitRenewalRequestsResponses = { /** * Success */ - 200: CostCalculatorEstimateCsvResponse; + 200: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse; }; -export type PostV1CostCalculatorEstimationCsvResponse = - PostV1CostCalculatorEstimationCsvResponses[keyof PostV1CostCalculatorEstimationCsvResponses]; +export type PostV1SandboxBenefitRenewalRequestsResponse = + PostV1SandboxBenefitRenewalRequestsResponses[keyof PostV1SandboxBenefitRenewalRequestsResponses]; -export type GetV1EmployeePersonalDetailsData = { +export type GetV2EmploymentsEmploymentIdBasicInformationData = { body?: never; - path?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: { /** - * Version of the personal_details form schema + * Version of the employment_basic_information form schema */ - personal_details_json_schema_version?: number | 'latest'; + employment_basic_information_json_schema_version?: number | 'latest'; }; - url: '/v1/employee/personal-details'; + url: '/v2/employments/{employment_id}/basic_information'; }; -export type GetV1EmployeePersonalDetailsErrors = { +export type GetV2EmploymentsEmploymentIdBasicInformationErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ @@ -20514,57 +20868,62 @@ export type GetV1EmployeePersonalDetailsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1EmployeePersonalDetailsError = - GetV1EmployeePersonalDetailsErrors[keyof GetV1EmployeePersonalDetailsErrors]; +export type GetV2EmploymentsEmploymentIdBasicInformationError = + GetV2EmploymentsEmploymentIdBasicInformationErrors[keyof GetV2EmploymentsEmploymentIdBasicInformationErrors]; -export type GetV1EmployeePersonalDetailsResponses = { +export type GetV2EmploymentsEmploymentIdBasicInformationResponses = { /** * Success */ 200: EmploymentDetailsOnlyResponse; }; -export type GetV1EmployeePersonalDetailsResponse = - GetV1EmployeePersonalDetailsResponses[keyof GetV1EmployeePersonalDetailsResponses]; +export type GetV2EmploymentsEmploymentIdBasicInformationResponse = + GetV2EmploymentsEmploymentIdBasicInformationResponses[keyof GetV2EmploymentsEmploymentIdBasicInformationResponses]; -export type PutV1EmployeePersonalDetailsData = { +export type PutV2EmploymentsEmploymentIdBasicInformationData = { /** - * Employee personal details params + * Employment basic information params */ - body?: EmploymentPersonalDetailsParams; - path?: never; + body?: EmploymentBasicInformationParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: { /** - * Version of the personal_details form schema + * Version of the employment_basic_information form schema */ - personal_details_json_schema_version?: number | 'latest'; + employment_basic_information_json_schema_version?: number | 'latest'; }; - url: '/v1/employee/personal-details'; + url: '/v2/employments/{employment_id}/basic_information'; }; -export type PutV1EmployeePersonalDetailsErrors = { +export type PutV2EmploymentsEmploymentIdBasicInformationErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -20575,87 +20934,79 @@ export type PutV1EmployeePersonalDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmployeePersonalDetailsError = - PutV1EmployeePersonalDetailsErrors[keyof PutV1EmployeePersonalDetailsErrors]; +export type PutV2EmploymentsEmploymentIdBasicInformationError = + PutV2EmploymentsEmploymentIdBasicInformationErrors[keyof PutV2EmploymentsEmploymentIdBasicInformationErrors]; -export type PutV1EmployeePersonalDetailsResponses = { +export type PutV2EmploymentsEmploymentIdBasicInformationResponses = { /** * Success */ 200: EmploymentDetailsOnlyResponse; }; -export type PutV1EmployeePersonalDetailsResponse = - PutV1EmployeePersonalDetailsResponses[keyof PutV1EmployeePersonalDetailsResponses]; +export type PutV2EmploymentsEmploymentIdBasicInformationResponse = + PutV2EmploymentsEmploymentIdBasicInformationResponses[keyof PutV2EmploymentsEmploymentIdBasicInformationResponses]; -export type GetV1ScimV2GroupsData = { +export type GetV1LeavePoliciesSummaryEmploymentIdData = { body?: never; - path?: never; - query?: { - /** - * 1-based index of the first result - */ - startIndex?: number; - /** - * Maximum number of results per page - */ - count?: number; + path: { /** - * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + * Employment ID */ - filter?: string; + employment_id: string; }; - url: '/v1/scim/v2/Groups'; + query?: never; + url: '/v1/leave-policies/summary/{employment_id}'; }; -export type GetV1ScimV2GroupsErrors = { - /** - * Bad Request - */ - 400: IntegrationsScimErrorResponse; +export type GetV1LeavePoliciesSummaryEmploymentIdErrors = { /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1ScimV2GroupsError = - GetV1ScimV2GroupsErrors[keyof GetV1ScimV2GroupsErrors]; +export type GetV1LeavePoliciesSummaryEmploymentIdError = + GetV1LeavePoliciesSummaryEmploymentIdErrors[keyof GetV1LeavePoliciesSummaryEmploymentIdErrors]; -export type GetV1ScimV2GroupsResponses = { +export type GetV1LeavePoliciesSummaryEmploymentIdResponses = { /** * Success */ - 200: IntegrationsScimGroupListResponse; + 200: ListLeavePoliciesSummaryResponse; }; -export type GetV1ScimV2GroupsResponse = - GetV1ScimV2GroupsResponses[keyof GetV1ScimV2GroupsResponses]; +export type GetV1LeavePoliciesSummaryEmploymentIdResponse = + GetV1LeavePoliciesSummaryEmploymentIdResponses[keyof GetV1LeavePoliciesSummaryEmploymentIdResponses]; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData = { +export type PostV1TimeoffTimeoffIdCancelData = { /** - * CreateContractDocumentParams + * CancelTimeoff */ - body: CreateContractDocument; + body: CancelTimeoffParams; path: { /** - * Employment ID + * Time Off ID */ - employment_id: string; + timeoff_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents'; + url: '/v1/timeoff/{timeoff_id}/cancel'; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors = { +export type PostV1TimeoffTimeoffIdCancelErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -20668,86 +21019,76 @@ export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsError = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors]; +export type PostV1TimeoffTimeoffIdCancelError = + PostV1TimeoffTimeoffIdCancelErrors[keyof PostV1TimeoffTimeoffIdCancelErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses = - { +export type PostV1TimeoffTimeoffIdCancelResponses = { + /** + * Success + */ + 200: TimeoffResponse; +}; + +export type PostV1TimeoffTimeoffIdCancelResponse = + PostV1TimeoffTimeoffIdCancelResponses[keyof PostV1TimeoffTimeoffIdCancelResponses]; + +export type GetV1HelpCenterArticlesIdData = { + body?: never; + path: { /** - * Success + * Help Center Article Zendesk ID */ - 200: CreateContractDocumentResponse; + id: number; }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponse = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses]; - -export type PostV1SandboxWebhookCallbacksTriggerData = { - /** - * Webhook Trigger Params - */ - body?: WebhookTriggerParams; - path?: never; query?: never; - url: '/v1/sandbox/webhook-callbacks/trigger'; + url: '/v1/help-center-articles/{id}'; }; -export type PostV1SandboxWebhookCallbacksTriggerErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1HelpCenterArticlesIdErrors = { /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PostV1SandboxWebhookCallbacksTriggerError = - PostV1SandboxWebhookCallbacksTriggerErrors[keyof PostV1SandboxWebhookCallbacksTriggerErrors]; +export type GetV1HelpCenterArticlesIdError = + GetV1HelpCenterArticlesIdErrors[keyof GetV1HelpCenterArticlesIdErrors]; -export type PostV1SandboxWebhookCallbacksTriggerResponses = { +export type GetV1HelpCenterArticlesIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: HelpCenterArticleResponse; }; -export type PostV1SandboxWebhookCallbacksTriggerResponse = - PostV1SandboxWebhookCallbacksTriggerResponses[keyof PostV1SandboxWebhookCallbacksTriggerResponses]; +export type GetV1HelpCenterArticlesIdResponse = + GetV1HelpCenterArticlesIdResponses[keyof GetV1HelpCenterArticlesIdResponses]; -export type GetV1PayslipsPayslipIdPdfData = { - body?: never; +export type PostV1DocumentsData = { + /** + * File + */ + body: FileParams; headers: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. + * This endpoint works with any of the access tokens provided. You can use an access + * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. * */ Authorization: string; }; - path: { - /** - * Payslip ID - */ - payslip_id: string; - }; + path?: never; query?: never; - url: '/v1/payslips/{payslip_id}/pdf'; + url: '/v1/documents'; }; -export type GetV1PayslipsPayslipIdPdfErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1DocumentsErrors = { /** * Unauthorized */ @@ -20760,36 +21101,34 @@ export type GetV1PayslipsPayslipIdPdfErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1PayslipsPayslipIdPdfError = - GetV1PayslipsPayslipIdPdfErrors[keyof GetV1PayslipsPayslipIdPdfErrors]; +export type PostV1DocumentsError = + PostV1DocumentsErrors[keyof PostV1DocumentsErrors]; -export type GetV1PayslipsPayslipIdPdfResponses = { +export type PostV1DocumentsResponses = { /** * Success */ - 200: PayslipDownloadResponse; + 200: UploadFileResponse; }; -export type GetV1PayslipsPayslipIdPdfResponse = - GetV1PayslipsPayslipIdPdfResponses[keyof GetV1PayslipsPayslipIdPdfResponses]; +export type PostV1DocumentsResponse = + PostV1DocumentsResponses[keyof PostV1DocumentsResponses]; -export type PostV1CurrencyConverterEffectiveData = { - /** - * Convert currency parameters - */ - body: ConvertCurrencyParams; - path?: never; +export type PostV1IdentityVerificationEmploymentIdVerifyData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/currency-converter/effective'; + url: '/v1/identity-verification/{employment_id}/verify'; }; -export type PostV1CurrencyConverterEffectiveErrors = { +export type PostV1IdentityVerificationEmploymentIdVerifyErrors = { /** * Unauthorized */ @@ -20804,45 +21143,36 @@ export type PostV1CurrencyConverterEffectiveErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CurrencyConverterEffectiveError = - PostV1CurrencyConverterEffectiveErrors[keyof PostV1CurrencyConverterEffectiveErrors]; +export type PostV1IdentityVerificationEmploymentIdVerifyError = + PostV1IdentityVerificationEmploymentIdVerifyErrors[keyof PostV1IdentityVerificationEmploymentIdVerifyErrors]; -export type PostV1CurrencyConverterEffectiveResponses = { +export type PostV1IdentityVerificationEmploymentIdVerifyResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: SuccessResponse; }; -export type PostV1CurrencyConverterEffectiveResponse = - PostV1CurrencyConverterEffectiveResponses[keyof PostV1CurrencyConverterEffectiveResponses]; +export type PostV1IdentityVerificationEmploymentIdVerifyResponse = + PostV1IdentityVerificationEmploymentIdVerifyResponses[keyof PostV1IdentityVerificationEmploymentIdVerifyResponses]; -export type GetV1TimeoffIdData = { +export type GetV1CustomFieldsData = { body?: never; - headers: { + path?: never; + query?: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Starts fetching records after the given page */ - Authorization: string; - }; - path: { + page?: number; /** - * Timeoff ID + * Number of items per page */ - id: string; + page_size?: number; }; - query?: never; - url: '/v1/timeoff/{id}'; + url: '/v1/custom-fields'; }; -export type GetV1TimeoffIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CustomFieldsErrors = { /** * Unauthorized */ @@ -20855,54 +21185,32 @@ export type GetV1TimeoffIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1TimeoffIdError = - GetV1TimeoffIdErrors[keyof GetV1TimeoffIdErrors]; +export type GetV1CustomFieldsError = + GetV1CustomFieldsErrors[keyof GetV1CustomFieldsErrors]; -export type GetV1TimeoffIdResponses = { +export type GetV1CustomFieldsResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ListEmploymentCustomFieldsResponse; }; -export type GetV1TimeoffIdResponse = - GetV1TimeoffIdResponses[keyof GetV1TimeoffIdResponses]; +export type GetV1CustomFieldsResponse = + GetV1CustomFieldsResponses[keyof GetV1CustomFieldsResponses]; -export type PatchV1TimeoffId2Data = { +export type PostV1CustomFieldsData = { /** - * UpdateTimeoff + * Custom Field Definition Create Parameters */ - body: UpdateApprovedTimeoffParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Timeoff ID - */ - id: string; - }; + body: CreateCustomFieldDefinitionParams; + path?: never; query?: never; - url: '/v1/timeoff/{id}'; + url: '/v1/custom-fields'; }; -export type PatchV1TimeoffId2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1CustomFieldsErrors = { /** * Unauthorized */ @@ -20915,30 +21223,77 @@ export type PatchV1TimeoffId2Errors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchV1TimeoffId2Error = - PatchV1TimeoffId2Errors[keyof PatchV1TimeoffId2Errors]; +export type PostV1CustomFieldsError = + PostV1CustomFieldsErrors[keyof PostV1CustomFieldsErrors]; -export type PatchV1TimeoffId2Responses = { +export type PostV1CustomFieldsResponses = { /** * Success */ - 200: TimeoffResponse; + 200: CreateEmploymentCustomFieldResponse; }; -export type PatchV1TimeoffId2Response = - PatchV1TimeoffId2Responses[keyof PatchV1TimeoffId2Responses]; +export type PostV1CustomFieldsResponse = + PostV1CustomFieldsResponses[keyof PostV1CustomFieldsResponses]; -export type PatchV1TimeoffIdData = { +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve'; + }; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; + }; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveError = + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors]; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses = + { + /** + * Success + */ + 200: RiskReserveProofOfPaymentResponse; + }; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponse = + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses]; + +export type PostV1WebhookCallbacksData = { /** - * UpdateTimeoff + * WebhookCallback */ - body: UpdateApprovedTimeoffParams; + body?: CreateWebhookCallbackParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -20948,21 +21303,12 @@ export type PatchV1TimeoffIdData = { */ Authorization: string; }; - path: { - /** - * Timeoff ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/timeoff/{id}'; + url: '/v1/webhook-callbacks'; }; -export type PatchV1TimeoffIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1WebhookCallbacksErrors = { /** * Unauthorized */ @@ -20975,41 +21321,72 @@ export type PatchV1TimeoffIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchV1TimeoffIdError = - PatchV1TimeoffIdErrors[keyof PatchV1TimeoffIdErrors]; +export type PostV1WebhookCallbacksError = + PostV1WebhookCallbacksErrors[keyof PostV1WebhookCallbacksErrors]; -export type PatchV1TimeoffIdResponses = { +export type PostV1WebhookCallbacksResponses = { /** * Success */ - 200: TimeoffResponse; + 200: WebhookCallbackResponse; }; -export type PatchV1TimeoffIdResponse = - PatchV1TimeoffIdResponses[keyof PatchV1TimeoffIdResponses]; +export type PostV1WebhookCallbacksResponse = + PostV1WebhookCallbacksResponses[keyof PostV1WebhookCallbacksResponses]; -export type PostV1TimeoffTimeoffIdDeclineData = { - /** - * DeclineTimeoff - */ - body: DeclineTimeoffParams; - path: { +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements'; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors = + { /** - * Time Off ID + * Unauthorized */ - timeoff_id: string; + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsError = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors]; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses = + { + /** + * Success + */ + 200: IndexPreOnboardingDocumentRequirementsResponse; }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponse = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses]; + +export type GetV1SsoConfigurationDetailsData = { + body?: never; + path?: never; query?: never; - url: '/v1/timeoff/{timeoff_id}/decline'; + url: '/v1/sso-configuration/details'; }; -export type PostV1TimeoffTimeoffIdDeclineErrors = { +export type GetV1SsoConfigurationDetailsErrors = { /** * Bad Request */ @@ -21022,58 +21399,108 @@ export type PostV1TimeoffTimeoffIdDeclineErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdDeclineError = - PostV1TimeoffTimeoffIdDeclineErrors[keyof PostV1TimeoffTimeoffIdDeclineErrors]; +export type GetV1SsoConfigurationDetailsError = + GetV1SsoConfigurationDetailsErrors[keyof GetV1SsoConfigurationDetailsErrors]; -export type PostV1TimeoffTimeoffIdDeclineResponses = { +export type GetV1SsoConfigurationDetailsResponses = { /** * Success */ - 200: TimeoffResponse; + 200: SsoConfigurationDetailsResponse; }; -export type PostV1TimeoffTimeoffIdDeclineResponse = - PostV1TimeoffTimeoffIdDeclineResponses[keyof PostV1TimeoffTimeoffIdDeclineResponses]; +export type GetV1SsoConfigurationDetailsResponse = + GetV1SsoConfigurationDetailsResponses[keyof GetV1SsoConfigurationDetailsResponses]; -export type PostV1ContractAmendmentsAutomatableData = { - /** - * Contract Amendment - */ - body?: CreateContractAmendmentParams; - headers: { +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * SignContractDocument */ - Authorization: string; + body: SignContractDocument; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Document ID + */ + contract_document_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignError = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors]; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses = + { + /** + * Success + */ + 200: SuccessResponse; }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponse = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses]; + +export type GetV1PayItemsData = { + body?: never; path?: never; query?: { /** - * Version of the form schema + * Filter by employment slug */ - json_schema_version?: number | 'latest'; + employment_slug?: UuidSlug; + /** + * Filter pay items with effective_date >= given date (YYYY-MM-DD) + */ + effective_from?: Date; + /** + * Filter pay items with effective_date <= given date (YYYY-MM-DD) + */ + effective_to?: Date; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/contract-amendments/automatable'; + url: '/v1/pay-items'; }; -export type PostV1ContractAmendmentsAutomatableErrors = { +export type GetV1PayItemsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -21084,35 +21511,83 @@ export type PostV1ContractAmendmentsAutomatableErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1ContractAmendmentsAutomatableError = - PostV1ContractAmendmentsAutomatableErrors[keyof PostV1ContractAmendmentsAutomatableErrors]; +export type GetV1PayItemsError = GetV1PayItemsErrors[keyof GetV1PayItemsErrors]; -export type PostV1ContractAmendmentsAutomatableResponses = { +export type GetV1PayItemsResponses = { /** * Success */ - 200: ContractAmendmentAutomatableResponse; + 200: ListPayItemsResponse; }; -export type PostV1ContractAmendmentsAutomatableResponse = - PostV1ContractAmendmentsAutomatableResponses[keyof PostV1ContractAmendmentsAutomatableResponses]; +export type GetV1PayItemsResponse = + GetV1PayItemsResponses[keyof GetV1PayItemsResponses]; -export type PostV1TimeoffTimeoffIdApproveData = { +export type GetV1ScimV2UsersData = { + body?: never; + path?: never; + query?: { + /** + * 1-based index of the first result + */ + startIndex?: number; + /** + * Maximum number of results per page + */ + count?: number; + /** + * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + */ + filter?: string; + }; + url: '/v1/scim/v2/Users'; +}; + +export type GetV1ScimV2UsersErrors = { /** - * ApproveTimeoff + * Bad Request */ - body: ApproveTimeoffParams; + 400: IntegrationsScimErrorResponse; + /** + * Unauthorized + */ + 401: IntegrationsScimErrorResponse; + /** + * Forbidden + */ + 403: IntegrationsScimErrorResponse; + /** + * Not Found + */ + 404: IntegrationsScimErrorResponse; +}; + +export type GetV1ScimV2UsersError = + GetV1ScimV2UsersErrors[keyof GetV1ScimV2UsersErrors]; + +export type GetV1ScimV2UsersResponses = { + /** + * Success + */ + 200: IntegrationsScimUserListResponse; +}; + +export type GetV1ScimV2UsersResponse = + GetV1ScimV2UsersResponses[keyof GetV1ScimV2UsersResponses]; + +export type GetV1ResignationsOffboardingRequestIdData = { + body?: never; path: { /** - * Time Off ID + * Offboarding request ID */ - timeoff_id: string; + offboarding_request_id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/approve'; + url: '/v1/resignations/{offboarding_request_id}'; }; -export type PostV1TimeoffTimeoffIdApproveErrors = { +export type GetV1ResignationsOffboardingRequestIdErrors = { /** * Bad Request */ @@ -21135,49 +21610,41 @@ export type PostV1TimeoffTimeoffIdApproveErrors = { 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdApproveError = - PostV1TimeoffTimeoffIdApproveErrors[keyof PostV1TimeoffTimeoffIdApproveErrors]; +export type GetV1ResignationsOffboardingRequestIdError = + GetV1ResignationsOffboardingRequestIdErrors[keyof GetV1ResignationsOffboardingRequestIdErrors]; -export type PostV1TimeoffTimeoffIdApproveResponses = { +export type GetV1ResignationsOffboardingRequestIdResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ResignationResponse; }; -export type PostV1TimeoffTimeoffIdApproveResponse = - PostV1TimeoffTimeoffIdApproveResponses[keyof PostV1TimeoffTimeoffIdApproveResponses]; +export type GetV1ResignationsOffboardingRequestIdResponse = + GetV1ResignationsOffboardingRequestIdResponses[keyof GetV1ResignationsOffboardingRequestIdResponses]; -export type GetV1EmploymentsEmploymentIdFilesData = { +export type GetV1BillingDocumentsBillingDocumentIdBreakdownData = { body?: never; path: { /** - * Employment ID + * The billing document's ID */ - employment_id: string; + billing_document_id: string; }; query?: { /** - * Filter by file type (optional) + * Filters the results by the type of the billing breakdown item. */ type?: string; - /** - * Filter by file sub_type (optional) - */ - sub_type?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; }; - url: '/v1/employments/{employment_id}/files'; + url: '/v1/billing-documents/{billing_document_id}/breakdown'; }; -export type GetV1EmploymentsEmploymentIdFilesErrors = { +export type GetV1BillingDocumentsBillingDocumentIdBreakdownErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -21190,76 +21657,97 @@ export type GetV1EmploymentsEmploymentIdFilesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdFilesError = - GetV1EmploymentsEmploymentIdFilesErrors[keyof GetV1EmploymentsEmploymentIdFilesErrors]; +export type GetV1BillingDocumentsBillingDocumentIdBreakdownError = + GetV1BillingDocumentsBillingDocumentIdBreakdownErrors[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownErrors]; -export type GetV1EmploymentsEmploymentIdFilesResponses = { +export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponses = { /** * Success */ - 200: ListFilesResponse; + 200: BillingDocumentBreakdownResponse; }; -export type GetV1EmploymentsEmploymentIdFilesResponse = - GetV1EmploymentsEmploymentIdFilesResponses[keyof GetV1EmploymentsEmploymentIdFilesResponses]; +export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponse = + GetV1BillingDocumentsBillingDocumentIdBreakdownResponses[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownResponses]; -export type GetV1CustomFieldsData = { - body?: never; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; +export type PostV1TimeoffTimeoffIdCancelRequestDeclineData = { + /** + * Timeoff + */ + body: DeclineTimeoffParams; + path: { /** - * Number of items per page + * Time Off ID */ - page_size?: number; + timeoff_id: string; }; - url: '/v1/custom-fields'; + query?: never; + url: '/v1/timeoff/{timeoff_id}/cancel-request/decline'; }; -export type GetV1CustomFieldsErrors = { +export type PostV1TimeoffTimeoffIdCancelRequestDeclineErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1CustomFieldsError = - GetV1CustomFieldsErrors[keyof GetV1CustomFieldsErrors]; +export type PostV1TimeoffTimeoffIdCancelRequestDeclineError = + PostV1TimeoffTimeoffIdCancelRequestDeclineErrors[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineErrors]; -export type GetV1CustomFieldsResponses = { +export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponses = { /** * Success */ - 200: ListEmploymentCustomFieldsResponse; + 200: SuccessResponse; }; -export type GetV1CustomFieldsResponse = - GetV1CustomFieldsResponses[keyof GetV1CustomFieldsResponses]; +export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponse = + PostV1TimeoffTimeoffIdCancelRequestDeclineResponses[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineResponses]; -export type PostV1CustomFieldsData = { - /** - * Custom Field Definition Create Parameters - */ - body: CreateCustomFieldDefinitionParams; +export type GetV1PayrollCalendarsData = { + body?: never; path?: never; - query?: never; - url: '/v1/custom-fields'; + query?: { + /** + * Filter payroll calendars by country code + */ + country_code?: string; + /** + * Filter payroll calendars by year + */ + year?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/payroll-calendars'; }; -export type PostV1CustomFieldsErrors = { +export type GetV1PayrollCalendarsErrors = { /** * Unauthorized */ @@ -21274,51 +21762,79 @@ export type PostV1CustomFieldsErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CustomFieldsError = - PostV1CustomFieldsErrors[keyof PostV1CustomFieldsErrors]; +export type GetV1PayrollCalendarsError = + GetV1PayrollCalendarsErrors[keyof GetV1PayrollCalendarsErrors]; -export type PostV1CustomFieldsResponses = { +export type GetV1PayrollCalendarsResponses = { /** * Success */ - 200: CreateEmploymentCustomFieldResponse; + 200: PayrollCalendarsEorResponse; }; -export type PostV1CustomFieldsResponse = - PostV1CustomFieldsResponses[keyof PostV1CustomFieldsResponses]; +export type GetV1PayrollCalendarsResponse = + GetV1PayrollCalendarsResponses[keyof GetV1PayrollCalendarsResponses]; -export type GetV1CompanyCurrenciesData = { +export type GetV1WdGphPayDetailData = { body?: never; + headers?: { + /** + * The preferred language of the inquiring user in Workday + */ + accept_language?: string; + }; path?: never; - query?: never; - url: '/v1/company-currencies'; + query: { + /** + * The pay group ID for identifying the pay group at the vendor system + */ + payGroupExternalId: string; + /** + * The run type id provided in the paySummary API + */ + runTypeId: string; + /** + * The cycle type id, defaults to the main run if not provided + */ + cycleTypeId?: string; + /** + * The period end date in question, defaults to current period if not provided + */ + periodEndDate?: Date; + }; + url: '/v1/wd/gph/payDetail'; }; -export type GetV1CompanyCurrenciesErrors = { +export type GetV1WdGphPayDetailErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; }; -export type GetV1CompanyCurrenciesError = - GetV1CompanyCurrenciesErrors[keyof GetV1CompanyCurrenciesErrors]; +export type GetV1WdGphPayDetailError = + GetV1WdGphPayDetailErrors[keyof GetV1WdGphPayDetailErrors]; -export type GetV1CompanyCurrenciesResponses = { +export type GetV1WdGphPayDetailResponses = { /** * Success */ - 200: CompanyCurrenciesResponse; + 200: PayDetailResponse; }; -export type GetV1CompanyCurrenciesResponse = - GetV1CompanyCurrenciesResponses[keyof GetV1CompanyCurrenciesResponses]; +export type GetV1WdGphPayDetailResponse = + GetV1WdGphPayDetailResponses[keyof GetV1WdGphPayDetailResponses]; -export type PatchV1SandboxEmploymentsEmploymentId2Data = { - /** - * Employment params - */ - body?: EmploymentUpdateParams; +export type GetV1ContractAmendmentsSchemaData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -21328,21 +21844,29 @@ export type PatchV1SandboxEmploymentsEmploymentId2Data = { */ Authorization: string; }; - path: { + path?: never; + query: { /** - * Employment ID + * The ID of the employment concerned by the contract amendment request. */ employment_id: string; + /** + * Country code according to ISO 3-digit alphabetic codes. + */ + country_code: string; + /** + * Name of the desired form + */ + form?: 'contract_amendment'; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/sandbox/employments/{employment_id}'; + url: '/v1/contract-amendments/schema'; }; -export type PatchV1SandboxEmploymentsEmploymentId2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ContractAmendmentsSchemaErrors = { /** * Unauthorized */ @@ -21351,47 +21875,49 @@ export type PatchV1SandboxEmploymentsEmploymentId2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1SandboxEmploymentsEmploymentId2Error = - PatchV1SandboxEmploymentsEmploymentId2Errors[keyof PatchV1SandboxEmploymentsEmploymentId2Errors]; +export type GetV1ContractAmendmentsSchemaError = + GetV1ContractAmendmentsSchemaErrors[keyof GetV1ContractAmendmentsSchemaErrors]; -export type PatchV1SandboxEmploymentsEmploymentId2Responses = { +export type GetV1ContractAmendmentsSchemaResponses = { /** * Success */ - 200: EmploymentResponse; + 200: ContractAmendmentFormResponse; }; -export type PatchV1SandboxEmploymentsEmploymentId2Response = - PatchV1SandboxEmploymentsEmploymentId2Responses[keyof PatchV1SandboxEmploymentsEmploymentId2Responses]; +export type GetV1ContractAmendmentsSchemaResponse = + GetV1ContractAmendmentsSchemaResponses[keyof GetV1ContractAmendmentsSchemaResponses]; -export type PatchV1SandboxEmploymentsEmploymentIdData = { - /** - * Employment params - */ - body?: EmploymentUpdateParams; - headers: { +export type GetV1TestSchemaData = { + body?: never; + path?: never; + query?: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Version of the form schema */ - Authorization: string; + json_schema_version?: number | 'latest'; }; + url: '/v1/test-schema'; +}; + +export type GetV1TestSchemaResponses = { + /** + * Success + */ + 200: CompanyFormResponse; +}; + +export type GetV1TestSchemaResponse = + GetV1TestSchemaResponses[keyof GetV1TestSchemaResponses]; + +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData = { + body?: never; path: { /** * Employment ID @@ -21399,14 +21925,10 @@ export type PatchV1SandboxEmploymentsEmploymentIdData = { employment_id: string; }; query?: never; - url: '/v1/sandbox/employments/{employment_id}'; + url: '/v1/employments/{employment_id}/employment-agreement/download'; }; -export type PatchV1SandboxEmploymentsEmploymentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors = { /** * Unauthorized */ @@ -21415,63 +21937,49 @@ export type PatchV1SandboxEmploymentsEmploymentIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1SandboxEmploymentsEmploymentIdError = - PatchV1SandboxEmploymentsEmploymentIdErrors[keyof PatchV1SandboxEmploymentsEmploymentIdErrors]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadError = + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors]; -export type PatchV1SandboxEmploymentsEmploymentIdResponses = { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses = { /** * Success */ - 200: EmploymentResponse; + 200: GenericFile; }; -export type PatchV1SandboxEmploymentsEmploymentIdResponse = - PatchV1SandboxEmploymentsEmploymentIdResponses[keyof PatchV1SandboxEmploymentsEmploymentIdResponses]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse = + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses]; -export type GetV1EmploymentContractsEmploymentIdPendingChangesData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type PatchV1EmployeeTimeoffId2Data = { + /** + * UpdateTimeoff + */ + body: UpdateEmployeeTimeoffParams; path: { /** - * Employment ID + * Timeoff ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employment-contracts/{employment_id}/pending-changes'; + url: '/v1/employee/timeoff/{id}'; }; -export type GetV1EmploymentContractsEmploymentIdPendingChangesErrors = { +export type PatchV1EmployeeTimeoffId2Errors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -21480,34 +21988,41 @@ export type GetV1EmploymentContractsEmploymentIdPendingChangesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentContractsEmploymentIdPendingChangesError = - GetV1EmploymentContractsEmploymentIdPendingChangesErrors[keyof GetV1EmploymentContractsEmploymentIdPendingChangesErrors]; +export type PatchV1EmployeeTimeoffId2Error = + PatchV1EmployeeTimeoffId2Errors[keyof PatchV1EmployeeTimeoffId2Errors]; -export type GetV1EmploymentContractsEmploymentIdPendingChangesResponses = { +export type PatchV1EmployeeTimeoffId2Responses = { /** * Success */ - 200: EmploymentContractPendingChangesResponse; + 200: TimeoffResponse; }; -export type GetV1EmploymentContractsEmploymentIdPendingChangesResponse = - GetV1EmploymentContractsEmploymentIdPendingChangesResponses[keyof GetV1EmploymentContractsEmploymentIdPendingChangesResponses]; +export type PatchV1EmployeeTimeoffId2Response = + PatchV1EmployeeTimeoffId2Responses[keyof PatchV1EmployeeTimeoffId2Responses]; -export type GetV1ResignationsOffboardingRequestIdData = { - body?: never; +export type PatchV1EmployeeTimeoffIdData = { + /** + * UpdateTimeoff + */ + body: UpdateEmployeeTimeoffParams; path: { /** - * Offboarding request ID + * Timeoff ID */ - offboarding_request_id: string; + id: string; }; query?: never; - url: '/v1/resignations/{offboarding_request_id}'; + url: '/v1/employee/timeoff/{id}'; }; -export type GetV1ResignationsOffboardingRequestIdErrors = { +export type PatchV1EmployeeTimeoffIdErrors = { /** * Bad Request */ @@ -21530,95 +22045,101 @@ export type GetV1ResignationsOffboardingRequestIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ResignationsOffboardingRequestIdError = - GetV1ResignationsOffboardingRequestIdErrors[keyof GetV1ResignationsOffboardingRequestIdErrors]; +export type PatchV1EmployeeTimeoffIdError = + PatchV1EmployeeTimeoffIdErrors[keyof PatchV1EmployeeTimeoffIdErrors]; -export type GetV1ResignationsOffboardingRequestIdResponses = { +export type PatchV1EmployeeTimeoffIdResponses = { /** * Success */ - 200: ResignationResponse; + 200: TimeoffResponse; }; -export type GetV1ResignationsOffboardingRequestIdResponse = - GetV1ResignationsOffboardingRequestIdResponses[keyof GetV1ResignationsOffboardingRequestIdResponses]; +export type PatchV1EmployeeTimeoffIdResponse = + PatchV1EmployeeTimeoffIdResponses[keyof PatchV1EmployeeTimeoffIdResponses]; -export type PostV1DocumentsData = { - /** - * File - */ - body: FileParams; - headers: { +export type GetV1ScimV2GroupsIdData = { + body?: never; + path: { /** - * This endpoint works with any of the access tokens provided. You can use an access - * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. - * + * Group ID (slug) */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/documents'; + url: '/v1/scim/v2/Groups/{id}'; }; -export type PostV1DocumentsErrors = { +export type GetV1ScimV2GroupsIdErrors = { /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: IntegrationsScimErrorResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: IntegrationsScimErrorResponse; }; -export type PostV1DocumentsError = - PostV1DocumentsErrors[keyof PostV1DocumentsErrors]; +export type GetV1ScimV2GroupsIdError = + GetV1ScimV2GroupsIdErrors[keyof GetV1ScimV2GroupsIdErrors]; -export type PostV1DocumentsResponses = { +export type GetV1ScimV2GroupsIdResponses = { /** * Success */ - 200: UploadFileResponse; + 200: IntegrationsScimGroup; }; -export type PostV1DocumentsResponse = - PostV1DocumentsResponses[keyof PostV1DocumentsResponses]; +export type GetV1ScimV2GroupsIdResponse = + GetV1ScimV2GroupsIdResponses[keyof GetV1ScimV2GroupsIdResponses]; -export type PostV1EmploymentsEmploymentIdInviteData = { +export type GetV1CountriesCountryCodeLegalEntityFormsFormData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Country code according to ISO 3-digit alphabetic codes */ - Authorization: string; + country_code: string; + /** + * Name of the desired form + */ + form: string; }; - path: { + query?: { /** - * Employment ID + * Product type. Default value is global_payroll. */ - employment_id: string; + product_type?: 'peo' | 'global_payroll' | 'e2e_payroll'; + /** + * Legal entity id for admistrative_details of e2e payroll products in GBR + */ + legal_entity_id?: UuidSlug; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/employments/{employment_id}/invite'; + url: '/v1/countries/{country_code}/legal_entity_forms/{form}'; }; -export type PostV1EmploymentsEmploymentIdInviteErrors = { +export type GetV1CountriesCountryCodeLegalEntityFormsFormErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Conflict + * Unauthorized */ - 409: ConflictResponse; + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -21629,20 +22150,20 @@ export type PostV1EmploymentsEmploymentIdInviteErrors = { 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdInviteError = - PostV1EmploymentsEmploymentIdInviteErrors[keyof PostV1EmploymentsEmploymentIdInviteErrors]; +export type GetV1CountriesCountryCodeLegalEntityFormsFormError = + GetV1CountriesCountryCodeLegalEntityFormsFormErrors[keyof GetV1CountriesCountryCodeLegalEntityFormsFormErrors]; -export type PostV1EmploymentsEmploymentIdInviteResponses = { +export type GetV1CountriesCountryCodeLegalEntityFormsFormResponses = { /** * Success */ - 200: SuccessResponse; + 200: CountryFormResponse; }; -export type PostV1EmploymentsEmploymentIdInviteResponse = - PostV1EmploymentsEmploymentIdInviteResponses[keyof PostV1EmploymentsEmploymentIdInviteResponses]; +export type GetV1CountriesCountryCodeLegalEntityFormsFormResponse = + GetV1CountriesCountryCodeLegalEntityFormsFormResponses[keyof GetV1CountriesCountryCodeLegalEntityFormsFormResponses]; -export type GetV1ExpensesIdData = { +export type GetV1EmploymentContractsEmploymentIdPendingChangesData = { body?: never; headers: { /** @@ -21655,23 +22176,23 @@ export type GetV1ExpensesIdData = { }; path: { /** - * Expense ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/expenses/{id}'; + url: '/v1/employment-contracts/{employment_id}/pending-changes'; }; -export type GetV1ExpensesIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentContractsEmploymentIdPendingChangesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -21680,41 +22201,34 @@ export type GetV1ExpensesIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1ExpensesIdError = - GetV1ExpensesIdErrors[keyof GetV1ExpensesIdErrors]; +export type GetV1EmploymentContractsEmploymentIdPendingChangesError = + GetV1EmploymentContractsEmploymentIdPendingChangesErrors[keyof GetV1EmploymentContractsEmploymentIdPendingChangesErrors]; -export type GetV1ExpensesIdResponses = { +export type GetV1EmploymentContractsEmploymentIdPendingChangesResponses = { /** * Success */ - 200: ExpenseResponse; + 200: EmploymentContractPendingChangesResponse; }; -export type GetV1ExpensesIdResponse = - GetV1ExpensesIdResponses[keyof GetV1ExpensesIdResponses]; +export type GetV1EmploymentContractsEmploymentIdPendingChangesResponse = + GetV1EmploymentContractsEmploymentIdPendingChangesResponses[keyof GetV1EmploymentContractsEmploymentIdPendingChangesResponses]; -export type PatchV1ExpensesId2Data = { - /** - * Expenses - */ - body?: UpdateExpenseParams; +export type GetV2OffboardingsIdData = { + body?: never; path: { /** - * Expense ID + * Offboarding ID */ id: string; }; query?: never; - url: '/v1/expenses/{id}'; + url: '/v2/offboardings/{id}'; }; -export type PatchV1ExpensesId2Errors = { +export type GetV2OffboardingsIdErrors = { /** * Bad Request */ @@ -21727,10 +22241,6 @@ export type PatchV1ExpensesId2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -21741,128 +22251,92 @@ export type PatchV1ExpensesId2Errors = { 429: TooManyRequestsResponse; }; -export type PatchV1ExpensesId2Error = - PatchV1ExpensesId2Errors[keyof PatchV1ExpensesId2Errors]; +export type GetV2OffboardingsIdError = + GetV2OffboardingsIdErrors[keyof GetV2OffboardingsIdErrors]; -export type PatchV1ExpensesId2Responses = { +export type GetV2OffboardingsIdResponses = { /** * Success */ - 200: ExpenseResponse; + 200: V2OffboardingResponse; }; -export type PatchV1ExpensesId2Response = - PatchV1ExpensesId2Responses[keyof PatchV1ExpensesId2Responses]; +export type GetV2OffboardingsIdResponse = + GetV2OffboardingsIdResponses[keyof GetV2OffboardingsIdResponses]; -export type PatchV1ExpensesIdData = { +export type PostV1SdkTelemetryErrorsData = { /** - * Expenses + * SDK Error Report */ - body?: UpdateExpenseParams; - path: { - /** - * Expense ID - */ - id: string; - }; + body: SdkErrorPayload; + path?: never; query?: never; - url: '/v1/expenses/{id}'; + url: '/v1/sdk/telemetry-errors'; }; -export type PatchV1ExpensesIdErrors = { +export type PostV1SdkTelemetryErrorsErrors = { /** * Bad Request */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; + 400: ErrorResponse; /** - * Not Found + * Too Many Requests */ - 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; + 429: RateLimitResponse; }; -export type PatchV1ExpensesIdError = - PatchV1ExpensesIdErrors[keyof PatchV1ExpensesIdErrors]; +export type PostV1SdkTelemetryErrorsError = + PostV1SdkTelemetryErrorsErrors[keyof PostV1SdkTelemetryErrorsErrors]; -export type PatchV1ExpensesIdResponses = { +export type PostV1SdkTelemetryErrorsResponses = { /** - * Success + * No Content */ - 200: ExpenseResponse; + 204: unknown; }; -export type PatchV1ExpensesIdResponse = - PatchV1ExpensesIdResponses[keyof PatchV1ExpensesIdResponses]; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { +export type GetV1CompaniesCompanyIdComplianceProfileData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path: { /** - * Benefit Renewal Request Id + * Company ID */ - benefit_renewal_request_id: UuidSlug; + company_id: UuidSlug; }; query?: never; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; + url: '/v1/companies/{company_id}/compliance-profile'; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { +export type GetV1CompaniesCompanyIdComplianceProfileErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdError = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; +export type GetV1CompaniesCompanyIdComplianceProfileError = + GetV1CompaniesCompanyIdComplianceProfileErrors[keyof GetV1CompaniesCompanyIdComplianceProfileErrors]; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { +export type GetV1CompaniesCompanyIdComplianceProfileResponses = { /** * Success */ - 200: BenefitRenewalRequestsBenefitRenewalRequestResponse; + 200: CompanyComplianceProfileResponse; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; +export type GetV1CompaniesCompanyIdComplianceProfileResponse = + GetV1CompaniesCompanyIdComplianceProfileResponses[keyof GetV1CompaniesCompanyIdComplianceProfileResponses]; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { - /** - * Benefit Renewal Request Response - */ - body?: BenefitRenewalRequestsUpdateBenefitRenewalRequest; +export type GetV1PayslipsIdData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -21874,127 +22348,188 @@ export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { }; path: { /** - * Benefit Renewal Request Id - */ - benefit_renewal_request_id: UuidSlug; - }; - query?: { - /** - * Version of the form schema + * Payslip ID */ - json_schema_version?: number | 'latest'; + id: string; }; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; + query?: never; + url: '/v1/payslips/{id}'; }; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { +export type GetV1PayslipsIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdError = - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; +export type GetV1PayslipsIdError = + GetV1PayslipsIdErrors[keyof GetV1PayslipsIdErrors]; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { +export type GetV1PayslipsIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: PayslipResponse; }; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; +export type GetV1PayslipsIdResponse = + GetV1PayslipsIdResponses[keyof GetV1PayslipsIdResponses]; -export type GetV1EmploymentsEmploymentIdOnboardingStepsData = { +export type PostV1TimeoffTimeoffIdCancelRequestApproveData = { body?: never; path: { /** - * Employment ID + * Time Off ID */ - employment_id: UuidSlug; + timeoff_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/onboarding-steps'; + url: '/v1/timeoff/{timeoff_id}/cancel-request/approve'; }; -export type GetV1EmploymentsEmploymentIdOnboardingStepsErrors = { +export type PostV1TimeoffTimeoffIdCancelRequestApproveErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdOnboardingStepsError = - GetV1EmploymentsEmploymentIdOnboardingStepsErrors[keyof GetV1EmploymentsEmploymentIdOnboardingStepsErrors]; +export type PostV1TimeoffTimeoffIdCancelRequestApproveError = + PostV1TimeoffTimeoffIdCancelRequestApproveErrors[keyof PostV1TimeoffTimeoffIdCancelRequestApproveErrors]; -export type GetV1EmploymentsEmploymentIdOnboardingStepsResponses = { +export type PostV1TimeoffTimeoffIdCancelRequestApproveResponses = { /** * Success */ - 200: EmploymentOnboardingStepsResponse; + 200: SuccessResponse; }; -export type GetV1EmploymentsEmploymentIdOnboardingStepsResponse = - GetV1EmploymentsEmploymentIdOnboardingStepsResponses[keyof GetV1EmploymentsEmploymentIdOnboardingStepsResponses]; +export type PostV1TimeoffTimeoffIdCancelRequestApproveResponse = + PostV1TimeoffTimeoffIdCancelRequestApproveResponses[keyof PostV1TimeoffTimeoffIdCancelRequestApproveResponses]; -export type GetV1EmployeeCurrentData = { +export type GetV1WebhookEventsData = { body?: never; path?: never; - query?: never; - url: '/v1/employee/current'; + query?: { + /** + * Filter by webhook event type + */ + event_type?: string; + /** + * Filter by delivery status (true = 200, false = 4xx/5xx) + */ + successfully_delivered?: boolean; + /** + * Filter by company ID + */ + company_id?: string; + /** + * Filter by date before (ISO 8601 format) + */ + before?: string; + /** + * Filter by date after (ISO 8601 format) + */ + after?: string; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'first_triggered_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/webhook-events'; }; -export type GetV1EmployeeCurrentErrors = { +export type GetV1WebhookEventsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: ForbiddenResponse; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeCurrentError = - GetV1EmployeeCurrentErrors[keyof GetV1EmployeeCurrentErrors]; +export type GetV1WebhookEventsError = + GetV1WebhookEventsErrors[keyof GetV1WebhookEventsErrors]; -export type GetV1EmployeeCurrentResponses = { +export type GetV1WebhookEventsResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListWebhookEventsResponse; }; -export type GetV1EmployeeCurrentResponse = - GetV1EmployeeCurrentResponses[keyof GetV1EmployeeCurrentResponses]; +export type GetV1WebhookEventsResponse = + GetV1WebhookEventsResponses[keyof GetV1WebhookEventsResponses]; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesData = { +export type GetV1TimeoffTypesData = { body?: never; - path: { + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: never; - url: '/v1/employments/{employment_id}/company-structure-nodes'; + path?: never; + query?: { + /** + * Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types). + */ + type?: TimeoffTypesEmploymentType; + }; + url: '/v1/timeoff/types'; }; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors = { +export type GetV1TimeoffTypesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -22007,28 +22542,32 @@ export type GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesError = - GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors]; +export type GetV1TimeoffTypesError = + GetV1TimeoffTypesErrors[keyof GetV1TimeoffTypesErrors]; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses = { +export type GetV1TimeoffTypesResponses = { /** * Success */ - 200: CompanyStructureNodesResponse; + 200: ListTimeoffTypesResponse; }; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponse = - GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses]; +export type GetV1TimeoffTypesResponse = + GetV1TimeoffTypesResponses[keyof GetV1TimeoffTypesResponses]; -export type GetV1EmploymentsEmploymentIdCustomFieldsData = { +export type GetV1CompaniesCompanyIdLegalEntitiesData = { body?: never; path: { /** - * Employment ID + * Company ID */ - employment_id: string; + company_id: UuidSlug; }; query?: { /** @@ -22040,10 +22579,10 @@ export type GetV1EmploymentsEmploymentIdCustomFieldsData = { */ page_size?: number; }; - url: '/v1/employments/{employment_id}/custom-fields'; + url: '/v1/companies/{company_id}/legal-entities'; }; -export type GetV1EmploymentsEmploymentIdCustomFieldsErrors = { +export type GetV1CompaniesCompanyIdLegalEntitiesErrors = { /** * Unauthorized */ @@ -22052,53 +22591,41 @@ export type GetV1EmploymentsEmploymentIdCustomFieldsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentsEmploymentIdCustomFieldsError = - GetV1EmploymentsEmploymentIdCustomFieldsErrors[keyof GetV1EmploymentsEmploymentIdCustomFieldsErrors]; +export type GetV1CompaniesCompanyIdLegalEntitiesError = + GetV1CompaniesCompanyIdLegalEntitiesErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesErrors]; -export type GetV1EmploymentsEmploymentIdCustomFieldsResponses = { +export type GetV1CompaniesCompanyIdLegalEntitiesResponses = { /** * Success */ - 200: ListEmploymentCustomFieldValuePaginatedResponse; + 200: ListCompanyLegalEntitiesResponse; }; -export type GetV1EmploymentsEmploymentIdCustomFieldsResponse = - GetV1EmploymentsEmploymentIdCustomFieldsResponses[keyof GetV1EmploymentsEmploymentIdCustomFieldsResponses]; +export type GetV1CompaniesCompanyIdLegalEntitiesResponse = + GetV1CompaniesCompanyIdLegalEntitiesResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesResponses]; -export type PutV1ResignationsOffboardingRequestIdValidateData = { +export type PostV1EmploymentsEmploymentIdContractEligibilityData = { /** - * ValidateResignation + * Contract Eligibility Create Parameters */ - body: ValidateResignationRequestParams; + body: CreateContractEligibilityParams; path: { /** - * Offboarding request ID + * Employment ID */ - offboarding_request_id: string; + employment_id: string; }; query?: never; - url: '/v1/resignations/{offboarding_request_id}/validate'; + url: '/v1/employments/{employment_id}/contract-eligibility'; }; -export type PutV1ResignationsOffboardingRequestIdValidateErrors = { +export type PostV1EmploymentsEmploymentIdContractEligibilityErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -22109,179 +22636,111 @@ export type PutV1ResignationsOffboardingRequestIdValidateErrors = { 429: TooManyRequestsResponse; }; -export type PutV1ResignationsOffboardingRequestIdValidateError = - PutV1ResignationsOffboardingRequestIdValidateErrors[keyof PutV1ResignationsOffboardingRequestIdValidateErrors]; +export type PostV1EmploymentsEmploymentIdContractEligibilityError = + PostV1EmploymentsEmploymentIdContractEligibilityErrors[keyof PostV1EmploymentsEmploymentIdContractEligibilityErrors]; -export type PutV1ResignationsOffboardingRequestIdValidateResponses = { +export type PostV1EmploymentsEmploymentIdContractEligibilityResponses = { /** * Success */ 200: SuccessResponse; }; -export type PutV1ResignationsOffboardingRequestIdValidateResponse = - PutV1ResignationsOffboardingRequestIdValidateResponses[keyof PutV1ResignationsOffboardingRequestIdValidateResponses]; +export type PostV1EmploymentsEmploymentIdContractEligibilityResponse = + PostV1EmploymentsEmploymentIdContractEligibilityResponses[keyof PostV1EmploymentsEmploymentIdContractEligibilityResponses]; -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData = - { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Company ID - */ - company_id: string; - /** - * Legal Entity ID to set as the new default - */ - legal_entity_id: string; - }; - query?: never; - url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}'; +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; }; - -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors = - { + query?: { /** - * Bad Request + * Restrict to currencies which payout is guaranteed (default: true) */ - 400: BadRequestResponse; + restrict_to_guaranteed_pay_out_currencies?: boolean; + }; + url: '/v1/contractors/employments/{employment_id}/contractor-currencies'; +}; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors = + { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** - * Too many requests + * Internal Server Error */ - 429: TooManyRequestsResponse; + 500: InternalServerErrorResponse; }; -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdError = - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors]; +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesError = + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors]; -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses = +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractorCurrencyResponse; }; -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponse = - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses]; +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponse = + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses]; -export type GetV1CompaniesCompanyIdWebhookCallbacksData = { +export type GetV1PayslipsData = { body?: never; - path: { + path?: never; + query?: { /** - * Company ID + * Employment ID */ - company_id: string; - }; - query?: never; - url: '/v1/companies/{company_id}/webhook-callbacks'; -}; - -export type GetV1CompaniesCompanyIdWebhookCallbacksErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1CompaniesCompanyIdWebhookCallbacksError = - GetV1CompaniesCompanyIdWebhookCallbacksErrors[keyof GetV1CompaniesCompanyIdWebhookCallbacksErrors]; - -export type GetV1CompaniesCompanyIdWebhookCallbacksResponses = { - /** - * Success - */ - 200: ListWebhookCallbacksResponse; -}; - -export type GetV1CompaniesCompanyIdWebhookCallbacksResponse = - GetV1CompaniesCompanyIdWebhookCallbacksResponses[keyof GetV1CompaniesCompanyIdWebhookCallbacksResponses]; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData = - { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID - */ - legal_entity_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility'; - }; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors = - { + employment_id?: string; /** - * Unauthorized + * Filters by payslips `issued_at` field, after or on the same day than the given date */ - 401: UnauthorizedResponse; + start_date?: string; /** - * Not Found + * Filters by payslips `issued_at` field, before or or the same day than the given date */ - 404: NotFoundResponse; - }; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityError = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors]; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses = - { + end_date?: string; /** - * Success + * Filters by payslips `expected_payout_date` field, after or on the same day than the given date */ - 200: ContractorEligibilityResponse; - }; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponse = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses]; - -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { - body?: never; - path: { + expected_payout_start_date?: string; /** - * Custom field ID + * Filters by payslips `expected_payout_date` field, before or or the same day than the given date */ - custom_field_id: string; + expected_payout_end_date?: string; /** - * Employment ID + * Starts fetching records after the given page */ - employment_id: string; + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; + url: '/v1/payslips'; }; -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { +export type GetV1PayslipsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -22294,49 +22753,52 @@ export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdError = - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; +export type GetV1PayslipsError = GetV1PayslipsErrors[keyof GetV1PayslipsErrors]; -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { +export type GetV1PayslipsResponses = { /** * Success */ - 200: EmploymentCustomFieldValueResponse; + 200: ListPayslipsResponse; }; -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; +export type GetV1PayslipsResponse = + GetV1PayslipsResponses[keyof GetV1PayslipsResponses]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data = { +export type PostV1SandboxEmploymentsData = { /** - * Custom Field Value Update Parameters + * Employment params */ - body: UpdateEmploymentCustomFieldValueParams; - path: { - /** - * Custom field ID - */ - custom_field_id: string; + body?: EmploymentCreateParams; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; + url: '/v1/sandbox/employments'; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors = { +export type PostV1SandboxEmploymentsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -22345,41 +22807,42 @@ export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Error = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors]; +export type PostV1SandboxEmploymentsError = + PostV1SandboxEmploymentsErrors[keyof PostV1SandboxEmploymentsErrors]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses = { +export type PostV1SandboxEmploymentsResponses = { /** * Success */ - 200: EmploymentCustomFieldValueResponse; + 201: EmploymentCreationResponse; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Response = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses]; +export type PostV1SandboxEmploymentsResponse = + PostV1SandboxEmploymentsResponses[keyof PostV1SandboxEmploymentsResponses]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { - /** - * Custom Field Value Update Parameters - */ - body: UpdateEmploymentCustomFieldValueParams; - path: { - /** - * Custom field ID - */ - custom_field_id: string; +export type GetV1EmployeeEmergencyContactData = { + body?: never; + path?: never; + query?: { /** - * Employment ID + * Version of the emergency_contact_details form schema */ - employment_id: string; + emergency_contact_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; + url: '/v1/employee/emergency-contact'; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { +export type GetV1EmployeeEmergencyContactErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -22395,174 +22858,38 @@ export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdError = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; +export type GetV1EmployeeEmergencyContactError = + GetV1EmployeeEmergencyContactErrors[keyof GetV1EmployeeEmergencyContactErrors]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { +export type GetV1EmployeeEmergencyContactResponses = { /** * Success */ - 200: EmploymentCustomFieldValueResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Termination Request ID - */ - termination_request_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}'; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors = - { - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdError = - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses = - { - /** - * Success - */ - 200: CorTerminationRequestResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponse = - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses]; - -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentError = - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors]; - -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses = - { - /** - * Success - */ - 200: SuccessResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponse = - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses]; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData = - { - /** - * SignContractDocument - */ - body: SignContractDocument; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Document ID - */ - contract_document_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignError = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors]; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses = - { - /** - * Success - */ - 200: SuccessResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponse = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses]; +export type GetV1EmployeeEmergencyContactResponse = + GetV1EmployeeEmergencyContactResponses[keyof GetV1EmployeeEmergencyContactResponses]; -export type GetV1IdentityCurrentData = { - body?: never; - headers: { +export type PutV1EmployeeEmergencyContactData = { + /** + * Employee emergency contact params + */ + body?: EmploymentEmergencyContactParams; + path?: never; + query?: { /** - * This endpoint works with any of the access tokens provided. You can use an access - * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. - * + * Version of the emergency_contact_details form schema */ - Authorization: string; + emergency_contact_details_json_schema_version?: number | 'latest'; }; - path?: never; - query?: never; - url: '/v1/identity/current'; + url: '/v1/employee/emergency-contact'; }; -export type GetV1IdentityCurrentErrors = { +export type PutV1EmployeeEmergencyContactErrors = { /** * Bad Request */ @@ -22571,6 +22898,10 @@ export type GetV1IdentityCurrentErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -22580,50 +22911,37 @@ export type GetV1IdentityCurrentErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1IdentityCurrentError = - GetV1IdentityCurrentErrors[keyof GetV1IdentityCurrentErrors]; +export type PutV1EmployeeEmergencyContactError = + PutV1EmployeeEmergencyContactErrors[keyof PutV1EmployeeEmergencyContactErrors]; -export type GetV1IdentityCurrentResponses = { +export type PutV1EmployeeEmergencyContactResponses = { /** * Success */ - 201: IdentityCurrentResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1IdentityCurrentResponse = - GetV1IdentityCurrentResponses[keyof GetV1IdentityCurrentResponses]; +export type PutV1EmployeeEmergencyContactResponse = + PutV1EmployeeEmergencyContactResponses[keyof PutV1EmployeeEmergencyContactResponses]; -export type DeleteV1IncentivesIdData = { +export type GetV1PayrollRunsPayrollRunIdData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Payroll run ID */ - Authorization: string; - }; - path: { - /** - * Incentive ID - */ - id: string; + payroll_run_id: string; }; query?: never; - url: '/v1/incentives/{id}'; + url: '/v1/payroll-runs/{payroll_run_id}'; }; -export type DeleteV1IncentivesIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1PayrollRunsPayrollRunIdErrors = { /** * Unauthorized */ @@ -22632,55 +22950,38 @@ export type DeleteV1IncentivesIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type DeleteV1IncentivesIdError = - DeleteV1IncentivesIdErrors[keyof DeleteV1IncentivesIdErrors]; +export type GetV1PayrollRunsPayrollRunIdError = + GetV1PayrollRunsPayrollRunIdErrors[keyof GetV1PayrollRunsPayrollRunIdErrors]; -export type DeleteV1IncentivesIdResponses = { +export type GetV1PayrollRunsPayrollRunIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: PayrollRunResponse; }; -export type DeleteV1IncentivesIdResponse = - DeleteV1IncentivesIdResponses[keyof DeleteV1IncentivesIdResponses]; +export type GetV1PayrollRunsPayrollRunIdResponse = + GetV1PayrollRunsPayrollRunIdResponses[keyof GetV1PayrollRunsPayrollRunIdResponses]; -export type GetV1IncentivesIdData = { +export type GetV1OffboardingsIdData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path: { /** - * Incentive ID + * Offboarding request ID */ id: string; }; query?: never; - url: '/v1/incentives/{id}'; + url: '/v1/offboardings/{id}'; }; -export type GetV1IncentivesIdErrors = { +export type GetV1OffboardingsIdErrors = { /** * Bad Request */ @@ -22703,24 +23004,21 @@ export type GetV1IncentivesIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1IncentivesIdError = - GetV1IncentivesIdErrors[keyof GetV1IncentivesIdErrors]; +export type GetV1OffboardingsIdError = + GetV1OffboardingsIdErrors[keyof GetV1OffboardingsIdErrors]; -export type GetV1IncentivesIdResponses = { +export type GetV1OffboardingsIdResponses = { /** * Success */ - 200: IncentiveResponse; + 200: OffboardingResponse; }; -export type GetV1IncentivesIdResponse = - GetV1IncentivesIdResponses[keyof GetV1IncentivesIdResponses]; +export type GetV1OffboardingsIdResponse = + GetV1OffboardingsIdResponses[keyof GetV1OffboardingsIdResponses]; -export type PatchV1IncentivesId2Data = { - /** - * Incentive - */ - body?: UpdateIncentiveParams; +export type GetV1ExpensesData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -22730,17 +23028,21 @@ export type PatchV1IncentivesId2Data = { */ Authorization: string; }; - path: { + path?: never; + query?: { /** - * Incentive ID + * Starts fetching records after the given page */ - id: string; + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v1/incentives/{id}'; + url: '/v1/expenses'; }; -export type PatchV1IncentivesId2Errors = { +export type GetV1ExpensesErrors = { /** * Bad Request */ @@ -22753,10 +23055,6 @@ export type PatchV1IncentivesId2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -22767,24 +23065,23 @@ export type PatchV1IncentivesId2Errors = { 429: TooManyRequestsResponse; }; -export type PatchV1IncentivesId2Error = - PatchV1IncentivesId2Errors[keyof PatchV1IncentivesId2Errors]; +export type GetV1ExpensesError = GetV1ExpensesErrors[keyof GetV1ExpensesErrors]; -export type PatchV1IncentivesId2Responses = { +export type GetV1ExpensesResponses = { /** * Success */ - 200: IncentiveResponse; + 201: ListExpenseResponse; }; -export type PatchV1IncentivesId2Response = - PatchV1IncentivesId2Responses[keyof PatchV1IncentivesId2Responses]; +export type GetV1ExpensesResponse = + GetV1ExpensesResponses[keyof GetV1ExpensesResponses]; -export type PatchV1IncentivesIdData = { +export type PostV1ExpensesData = { /** - * Incentive + * Expenses */ - body?: UpdateIncentiveParams; + body?: ParamsToCreateExpense; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -22794,17 +23091,12 @@ export type PatchV1IncentivesIdData = { */ Authorization: string; }; - path: { - /** - * Incentive ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/incentives/{id}'; + url: '/v1/expenses'; }; -export type PatchV1IncentivesIdErrors = { +export type PostV1ExpensesErrors = { /** * Bad Request */ @@ -22817,10 +23109,6 @@ export type PatchV1IncentivesIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -22831,36 +23119,36 @@ export type PatchV1IncentivesIdErrors = { 429: TooManyRequestsResponse; }; -export type PatchV1IncentivesIdError = - PatchV1IncentivesIdErrors[keyof PatchV1IncentivesIdErrors]; +export type PostV1ExpensesError = + PostV1ExpensesErrors[keyof PostV1ExpensesErrors]; -export type PatchV1IncentivesIdResponses = { +export type PostV1ExpensesResponses = { /** * Success */ - 200: IncentiveResponse; + 201: ExpenseResponse; }; -export type PatchV1IncentivesIdResponse = - PatchV1IncentivesIdResponses[keyof PatchV1IncentivesIdResponses]; +export type PostV1ExpensesResponse = + PostV1ExpensesResponses[keyof PostV1ExpensesResponses]; -export type GetV1ContractorsSchemasEligibilityQuestionnaireData = { +export type GetV1EmployeePayslipFilesData = { body?: never; path?: never; - query: { + query?: { /** - * Type of eligibility questionnaire + * Starts fetching records after the given page */ - type: 'contractor_of_record'; + page?: number; /** - * Version of the form schema + * Number of items per page */ - json_schema_version?: number | 'latest'; + page_size?: number; }; - url: '/v1/contractors/schemas/eligibility-questionnaire'; + url: '/v1/employee/payslip-files'; }; -export type GetV1ContractorsSchemasEligibilityQuestionnaireErrors = { +export type GetV1EmployeePayslipFilesErrors = { /** * Unauthorized */ @@ -22870,111 +23158,96 @@ export type GetV1ContractorsSchemasEligibilityQuestionnaireErrors = { */ 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type GetV1ContractorsSchemasEligibilityQuestionnaireError = - GetV1ContractorsSchemasEligibilityQuestionnaireErrors[keyof GetV1ContractorsSchemasEligibilityQuestionnaireErrors]; +export type GetV1EmployeePayslipFilesError = + GetV1EmployeePayslipFilesErrors[keyof GetV1EmployeePayslipFilesErrors]; -export type GetV1ContractorsSchemasEligibilityQuestionnaireResponses = { +export type GetV1EmployeePayslipFilesResponses = { /** * Success */ - 200: EligibilityQuestionnaireJsonSchemaResponse; + 200: ListPayslipFilesResponse; }; -export type GetV1ContractorsSchemasEligibilityQuestionnaireResponse = - GetV1ContractorsSchemasEligibilityQuestionnaireResponses[keyof GetV1ContractorsSchemasEligibilityQuestionnaireResponses]; +export type GetV1EmployeePayslipFilesResponse = + GetV1EmployeePayslipFilesResponses[keyof GetV1EmployeePayslipFilesResponses]; -export type GetV1WorkAuthorizationRequestsData = { +export type PostV1EmploymentsEmploymentIdInviteData = { body?: never; - path?: never; - query?: { - /** - * Filter results on the given status - */ - status?: - | 'pending' - | 'cancelled' - | 'declined_by_manager' - | 'declined_by_remote' - | 'approved_by_manager' - | 'approved_by_remote'; - /** - * Filter results on the given employment slug - */ - employment_id?: string; - /** - * Filter results on the given employee name - */ - employee_name?: string; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Field to sort by - */ - sort_by?: 'submitted_at'; + headers: { /** - * Starts fetching records after the given page + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - page?: number; + Authorization: string; + }; + path: { /** - * Number of items per page + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v1/work-authorization-requests'; + query?: never; + url: '/v1/employments/{employment_id}/invite'; }; -export type GetV1WorkAuthorizationRequestsErrors = { +export type PostV1EmploymentsEmploymentIdInviteErrors = { /** - * Not Found + * Bad Request */ - 404: NotFoundResponse; + 400: BadRequestResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1WorkAuthorizationRequestsError = - GetV1WorkAuthorizationRequestsErrors[keyof GetV1WorkAuthorizationRequestsErrors]; +export type PostV1EmploymentsEmploymentIdInviteError = + PostV1EmploymentsEmploymentIdInviteErrors[keyof PostV1EmploymentsEmploymentIdInviteErrors]; -export type GetV1WorkAuthorizationRequestsResponses = { +export type PostV1EmploymentsEmploymentIdInviteResponses = { /** * Success */ - 200: ListWorkAuthorizationRequestsResponse; + 200: SuccessResponse; }; -export type GetV1WorkAuthorizationRequestsResponse = - GetV1WorkAuthorizationRequestsResponses[keyof GetV1WorkAuthorizationRequestsResponses]; +export type PostV1EmploymentsEmploymentIdInviteResponse = + PostV1EmploymentsEmploymentIdInviteResponses[keyof PostV1EmploymentsEmploymentIdInviteResponses]; -export type GetV1BulkEmploymentJobsJobIdData = { - body?: never; - path: { - /** - * Bulk employment job id - */ - job_id: string; - }; +export type PostV1ProbationExtensionsData = { + /** + * ProbationExtension + */ + body: CreateProbationExtensionParams; + path?: never; query?: never; - url: '/v1/bulk-employment-jobs/{job_id}'; + url: '/v1/probation-extensions'; }; -export type GetV1BulkEmploymentJobsJobIdErrors = { +export type PostV1ProbationExtensionsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -22982,38 +23255,34 @@ export type GetV1BulkEmploymentJobsJobIdErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1BulkEmploymentJobsJobIdError = - GetV1BulkEmploymentJobsJobIdErrors[keyof GetV1BulkEmploymentJobsJobIdErrors]; +export type PostV1ProbationExtensionsError = + PostV1ProbationExtensionsErrors[keyof PostV1ProbationExtensionsErrors]; -export type GetV1BulkEmploymentJobsJobIdResponses = { +export type PostV1ProbationExtensionsResponses = { /** * Success */ - 200: BulkEmploymentImportJobResponse; + 200: ProbationExtensionResponse; }; -export type GetV1BulkEmploymentJobsJobIdResponse = - GetV1BulkEmploymentJobsJobIdResponses[keyof GetV1BulkEmploymentJobsJobIdResponses]; +export type PostV1ProbationExtensionsResponse = + PostV1ProbationExtensionsResponses[keyof PostV1ProbationExtensionsResponses]; -export type GetV1PayItemsData = { +export type GetV1ContractorsCorTerminationRequestsData = { body?: never; path?: never; query?: { /** - * Filter by employment slug - */ - employment_slug?: UuidSlug; - /** - * Filter pay items with effective_date >= given date (YYYY-MM-DD) + * Filter termination requests by employment ID. */ - effective_from?: Date; + employment_id?: UuidSlug; /** - * Filter pay items with effective_date <= given date (YYYY-MM-DD) + * Filter termination requests by status. */ - effective_to?: Date; + status?: 'initiated' | 'executed' | 'cancelled'; /** * Starts fetching records after the given page */ @@ -23023,14 +23292,10 @@ export type GetV1PayItemsData = { */ page_size?: number; }; - url: '/v1/pay-items'; + url: '/v1/contractors/cor-termination-requests'; }; -export type GetV1PayItemsErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1ContractorsCorTerminationRequestsErrors = { /** * Forbidden */ @@ -23039,101 +23304,22 @@ export type GetV1PayItemsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1PayItemsError = GetV1PayItemsErrors[keyof GetV1PayItemsErrors]; - -export type GetV1PayItemsResponses = { - /** - * Success - */ - 200: ListPayItemsResponse; -}; - -export type GetV1PayItemsResponse = - GetV1PayItemsResponses[keyof GetV1PayItemsResponses]; - -export type GetV1BenefitOffersCountrySummariesData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: never; - url: '/v1/benefit-offers/country-summaries'; -}; - -export type GetV1BenefitOffersCountrySummariesErrors = { - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1BenefitOffersCountrySummariesError = - GetV1BenefitOffersCountrySummariesErrors[keyof GetV1BenefitOffersCountrySummariesErrors]; - -export type GetV1BenefitOffersCountrySummariesResponses = { - /** - * Success - */ - 200: CountrySummariesResponse; -}; - -export type GetV1BenefitOffersCountrySummariesResponse = - GetV1BenefitOffersCountrySummariesResponses[keyof GetV1BenefitOffersCountrySummariesResponses]; - -export type GetV1BenefitOffersData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: never; - url: '/v1/benefit-offers'; -}; - -export type GetV1BenefitOffersErrors = { - /** - * Not Found - */ - 404: NotFoundResponse; }; -export type GetV1BenefitOffersError = - GetV1BenefitOffersErrors[keyof GetV1BenefitOffersErrors]; +export type GetV1ContractorsCorTerminationRequestsError = + GetV1ContractorsCorTerminationRequestsErrors[keyof GetV1ContractorsCorTerminationRequestsErrors]; -export type GetV1BenefitOffersResponses = { +export type GetV1ContractorsCorTerminationRequestsResponses = { /** * Success */ - 200: BenefitOfferByEmploymentResponse; + 200: IndexCorTerminationRequestsResponse; }; -export type GetV1BenefitOffersResponse = - GetV1BenefitOffersResponses[keyof GetV1BenefitOffersResponses]; +export type GetV1ContractorsCorTerminationRequestsResponse = + GetV1ContractorsCorTerminationRequestsResponses[keyof GetV1ContractorsCorTerminationRequestsResponses]; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData = +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData = { body?: never; path: { @@ -23143,10 +23329,10 @@ export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData = contract_amendment_request_id: string; }; query?: never; - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel'; + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve'; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors = +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors = { /** * Bad Request @@ -23170,45 +23356,88 @@ export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors 429: TooManyRequestsResponse; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelError = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors]; +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors]; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses = +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractAmendmentResponse; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponse = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses]; +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponse = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses]; -export type GetV1EmployeeTimeoffData = { - body?: never; - path?: never; - query?: { +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData = + { + body?: never; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + /** + * Employment ID + */ + employment_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status'; + }; + +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors = + { /** - * Starts fetching records after the given page + * Unauthorized */ - page?: number; + 401: UnauthorizedResponse; /** - * Number of items per page + * Forbidden */ - page_size?: number; + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; }; - url: '/v1/employee/timeoff'; + +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusError = + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors]; + +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses = + { + /** + * Success + */ + 200: OnboardingReservesStatusResponse; + }; + +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponse = + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses]; + +export type GetV1ContractorInvoicesIdData = { + body?: never; + path: { + /** + * Resource unique identifier + */ + id: UuidSlug; + }; + query?: never; + url: '/v1/contractor-invoices/{id}'; }; -export type GetV1EmployeeTimeoffErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ContractorInvoicesIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -23216,33 +23445,30 @@ export type GetV1EmployeeTimeoffErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeTimeoffError = - GetV1EmployeeTimeoffErrors[keyof GetV1EmployeeTimeoffErrors]; +export type GetV1ContractorInvoicesIdError = + GetV1ContractorInvoicesIdErrors[keyof GetV1ContractorInvoicesIdErrors]; -export type GetV1EmployeeTimeoffResponses = { +export type GetV1ContractorInvoicesIdResponses = { /** * Success */ - 200: ListTimeoffResponse; + 200: ContractorInvoiceResponse; }; -export type GetV1EmployeeTimeoffResponse = - GetV1EmployeeTimeoffResponses[keyof GetV1EmployeeTimeoffResponses]; +export type GetV1ContractorInvoicesIdResponse = + GetV1ContractorInvoicesIdResponses[keyof GetV1ContractorInvoicesIdResponses]; -export type PostV1EmployeeTimeoffData = { - /** - * Timeoff - */ - body: CreateEmployeeTimeoffParams; +export type GetV1WdGphPayProcessingFeatureData = { + body?: never; path?: never; query?: never; - url: '/v1/employee/timeoff'; + url: '/v1/wd/gph/payProcessingFeature'; }; -export type PostV1EmployeeTimeoffErrors = { +export type GetV1WdGphPayProcessingFeatureErrors = { /** * Bad Request */ @@ -23255,148 +23481,128 @@ export type PostV1EmployeeTimeoffErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1EmployeeTimeoffError = - PostV1EmployeeTimeoffErrors[keyof PostV1EmployeeTimeoffErrors]; +export type GetV1WdGphPayProcessingFeatureError = + GetV1WdGphPayProcessingFeatureErrors[keyof GetV1WdGphPayProcessingFeatureErrors]; -export type PostV1EmployeeTimeoffResponses = { +export type GetV1WdGphPayProcessingFeatureResponses = { /** - * Created + * Success */ - 201: TimeoffResponse; + 200: PayProcessingFeatureResponse; }; -export type PostV1EmployeeTimeoffResponse = - PostV1EmployeeTimeoffResponses[keyof PostV1EmployeeTimeoffResponses]; +export type GetV1WdGphPayProcessingFeatureResponse = + GetV1WdGphPayProcessingFeatureResponses[keyof GetV1WdGphPayProcessingFeatureResponses]; -export type PatchV2EmploymentsEmploymentId2Data = { - /** - * Employment params - */ - body?: EmploymentV2UpdateParams; - path: { +export type GetV1WdGphPayProgressData = { + body?: never; + headers?: { /** - * Employment ID + * The preferred language of the inquiring user in Workday */ - employment_id: string; + accept_language?: string; }; - query?: never; - url: '/v2/employments/{employment_id}'; + path?: never; + query: { + /** + * The pay group ID for identifying the pay group at the vendor system + */ + payGroupExternalId: string; + /** + * The run type id provided in the paySummary API + */ + runTypeId: string; + /** + * The cycle type id, defaults to the main run if not provided + */ + cycleTypeId?: string; + /** + * The period end date in question, defaults to current period if not provided + */ + periodEndDate?: Date; + }; + url: '/v1/wd/gph/payProgress'; }; -export type PatchV2EmploymentsEmploymentId2Errors = { +export type GetV1WdGphPayProgressErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity + * Unauthorized */ - 422: UnprocessableEntityResponse; + 401: UnauthorizedResponse; /** - * Unprocessable Entity + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PatchV2EmploymentsEmploymentId2Error = - PatchV2EmploymentsEmploymentId2Errors[keyof PatchV2EmploymentsEmploymentId2Errors]; +export type GetV1WdGphPayProgressError = + GetV1WdGphPayProgressErrors[keyof GetV1WdGphPayProgressErrors]; -export type PatchV2EmploymentsEmploymentId2Responses = { +export type GetV1WdGphPayProgressResponses = { /** * Success */ - 200: EmploymentResponse; + 200: PayProgressResponse; }; -export type PatchV2EmploymentsEmploymentId2Response = - PatchV2EmploymentsEmploymentId2Responses[keyof PatchV2EmploymentsEmploymentId2Responses]; +export type GetV1WdGphPayProgressResponse = + GetV1WdGphPayProgressResponses[keyof GetV1WdGphPayProgressResponses]; -export type PatchV2EmploymentsEmploymentIdData = { - /** - * Employment params - */ - body?: EmploymentV2UpdateParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; +export type GetV1CompanyCurrenciesData = { + body?: never; + path?: never; query?: never; - url: '/v2/employments/{employment_id}'; + url: '/v1/company-currencies'; }; -export type PatchV2EmploymentsEmploymentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; +export type GetV1CompanyCurrenciesErrors = { /** - * Unprocessable Entity + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PatchV2EmploymentsEmploymentIdError = - PatchV2EmploymentsEmploymentIdErrors[keyof PatchV2EmploymentsEmploymentIdErrors]; +export type GetV1CompanyCurrenciesError = + GetV1CompanyCurrenciesErrors[keyof GetV1CompanyCurrenciesErrors]; -export type PatchV2EmploymentsEmploymentIdResponses = { +export type GetV1CompanyCurrenciesResponses = { /** * Success */ - 200: EmploymentResponse; + 200: CompanyCurrenciesResponse; }; -export type PatchV2EmploymentsEmploymentIdResponse = - PatchV2EmploymentsEmploymentIdResponses[keyof PatchV2EmploymentsEmploymentIdResponses]; +export type GetV1CompanyCurrenciesResponse = + GetV1CompanyCurrenciesResponses[keyof GetV1CompanyCurrenciesResponses]; -export type GetV1ProbationExtensionsIdData = { +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaData = { body?: never; path: { /** - * Probation Extension Request ID + * Unique identifier of the employment */ - id: string; + employment_id: UuidSlug; }; - query?: never; - url: '/v1/probation-extensions/{id}'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/employments/{employment_id}/benefit-offers/schema'; }; -export type GetV1ProbationExtensionsIdErrors = { +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors = { /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ @@ -23407,115 +23613,119 @@ export type GetV1ProbationExtensionsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ProbationExtensionsIdError = - GetV1ProbationExtensionsIdErrors[keyof GetV1ProbationExtensionsIdErrors]; +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaError = + GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors]; -export type GetV1ProbationExtensionsIdResponses = { +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses = { /** * Success */ - 200: ProbationExtensionResponse; + 200: UnifiedEmploymentsBenefitOffersJsonSchemaResponse; }; -export type GetV1ProbationExtensionsIdResponse = - GetV1ProbationExtensionsIdResponses[keyof GetV1ProbationExtensionsIdResponses]; +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponse = + GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses]; -export type GetV1PayslipsData = { +export type GetV1ContractorInvoiceSchedulesData = { body?: never; path?: never; query?: { /** - * Employment ID + * Filters contractor invoice schedules by start date greater than or equal to the value. */ - employment_id?: string; + start_date_from?: Date; /** - * Filters by payslips `issued_at` field, after or on the same day than the given date + * Filters contractor invoice schedules by start date less than or equal to the value. */ - start_date?: string; + start_date_to?: Date; /** - * Filters by payslips `issued_at` field, before or or the same day than the given date + * Filters contractor invoice schedules by next invoice date greater than or equal to the value. */ - end_date?: string; + next_invoice_date_from?: Date; /** - * Filters by payslips `expected_payout_date` field, after or on the same day than the given date + * Filters contractor invoice schedules by next invoice date less than or equal to the value. */ - expected_payout_start_date?: string; + next_invoice_date_to?: Date; /** - * Filters by payslips `expected_payout_date` field, before or or the same day than the given date + * Filters contractor invoice schedules by status matching the value. */ - expected_payout_end_date?: string; + status?: ContractorInvoiceScheduleStatus; + /** + * Filters contractor invoice schedules by employment id matching the value. + */ + employment_id?: UuidSlug; + /** + * Filters contractor invoice schedules by periodicity matching the value. + */ + periodicity?: ContractorInvoiceSchedulePeriodicity; + /** + * Filters contractor invoice schedules by currency matching the value. + */ + currency?: string; + /** + * Field to sort by + */ + sort_by?: + | 'number' + | 'total_amount' + | 'next_invoice_at' + | 'start_date' + | 'nr_occurrences'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; /** * Starts fetching records after the given page */ page?: number; /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Number of items per page */ page_size?: number; }; - url: '/v1/payslips'; + url: '/v1/contractor-invoice-schedules'; }; -export type GetV1PayslipsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ContractorInvoiceSchedulesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity + * Forbidden */ - 422: UnprocessableEntityResponse; + 403: ForbiddenResponse; /** - * Too many requests + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type GetV1PayslipsError = GetV1PayslipsErrors[keyof GetV1PayslipsErrors]; +export type GetV1ContractorInvoiceSchedulesError = + GetV1ContractorInvoiceSchedulesErrors[keyof GetV1ContractorInvoiceSchedulesErrors]; -export type GetV1PayslipsResponses = { +export type GetV1ContractorInvoiceSchedulesResponses = { /** * Success */ - 200: ListPayslipsResponse; + 200: ListContractorInvoiceSchedulesResponse; }; -export type GetV1PayslipsResponse = - GetV1PayslipsResponses[keyof GetV1PayslipsResponses]; +export type GetV1ContractorInvoiceSchedulesResponse = + GetV1ContractorInvoiceSchedulesResponses[keyof GetV1ContractorInvoiceSchedulesResponses]; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdData = { - body?: never; - path: { - /** - * The expense ID - */ - expense_id: string; - /** - * The receipt ID - */ - receipt_id: string; - }; +export type PostV1ContractorInvoiceSchedulesData = { + /** + * Bulk creation payload + */ + body: BulkContractorInvoiceScheduleCreateParams; + path?: never; query?: never; - url: '/v1/expenses/{expense_id}/receipts/{receipt_id}'; + url: '/v1/contractor-invoice-schedules'; }; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostV1ContractorInvoiceSchedulesErrors = { /** * Forbidden */ @@ -23525,43 +23735,101 @@ export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { */ 404: NotFoundResponse; /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. */ - 429: TooManyRequestsResponse; + 422: { + data: { + failures: Array; + successes: Array; + }; + }; }; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdError = - GetV1ExpensesExpenseIdReceiptsReceiptIdErrors[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdErrors]; +export type PostV1ContractorInvoiceSchedulesError = + PostV1ContractorInvoiceSchedulesErrors[keyof PostV1ContractorInvoiceSchedulesErrors]; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponses = { +export type PostV1ContractorInvoiceSchedulesResponses = { /** - * Success + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. */ - 200: GenericFile; -}; + 201: { + data: { + failures: Array; + successes: Array; + }; + }; + /** + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. + */ + 207: { + data: { + failures: Array; + successes: Array; + }; + }; +}; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponse = - GetV1ExpensesExpenseIdReceiptsReceiptIdResponses[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdResponses]; +export type PostV1ContractorInvoiceSchedulesResponse = + PostV1ContractorInvoiceSchedulesResponses[keyof PostV1ContractorInvoiceSchedulesResponses]; -export type PostAuthOauth2TokenData = { +export type GetV1WorkAuthorizationRequestsIdData = { + body?: never; + path: { + /** + * work authorization request ID + */ + id: string; + }; + query?: never; + url: '/v1/work-authorization-requests/{id}'; +}; + +export type GetV1WorkAuthorizationRequestsIdErrors = { /** - * OAuth2Token + * Not Found */ - body?: OAuth2TokenParams; - path?: never; - query?: never; - url: '/auth/oauth2/token'; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type PostAuthOauth2TokenErrors = { +export type GetV1WorkAuthorizationRequestsIdError = + GetV1WorkAuthorizationRequestsIdErrors[keyof GetV1WorkAuthorizationRequestsIdErrors]; + +export type GetV1WorkAuthorizationRequestsIdResponses = { /** - * Bad Request + * Success */ - 400: BadRequestResponse; + 200: WorkAuthorizationRequestResponse; +}; + +export type GetV1WorkAuthorizationRequestsIdResponse = + GetV1WorkAuthorizationRequestsIdResponses[keyof GetV1WorkAuthorizationRequestsIdResponses]; + +export type PatchV1WorkAuthorizationRequestsId2Data = { + /** + * Work Authorization Request + */ + body: UpdateWorkAuthorizationRequestParams; + path: { + /** + * work authorization request ID + */ + id: string; + }; + query?: never; + url: '/v1/work-authorization-requests/{id}'; +}; + +export type PatchV1WorkAuthorizationRequestsId2Errors = { /** * Unauthorized */ @@ -23574,46 +23842,80 @@ export type PostAuthOauth2TokenErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostAuthOauth2TokenError = - PostAuthOauth2TokenErrors[keyof PostAuthOauth2TokenErrors]; +export type PatchV1WorkAuthorizationRequestsId2Error = + PatchV1WorkAuthorizationRequestsId2Errors[keyof PatchV1WorkAuthorizationRequestsId2Errors]; -export type PostAuthOauth2TokenResponses = { +export type PatchV1WorkAuthorizationRequestsId2Responses = { /** * Success */ - 200: OAuth2Tokens; + 200: WorkAuthorizationRequestResponse; }; -export type PostAuthOauth2TokenResponse = - PostAuthOauth2TokenResponses[keyof PostAuthOauth2TokenResponses]; +export type PatchV1WorkAuthorizationRequestsId2Response = + PatchV1WorkAuthorizationRequestsId2Responses[keyof PatchV1WorkAuthorizationRequestsId2Responses]; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsData = { +export type PatchV1WorkAuthorizationRequestsIdData = { /** - * Employment pricing plan details params + * Work Authorization Request */ - body?: EmploymentPricingPlanDetailsParams; + body: UpdateWorkAuthorizationRequestParams; path: { /** - * Employment ID + * work authorization request ID */ - employment_id: string; + id: string; }; - query?: { + query?: never; + url: '/v1/work-authorization-requests/{id}'; +}; + +export type PatchV1WorkAuthorizationRequestsIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PatchV1WorkAuthorizationRequestsIdError = + PatchV1WorkAuthorizationRequestsIdErrors[keyof PatchV1WorkAuthorizationRequestsIdErrors]; + +export type PatchV1WorkAuthorizationRequestsIdResponses = { + /** + * Success + */ + 200: WorkAuthorizationRequestResponse; +}; + +export type PatchV1WorkAuthorizationRequestsIdResponse = + PatchV1WorkAuthorizationRequestsIdResponses[keyof PatchV1WorkAuthorizationRequestsIdResponses]; + +export type PostV1TimeoffTimeoffIdDeclineData = { + /** + * DeclineTimeoff + */ + body: DeclineTimeoffParams; + path: { /** - * Version of the pricing_plan_details form schema + * Time Off ID */ - pricing_plan_details_json_schema_version?: number | 'latest'; + timeoff_id: string; }; - url: '/v2/employments/{employment_id}/pricing_plan_details'; + query?: never; + url: '/v1/timeoff/{timeoff_id}/decline'; }; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors = { +export type PostV1TimeoffTimeoffIdDeclineErrors = { /** * Bad Request */ @@ -23622,18 +23924,10 @@ export type PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -23644,49 +23938,74 @@ export type PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsError = - PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors]; +export type PostV1TimeoffTimeoffIdDeclineError = + PostV1TimeoffTimeoffIdDeclineErrors[keyof PostV1TimeoffTimeoffIdDeclineErrors]; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses = { +export type PostV1TimeoffTimeoffIdDeclineResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: TimeoffResponse; }; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponse = - PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses]; +export type PostV1TimeoffTimeoffIdDeclineResponse = + PostV1TimeoffTimeoffIdDeclineResponses[keyof PostV1TimeoffTimeoffIdDeclineResponses]; -export type GetV1CountriesCountryCodeLegalEntityFormsFormData = { +export type GetV1ContractorsSchemasEligibilityQuestionnaireData = { body?: never; - path: { - /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; - /** - * Name of the desired form - */ - form: string; - }; - query?: { - /** - * Product type. Default value is global_payroll. - */ - product_type?: 'peo' | 'global_payroll' | 'e2e_payroll'; + path?: never; + query: { /** - * Legal entity id for admistrative_details of e2e payroll products in GBR + * Type of eligibility questionnaire */ - legal_entity_id?: UuidSlug; + type: 'contractor_of_record'; /** * Version of the form schema */ json_schema_version?: number | 'latest'; }; - url: '/v1/countries/{country_code}/legal_entity_forms/{form}'; + url: '/v1/contractors/schemas/eligibility-questionnaire'; }; -export type GetV1CountriesCountryCodeLegalEntityFormsFormErrors = { +export type GetV1ContractorsSchemasEligibilityQuestionnaireErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireError = + GetV1ContractorsSchemasEligibilityQuestionnaireErrors[keyof GetV1ContractorsSchemasEligibilityQuestionnaireErrors]; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireResponses = { + /** + * Success + */ + 200: EligibilityQuestionnaireJsonSchemaResponse; +}; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireResponse = + GetV1ContractorsSchemasEligibilityQuestionnaireResponses[keyof GetV1ContractorsSchemasEligibilityQuestionnaireResponses]; + +export type PostAuthOauth2TokenData = { + /** + * OAuth2Token + */ + body?: OAuth2TokenParams; + path?: never; + query?: never; + url: '/oauth2/token'; +}; + +export type PostAuthOauth2TokenErrors = { /** * Bad Request */ @@ -23704,30 +24023,27 @@ export type GetV1CountriesCountryCodeLegalEntityFormsFormErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeLegalEntityFormsFormError = - GetV1CountriesCountryCodeLegalEntityFormsFormErrors[keyof GetV1CountriesCountryCodeLegalEntityFormsFormErrors]; +export type PostAuthOauth2TokenError = + PostAuthOauth2TokenErrors[keyof PostAuthOauth2TokenErrors]; -export type GetV1CountriesCountryCodeLegalEntityFormsFormResponses = { +export type PostAuthOauth2TokenResponses = { /** * Success */ - 200: CountryFormResponse; + 200: OAuth2Tokens; }; -export type GetV1CountriesCountryCodeLegalEntityFormsFormResponse = - GetV1CountriesCountryCodeLegalEntityFormsFormResponses[keyof GetV1CountriesCountryCodeLegalEntityFormsFormResponses]; +export type PostAuthOauth2TokenResponse = + PostAuthOauth2TokenResponses[keyof PostAuthOauth2TokenResponses]; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData = +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = { - /** - * Manage Contractor Plus subscription params - */ - body: ManageContractorPlusSubscriptionOperationsParams; + body?: never; path: { /** * Employment ID @@ -23735,135 +24051,108 @@ export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionDa employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription'; + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors = +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionError = - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors]; +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses = +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = { /** - * Success + * No Content */ - 200: SuccessResponse; + 204: unknown; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponse = - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses]; - -export type GetV1TimeoffData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; }; - path?: never; - query?: { - /** - * Only show time off for a specific employment - */ - employment_id?: string; - /** - * Filter time off by its type - */ - timeoff_type?: TimeoffType; - /** - * Filter time off by its status - */ - status?: TimeoffStatus; + +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = + { /** - * Sort order + * Bad Request */ - order?: 'asc' | 'desc'; + 400: BadRequestResponse; /** - * Field to sort by + * Forbidden */ - sort_by?: 'timeoff_type' | 'status'; + 403: ForbiddenResponse; /** - * Starts fetching records after the given page + * Not Found */ - page?: number; + 404: NotFoundResponse; /** - * Number of items per page + * Unprocessable Entity */ - page_size?: number; + 422: UnprocessableEntityResponse; }; - url: '/v1/timeoff'; -}; - -export type GetV1TimeoffErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; -}; -export type GetV1TimeoffError = GetV1TimeoffErrors[keyof GetV1TimeoffErrors]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; -export type GetV1TimeoffResponses = { - /** - * Success - */ - 200: ListTimeoffResponse; -}; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = + { + /** + * Created + */ + 201: SuccessResponse; + }; -export type GetV1TimeoffResponse = - GetV1TimeoffResponses[keyof GetV1TimeoffResponses]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse = + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses]; -export type PostV1TimeoffData = { +export type PutV2EmploymentsEmploymentIdPersonalDetailsData = { /** - * Timeoff + * Employment personal details params */ - body: CreateApprovedTimeoffParams; - headers: { + body?: EmploymentPersonalDetailsParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; - query?: never; - url: '/v1/timeoff'; + query?: { + /** + * Version of the personal_details form schema + */ + personal_details_json_schema_version?: number | 'latest'; + }; + url: '/v2/employments/{employment_id}/personal_details'; }; -export type PostV1TimeoffErrors = { +export type PutV2EmploymentsEmploymentIdPersonalDetailsErrors = { /** * Bad Request */ @@ -23872,79 +24161,40 @@ export type PostV1TimeoffErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; /** - * Unprocessable Entity + * Conflict */ - 422: UnprocessableEntityResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; -}; - -export type PostV1TimeoffError = PostV1TimeoffErrors[keyof PostV1TimeoffErrors]; - -export type PostV1TimeoffResponses = { - /** - * Created - */ - 201: TimeoffResponse; -}; - -export type PostV1TimeoffResponse = - PostV1TimeoffResponses[keyof PostV1TimeoffResponses]; - -export type GetV1PayrollRunsData = { - body?: never; - path?: never; - query?: { - /** - * Filters payroll runs where period_start or period_end match the given date - */ - payroll_period?: Date; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/payroll-runs'; -}; - -export type GetV1PayrollRunsErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetV1PayrollRunsError = - GetV1PayrollRunsErrors[keyof GetV1PayrollRunsErrors]; +export type PutV2EmploymentsEmploymentIdPersonalDetailsError = + PutV2EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV2EmploymentsEmploymentIdPersonalDetailsErrors]; -export type GetV1PayrollRunsResponses = { +export type PutV2EmploymentsEmploymentIdPersonalDetailsResponses = { /** * Success */ - 200: ListPayrollRunResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1PayrollRunsResponse = - GetV1PayrollRunsResponses[keyof GetV1PayrollRunsResponses]; +export type PutV2EmploymentsEmploymentIdPersonalDetailsResponse = + PutV2EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV2EmploymentsEmploymentIdPersonalDetailsResponses]; export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData = { @@ -23996,72 +24246,112 @@ export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsRespons export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponse = PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses]; -export type GetV1ScimV2GroupsIdData = { +export type GetV1ContractAmendmentsIdData = { body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Group ID (slug) + * Contract amendment request ID */ id: string; }; query?: never; - url: '/v1/scim/v2/Groups/{id}'; + url: '/v1/contract-amendments/{id}'; }; -export type GetV1ScimV2GroupsIdErrors = { +export type GetV1ContractAmendmentsIdErrors = { /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1ScimV2GroupsIdError = - GetV1ScimV2GroupsIdErrors[keyof GetV1ScimV2GroupsIdErrors]; +export type GetV1ContractAmendmentsIdError = + GetV1ContractAmendmentsIdErrors[keyof GetV1ContractAmendmentsIdErrors]; -export type GetV1ScimV2GroupsIdResponses = { +export type GetV1ContractAmendmentsIdResponses = { /** * Success */ - 200: IntegrationsScimGroup; + 200: ContractAmendmentResponse; }; -export type GetV1ScimV2GroupsIdResponse = - GetV1ScimV2GroupsIdResponses[keyof GetV1ScimV2GroupsIdResponses]; +export type GetV1ContractAmendmentsIdResponse = + GetV1ContractAmendmentsIdResponses[keyof GetV1ContractAmendmentsIdResponses]; -export type GetV1EmploymentContractsData = { +export type PostV1IdentityVerificationEmploymentIdDeclineData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; + query?: never; + url: '/v1/identity-verification/{employment_id}/decline'; +}; + +export type PostV1IdentityVerificationEmploymentIdDeclineErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostV1IdentityVerificationEmploymentIdDeclineError = + PostV1IdentityVerificationEmploymentIdDeclineErrors[keyof PostV1IdentityVerificationEmploymentIdDeclineErrors]; + +export type PostV1IdentityVerificationEmploymentIdDeclineResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type PostV1IdentityVerificationEmploymentIdDeclineResponse = + PostV1IdentityVerificationEmploymentIdDeclineResponses[keyof PostV1IdentityVerificationEmploymentIdDeclineResponses]; + +export type GetV1EmployeeExpenseCategoriesData = { + body?: never; path?: never; - query: { + query?: { /** - * Employment ID + * Include parent (non-selectable) categories in addition to selectable leaves */ - employment_id: string; + include_parents?: boolean; /** - * Only Active + * Expense ID (slug) whose category should be included in the result, even if it is not selectable by default */ - only_active?: boolean; + expense_id?: string; }; - url: '/v1/employment-contracts'; + url: '/v1/employee/expense-categories'; }; -export type GetV1EmploymentContractsErrors = { +export type GetV1EmployeeExpenseCategoriesErrors = { /** * Unauthorized */ @@ -24074,40 +24364,32 @@ export type GetV1EmploymentContractsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentContractsError = - GetV1EmploymentContractsErrors[keyof GetV1EmploymentContractsErrors]; +export type GetV1EmployeeExpenseCategoriesError = + GetV1EmployeeExpenseCategoriesErrors[keyof GetV1EmployeeExpenseCategoriesErrors]; -export type GetV1EmploymentContractsResponses = { +export type GetV1EmployeeExpenseCategoriesResponses = { /** * Success */ - 200: ListEmploymentContractResponse; + 200: ListExpenseCategoriesResponse; }; -export type GetV1EmploymentContractsResponse = - GetV1EmploymentContractsResponses[keyof GetV1EmploymentContractsResponses]; +export type GetV1EmployeeExpenseCategoriesResponse = + GetV1EmployeeExpenseCategoriesResponses[keyof GetV1EmployeeExpenseCategoriesResponses]; -export type PostV1CurrencyConverterEffective2Data = { +export type PostV1CostCalculatorEstimationCsvData = { /** - * Convert currency parameters + * Estimate params */ - body: ConvertCurrencyParams; + body?: CostCalculatorEstimateParams; path?: never; query?: never; - url: '/v1/currency-converter'; + url: '/v1/cost-calculator/estimation-csv'; }; -export type PostV1CurrencyConverterEffective2Errors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostV1CostCalculatorEstimationCsvErrors = { /** * Not Found */ @@ -24118,26 +24400,73 @@ export type PostV1CurrencyConverterEffective2Errors = { 422: UnprocessableEntityResponse; }; -export type PostV1CurrencyConverterEffective2Error = - PostV1CurrencyConverterEffective2Errors[keyof PostV1CurrencyConverterEffective2Errors]; +export type PostV1CostCalculatorEstimationCsvError = + PostV1CostCalculatorEstimationCsvErrors[keyof PostV1CostCalculatorEstimationCsvErrors]; -export type PostV1CurrencyConverterEffective2Responses = { +export type PostV1CostCalculatorEstimationCsvResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: CostCalculatorEstimateCsvResponse; }; -export type PostV1CurrencyConverterEffective2Response = - PostV1CurrencyConverterEffective2Responses[keyof PostV1CurrencyConverterEffective2Responses]; +export type PostV1CostCalculatorEstimationCsvResponse = + PostV1CostCalculatorEstimationCsvResponses[keyof PostV1CostCalculatorEstimationCsvResponses]; -export type GetV1CompaniesData = { +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Pre-onboarding document ID + */ + id: string; + }; + query?: never; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}'; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdError = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors]; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses = + { + /** + * Success + */ + 200: ShowPreOnboardingDocumentResponse; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponse = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses]; + +export type GetV1BillingDocumentsData = { body?: never; headers: { /** - * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. * - * The refresh token needs to have been obtained through the Client Credentials flow. + * The refresh token needs to have been obtained through the Authorization Code flow. * */ Authorization: string; @@ -24145,14 +24474,22 @@ export type GetV1CompaniesData = { path?: never; query?: { /** - * External ID + * The month for the billing documents (in ISO-8601 format) */ - external_id?: string; + period?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/companies'; + url: '/v1/billing-documents'; }; -export type GetV1CompaniesErrors = { +export type GetV1BillingDocumentsErrors = { /** * Unauthorized */ @@ -24167,80 +24504,58 @@ export type GetV1CompaniesErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1CompaniesError = - GetV1CompaniesErrors[keyof GetV1CompaniesErrors]; +export type GetV1BillingDocumentsError = + GetV1BillingDocumentsErrors[keyof GetV1BillingDocumentsErrors]; -export type GetV1CompaniesResponses = { +export type GetV1BillingDocumentsResponses = { /** * Success */ - 200: CompaniesResponse; + 200: BillingDocumentsResponse; }; -export type GetV1CompaniesResponse = - GetV1CompaniesResponses[keyof GetV1CompaniesResponses]; +export type GetV1BillingDocumentsResponse = + GetV1BillingDocumentsResponses[keyof GetV1BillingDocumentsResponses]; -export type PostV1CompaniesData = { - /** - * Create Company params - */ - body?: CreateCompanyParams; +export type GetV1BillingDocumentsBillingDocumentIdData = { + body?: never; headers: { /** - * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. * - * The refresh token needs to have been obtained through the Client Credentials flow. + * The refresh token needs to have been obtained through the Authorization Code flow. * */ Authorization: string; }; - path?: never; - query?: { - /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema - */ - bank_account_details_json_schema_version?: number | 'latest'; - /** - * Complementary action(s) to perform when creating a company: - * - * - `get_oauth_access_tokens` returns the user's access and refresh tokens - * - `send_create_password_email ` sends a reset password token to the company owner's email so they can log in using Remote UI (not needed if integration plans to use SSO only) - * - * If `action` contains `send_create_password_email` you can redirect the user to [https://employ.remote.com/api-integration-new-password-send](https://employ.remote.com/api-integration-new-password-send) - * - */ - action?: string; + path: { /** - * Whether the request should be performed async - * + * The billing document's ID */ - async?: boolean; + billing_document_id: string; + }; + query?: { /** - * Scope of the access token - * + * When true, includes billing document items whose type is not part of the standard set for the invoice type. */ - scope?: string; + include_unrecognized_types?: boolean; }; - url: '/v1/companies'; + url: '/v1/billing-documents/{billing_document_id}'; }; -export type PostV1CompaniesErrors = { +export type GetV1BillingDocumentsBillingDocumentIdErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: CompanyCreationConflictErrorResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -24251,81 +24566,111 @@ export type PostV1CompaniesErrors = { 429: TooManyRequestsResponse; }; -export type PostV1CompaniesError = - PostV1CompaniesErrors[keyof PostV1CompaniesErrors]; +export type GetV1BillingDocumentsBillingDocumentIdError = + GetV1BillingDocumentsBillingDocumentIdErrors[keyof GetV1BillingDocumentsBillingDocumentIdErrors]; -export type PostV1CompaniesResponses = { +export type GetV1BillingDocumentsBillingDocumentIdResponses = { /** - * Created + * Success */ - 201: CompanyCreationResponse; + 200: BillingDocumentResponse; }; -export type PostV1CompaniesResponse = - PostV1CompaniesResponses[keyof PostV1CompaniesResponses]; - -export type PostV1BulkEmploymentJobsData = { - /** - * Bulk employment params - */ - body?: BulkEmploymentCreateParams; +export type GetV1BillingDocumentsBillingDocumentIdResponse = + GetV1BillingDocumentsBillingDocumentIdResponses[keyof GetV1BillingDocumentsBillingDocumentIdResponses]; + +export type GetV1EmployeeDocumentsData = { + body?: never; path?: never; - query?: never; - url: '/v1/bulk-employment-jobs'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + /** + * Filter documents by their description or file name, accepts full and partial case insensitive matches + */ + name?: string; + /** + * Filters the results that were uploaded on or after a given date + */ + inserted_after?: Date; + /** + * Filters the results that were uploaded before a given date + */ + inserted_before?: Date; + /** + * Field to sort by + */ + sort_by?: + | 'description' + | 'document_source' + | 'inserted_at' + | 'name' + | 'type' + | 'uploaded_by_role' + | 'related_to' + | 'sub_type' + | 'uploaded_by'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + }; + url: '/v1/employee/documents'; }; -export type PostV1BulkEmploymentJobsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmployeeDocumentsErrors = { /** * Forbidden */ 403: ForbiddenResponse; /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PostV1BulkEmploymentJobsError = - PostV1BulkEmploymentJobsErrors[keyof PostV1BulkEmploymentJobsErrors]; +export type GetV1EmployeeDocumentsError = + GetV1EmployeeDocumentsErrors[keyof GetV1EmployeeDocumentsErrors]; -export type PostV1BulkEmploymentJobsResponses = { +export type GetV1EmployeeDocumentsResponses = { /** - * Accepted + * Success */ - 202: BulkEmploymentImportJobResponse; + 200: ListDocumentsResponse; }; -export type PostV1BulkEmploymentJobsResponse = - PostV1BulkEmploymentJobsResponses[keyof PostV1BulkEmploymentJobsResponses]; +export type GetV1EmployeeDocumentsResponse = + GetV1EmployeeDocumentsResponses[keyof GetV1EmployeeDocumentsResponses]; -export type PostV1TimesheetsTimesheetIdSendBackData = { +export type PostV1EmployeeDocumentsData = { /** - * SendBackTimesheetParams + * File */ - body?: SendBackTimesheetParams; - path: { - /** - * Timesheet ID - */ - timesheet_id: string; - }; + body: EmployeeFileParams; + path?: never; query?: never; - url: '/v1/timesheets/{timesheet_id}/send-back'; + url: '/v1/employee/documents'; }; -export type PostV1TimesheetsTimesheetIdSendBackErrors = { +export type PostV1EmployeeDocumentsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -24336,41 +24681,36 @@ export type PostV1TimesheetsTimesheetIdSendBackErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1TimesheetsTimesheetIdSendBackError = - PostV1TimesheetsTimesheetIdSendBackErrors[keyof PostV1TimesheetsTimesheetIdSendBackErrors]; +export type PostV1EmployeeDocumentsError = + PostV1EmployeeDocumentsErrors[keyof PostV1EmployeeDocumentsErrors]; -export type PostV1TimesheetsTimesheetIdSendBackResponses = { +export type PostV1EmployeeDocumentsResponses = { /** - * Success + * Created */ - 200: SentBackTimesheetResponse; + 201: UploadFileResponse; }; -export type PostV1TimesheetsTimesheetIdSendBackResponse = - PostV1TimesheetsTimesheetIdSendBackResponses[keyof PostV1TimesheetsTimesheetIdSendBackResponses]; +export type PostV1EmployeeDocumentsResponse = + PostV1EmployeeDocumentsResponses[keyof PostV1EmployeeDocumentsResponses]; -export type DeleteV1CompanyManagersUserIdData = { +export type GetV1EmployeeTimeoffData = { body?: never; - headers: { + path?: never; + query?: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Starts fetching records after the given page */ - Authorization: string; - }; - path: { + page?: number; /** - * User ID + * Number of items per page */ - user_id: string; + page_size?: number; }; - query?: never; - url: '/v1/company-managers/{user_id}'; + url: '/v1/employee/timeoff'; }; -export type DeleteV1CompanyManagersUserIdErrors = { +export type GetV1EmployeeTimeoffErrors = { /** * Bad Request */ @@ -24386,39 +24726,33 @@ export type DeleteV1CompanyManagersUserIdErrors = { /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ 429: TooManyRequestsResponse; }; -export type DeleteV1CompanyManagersUserIdError = - DeleteV1CompanyManagersUserIdErrors[keyof DeleteV1CompanyManagersUserIdErrors]; +export type GetV1EmployeeTimeoffError = + GetV1EmployeeTimeoffErrors[keyof GetV1EmployeeTimeoffErrors]; -export type DeleteV1CompanyManagersUserIdResponses = { +export type GetV1EmployeeTimeoffResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListTimeoffResponse; }; -export type DeleteV1CompanyManagersUserIdResponse = - DeleteV1CompanyManagersUserIdResponses[keyof DeleteV1CompanyManagersUserIdResponses]; +export type GetV1EmployeeTimeoffResponse = + GetV1EmployeeTimeoffResponses[keyof GetV1EmployeeTimeoffResponses]; -export type GetV1CompanyManagersUserIdData = { - body?: never; - path: { - /** - * User ID - */ - user_id: string; - }; +export type PostV1EmployeeTimeoffData = { + /** + * Timeoff + */ + body: CreateEmployeeTimeoffParams; + path?: never; query?: never; - url: '/v1/company-managers/{user_id}'; + url: '/v1/employee/timeoff'; }; -export type GetV1CompanyManagersUserIdErrors = { +export type PostV1EmployeeTimeoffErrors = { /** * Bad Request */ @@ -24436,61 +24770,48 @@ export type GetV1CompanyManagersUserIdErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1CompanyManagersUserIdError = - GetV1CompanyManagersUserIdErrors[keyof GetV1CompanyManagersUserIdErrors]; +export type PostV1EmployeeTimeoffError = + PostV1EmployeeTimeoffErrors[keyof PostV1EmployeeTimeoffErrors]; -export type GetV1CompanyManagersUserIdResponses = { +export type PostV1EmployeeTimeoffResponses = { /** - * Success + * Created */ - 200: CompanyManagerResponse; + 201: TimeoffResponse; }; -export type GetV1CompanyManagersUserIdResponse = - GetV1CompanyManagersUserIdResponses[keyof GetV1CompanyManagersUserIdResponses]; +export type PostV1EmployeeTimeoffResponse = + PostV1EmployeeTimeoffResponses[keyof PostV1EmployeeTimeoffResponses]; -export type PutV2EmploymentsEmploymentIdEmergencyContactData = { +export type PutV1EmploymentsEmploymentIdPersonalDetailsData = { /** - * Employment emergency contact params + * Employment personal details params */ - body?: EmploymentEmergencyContactParams; + body?: EmploymentPersonalDetailsParams; path: { /** * Employment ID */ employment_id: string; }; - query?: { - /** - * Version of the emergency_contact_details form schema - */ - emergency_contact_details_json_schema_version?: number | 'latest'; - }; - url: '/v2/employments/{employment_id}/emergency_contact'; + query?: never; + url: '/v1/employments/{employment_id}/personal_details'; }; -export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { +export type PutV1EmploymentsEmploymentIdPersonalDetailsErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Conflict */ @@ -24505,294 +24826,505 @@ export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdEmergencyContactError = - PutV2EmploymentsEmploymentIdEmergencyContactErrors[keyof PutV2EmploymentsEmploymentIdEmergencyContactErrors]; +export type PutV1EmploymentsEmploymentIdPersonalDetailsError = + PutV1EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV1EmploymentsEmploymentIdPersonalDetailsErrors]; -export type PutV2EmploymentsEmploymentIdEmergencyContactResponses = { +export type PutV1EmploymentsEmploymentIdPersonalDetailsResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: EmploymentResponse; }; -export type PutV2EmploymentsEmploymentIdEmergencyContactResponse = - PutV2EmploymentsEmploymentIdEmergencyContactResponses[keyof PutV2EmploymentsEmploymentIdEmergencyContactResponses]; +export type PutV1EmploymentsEmploymentIdPersonalDetailsResponse = + PutV1EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV1EmploymentsEmploymentIdPersonalDetailsResponses]; -export type GetV1EmployeeExpensesData = { +export type GetV1ProbationExtensionsIdData = { body?: never; - path?: never; + path: { + /** + * Probation Extension Request ID + */ + id: string; + }; query?: never; - url: '/v1/employee/expenses'; + url: '/v1/probation-extensions/{id}'; }; -export type GetV1EmployeeExpensesErrors = { +export type GetV1ProbationExtensionsIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeExpensesError = - GetV1EmployeeExpensesErrors[keyof GetV1EmployeeExpensesErrors]; +export type GetV1ProbationExtensionsIdError = + GetV1ProbationExtensionsIdErrors[keyof GetV1ProbationExtensionsIdErrors]; -export type GetV1EmployeeExpensesResponses = { +export type GetV1ProbationExtensionsIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: ProbationExtensionResponse; }; -export type GetV1EmployeeExpensesResponse = - GetV1EmployeeExpensesResponses[keyof GetV1EmployeeExpensesResponses]; +export type GetV1ProbationExtensionsIdResponse = + GetV1ProbationExtensionsIdResponses[keyof GetV1ProbationExtensionsIdResponses]; -export type PostV1EmployeeExpensesData = { - /** - * Expense params - */ - body?: ParamsToCreateEmployeeExpense; - path?: never; +export type GetV1FilesIdData = { + body?: never; + path: { + /** + * File ID + */ + id: string; + }; query?: never; - url: '/v1/employee/expenses'; + url: '/v1/files/{id}'; }; -export type PostV1EmployeeExpensesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1FilesIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: ForbiddenResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type PostV1EmployeeExpensesError = - PostV1EmployeeExpensesErrors[keyof PostV1EmployeeExpensesErrors]; +export type GetV1FilesIdError = GetV1FilesIdErrors[keyof GetV1FilesIdErrors]; -export type PostV1EmployeeExpensesResponses = { +export type GetV1FilesIdResponses = { /** - * Created + * Success */ - 201: SuccessResponse; + 200: DownloadFileResponse; }; -export type PostV1EmployeeExpensesResponse = - PostV1EmployeeExpensesResponses[keyof PostV1EmployeeExpensesResponses]; - -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; - }; +export type GetV1FilesIdResponse = + GetV1FilesIdResponses[keyof GetV1FilesIdResponses]; -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = - { +export type GetV1CompanyDepartmentsData = { + body?: never; + path?: never; + query: { /** - * Unauthorized + * Company ID */ - 401: UnauthorizedResponse; + company_id: string; /** - * Forbidden + * Paginate option. Default: true. When true, paginates response; otherwise, does not. */ - 403: ForbiddenResponse; + paginate?: boolean; /** - * Not Found + * Starts fetching records after the given page */ - 404: NotFoundResponse; + page?: number; /** - * Unprocessable Entity + * Number of items per page */ - 422: UnprocessableEntityResponse; + page_size?: number; }; + url: '/v1/company-departments'; +}; -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; +export type GetV1CompanyDepartmentsErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = - { - /** - * No Content - */ - 204: unknown; - }; +export type GetV1CompanyDepartmentsError = + GetV1CompanyDepartmentsErrors[keyof GetV1CompanyDepartmentsErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; - }; +export type GetV1CompanyDepartmentsResponses = { + /** + * Success + */ + 200: ListCompanyDepartmentsPaginatedResponse; +}; -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CompanyDepartmentsResponse = + GetV1CompanyDepartmentsResponses[keyof GetV1CompanyDepartmentsResponses]; + +export type PostV1CompanyDepartmentsData = { + /** + * Create Company Department request params + */ + body: CreateCompanyDepartmentParams; + path?: never; + query?: never; + url: '/v1/company-departments'; +}; + +export type PostV1CompanyDepartmentsErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostV1CompanyDepartmentsError = + PostV1CompanyDepartmentsErrors[keyof PostV1CompanyDepartmentsErrors]; + +export type PostV1CompanyDepartmentsResponses = { + /** + * Created + */ + 201: CompanyDepartmentCreatedResponse; +}; + +export type PostV1CompanyDepartmentsResponse = + PostV1CompanyDepartmentsResponses[keyof PostV1CompanyDepartmentsResponses]; + +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsData = { + body?: never; + path: { /** - * Forbidden + * Payroll run ID */ - 403: ForbiddenResponse; + payroll_run_id: string; + }; + query?: { /** - * Not Found + * Starts fetching records after the given page */ - 404: NotFoundResponse; + page?: number; /** - * Unprocessable Entity + * Number of items per page */ - 422: UnprocessableEntityResponse; + page_size?: number; }; + url: '/v1/payroll-runs/{payroll_run_id}/employee-details'; +}; -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = - { - /** - * Created - */ - 201: SuccessResponse; - }; +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsError = + GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse = - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses]; +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses = { + /** + * Success + */ + 200: EmployeeDetailsResponse; +}; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData = - { +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponse = + GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses]; + +export type GetV1EmploymentsEmploymentIdData = { + body?: never; + headers: { /** - * SignContractDocument + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - body: SignContractDocument; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Pre-onboarding document ID - */ - id: string; - }; - query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign'; + Authorization: string; }; - -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors = - { + path: { /** - * Bad Request + * Employment ID */ - 400: BadRequestResponse; + employment_id: string; + }; + query?: { /** - * Unauthorized + * Wether files should be excluded */ - 401: UnauthorizedResponse; + exclude_files?: boolean; + }; + url: '/v1/employments/{employment_id}'; +}; + +export type GetV1EmploymentsEmploymentIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type GetV1EmploymentsEmploymentIdError = + GetV1EmploymentsEmploymentIdErrors[keyof GetV1EmploymentsEmploymentIdErrors]; + +export type GetV1EmploymentsEmploymentIdResponses = { + /** + * Success + */ + 200: EmploymentShowResponse; +}; + +export type GetV1EmploymentsEmploymentIdResponse = + GetV1EmploymentsEmploymentIdResponses[keyof GetV1EmploymentsEmploymentIdResponses]; + +export type PatchV1EmploymentsEmploymentId2Data = { + /** + * Employment params + */ + body?: EmploymentFullParams; + headers: { /** - * Forbidden + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - 403: ForbiddenResponse; + Authorization: string; + }; + path: { /** - * Not Found + * Employment ID */ - 404: NotFoundResponse; + employment_id: string; + }; + query?: { /** - * Unprocessable Entity + * Version of the address_details form schema */ - 422: UnprocessableEntityResponse; + address_details_json_schema_version?: number | 'latest'; + /** + * Version of the administrative_details form schema + */ + administrative_details_json_schema_version?: number | 'latest'; + /** + * Version of the bank_account_details form schema + */ + bank_account_details_json_schema_version?: number | 'latest'; + /** + * Version of the employment_basic_information form schema + */ + employment_basic_information_json_schema_version?: number | 'latest'; + /** + * Version of the billing_address_details form schema + */ + billing_address_details_json_schema_version?: number | 'latest'; + /** + * Version of the contract_details form schema + */ + contract_details_json_schema_version?: number | 'latest'; + /** + * Version of the emergency_contact_details form schema + */ + emergency_contact_details_json_schema_version?: number | 'latest'; + /** + * Version of the personal_details form schema + */ + personal_details_json_schema_version?: number | 'latest'; + /** + * Version of the pricing_plan_details form schema + */ + pricing_plan_details_json_schema_version?: number | 'latest'; + /** + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + */ + skip_benefits?: boolean; + /** + * Complementary action(s) to perform when creating an employment. + */ + actions?: string; }; + url: '/v1/employments/{employment_id}'; +}; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignError = - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors]; +export type PatchV1EmploymentsEmploymentId2Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses = - { +export type PatchV1EmploymentsEmploymentId2Error = + PatchV1EmploymentsEmploymentId2Errors[keyof PatchV1EmploymentsEmploymentId2Errors]; + +export type PatchV1EmploymentsEmploymentId2Responses = { + /** + * Success + */ + 200: EmploymentResponse; +}; + +export type PatchV1EmploymentsEmploymentId2Response = + PatchV1EmploymentsEmploymentId2Responses[keyof PatchV1EmploymentsEmploymentId2Responses]; + +export type PatchV1EmploymentsEmploymentIdData = { + /** + * Employment params + */ + body?: EmploymentFullParams; + headers: { /** - * Success + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - 200: SuccessResponse; + Authorization: string; + }; + path: { + /** + * Employment ID + */ + employment_id: string; }; - -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponse = - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses]; - -export type GetV1ContractorInvoiceSchedulesData = { - body?: never; - path?: never; query?: { /** - * Filters contractor invoice schedules by start date greater than or equal to the value. + * Version of the address_details form schema */ - start_date_from?: Date; + address_details_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by start date less than or equal to the value. + * Version of the administrative_details form schema */ - start_date_to?: Date; + administrative_details_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by next invoice date greater than or equal to the value. + * Version of the bank_account_details form schema */ - next_invoice_date_from?: Date; + bank_account_details_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by next invoice date less than or equal to the value. + * Version of the employment_basic_information form schema */ - next_invoice_date_to?: Date; + employment_basic_information_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by status matching the value. + * Version of the billing_address_details form schema */ - status?: ContractorInvoiceScheduleStatus; + billing_address_details_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by employment id matching the value. + * Version of the contract_details form schema */ - employment_id?: UuidSlug; + contract_details_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by periodicity matching the value. + * Version of the emergency_contact_details form schema */ - periodicity?: ContractorInvoiceSchedulePeriodicity; + emergency_contact_details_json_schema_version?: number | 'latest'; /** - * Filters contractor invoice schedules by currency matching the value. + * Version of the personal_details form schema */ - currency?: string; + personal_details_json_schema_version?: number | 'latest'; /** - * Field to sort by + * Version of the pricing_plan_details form schema */ - sort_by?: - | 'number' - | 'total_amount' - | 'next_invoice_at' - | 'start_date' - | 'nr_occurrences'; + pricing_plan_details_json_schema_version?: number | 'latest'; /** - * Sort order + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ - order?: 'asc' | 'desc'; + skip_benefits?: boolean; + /** + * Complementary action(s) to perform when creating an employment. + */ + actions?: string; + }; + url: '/v1/employments/{employment_id}'; +}; + +export type PatchV1EmploymentsEmploymentIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type PatchV1EmploymentsEmploymentIdError = + PatchV1EmploymentsEmploymentIdErrors[keyof PatchV1EmploymentsEmploymentIdErrors]; + +export type PatchV1EmploymentsEmploymentIdResponses = { + /** + * Success + */ + 200: EmploymentResponse; +}; + +export type PatchV1EmploymentsEmploymentIdResponse = + PatchV1EmploymentsEmploymentIdResponses[keyof PatchV1EmploymentsEmploymentIdResponses]; + +export type GetV1EmployeeTimesheetsData = { + body?: never; + path?: never; + query?: { /** * Starts fetching records after the given page */ @@ -24802,48 +25334,255 @@ export type GetV1ContractorInvoiceSchedulesData = { */ page_size?: number; }; - url: '/v1/contractor-invoice-schedules'; + url: '/v1/employee/timesheets'; }; -export type GetV1ContractorInvoiceSchedulesErrors = { +export type GetV1EmployeeTimesheetsErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1EmployeeTimesheetsError = + GetV1EmployeeTimesheetsErrors[keyof GetV1EmployeeTimesheetsErrors]; + +export type GetV1EmployeeTimesheetsResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type GetV1EmployeeTimesheetsResponse = + GetV1EmployeeTimesheetsResponses[keyof GetV1EmployeeTimesheetsResponses]; + +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { + body?: never; + path: { + /** + * Custom field ID + */ + custom_field_id: string; + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; +}; + +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdError = + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; + +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { + /** + * Success + */ + 200: EmploymentCustomFieldValueResponse; +}; + +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data = { + /** + * Custom Field Value Update Parameters + */ + body: UpdateEmploymentCustomFieldValueParams; + path: { + /** + * Custom field ID + */ + custom_field_id: string; + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; +}; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Error = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors]; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses = { + /** + * Success + */ + 200: EmploymentCustomFieldValueResponse; +}; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Response = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses]; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { + /** + * Custom Field Value Update Parameters + */ + body: UpdateEmploymentCustomFieldValueParams; + path: { + /** + * Custom field ID + */ + custom_field_id: string; + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; +}; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdError = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { + /** + * Success + */ + 200: EmploymentCustomFieldValueResponse; +}; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; + +export type PutV1ResignationsOffboardingRequestIdValidateData = { + /** + * ValidateResignation + */ + body: ValidateResignationRequestParams; + path: { + /** + * Offboarding request ID + */ + offboarding_request_id: string; + }; + query?: never; + url: '/v1/resignations/{offboarding_request_id}/validate'; +}; + +export type PutV1ResignationsOffboardingRequestIdValidateErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoiceSchedulesError = - GetV1ContractorInvoiceSchedulesErrors[keyof GetV1ContractorInvoiceSchedulesErrors]; +export type PutV1ResignationsOffboardingRequestIdValidateError = + PutV1ResignationsOffboardingRequestIdValidateErrors[keyof PutV1ResignationsOffboardingRequestIdValidateErrors]; -export type GetV1ContractorInvoiceSchedulesResponses = { +export type PutV1ResignationsOffboardingRequestIdValidateResponses = { /** * Success */ - 200: ListContractorInvoiceSchedulesResponse; + 200: SuccessResponse; }; -export type GetV1ContractorInvoiceSchedulesResponse = - GetV1ContractorInvoiceSchedulesResponses[keyof GetV1ContractorInvoiceSchedulesResponses]; +export type PutV1ResignationsOffboardingRequestIdValidateResponse = + PutV1ResignationsOffboardingRequestIdValidateResponses[keyof PutV1ResignationsOffboardingRequestIdValidateResponses]; -export type PostV1ContractorInvoiceSchedulesData = { - /** - * Bulk creation payload - */ - body: BulkContractorInvoiceScheduleCreateParams; - path?: never; +export type GetV1ContractorInvoiceSchedulesIdData = { + body?: never; + path: { + /** + * Resource unique identifier + */ + id: UuidSlug; + }; query?: never; - url: '/v1/contractor-invoice-schedules'; + url: '/v1/contractor-invoice-schedules/{id}'; }; -export type PostV1ContractorInvoiceSchedulesErrors = { +export type GetV1ContractorInvoiceSchedulesIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Forbidden */ @@ -24853,66 +25592,48 @@ export type PostV1ContractorInvoiceSchedulesErrors = { */ 404: NotFoundResponse; /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + * Unprocessable Entity */ - 422: { - data: { - failures: Array; - successes: Array; - }; - }; + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractorInvoiceSchedulesError = - PostV1ContractorInvoiceSchedulesErrors[keyof PostV1ContractorInvoiceSchedulesErrors]; +export type GetV1ContractorInvoiceSchedulesIdError = + GetV1ContractorInvoiceSchedulesIdErrors[keyof GetV1ContractorInvoiceSchedulesIdErrors]; -export type PostV1ContractorInvoiceSchedulesResponses = { - /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. - */ - 201: { - data: { - failures: Array; - successes: Array; - }; - }; +export type GetV1ContractorInvoiceSchedulesIdResponses = { /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + * Success */ - 207: { - data: { - failures: Array; - successes: Array; - }; - }; + 200: ContractorInvoiceScheduleResponse; }; -export type PostV1ContractorInvoiceSchedulesResponse = - PostV1ContractorInvoiceSchedulesResponses[keyof PostV1ContractorInvoiceSchedulesResponses]; +export type GetV1ContractorInvoiceSchedulesIdResponse = + GetV1ContractorInvoiceSchedulesIdResponses[keyof GetV1ContractorInvoiceSchedulesIdResponses]; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { - body?: never; +export type PatchV1ContractorInvoiceSchedulesId2Data = { + /** + * Update parameters + */ + body: UpdateScheduleContractorInvoiceParams; path: { /** - * Employment ID + * Resource unique identifier */ - employment_id: string; + id: UuidSlug; }; query?: never; - url: '/v1/employments/{employment_id}/engagement-agreement-details'; + url: '/v1/contractor-invoice-schedules/{id}'; }; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { +export type PatchV1ContractorInvoiceSchedulesId2Errors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ @@ -24925,45 +25646,41 @@ export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError = - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type PatchV1ContractorInvoiceSchedulesId2Error = + PatchV1ContractorInvoiceSchedulesId2Errors[keyof PatchV1ContractorInvoiceSchedulesId2Errors]; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type PatchV1ContractorInvoiceSchedulesId2Responses = { /** * Success */ - 200: EmploymentEngagementAgreementDetailsResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type PatchV1ContractorInvoiceSchedulesId2Response = + PatchV1ContractorInvoiceSchedulesId2Responses[keyof PatchV1ContractorInvoiceSchedulesId2Responses]; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { +export type PatchV1ContractorInvoiceSchedulesIdData = { /** - * Employment engagement agreement details params + * Update parameters */ - body?: EmploymentEngagementAgreementDetailsParams; + body: UpdateScheduleContractorInvoiceParams; path: { /** - * Employment ID + * Resource unique identifier */ - employment_id: string; + id: UuidSlug; }; query?: never; - url: '/v1/employments/{employment_id}/engagement-agreement-details'; + url: '/v1/contractor-invoice-schedules/{id}'; }; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { +export type PatchV1ContractorInvoiceSchedulesIdErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ @@ -24972,51 +25689,46 @@ export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsError = - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type PatchV1ContractorInvoiceSchedulesIdError = + PatchV1ContractorInvoiceSchedulesIdErrors[keyof PatchV1ContractorInvoiceSchedulesIdErrors]; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type PatchV1ContractorInvoiceSchedulesIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type PatchV1ContractorInvoiceSchedulesIdResponse = + PatchV1ContractorInvoiceSchedulesIdResponses[keyof PatchV1ContractorInvoiceSchedulesIdResponses]; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownData = { - body?: never; +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsData = { + /** + * Employment pricing plan details params + */ + body?: EmploymentPricingPlanDetailsParams; path: { /** - * The billing document's ID + * Employment ID */ - billing_document_id: string; + employment_id: string; }; query?: { /** - * Filters the results by the type of the billing breakdown item. + * Version of the pricing_plan_details form schema */ - type?: string; + pricing_plan_details_json_schema_version?: number | 'latest'; }; - url: '/v1/billing-documents/{billing_document_id}/breakdown'; + url: '/v2/employments/{employment_id}/pricing_plan_details'; }; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownErrors = { +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors = { /** * Bad Request */ @@ -25025,113 +25737,100 @@ export type GetV1BillingDocumentsBillingDocumentIdBreakdownErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; /** - * Unprocessable Entity + * Conflict */ - 422: UnprocessableEntityResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; -}; - -export type GetV1BillingDocumentsBillingDocumentIdBreakdownError = - GetV1BillingDocumentsBillingDocumentIdBreakdownErrors[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownErrors]; - -export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponses = { + 422: UnprocessableEntityResponse; /** - * Success + * Unprocessable Entity */ - 200: BillingDocumentBreakdownResponse; -}; - -export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponse = - GetV1BillingDocumentsBillingDocumentIdBreakdownResponses[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownResponses]; - -export type GetV1EmployeeDocumentsData = { - body?: never; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - /** - * Filter documents by their description or file name, accepts full and partial case insensitive matches - */ - name?: string; - /** - * Filters the results that were uploaded on or after a given date - */ - inserted_after?: Date; - /** - * Filters the results that were uploaded before a given date - */ - inserted_before?: Date; - /** - * Field to sort by - */ - sort_by?: - | 'description' - | 'document_source' - | 'inserted_at' - | 'name' - | 'type' - | 'uploaded_by_role' - | 'related_to' - | 'sub_type' - | 'uploaded_by'; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - }; - url: '/v1/employee/documents'; + 429: TooManyRequestsResponse; }; -export type GetV1EmployeeDocumentsErrors = { +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsError = + PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors]; + +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses = { /** - * Forbidden + * Success */ - 403: ForbiddenResponse; + 200: EmploymentDetailsOnlyResponse; +}; + +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponse = + PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses]; + +export type PostV1RiskReserveData = { + /** + * Risk Reserve + */ + body: CreateRiskReserveParams; + path?: never; + query?: never; + url: '/v1/risk-reserve'; +}; + +export type PostV1RiskReserveErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeDocumentsError = - GetV1EmployeeDocumentsErrors[keyof GetV1EmployeeDocumentsErrors]; +export type PostV1RiskReserveError = + PostV1RiskReserveErrors[keyof PostV1RiskReserveErrors]; -export type GetV1EmployeeDocumentsResponses = { +export type PostV1RiskReserveResponses = { /** * Success */ - 200: ListDocumentsResponse; + 200: SuccessResponse; }; -export type GetV1EmployeeDocumentsResponse = - GetV1EmployeeDocumentsResponses[keyof GetV1EmployeeDocumentsResponses]; +export type PostV1RiskReserveResponse = + PostV1RiskReserveResponses[keyof PostV1RiskReserveResponses]; -export type PostV1EmployeeDocumentsData = { +export type PutV2EmploymentsEmploymentIdAddressDetailsData = { /** - * File + * Employment address details params */ - body: EmployeeFileParams; - path?: never; - query?: never; - url: '/v1/employee/documents'; + body?: EmploymentAddressDetailsParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Version of the address_details form schema + */ + address_details_json_schema_version?: number | 'latest'; + }; + url: '/v2/employments/{employment_id}/address_details'; }; -export type PostV1EmployeeDocumentsErrors = { +export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { /** * Bad Request */ @@ -25148,82 +25847,106 @@ export type PostV1EmployeeDocumentsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1EmployeeDocumentsError = - PostV1EmployeeDocumentsErrors[keyof PostV1EmployeeDocumentsErrors]; +export type PutV2EmploymentsEmploymentIdAddressDetailsError = + PutV2EmploymentsEmploymentIdAddressDetailsErrors[keyof PutV2EmploymentsEmploymentIdAddressDetailsErrors]; -export type PostV1EmployeeDocumentsResponses = { +export type PutV2EmploymentsEmploymentIdAddressDetailsResponses = { /** - * Created + * Success */ - 201: UploadFileResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1EmployeeDocumentsResponse = - PostV1EmployeeDocumentsResponses[keyof PostV1EmployeeDocumentsResponses]; +export type PutV2EmploymentsEmploymentIdAddressDetailsResponse = + PutV2EmploymentsEmploymentIdAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdAddressDetailsResponses]; -export type PostV1TimeoffTimeoffIdCancelRequestApproveData = { +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData = { body?: never; path: { /** - * Time Off ID + * Employment ID */ - timeoff_id: string; + employment_id: string; + /** + * Document ID + */ + id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel-request/approve'; + url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}'; }; -export type PostV1TimeoffTimeoffIdCancelRequestApproveErrors = { +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestApproveError = - PostV1TimeoffTimeoffIdCancelRequestApproveErrors[keyof PostV1TimeoffTimeoffIdCancelRequestApproveErrors]; +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError = + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors]; -export type PostV1TimeoffTimeoffIdCancelRequestApproveResponses = { - /** - * Success - */ - 200: SuccessResponse; -}; +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses = + { + /** + * Success + */ + 200: ContractDocumentResponse; + }; -export type PostV1TimeoffTimeoffIdCancelRequestApproveResponse = - PostV1TimeoffTimeoffIdCancelRequestApproveResponses[keyof PostV1TimeoffTimeoffIdCancelRequestApproveResponses]; +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponse = + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses]; -export type PostV1IdentityVerificationEmploymentIdVerifyData = { - body?: never; +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsData = { + /** + * ContractorCreateTimesheetParams + */ + body: ContractorCreateTimesheetParams; path: { /** - * Employment ID + * Contractor employment ID */ employment_id: string; }; query?: never; - url: '/v1/identity-verification/{employment_id}/verify'; + url: '/v1/contractors/employments/{employment_id}/timesheets'; }; -export type PostV1IdentityVerificationEmploymentIdVerifyErrors = { +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -25234,64 +25957,106 @@ export type PostV1IdentityVerificationEmploymentIdVerifyErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1IdentityVerificationEmploymentIdVerifyError = - PostV1IdentityVerificationEmploymentIdVerifyErrors[keyof PostV1IdentityVerificationEmploymentIdVerifyErrors]; +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsError = + PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors]; -export type PostV1IdentityVerificationEmploymentIdVerifyResponses = { +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractorTimesheetResponse; }; -export type PostV1IdentityVerificationEmploymentIdVerifyResponse = - PostV1IdentityVerificationEmploymentIdVerifyResponses[keyof PostV1IdentityVerificationEmploymentIdVerifyResponses]; +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponse = + PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses]; -export type GetV1BillingDocumentsBillingDocumentIdPdfData = { - body?: never; - headers: { +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Bad Request */ - Authorization: string; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; - path: { + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsError = + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors]; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses = + { /** - * The billing document's ID + * Created */ - billing_document_id: string; + 201: CorTerminationRequestCreatedResponse; }; - query?: never; - url: '/v1/billing-documents/{billing_document_id}/pdf'; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponse = + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses]; + +export type GetV1EmployeePayslipsData = { + body?: never; + path?: never; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/employee/payslips'; }; -export type GetV1BillingDocumentsBillingDocumentIdPdfErrors = { +export type GetV1EmployeePayslipsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdPdfError = - GetV1BillingDocumentsBillingDocumentIdPdfErrors[keyof GetV1BillingDocumentsBillingDocumentIdPdfErrors]; +export type GetV1EmployeePayslipsError = + GetV1EmployeePayslipsErrors[keyof GetV1EmployeePayslipsErrors]; -export type GetV1BillingDocumentsBillingDocumentIdPdfResponses = { +export type GetV1EmployeePayslipsResponses = { /** * Success */ - 200: GenericFile; + 200: ListEmployeePayslipsResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdPdfResponse = - GetV1BillingDocumentsBillingDocumentIdPdfResponses[keyof GetV1BillingDocumentsBillingDocumentIdPdfResponses]; +export type GetV1EmployeePayslipsResponse = + GetV1EmployeePayslipsResponses[keyof GetV1EmployeePayslipsResponses]; diff --git a/src/components/form/fields/default/DatePickerFieldDefault.tsx b/src/components/form/fields/default/DatePickerFieldDefault.tsx index a68353e48..247404c89 100644 --- a/src/components/form/fields/default/DatePickerFieldDefault.tsx +++ b/src/components/form/fields/default/DatePickerFieldDefault.tsx @@ -29,6 +29,10 @@ export function DatePickerFieldDefault({ const maxDateValue = maxDate ? new Date(maxDate) : undefined; const [open, setOpen] = useState(false); + const currentYear = new Date().getFullYear(); + const fromYear = minDateValue ? minDateValue.getFullYear() : 1900; + const toYear = maxDateValue ? maxDateValue.getFullYear() : currentYear + 10; + return ( { @@ -69,7 +76,11 @@ export function DatePickerFieldDefault({ field.onChange(formattedDate); setOpen(false); }} - defaultMonth={minDateValue} + defaultMonth={ + field.value + ? new Date(field.value) + : (maxDateValue ?? minDateValue) + } disabled={(date: Date) => { if (minDateValue && date < minDateValue) return true; if (maxDateValue && date > maxDateValue) return true; diff --git a/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx b/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx index 2178c20eb..5b3773bd2 100644 --- a/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx +++ b/src/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.tsx @@ -1,9 +1,9 @@ import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; import { PayrollAdminForm } from '@/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm'; import { useStepSubmitHandler } from '@/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler'; -import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import type { GPStepCallbacks } from '@/src/flows/types'; -export function AdministrativeDetailsStep(props: GPAdminStepCallbacks) { +export function AdministrativeDetailsStep(props: GPStepCallbacks) { const { adminBag } = usePayrollAdminOnboardingContext(); const handleSubmit = useStepSubmitHandler(props); diff --git a/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx b/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx index a6a541c20..dfeb9bbf5 100644 --- a/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx +++ b/src/flows/PayrollAdminOnboarding/components/ContractDetailsStep.tsx @@ -1,9 +1,9 @@ import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; import { PayrollAdminForm } from '@/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm'; import { useStepSubmitHandler } from '@/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler'; -import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import type { GPStepCallbacks } from '@/src/flows/types'; -export function ContractDetailsStep(props: GPAdminStepCallbacks) { +export function ContractDetailsStep(props: GPStepCallbacks) { const { adminBag } = usePayrollAdminOnboardingContext(); const handleSubmit = useStepSubmitHandler(props); diff --git a/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx b/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx index 8b531c58e..8b80977c9 100644 --- a/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx +++ b/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx @@ -1,13 +1,10 @@ import { PropsWithChildren } from 'react'; import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; import { useFormFields } from '@/src/context'; -import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import type { GPStepCallbacks } from '@/src/flows/types'; import { isMutationError } from '@/src/lib/mutations'; -type InvitationStepProps = Pick< - GPAdminStepCallbacks, - 'onSuccess' | 'onError' -> & { +type InvitationStepProps = Pick & { children?: React.ReactNode; }; diff --git a/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx b/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx index c38687fa0..93fac8526 100644 --- a/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx +++ b/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query'; import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; import { PayrollAdminForm } from '@/src/flows/PayrollAdminOnboarding/components/PayrollAdminForm'; -import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import type { GPStepCallbacks } from '@/src/flows/types'; import { useClient } from '@/src/context'; import { Client } from '@/src/client/client'; import { countriesOptions } from '@/src/common/api/countries'; @@ -11,7 +11,7 @@ export function SelectCountryStep({ onSubmit, onSuccess, onError, -}: GPAdminStepCallbacks) { +}: GPStepCallbacks) { const { adminBag } = usePayrollAdminOnboardingContext(); const { client } = useClient(); diff --git a/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts b/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts index 0174bdeac..69990a412 100644 --- a/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts +++ b/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts @@ -1,5 +1,5 @@ import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; -import type { GPAdminStepCallbacks } from '@/src/flows/PayrollAdminOnboarding/types'; +import type { GPStepCallbacks } from '@/src/flows/types'; import { isMutationError } from '@/src/lib/mutations'; /** @@ -10,7 +10,7 @@ export function useStepSubmitHandler({ onSubmit, onSuccess, onError, -}: GPAdminStepCallbacks) { +}: GPStepCallbacks) { const { adminBag } = usePayrollAdminOnboardingContext(); return async (values: Record) => { diff --git a/src/flows/PayrollAdminOnboarding/types.ts b/src/flows/PayrollAdminOnboarding/types.ts index 156d9832d..6027834be 100644 --- a/src/flows/PayrollAdminOnboarding/types.ts +++ b/src/flows/PayrollAdminOnboarding/types.ts @@ -1,25 +1,16 @@ -import { FlowOptions } from '@/src/flows/types'; +import { FlowOptions, GPStepCallbacks } from '@/src/flows/types'; import { usePayrollAdminOnboarding } from '@/src/flows/PayrollAdminOnboarding/hooks'; -import type { FieldError } from '@/src/lib/mutations'; -export type GPAdminStepCallbacks = { - onSubmit?: (payload: Record) => void | Promise; - onSuccess?: (data: unknown) => void | Promise; - onError?: (args: { - error: Error; - rawError: Record; - fieldErrors: FieldError[]; - }) => void; -}; +export type { GPStepCallbacks as GPAdminStepCallbacks }; export type PayrollAdminOnboardingRenderProps = { adminBag: ReturnType; components: { - SelectCountryStep: React.ComponentType; - ContractDetailsStep: React.ComponentType; - AdministrativeDetailsStep: React.ComponentType; + SelectCountryStep: React.ComponentType; + ContractDetailsStep: React.ComponentType; + AdministrativeDetailsStep: React.ComponentType; InvitationStep: React.ComponentType< - Pick & { + Pick & { children?: React.ReactNode; } >; diff --git a/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx b/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx index 16fae5ed6..77fb7f505 100644 --- a/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx +++ b/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx @@ -2,17 +2,15 @@ import { useId } from 'react'; import { usePayrollEmployeeOnboarding } from '@/src/flows/PayrollEmployeeOnboarding/hooks'; import { PayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; import type { PayrollEmployeeOnboardingFlowProps } from '@/src/flows/PayrollEmployeeOnboarding/types'; - -// Stable module-level references — prevents consumer subtrees from unmounting on parent re-renders. -// Each will be replaced with a real implementation in PBYR-4045. -const PersonalDetailsStep = () => null; -const HomeAddressStep = () => null; -const BankAccountStep = () => null; -const SubmitButton = () => null; -const BackButton = () => null; +import { PersonalDetailsStep } from '@/src/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep'; +import { HomeAddressStep } from '@/src/flows/PayrollEmployeeOnboarding/components/HomeAddressStep'; +import { BankAccountStep } from '@/src/flows/PayrollEmployeeOnboarding/components/BankAccountStep'; +import { SubmitButton } from '@/src/flows/PayrollEmployeeOnboarding/components/SubmitButton'; +import { BackButton } from '@/src/flows/PayrollEmployeeOnboarding/components/BackButton'; export const PayrollEmployeeOnboardingFlow = ({ employmentId, + countryCode, initialValues, options, render, @@ -20,6 +18,7 @@ export const PayrollEmployeeOnboardingFlow = ({ const formId = useId(); const employeeBag = usePayrollEmployeeOnboarding({ employmentId, + countryCode, initialValues, options, }); diff --git a/src/flows/PayrollEmployeeOnboarding/api.ts b/src/flows/PayrollEmployeeOnboarding/api.ts new file mode 100644 index 000000000..32866c3ee --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/api.ts @@ -0,0 +1,95 @@ +import { useMutation, useQuery } from '@tanstack/react-query'; +import type { FieldValues } from 'react-hook-form'; +import { + getV1CountriesCountryCodeForm, + putV1EmployeeAddress, + putV1EmployeeBankAccount, + putV1EmployeePersonalDetails, +} from '@/src/client'; +import { Client } from '@/src/client/client'; +import { useClient } from '@/src/context'; +import { createHeadlessForm } from '@/src/common/createHeadlessForm'; +import type { + JSONSchemaFormResultWithFieldsets, + JSFModify, +} from '@/src/flows/types'; + +export type GPEmployeeSchemaType = + | 'global_payroll_personal_details' + | 'address_details' + | 'global_payroll_bank_account_details'; + +export const useGPEmployeeFormSchema = ( + countryCode: string | undefined, + schemaType: GPEmployeeSchemaType, + fieldValues: FieldValues, + queryOptions?: { enabled?: boolean }, + jsfModify?: JSFModify, +): ReturnType> => { + const { client } = useClient(); + return useQuery({ + queryKey: ['gp-employee-form-schema', countryCode, schemaType], + enabled: !!countryCode && (queryOptions?.enabled ?? true), + retry: false, + queryFn: async () => { + const response = await getV1CountriesCountryCodeForm({ + client: client as Client, + headers: { Authorization: `` }, + path: { + country_code: countryCode as string, + form: schemaType, + }, + }); + if (response.error || !response.data) { + throw new Error(`Failed to fetch ${schemaType} schema`); + } + return response; + }, + select: ({ data }) => + createHeadlessForm( + (data?.data as Record) || {}, + fieldValues, + jsfModify ? { jsfModify } : undefined, + ), + }); +}; + +export const useGPUpdatePersonalDetails = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: (personalDetails: Record) => { + // 'name' is a computed read-only display field in the schema (additionalProperties: false + // on the PUT endpoint rejects it). Strip it before sending. + const { name: _name, ...payload } = personalDetails; + return putV1EmployeePersonalDetails({ + client: client as Client, + headers: { Authorization: `` }, + body: { personal_details: payload }, + }); + }, + }); +}; + +export const useGPUpdateHomeAddress = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: (addressDetails: Record) => + putV1EmployeeAddress({ + client: client as Client, + headers: { Authorization: `` }, + body: { address_details: addressDetails }, + }), + }); +}; + +export const useGPUpdateBankAccount = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: (bankAccountDetails: Record) => + putV1EmployeeBankAccount({ + client: client as Client, + headers: { Authorization: `` }, + body: { bank_account_details: bankAccountDetails }, + }), + }); +}; diff --git a/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx b/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx new file mode 100644 index 000000000..a6d25486d --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx @@ -0,0 +1,28 @@ +import { ButtonHTMLAttributes, PropsWithChildren } from 'react'; +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { useFormFields } from '@/src/context'; + +export function BackButton({ + children, + onClick, + ...props +}: PropsWithChildren>) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + const { components } = useFormFields(); + + const CustomButton = components?.button; + if (!CustomButton) { + throw new Error('Button component not found'); + } + + const handleBack = (evt: React.MouseEvent) => { + employeeBag.goToPreviousStep(); + onClick?.(evt); + }; + + return ( + + {children} + + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/BankAccountStep.tsx b/src/flows/PayrollEmployeeOnboarding/components/BankAccountStep.tsx new file mode 100644 index 000000000..a6c1b553f --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/BankAccountStep.tsx @@ -0,0 +1,29 @@ +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { PayrollEmployeeForm } from '@/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm'; +import { useEmployeeStepSubmitHandler } from '@/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler'; +import type { GPStepCallbacks } from '@/src/flows/types'; + +/** + * Render only when employeeBag.selfOnboardingSubsteps includes + * 'employee_provides_bank_details'. The step is always present in the step + * state but the substep presence determines whether it is actually required. + */ +export function BankAccountStep(props: GPStepCallbacks) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + const handleSubmit = useEmployeeStepSubmitHandler(props); + + const isRequired = employeeBag.selfOnboardingSubsteps.some( + (s) => s.type === 'employee_provides_bank_details', + ); + + if (!isRequired) return null; + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.tsx b/src/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.tsx new file mode 100644 index 000000000..a1e50078e --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.tsx @@ -0,0 +1,18 @@ +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { PayrollEmployeeForm } from '@/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm'; +import { useEmployeeStepSubmitHandler } from '@/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler'; +import type { GPStepCallbacks } from '@/src/flows/types'; + +export function HomeAddressStep(props: GPStepCallbacks) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + const handleSubmit = useEmployeeStepSubmitHandler(props); + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.tsx b/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.tsx new file mode 100644 index 000000000..a54b06cc2 --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.tsx @@ -0,0 +1,39 @@ +import { Form } from '@/src/components/ui/form'; +import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm'; +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { useJSONSchemaForm } from '@/src/components/form/useJSONSchemaForm'; +import type { JSFFieldset } from '@/src/types/remoteFlows'; + +type PayrollEmployeeFormProps = { + onSubmit: (values: Record) => Promise; + defaultValues?: Record; +}; + +export function PayrollEmployeeForm({ + onSubmit, + defaultValues, +}: PayrollEmployeeFormProps) { + const { formId, employeeBag } = usePayrollEmployeeOnboardingContext(); + + const form = useJSONSchemaForm({ + handleValidation: employeeBag.handleValidation, + defaultValues: defaultValues ?? {}, + checkFieldUpdates: employeeBag.setFieldValues, + }); + + return ( +
+ + + + + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.tsx b/src/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.tsx new file mode 100644 index 000000000..17bef888b --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.tsx @@ -0,0 +1,18 @@ +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { PayrollEmployeeForm } from '@/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm'; +import { useEmployeeStepSubmitHandler } from '@/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler'; +import type { GPStepCallbacks } from '@/src/flows/types'; + +export function PersonalDetailsStep(props: GPStepCallbacks) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + const handleSubmit = useEmployeeStepSubmitHandler(props); + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/SubmitButton.tsx b/src/flows/PayrollEmployeeOnboarding/components/SubmitButton.tsx new file mode 100644 index 000000000..c4f04f61d --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/SubmitButton.tsx @@ -0,0 +1,26 @@ +import { ButtonHTMLAttributes, PropsWithChildren } from 'react'; +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { useFormFields } from '@/src/context'; + +export function SubmitButton({ + children, + ...props +}: PropsWithChildren>) { + const { formId, employeeBag } = usePayrollEmployeeOnboardingContext(); + const { components } = useFormFields(); + + const CustomButton = components?.button; + if (!CustomButton) { + throw new Error('Button component not found'); + } + + return ( + + {children} + + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts b/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts new file mode 100644 index 000000000..6149c1386 --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts @@ -0,0 +1,34 @@ +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import type { GPStepCallbacks } from '@/src/flows/types'; +import { isMutationError } from '@/src/lib/mutations'; + +export function useEmployeeStepSubmitHandler({ + onSubmit, + onSuccess, + onError, +}: GPStepCallbacks) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + + return async (values: Record) => { + try { + await onSubmit?.(values); + const data = await employeeBag.onSubmit(values); + await onSuccess?.(data); + employeeBag.goToNextStep(); + } catch (error: unknown) { + if (isMutationError(error)) { + onError?.({ + error: error.error, + rawError: error.rawError, + fieldErrors: error.fieldErrors, + }); + } else { + onError?.({ + error: error as Error, + rawError: error as Record, + fieldErrors: [], + }); + } + } + }; +} diff --git a/src/flows/PayrollEmployeeOnboarding/hooks.tsx b/src/flows/PayrollEmployeeOnboarding/hooks.tsx index e16a0400a..8cfa9bdf1 100644 --- a/src/flows/PayrollEmployeeOnboarding/hooks.tsx +++ b/src/flows/PayrollEmployeeOnboarding/hooks.tsx @@ -1,18 +1,45 @@ -import { useMemo, useCallback } from 'react'; +import { useMemo, useCallback, useState } from 'react'; +import { FieldValues } from 'react-hook-form'; import { useGPOnboardingSteps } from '@/src/common/api/gpOnboarding'; import { useStepState } from '@/src/flows/useStepState'; import type { Step } from '@/src/flows/useStepState'; import type { PayrollEmployeeOnboardingFlowProps } from '@/src/flows/PayrollEmployeeOnboarding/types'; import { useErrorReporting } from '@/src/components/error-handling/useErrorReporting'; +import { mutationToPromise } from '@/src/lib/mutations'; +import { parseJSFToValidate } from '@/src/components/form/utils'; +import { + useGPEmployeeFormSchema, + useGPUpdatePersonalDetails, + useGPUpdateHomeAddress, + useGPUpdateBankAccount, +} from '@/src/flows/PayrollEmployeeOnboarding/api'; +import type { + JSONSchemaFormResultWithFieldsets, + JSFModify, +} from '@/src/flows/types'; export type EmployeeStepKey = | 'personal_details' | 'home_address' | 'bank_account'; -// Steps are stable — visibility of bank_account is not derived from loaded data here. -// Consumers check selfOnboardingSubsteps to determine whether the bank_account step -// applies to the employment; the BankAccountStep component handles its own no-op case. +// Stable module-level jsfModify for personal_details — avoids recreating createHeadlessForm +// on every render (select closure captures fieldValues from outer scope per render, so the +// schema data itself is always fresh; the jsfModify just needs to be reference-stable). +const PERSONAL_DETAILS_JSF_MODIFY: JSFModify = { + fields: { + // 'name' is a computed read-only display field; hide it so it is never submitted + // (additionalProperties: false on the PUT endpoint rejects it). + name: { 'x-jsf-presentation': { inputType: 'hidden' } }, + // Clarify that mobile_number expects digits only (no + or country code) for USA + mobile_number: { + description: 'Enter 10 digits, no country code (e.g. 5389274785)', + }, + }, +}; + +// Steps are stable — bank_account visibility is not derived from loaded API data. +// Consumers check selfOnboardingSubsteps to decide whether to render BankAccountStep. const EMPLOYEE_STEPS: Record> = { personal_details: { index: 0, name: 'personal_details' }, home_address: { index: 1, name: 'home_address' }, @@ -21,9 +48,12 @@ const EMPLOYEE_STEPS: Record> = { export const usePayrollEmployeeOnboarding = ({ employmentId, + countryCode, initialValues, options, }: Omit) => { + const [fieldValues, setFieldValues] = useState({}); + const { updateErrorContext } = useErrorReporting({ flow: 'payroll_employee_onboarding', }); @@ -38,9 +68,75 @@ export const usePayrollEmployeeOnboarding = ({ const { stepState, nextStep, previousStep, goToStep, setStepValues } = useStepState(EMPLOYEE_STEPS, onStepChange); + const currentStep = stepState.currentStep.name; + + // ── Schema queries ────────────────────────────────────────────────────────── + + const personalDetailsSchema = useGPEmployeeFormSchema( + countryCode, + 'global_payroll_personal_details', + fieldValues, + { enabled: currentStep === 'personal_details' }, + PERSONAL_DETAILS_JSF_MODIFY, + ); + + const homeAddressSchema = useGPEmployeeFormSchema( + countryCode, + 'address_details', + fieldValues, + { enabled: currentStep === 'home_address' }, + ); + + const bankAccountSchema = useGPEmployeeFormSchema( + countryCode, + 'global_payroll_bank_account_details', + fieldValues, + { enabled: currentStep === 'bank_account' }, + ); + + const currentSchema = useMemo(() => { + if (currentStep === 'personal_details') return personalDetailsSchema.data; + if (currentStep === 'home_address') return homeAddressSchema.data; + if (currentStep === 'bank_account') return bankAccountSchema.data; + return undefined; + }, [ + currentStep, + personalDetailsSchema.data, + homeAddressSchema.data, + bankAccountSchema.data, + ]); + + const isLoadingSchema = + personalDetailsSchema.isLoading || + homeAddressSchema.isLoading || + bankAccountSchema.isLoading; + + // ── Mutations ─────────────────────────────────────────────────────────────── + + const updatePersonalDetailsMutation = useGPUpdatePersonalDetails(); + const updateHomeAddressMutation = useGPUpdateHomeAddress(); + const updateBankAccountMutation = useGPUpdateBankAccount(); + + const { mutateAsyncOrThrow: updatePersonalDetailsAsync } = mutationToPromise( + updatePersonalDetailsMutation, + ); + const { mutateAsyncOrThrow: updateHomeAddressAsync } = mutationToPromise( + updateHomeAddressMutation, + ); + const { mutateAsyncOrThrow: updateBankAccountAsync } = mutationToPromise( + updateBankAccountMutation, + ); + + const isSubmitting = + updatePersonalDetailsMutation.isPending || + updateHomeAddressMutation.isPending || + updateBankAccountMutation.isPending; + + // ── API steps ─────────────────────────────────────────────────────────────── + const { data: apiSteps, - isLoading, + isLoading: isLoadingSteps, refetch: refetchSteps, } = useGPOnboardingSteps(employmentId); @@ -53,16 +149,85 @@ export const usePayrollEmployeeOnboarding = ({ apiSteps?.find((s) => s.type === 'completion')?.sub_steps?.[0]?.status === 'completed'; + // ── Form helpers ──────────────────────────────────────────────────────────── + + const handleValidation = useCallback( + async (values: FieldValues) => { + if (!currentSchema) return null; + const parsedValues = await parseJSFToValidate( + values, + currentSchema.fields, + { isPartialValidation: false }, + ); + return currentSchema.handleValidation(parsedValues); + }, + [currentSchema], + ); + + const parseFormValues = useCallback( + async (values: FieldValues): Promise> => { + if (!currentSchema) return values; + return parseJSFToValidate(values, currentSchema.fields, { + isPartialValidation: false, + }); + }, + [currentSchema], + ); + + const onSubmit = useCallback( + async (values: FieldValues) => { + const parsedValues = await parseFormValues(values); + + switch (currentStep) { + case 'personal_details': { + const data = await updatePersonalDetailsAsync(parsedValues); + await refetchSteps(); + return data; + } + case 'home_address': { + const data = await updateHomeAddressAsync(parsedValues); + await refetchSteps(); + return data; + } + case 'bank_account': { + const data = await updateBankAccountAsync(parsedValues); + await refetchSteps(); + return data; + } + default: + return; + } + }, + [ + currentStep, + parseFormValues, + updatePersonalDetailsAsync, + updateHomeAddressAsync, + updateBankAccountAsync, + refetchSteps, + ], + ); + return { stepState, - isLoading, + isLoading: isLoadingSteps || isLoadingSchema, + isSubmitting, isComplete: isComplete ?? false, employmentId, + countryCode, initialValues, options, apiSteps, selfOnboardingSubsteps, refetchSteps, + fields: currentSchema?.fields ?? [], + meta: (currentSchema?.meta ?? + {}) as JSONSchemaFormResultWithFieldsets['meta'], + fieldValues, + setFieldValues, + handleValidation, + parseFormValues, + onSubmit, goToNextStep: nextStep, goToPreviousStep: previousStep, goToStep, diff --git a/src/flows/PayrollEmployeeOnboarding/index.ts b/src/flows/PayrollEmployeeOnboarding/index.ts index af97f5cff..7b4715b72 100644 --- a/src/flows/PayrollEmployeeOnboarding/index.ts +++ b/src/flows/PayrollEmployeeOnboarding/index.ts @@ -3,4 +3,5 @@ export { usePayrollEmployeeOnboarding } from './hooks'; export type { PayrollEmployeeOnboardingFlowProps, PayrollEmployeeOnboardingRenderProps, + GPEmployeeStepCallbacks, } from './types'; diff --git a/src/flows/PayrollEmployeeOnboarding/types.ts b/src/flows/PayrollEmployeeOnboarding/types.ts index 12359e23b..6c91f8d57 100644 --- a/src/flows/PayrollEmployeeOnboarding/types.ts +++ b/src/flows/PayrollEmployeeOnboarding/types.ts @@ -1,25 +1,35 @@ -import { FlowOptions } from '@/src/flows/types'; +import { FlowOptions, GPStepCallbacks } from '@/src/flows/types'; import { usePayrollEmployeeOnboarding } from '@/src/flows/PayrollEmployeeOnboarding/hooks'; -// Step component prop types are intentionally empty for this scaffold — PBYR-4045 will -// replace these with typed props once each step component is implemented. -type StepComponentType = React.ComponentType>; +export type { GPStepCallbacks as GPEmployeeStepCallbacks }; + +type StepComponentType = React.ComponentType; export type PayrollEmployeeOnboardingRenderProps = { employeeBag: ReturnType; components: { PersonalDetailsStep: StepComponentType; HomeAddressStep: StepComponentType; - /** Check employeeBag.selfOnboardingSubsteps to determine if bank account is required. */ + /** Check employeeBag.selfOnboardingSubsteps for 'employee_provides_bank_details' before rendering. */ BankAccountStep: StepComponentType; - SubmitButton: StepComponentType; - BackButton: StepComponentType; + SubmitButton: React.ComponentType< + React.ButtonHTMLAttributes & { + children?: React.ReactNode; + } + >; + BackButton: React.ComponentType< + React.ButtonHTMLAttributes & { + children?: React.ReactNode; + } + >; }; }; export type PayrollEmployeeOnboardingFlowProps = { /** UUID of the employment, scoped to the employee token. */ employmentId: string; + /** ISO 3166-1 alpha-3 country code of the employment (e.g. 'GBR'). Required for form schema fetching. */ + countryCode: string; /** Optional. Pre-populate form fields. */ initialValues?: Record; options?: Omit; diff --git a/src/flows/types.ts b/src/flows/types.ts index c277190b8..7bc985c2f 100644 --- a/src/flows/types.ts +++ b/src/flows/types.ts @@ -4,6 +4,7 @@ import type { FormResult as FormResultNext, FormResultLegacy, } from '@remoteoss/remote-json-schema-form-kit'; +import type { FieldError } from '@/src/lib/mutations'; type Success = { data: T; @@ -112,3 +113,16 @@ export type JSONSchemaFormResultWithFieldsets = FormResult & { 'x-jsf-presentation'?: Record; }; }; + +/** + * Shared callback prop type for GP step components (admin and employee flows). + */ +export type GPStepCallbacks = { + onSubmit?: (payload: Record) => void | Promise; + onSuccess?: (data: unknown) => void | Promise; + onError?: (args: { + error: Error; + rawError: Record; + fieldErrors: FieldError[]; + }) => void; +}; diff --git a/src/index.tsx b/src/index.tsx index 6ef37e3e1..8779d2223 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -105,7 +105,10 @@ export type { PayrollEmployeeOnboardingRenderProps, } from '@/src/flows/PayrollEmployeeOnboarding'; -export { useGPLegalEntities } from '@/src/common/api/gpOnboarding'; +export { + useGPLegalEntities, + useGPOnboardingSteps, +} from '@/src/common/api/gpOnboarding'; export { CreateCompanyFlow } from '@/src/flows/CreateCompany'; export type { diff --git a/src/styles/global.css b/src/styles/global.css index c6c22c3f9..f25e8567f 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -225,4 +225,40 @@ height: 0.875rem; width: 0.875rem; } + + /* Caption dropdown layout (captionLayout="dropdown") — month/year selects */ + .rdp-caption_dropdowns { + display: flex; + align-items: center; + gap: 0.25rem; + } + + .rdp-dropdown { + appearance: none; + -webkit-appearance: none; + background: transparent; + border: 1px solid var(--color-border); + border-radius: 0.375rem; + font-size: 0.875rem; + font-weight: 500; + padding: 0.15rem 1.5rem 0.15rem 0.5rem; + cursor: pointer; + color: var(--color-foreground); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 0.35rem center; + } + + .rdp-dropdown:focus { + outline: 2px solid var(--color-ring); + outline-offset: 1px; + } + + .rdp-dropdown_month { + min-width: 5rem; + } + + .rdp-dropdown_year { + min-width: 4rem; + } } From 83fc5fff4af1527b0002a2052d561e9554aa6ac9 Mon Sep 17 00:00:00 2001 From: hamzaremote <158288621+hamzaremote@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:53:29 +0200 Subject: [PATCH 05/14] feat(gp): federal_taxes + state_taxes steps in PayrollEmployeeOnboarding (PBYR-4047) (#1080) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(gp): PayrollEmployeeFederalTaxesFlow — W-4 step for USA employees (PBYR-4047) - Add new src/flows/PayrollEmployeeFederalTaxes/ flow: hooks, api, context, types, PayrollEmployeeFederalTaxesFlow render-prop component - usePayrollEmployeeFederalTaxes probes /v1/employments/:id/onboarding-steps to derive isActive (completion.sub_steps[0].status === 'completed') and exposes isAvailable + unavailableReason ('unsupported_country' | 'pending_enrollment') - Schema fetch (global_payroll_federal_taxes) is gated on countryCode === 'USA' && active; mutation hits PUT /v1/employee/federal-taxes (employee assertion token) - Components: FederalTaxesStep (returns null when unavailable), SubmitButton, PayrollEmployeeFederalTaxesForm, useFederalTaxesStepSubmitHandler - Add security: [{ scheme: 'bearer', type: 'http' }] to putV1EmployeeFederalTaxes in sdk.gen.ts so hey-api injects the Bearer token (same fix PBYR-4045 applied to personal-details/address/bank-account) - Export PayrollEmployeeFederalTaxesFlow, usePayrollEmployeeFederalTaxes, and related types from public SDK surface - Example app: PayrollEmployeeFederalTaxes demo with employment ID entry and not-available state for non-USA / pre-active employments Co-Authored-By: Claude Opus 4.7 (1M context) * refactor(gp): integrate federal_taxes + state_taxes into PayrollEmployeeOnboarding (PBYR-4047) Replace the standalone PayrollEmployeeFederalTaxesFlow with two new steps (federal_taxes, state_taxes) inside the existing PayrollEmployeeOnboarding flow, matching the merged-flow shape requested for the demo. - Delete src/flows/PayrollEmployeeFederalTaxes/ and its exports/example demo - Extend EmployeeStepKey with 'federal_taxes' and 'state_taxes' - Add jurisdiction?: string prop (US state code) — required for state_taxes - Add useGPUpdateFederalTaxes, useGPUpdateStateTaxes; extend GPEmployeeSchemaType with global_payroll_federal_taxes / global_payroll_state_taxes - Expose employeeBag.taxStepsAvailability keyed by step: { isAvailable, unavailableReason: 'unsupported_country' | 'pending_enrollment' | 'no_jurisdiction' } - Gating model: USA-only + onboarding completion-step probe + retroactive 404 catch. On submit, if Tiger returns 404 (`Tax task not found...`), flip the step's reason to 'pending_enrollment' so the consumer renders the not-available UI instead of a raw API error - New FederalTaxesStep / StateTaxesStep components that return null when the step is unavailable; consumer drives the not-available UI from the bag - Hand-add putV1EmployeeStateTaxes (with security: bearer) + EmploymentStateTaxesParams to sdk.gen.ts / types.gen.ts (prod gateway doesn't expose this endpoint yet, same hand-edit convention used in PBYR-4045) - Re-export TaxStepUnavailableReason + GPEmployeeStepCallbacks from public SDK - Example app: extend GP Employee Onboarding demo with both new steps + a TaxStepNotAvailable banner; jurisdiction from VITE_GP_STATE_JURISDICTION (default 'CA') Co-Authored-By: Claude Opus 4.7 (1M context) * fix(gp): surface schema_unavailable on tax steps when backend has no form schema The local Tiger gateway exposes `PUT /v1/employee/state-taxes/{jurisdiction}` but returns 400 from `GET /v1/countries/USA/global_payroll_state_taxes`, so the tax form was rendering with zero fields. Fold the schema query's error state into `taxStepsAvailability` so the bag exposes `unavailableReason: 'schema_unavailable'` and the consumer renders the not-available UI instead of a blank form. - Extend TaxStepUnavailableReason with 'schema_unavailable' - Compute taxStepsAvailability AFTER the schema queries so federalTaxesSchema.isError / stateTaxesSchema.isError can feed in; gate the schema queries on country + jurisdiction + post-enrollment (not on availability itself, to avoid a cycle) - Update example app's TaxStepNotAvailable banner with the new reason text Co-Authored-By: Claude Opus 4.7 (1M context) * fix(gp): derive countryCode and jurisdiction from the employment in the demo Instead of reading VITE_GP_COUNTRY_CODE / VITE_GP_STATE_JURISDICTION env vars (footgun: a USA env + DEU employment would silently submit to the wrong shape), fetch the employment in the outer (company-manager) context alongside useGPOnboardingSteps and hand country.code + work/home address state down to the inner (employee-token) context as props. - New useEmployeeFlowContext combines useGPOnboardingSteps + useEmploymentQuery, returns substeps/hasBankAccount/countryCode/jurisdiction/isLoading - Jurisdiction prefers work_address_details.state, falls back to address_details.state - EmployeeFlowInner now takes countryCode + jurisdiction as required props - Render an error card when the employment can't be loaded (e.g. bad ID or token without access) instead of running the flow with undefined country Co-Authored-By: Claude Opus 4.7 (1M context) --------- Co-authored-by: Claude Opus 4.7 (1M context) --- example/src/PayrollEmployeeOnboarding.tsx | 230 ++++++++++++++++-- src/client/index.ts | 7 + src/client/sdk.gen.ts | 33 +++ src/client/types.gen.ts | 72 ++++++ .../PayrollEmployeeOnboardingFlow.tsx | 6 + src/flows/PayrollEmployeeOnboarding/api.ts | 37 ++- .../components/FederalTaxesStep.tsx | 26 ++ .../components/StateTaxesStep.tsx | 26 ++ src/flows/PayrollEmployeeOnboarding/hooks.tsx | 227 +++++++++++++++-- src/flows/PayrollEmployeeOnboarding/index.ts | 1 + src/flows/PayrollEmployeeOnboarding/types.ts | 34 +++ src/index.tsx | 2 + 12 files changed, 660 insertions(+), 41 deletions(-) create mode 100644 src/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.tsx create mode 100644 src/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.tsx diff --git a/example/src/PayrollEmployeeOnboarding.tsx b/example/src/PayrollEmployeeOnboarding.tsx index edb688652..ab783bc3a 100644 --- a/example/src/PayrollEmployeeOnboarding.tsx +++ b/example/src/PayrollEmployeeOnboarding.tsx @@ -2,19 +2,22 @@ import { useState, useMemo } from 'react'; import { PayrollEmployeeOnboardingFlow, PayrollEmployeeOnboardingRenderProps, + TaxStepUnavailableReason, + useEmploymentQuery, + useGPOnboardingSteps, } from '@remoteoss/remote-flows'; -import { useGPOnboardingSteps } from '@remoteoss/remote-flows'; import { RemoteFlows } from './RemoteFlows'; import { AlertError } from './AlertError'; import './css/main.css'; -const COUNTRY_CODE = (import.meta.env.VITE_GP_COUNTRY_CODE as string) || 'AUS'; const EMPLOYMENT_ID = (import.meta.env.VITE_EMPLOYMENT_ID as string) || ''; const STEP_LABELS: Record = { personal_details: 'Personal Details', home_address: 'Home Address', bank_account: 'Bank Account', + federal_taxes: 'Federal Taxes (W-4)', + state_taxes: 'State Taxes', }; const STEP_DESCRIPTIONS: Record = { @@ -22,6 +25,10 @@ const STEP_DESCRIPTIONS: Record = { 'Provide your personal information for the employment record.', home_address: 'Enter your home address for payroll and compliance purposes.', bank_account: 'Add your bank account details to receive payroll payments.', + federal_taxes: + 'Set your federal income tax withholding preferences (USA only). Becomes available after your employment is activated.', + state_taxes: + 'Set your state tax withholding preferences for the selected jurisdiction (USA only). Becomes available after your employment is activated.', }; type Errors = { @@ -46,10 +53,20 @@ function buildEmployeeAuth(employmentId: string) { })); } -// ── Step status fetcher (company manager token, outer context) ────────────── +// ── Outer-context loader (company manager token) ──────────────────────────── +// +// The employee assertion token can't fetch /v1/employments/:id (returns +// {message} only), so we read country + work jurisdiction from the employment +// here, in the outer RemoteFlows context, and hand them down to the inner +// (employee-token) context as props. This keeps consumers from having to +// hardcode VITE_GP_COUNTRY_CODE / VITE_GP_STATE_JURISDICTION. + +function useEmployeeFlowContext(employmentId: string) { + const { data: apiSteps, isLoading: isLoadingSteps } = + useGPOnboardingSteps(employmentId); + const { data: employment, isLoading: isLoadingEmployment } = + useEmploymentQuery({ employmentId }); -function useEmployeeStepInfo(employmentId: string) { - const { data: apiSteps, isLoading } = useGPOnboardingSteps(employmentId); const selfOnboarding = apiSteps?.find( (s: { type: string }) => s.type === 'self_onboarding', ); @@ -57,7 +74,60 @@ function useEmployeeStepInfo(employmentId: string) { const hasBankAccount = substeps.some( (s: { type: string }) => s.type === 'employee_provides_bank_details', ); - return { substeps, hasBankAccount, isLoading }; + + const countryCode = employment?.country?.code; + // Prefer the work address state when present; fall back to the home address + // state. State code is only meaningful for USA — the SDK ignores + // `jurisdiction` for non-USA employments. + const workState = ( + employment?.work_address_details as { state?: string } | undefined + )?.state; + const homeState = ( + employment?.address_details as { state?: string } | undefined + )?.state; + const jurisdiction = workState || homeState; + + return { + substeps, + hasBankAccount, + countryCode, + jurisdiction, + isLoading: isLoadingSteps || isLoadingEmployment, + }; +} + +function TaxStepNotAvailable({ + reason, + jurisdiction, +}: { + reason: TaxStepUnavailableReason; + jurisdiction?: string; +}) { + let message: string; + if (reason === 'unsupported_country') { + message = 'Tax steps are only available for USA employments.'; + } else if (reason === 'no_jurisdiction') { + message = + 'A US state code is required to submit state taxes — pass a `jurisdiction` prop on the flow.'; + } else if (reason === 'schema_unavailable') { + message = jurisdiction + ? `The backend didn't return a form schema for state_taxes (jurisdiction "${jurisdiction}"). Check that the gateway has the schema configured for this country/jurisdiction.` + : `The backend didn't return a form schema for federal_taxes. Check that the gateway has the schema configured for USA.`; + } else { + message = jurisdiction + ? `Your employment isn't active yet, so the tax_task for jurisdiction "${jurisdiction}" hasn't been created. Come back after activation.` + : `Your employment isn't active yet, so the federal_taxes tax_task hasn't been created. Come back after activation.`; + } + return ( +
+

+ Step unavailable. {message} +

+
+ ); } // ── Employee form (employee-scoped token, inner context) ──────────────────── @@ -65,9 +135,13 @@ function useEmployeeStepInfo(employmentId: string) { function EmployeeFlowInner({ employmentId, hasBankAccount, + countryCode, + jurisdiction, }: { employmentId: string; hasBankAccount: boolean; + countryCode: string; + jurisdiction: string | undefined; }) { const [errors, setErrors] = useState(emptyErrors); const [done, setDone] = useState(false); @@ -76,10 +150,18 @@ function EmployeeFlowInner({ const handleError = (error: Error, fieldErrors: Errors['fieldErrors']) => setErrors({ apiError: error.message, fieldErrors }); + const isUSA = countryCode === 'USA'; + + // Visible steps depend on country + bank substep + jurisdiction availability. + // Tax steps are surfaced for USA even if not yet active — the bag exposes a + // not-available reason so we can render a friendly state in-place. const allSteps = Object.entries(STEP_LABELS); - const visibleSteps = hasBankAccount - ? allSteps - : allSteps.filter(([key]) => key !== 'bank_account'); + const visibleSteps = allSteps.filter(([key]) => { + if (key === 'bank_account') return hasBankAccount; + if (key === 'federal_taxes') return isUSA; + if (key === 'state_taxes') return isUSA && !!jurisdiction; + return true; + }); const lastStepKey = visibleSteps[visibleSteps.length - 1][0]; if (done) { @@ -108,7 +190,8 @@ function EmployeeFlowInner({ return (
@@ -225,7 +313,7 @@ function EmployeeFlowInner({ } onSuccess={() => { clearErrors(); - setDone(true); + if (isLastStep) setDone(true); }} /> @@ -237,11 +325,106 @@ function EmployeeFlowInner({ className='submit-button' onClick={clearErrors} > - Submit + {isLastStep ? 'Submit' : 'Save & Continue'}
)} + + {currentStep === 'federal_taxes' && ( + <> + {federalAvail.isAvailable ? ( + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={() => { + clearErrors(); + if (isLastStep) setDone(true); + }} + /> + ) : ( + + )} + +
+ + Previous Step + + {federalAvail.isAvailable ? ( + + {isLastStep ? 'Submit' : 'Save & Continue'} + + ) : ( + + )} +
+ + )} + + {currentStep === 'state_taxes' && ( + <> + {stateAvail.isAvailable ? ( + + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ) + } + onSuccess={() => { + clearErrors(); + setDone(true); + }} + /> + ) : ( + + )} + +
+ + Previous Step + + {stateAvail.isAvailable ? ( + + Submit + + ) : ( + + )} +
+ + )} ); @@ -253,13 +436,28 @@ function EmployeeFlowInner({ // ── Step info loader (company manager context) then hands off to employee ctx ─ function EmployeeFlowForm({ employmentId }: { employmentId: string }) { - const { hasBankAccount, isLoading } = useEmployeeStepInfo(employmentId); + const { hasBankAccount, countryCode, jurisdiction, isLoading } = + useEmployeeFlowContext(employmentId); const employeeAuth = useMemo( () => buildEmployeeAuth(employmentId), [employmentId], ); if (isLoading) return

Loading...

; + if (!countryCode) { + return ( +
+

+ Could not determine country for employment{' '} + {employmentId}. Check that the employment exists and your + company-manager token has access. +

+
+ ); + } return ( // Inner RemoteFlows uses the employee-scoped token for all mutations @@ -267,6 +465,8 @@ function EmployeeFlowForm({ employmentId }: { employmentId: string }) {
); @@ -290,7 +490,9 @@ function GPEmployeeOnboardingInner() {

Prerequisite: The admin must complete the GP Admin Onboarding flow and send the invitation first. The - employee endpoints only activate after the invitation is sent. + employee endpoints only activate after the invitation is sent. The + federal/state tax steps additionally require the employment to be{' '} + active.

diff --git a/src/client/index.ts b/src/client/index.ts index c0fb230db..f63caefe1 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -240,6 +240,7 @@ export { putV1EmployeeEmergencyContact, putV1EmployeeFederalTaxes, putV1EmployeePersonalDetails, + putV1EmployeeStateTaxes, putV1EmploymentsEmploymentIdBasicInformation, putV1EmploymentsEmploymentIdBenefitOffers, putV1EmploymentsEmploymentIdFederalTaxes, @@ -529,6 +530,7 @@ export type { EmploymentEngagementAgreementDetailsParams, EmploymentEngagementAgreementDetailsResponse, EmploymentFederalTaxesParams, + EmploymentStateTaxesParams, EmploymentFullParams, EmploymentId, EmploymentImage, @@ -1878,6 +1880,11 @@ export type { PutV1EmployeeFederalTaxesErrors, PutV1EmployeeFederalTaxesResponse, PutV1EmployeeFederalTaxesResponses, + PutV1EmployeeStateTaxesData, + PutV1EmployeeStateTaxesError, + PutV1EmployeeStateTaxesErrors, + PutV1EmployeeStateTaxesResponse, + PutV1EmployeeStateTaxesResponses, PutV1EmployeePersonalDetailsData, PutV1EmployeePersonalDetailsError, PutV1EmployeePersonalDetailsErrors, diff --git a/src/client/sdk.gen.ts b/src/client/sdk.gen.ts index aeb61d867..11b046688 100644 --- a/src/client/sdk.gen.ts +++ b/src/client/sdk.gen.ts @@ -753,6 +753,9 @@ import type { PutV1EmployeeFederalTaxesData, PutV1EmployeeFederalTaxesErrors, PutV1EmployeeFederalTaxesResponses, + PutV1EmployeeStateTaxesData, + PutV1EmployeeStateTaxesErrors, + PutV1EmployeeStateTaxesResponses, PutV1EmployeePersonalDetailsData, PutV1EmployeePersonalDetailsErrors, PutV1EmployeePersonalDetailsResponses, @@ -1012,6 +1015,7 @@ export const putV1EmployeeFederalTaxes = ( PutV1EmployeeFederalTaxesErrors, ThrowOnError >({ + security: [{ scheme: 'bearer', type: 'http' }], url: '/v1/employee/federal-taxes', ...options, headers: { @@ -1020,6 +1024,35 @@ export const putV1EmployeeFederalTaxes = ( }, }); +/** + * Submit employee state taxes + * + * Submits the authenticated employee's US state tax details for a single + * jurisdiction (state). Available for US Global Payroll employees once they + * reach the post-enrollment state. Calls made before then return a 404. + * + * This endpoint requires country- and jurisdiction-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with + * `global_payroll_state_taxes` as the form name to discover the schema for a given + * country and jurisdiction. + */ +export const putV1EmployeeStateTaxes = ( + options: Options, +) => + (options.client ?? client).put< + PutV1EmployeeStateTaxesResponses, + PutV1EmployeeStateTaxesErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/state-taxes/{jurisdiction}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + /** * List contractor subscriptions * diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts index 89cf32374..a9df7ba6f 100644 --- a/src/client/types.gen.ts +++ b/src/client/types.gen.ts @@ -10396,6 +10396,23 @@ export type EmploymentFederalTaxesParams = { }; }; +/** + * EmploymentStateTaxesParams + * + * State taxes schema compatible params, submitted one jurisdiction at a time. + */ +export type EmploymentStateTaxesParams = { + /** + * State taxes params for the jurisdiction in the path. As its properties vary depending + * on the country and jurisdiction, you must query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code + * and `global_payroll_state_taxes` as path parameters. + */ + state_taxes: { + [key: string]: unknown; + }; +}; + /** * BenefitTier * @@ -12709,6 +12726,61 @@ export type PutV1EmployeeFederalTaxesResponses = { export type PutV1EmployeeFederalTaxesResponse = PutV1EmployeeFederalTaxesResponses[keyof PutV1EmployeeFederalTaxesResponses]; +export type PutV1EmployeeStateTaxesData = { + /** + * Employee state taxes params for the given jurisdiction + */ + body?: EmploymentStateTaxesParams; + path: { + /** + * Jurisdiction code (e.g. US state abbreviation like 'CA', 'NY'). + */ + jurisdiction: string; + }; + query?: never; + url: '/v1/employee/state-taxes/{jurisdiction}'; +}; + +export type PutV1EmployeeStateTaxesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type PutV1EmployeeStateTaxesError = + PutV1EmployeeStateTaxesErrors[keyof PutV1EmployeeStateTaxesErrors]; + +export type PutV1EmployeeStateTaxesResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type PutV1EmployeeStateTaxesResponse = + PutV1EmployeeStateTaxesResponses[keyof PutV1EmployeeStateTaxesResponses]; + export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData = { body?: never; diff --git a/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx b/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx index 77fb7f505..8fdb3c697 100644 --- a/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx +++ b/src/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.tsx @@ -5,12 +5,15 @@ import type { PayrollEmployeeOnboardingFlowProps } from '@/src/flows/PayrollEmpl import { PersonalDetailsStep } from '@/src/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep'; import { HomeAddressStep } from '@/src/flows/PayrollEmployeeOnboarding/components/HomeAddressStep'; import { BankAccountStep } from '@/src/flows/PayrollEmployeeOnboarding/components/BankAccountStep'; +import { FederalTaxesStep } from '@/src/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep'; +import { StateTaxesStep } from '@/src/flows/PayrollEmployeeOnboarding/components/StateTaxesStep'; import { SubmitButton } from '@/src/flows/PayrollEmployeeOnboarding/components/SubmitButton'; import { BackButton } from '@/src/flows/PayrollEmployeeOnboarding/components/BackButton'; export const PayrollEmployeeOnboardingFlow = ({ employmentId, countryCode, + jurisdiction, initialValues, options, render, @@ -19,6 +22,7 @@ export const PayrollEmployeeOnboardingFlow = ({ const employeeBag = usePayrollEmployeeOnboarding({ employmentId, countryCode, + jurisdiction, initialValues, options, }); @@ -31,6 +35,8 @@ export const PayrollEmployeeOnboardingFlow = ({ PersonalDetailsStep, HomeAddressStep, BankAccountStep, + FederalTaxesStep, + StateTaxesStep, SubmitButton, BackButton, }, diff --git a/src/flows/PayrollEmployeeOnboarding/api.ts b/src/flows/PayrollEmployeeOnboarding/api.ts index 32866c3ee..bacf8d5bd 100644 --- a/src/flows/PayrollEmployeeOnboarding/api.ts +++ b/src/flows/PayrollEmployeeOnboarding/api.ts @@ -4,7 +4,9 @@ import { getV1CountriesCountryCodeForm, putV1EmployeeAddress, putV1EmployeeBankAccount, + putV1EmployeeFederalTaxes, putV1EmployeePersonalDetails, + putV1EmployeeStateTaxes, } from '@/src/client'; import { Client } from '@/src/client/client'; import { useClient } from '@/src/context'; @@ -17,7 +19,9 @@ import type { export type GPEmployeeSchemaType = | 'global_payroll_personal_details' | 'address_details' - | 'global_payroll_bank_account_details'; + | 'global_payroll_bank_account_details' + | 'global_payroll_federal_taxes' + | 'global_payroll_state_taxes'; export const useGPEmployeeFormSchema = ( countryCode: string | undefined, @@ -93,3 +97,34 @@ export const useGPUpdateBankAccount = () => { }), }); }; + +export const useGPUpdateFederalTaxes = () => { + const { client } = useClient(); + return useMutation({ + mutationFn: (federalTaxes: Record) => + putV1EmployeeFederalTaxes({ + client: client as Client, + headers: { Authorization: `` }, + body: { federal_taxes: federalTaxes }, + }), + }); +}; + +export const useGPUpdateStateTaxes = (jurisdiction: string | undefined) => { + const { client } = useClient(); + return useMutation({ + mutationFn: (stateTaxes: Record) => { + if (!jurisdiction) { + throw new Error( + 'A `jurisdiction` (US state code) is required to submit state taxes.', + ); + } + return putV1EmployeeStateTaxes({ + client: client as Client, + headers: { Authorization: `` }, + path: { jurisdiction }, + body: { state_taxes: stateTaxes }, + }); + }, + }); +}; diff --git a/src/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.tsx b/src/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.tsx new file mode 100644 index 000000000..8736979de --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.tsx @@ -0,0 +1,26 @@ +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { PayrollEmployeeForm } from '@/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm'; +import { useEmployeeStepSubmitHandler } from '@/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler'; +import type { GPStepCallbacks } from '@/src/flows/types'; + +/** + * Render only when `employeeBag.taxStepsAvailability.federal_taxes.isAvailable` + * is true. Returns null otherwise so the consumer can render their own + * not-available UI driven by `unavailableReason`. The step also flips itself + * to unavailable retroactively if the backend returns 404 on submit. + */ +export function FederalTaxesStep(props: GPStepCallbacks) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + const handleSubmit = useEmployeeStepSubmitHandler(props); + + if (!employeeBag.taxStepsAvailability.federal_taxes.isAvailable) return null; + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.tsx b/src/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.tsx new file mode 100644 index 000000000..8bd2cb532 --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.tsx @@ -0,0 +1,26 @@ +import { usePayrollEmployeeOnboardingContext } from '@/src/flows/PayrollEmployeeOnboarding/context'; +import { PayrollEmployeeForm } from '@/src/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm'; +import { useEmployeeStepSubmitHandler } from '@/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler'; +import type { GPStepCallbacks } from '@/src/flows/types'; + +/** + * Render only when `employeeBag.taxStepsAvailability.state_taxes.isAvailable` + * is true (USA + jurisdiction set + post-enrollment). Returns null otherwise. + * Submits to PUT /v1/employee/state-taxes/{jurisdiction} where jurisdiction + * comes from the flow's `jurisdiction` prop. + */ +export function StateTaxesStep(props: GPStepCallbacks) { + const { employeeBag } = usePayrollEmployeeOnboardingContext(); + const handleSubmit = useEmployeeStepSubmitHandler(props); + + if (!employeeBag.taxStepsAvailability.state_taxes.isAvailable) return null; + + return ( + + } + /> + ); +} diff --git a/src/flows/PayrollEmployeeOnboarding/hooks.tsx b/src/flows/PayrollEmployeeOnboarding/hooks.tsx index 8cfa9bdf1..b27cfee1e 100644 --- a/src/flows/PayrollEmployeeOnboarding/hooks.tsx +++ b/src/flows/PayrollEmployeeOnboarding/hooks.tsx @@ -3,15 +3,20 @@ import { FieldValues } from 'react-hook-form'; import { useGPOnboardingSteps } from '@/src/common/api/gpOnboarding'; import { useStepState } from '@/src/flows/useStepState'; import type { Step } from '@/src/flows/useStepState'; -import type { PayrollEmployeeOnboardingFlowProps } from '@/src/flows/PayrollEmployeeOnboarding/types'; +import type { + PayrollEmployeeOnboardingFlowProps, + TaxStepUnavailableReason, +} from '@/src/flows/PayrollEmployeeOnboarding/types'; import { useErrorReporting } from '@/src/components/error-handling/useErrorReporting'; -import { mutationToPromise } from '@/src/lib/mutations'; +import { isMutationError, mutationToPromise } from '@/src/lib/mutations'; import { parseJSFToValidate } from '@/src/components/form/utils'; import { useGPEmployeeFormSchema, - useGPUpdatePersonalDetails, - useGPUpdateHomeAddress, useGPUpdateBankAccount, + useGPUpdateFederalTaxes, + useGPUpdateHomeAddress, + useGPUpdatePersonalDetails, + useGPUpdateStateTaxes, } from '@/src/flows/PayrollEmployeeOnboarding/api'; import type { JSONSchemaFormResultWithFieldsets, @@ -21,7 +26,9 @@ import type { export type EmployeeStepKey = | 'personal_details' | 'home_address' - | 'bank_account'; + | 'bank_account' + | 'federal_taxes' + | 'state_taxes'; // Stable module-level jsfModify for personal_details — avoids recreating createHeadlessForm // on every render (select closure captures fieldValues from outer scope per render, so the @@ -38,22 +45,36 @@ const PERSONAL_DETAILS_JSF_MODIFY: JSFModify = { }, }; -// Steps are stable — bank_account visibility is not derived from loaded API data. -// Consumers check selfOnboardingSubsteps to decide whether to render BankAccountStep. +// Steps are stable. bank_account / federal_taxes / state_taxes are conditionally +// rendered by their components (BankAccountStep checks substeps; the tax steps check +// taxStepsAvailability) — consumers should decide which to render in their flow UI. const EMPLOYEE_STEPS: Record> = { personal_details: { index: 0, name: 'personal_details' }, home_address: { index: 1, name: 'home_address' }, bank_account: { index: 2, name: 'bank_account' }, + federal_taxes: { index: 3, name: 'federal_taxes' }, + state_taxes: { index: 4, name: 'state_taxes' }, }; +const TAX_STEPS = ['federal_taxes', 'state_taxes'] as const; +type TaxStepKey = (typeof TAX_STEPS)[number]; + export const usePayrollEmployeeOnboarding = ({ employmentId, countryCode, + jurisdiction, initialValues, options, }: Omit) => { const [fieldValues, setFieldValues] = useState({}); + // Per-step failures detected at submit time. Used to retroactively flip a + // tax step to `pending_enrollment` after the backend returns 404 with + // `Tax task not found...`. + const [taxSubmitFailures, setTaxSubmitFailures] = useState< + Partial> + >({}); + const { updateErrorContext } = useErrorReporting({ flow: 'payroll_employee_onboarding', }); @@ -70,6 +91,36 @@ export const usePayrollEmployeeOnboarding = ({ const currentStep = stepState.currentStep.name; + // ── API steps ─────────────────────────────────────────────────────────────── + + const { + data: apiSteps, + isLoading: isLoadingSteps, + refetch: refetchSteps, + } = useGPOnboardingSteps(employmentId); + + const selfOnboardingSubsteps = useMemo(() => { + const selfOnboarding = apiSteps?.find((s) => s.type === 'self_onboarding'); + return selfOnboarding?.sub_steps ?? []; + }, [apiSteps]); + + const isComplete = + apiSteps?.find((s) => s.type === 'completion')?.sub_steps?.[0]?.status === + 'completed'; + + // ── Tax-step availability ─────────────────────────────────────────────────── + // + // The federal_taxes and state_taxes endpoints only respond once Tiger creates + // the corresponding tax_task — which happens when the employment becomes + // `active`. We don't have a clean signal callable with the employee token + // (employments/:id returns 401, employee/current returns user+company only), + // so we use the `completion` step as the best upfront probe and, when even + // that is insufficient (e.g. step status is completed but employment lifecycle + // is `onboarded`), we fall back to retroactively flipping the step to + // `pending_enrollment` after the PUT returns 404. See `taxSubmitFailures`. + const isUSA = countryCode === 'USA'; + const isPostEnrollment = isComplete ?? false; + // ── Schema queries ────────────────────────────────────────────────────────── const personalDetailsSchema = useGPEmployeeFormSchema( @@ -94,28 +145,110 @@ export const usePayrollEmployeeOnboarding = ({ { enabled: currentStep === 'bank_account' }, ); + // The tax-step schema queries are gated only on country + active. We can't + // gate on `taxStepsAvailability` here because availability itself depends on + // the query outcome (schema_unavailable when 400/404), which would create a + // dependency cycle. The query just won't surface in the UI when the step + // isn't current — and a failed fetch flips availability to schema_unavailable + // via the dedicated effect below. + const federalTaxesSchema = useGPEmployeeFormSchema( + countryCode, + 'global_payroll_federal_taxes', + fieldValues, + { + enabled: isUSA && isPostEnrollment && currentStep === 'federal_taxes', + }, + ); + + const stateTaxesSchema = useGPEmployeeFormSchema( + countryCode, + 'global_payroll_state_taxes', + fieldValues, + { + enabled: + isUSA && + !!jurisdiction && + isPostEnrollment && + currentStep === 'state_taxes', + }, + ); + const currentSchema = useMemo(() => { if (currentStep === 'personal_details') return personalDetailsSchema.data; if (currentStep === 'home_address') return homeAddressSchema.data; if (currentStep === 'bank_account') return bankAccountSchema.data; + if (currentStep === 'federal_taxes') return federalTaxesSchema.data; + if (currentStep === 'state_taxes') return stateTaxesSchema.data; return undefined; }, [ currentStep, personalDetailsSchema.data, homeAddressSchema.data, bankAccountSchema.data, + federalTaxesSchema.data, + stateTaxesSchema.data, + ]); + + // Availability is computed AFTER schema queries so we can fold their error + // state (e.g. backend returns 400 for an unseeded schema) into a friendly + // `schema_unavailable` reason instead of letting the consumer render an + // empty form. + const taxStepsAvailability = useMemo(() => { + const federalReason: TaxStepUnavailableReason | null = !isUSA + ? 'unsupported_country' + : taxSubmitFailures.federal_taxes + ? taxSubmitFailures.federal_taxes + : !isPostEnrollment + ? 'pending_enrollment' + : federalTaxesSchema.isError + ? 'schema_unavailable' + : null; + + const stateReason: TaxStepUnavailableReason | null = !isUSA + ? 'unsupported_country' + : !jurisdiction + ? 'no_jurisdiction' + : taxSubmitFailures.state_taxes + ? taxSubmitFailures.state_taxes + : !isPostEnrollment + ? 'pending_enrollment' + : stateTaxesSchema.isError + ? 'schema_unavailable' + : null; + + return { + federal_taxes: { + isAvailable: federalReason === null, + unavailableReason: federalReason, + }, + state_taxes: { + isAvailable: stateReason === null, + unavailableReason: stateReason, + }, + }; + }, [ + isUSA, + isPostEnrollment, + jurisdiction, + taxSubmitFailures, + federalTaxesSchema.isError, + stateTaxesSchema.isError, ]); const isLoadingSchema = personalDetailsSchema.isLoading || homeAddressSchema.isLoading || - bankAccountSchema.isLoading; + bankAccountSchema.isLoading || + federalTaxesSchema.isLoading || + stateTaxesSchema.isLoading; // ── Mutations ─────────────────────────────────────────────────────────────── const updatePersonalDetailsMutation = useGPUpdatePersonalDetails(); const updateHomeAddressMutation = useGPUpdateHomeAddress(); const updateBankAccountMutation = useGPUpdateBankAccount(); + const updateFederalTaxesMutation = useGPUpdateFederalTaxes(); + const updateStateTaxesMutation = useGPUpdateStateTaxes(jurisdiction); const { mutateAsyncOrThrow: updatePersonalDetailsAsync } = mutationToPromise( updatePersonalDetailsMutation, @@ -126,28 +259,19 @@ export const usePayrollEmployeeOnboarding = ({ const { mutateAsyncOrThrow: updateBankAccountAsync } = mutationToPromise( updateBankAccountMutation, ); + const { mutateAsyncOrThrow: updateFederalTaxesAsync } = mutationToPromise( + updateFederalTaxesMutation, + ); + const { mutateAsyncOrThrow: updateStateTaxesAsync } = mutationToPromise( + updateStateTaxesMutation, + ); const isSubmitting = updatePersonalDetailsMutation.isPending || updateHomeAddressMutation.isPending || - updateBankAccountMutation.isPending; - - // ── API steps ─────────────────────────────────────────────────────────────── - - const { - data: apiSteps, - isLoading: isLoadingSteps, - refetch: refetchSteps, - } = useGPOnboardingSteps(employmentId); - - const selfOnboardingSubsteps = useMemo(() => { - const selfOnboarding = apiSteps?.find((s) => s.type === 'self_onboarding'); - return selfOnboarding?.sub_steps ?? []; - }, [apiSteps]); - - const isComplete = - apiSteps?.find((s) => s.type === 'completion')?.sub_steps?.[0]?.status === - 'completed'; + updateBankAccountMutation.isPending || + updateFederalTaxesMutation.isPending || + updateStateTaxesMutation.isPending; // ── Form helpers ──────────────────────────────────────────────────────────── @@ -174,6 +298,32 @@ export const usePayrollEmployeeOnboarding = ({ [currentSchema], ); + /** + * Tiger's tax endpoints return 404 with `{message: "Tax task not found..."}` + * when the employment hasn't reached post-enrollment. Convert that to a + * `pending_enrollment` availability flip so the consumer can render the + * not-available state instead of surfacing a raw error. + */ + const handleTaxSubmitError = useCallback( + (taxStep: TaxStepKey, error: unknown) => { + if (!isMutationError(error)) return; + const status = error.response?.status; + const message = + typeof error.rawError === 'object' && + error.rawError !== null && + 'message' in error.rawError + ? String((error.rawError as { message?: unknown }).message ?? '') + : ''; + if (status === 404 || /tax task not found/i.test(message)) { + setTaxSubmitFailures((prev) => ({ + ...prev, + [taxStep]: 'pending_enrollment' as TaxStepUnavailableReason, + })); + } + }, + [], + ); + const onSubmit = useCallback( async (values: FieldValues) => { const parsedValues = await parseFormValues(values); @@ -194,6 +344,26 @@ export const usePayrollEmployeeOnboarding = ({ await refetchSteps(); return data; } + case 'federal_taxes': { + try { + const data = await updateFederalTaxesAsync(parsedValues); + await refetchSteps(); + return data; + } catch (e) { + handleTaxSubmitError('federal_taxes', e); + throw e; + } + } + case 'state_taxes': { + try { + const data = await updateStateTaxesAsync(parsedValues); + await refetchSteps(); + return data; + } catch (e) { + handleTaxSubmitError('state_taxes', e); + throw e; + } + } default: return; } @@ -204,7 +374,10 @@ export const usePayrollEmployeeOnboarding = ({ updatePersonalDetailsAsync, updateHomeAddressAsync, updateBankAccountAsync, + updateFederalTaxesAsync, + updateStateTaxesAsync, refetchSteps, + handleTaxSubmitError, ], ); @@ -215,10 +388,12 @@ export const usePayrollEmployeeOnboarding = ({ isComplete: isComplete ?? false, employmentId, countryCode, + jurisdiction, initialValues, options, apiSteps, selfOnboardingSubsteps, + taxStepsAvailability, refetchSteps, fields: currentSchema?.fields ?? [], meta: (currentSchema?.meta ?? diff --git a/src/flows/PayrollEmployeeOnboarding/index.ts b/src/flows/PayrollEmployeeOnboarding/index.ts index 7b4715b72..4f140a07d 100644 --- a/src/flows/PayrollEmployeeOnboarding/index.ts +++ b/src/flows/PayrollEmployeeOnboarding/index.ts @@ -4,4 +4,5 @@ export type { PayrollEmployeeOnboardingFlowProps, PayrollEmployeeOnboardingRenderProps, GPEmployeeStepCallbacks, + TaxStepUnavailableReason, } from './types'; diff --git a/src/flows/PayrollEmployeeOnboarding/types.ts b/src/flows/PayrollEmployeeOnboarding/types.ts index 6c91f8d57..863ef5732 100644 --- a/src/flows/PayrollEmployeeOnboarding/types.ts +++ b/src/flows/PayrollEmployeeOnboarding/types.ts @@ -5,6 +5,25 @@ export type { GPStepCallbacks as GPEmployeeStepCallbacks }; type StepComponentType = React.ComponentType; +/** + * Reasons a tax step (federal or state) is unavailable to the employee right now. + * + * - `unsupported_country`: only USA employments expose the tax steps. + * - `pending_enrollment`: the employment is not yet `active`, so the + * corresponding tax_task does not exist on the backend yet (PUT returns 404 + * with `Tax task not found...`). + * - `no_jurisdiction`: a `jurisdiction` prop was not supplied to the flow, + * which is required for the state-taxes endpoint. + * - `schema_unavailable`: the backend doesn't expose the form schema for this + * step (e.g. `GET /v1/countries/USA/global_payroll_state_taxes` returns 400 + * or 404). Common on local/staging backends where a schema isn't seeded yet. + */ +export type TaxStepUnavailableReason = + | 'unsupported_country' + | 'pending_enrollment' + | 'no_jurisdiction' + | 'schema_unavailable'; + export type PayrollEmployeeOnboardingRenderProps = { employeeBag: ReturnType; components: { @@ -12,6 +31,16 @@ export type PayrollEmployeeOnboardingRenderProps = { HomeAddressStep: StepComponentType; /** Check employeeBag.selfOnboardingSubsteps for 'employee_provides_bank_details' before rendering. */ BankAccountStep: StepComponentType; + /** + * USA W-4 step. Returns null when `employeeBag.taxStepsAvailability.federal_taxes.isAvailable` + * is false — read the bag to render your own not-available UI. + */ + FederalTaxesStep: StepComponentType; + /** + * USA state-taxes step for a single jurisdiction (`PayrollEmployeeOnboardingFlowProps.jurisdiction`). + * Returns null when `employeeBag.taxStepsAvailability.state_taxes.isAvailable` is false. + */ + StateTaxesStep: StepComponentType; SubmitButton: React.ComponentType< React.ButtonHTMLAttributes & { children?: React.ReactNode; @@ -30,6 +59,11 @@ export type PayrollEmployeeOnboardingFlowProps = { employmentId: string; /** ISO 3166-1 alpha-3 country code of the employment (e.g. 'GBR'). Required for form schema fetching. */ countryCode: string; + /** + * Optional US state code (e.g. 'CA', 'NY'). Required for the state_taxes step + * to be rendered; omit it for non-USA employments or to skip state taxes entirely. + */ + jurisdiction?: string; /** Optional. Pre-populate form fields. */ initialValues?: Record; options?: Omit; diff --git a/src/index.tsx b/src/index.tsx index 8779d2223..0b4edf00f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -103,6 +103,8 @@ export { export type { PayrollEmployeeOnboardingFlowProps, PayrollEmployeeOnboardingRenderProps, + GPEmployeeStepCallbacks, + TaxStepUnavailableReason, } from '@/src/flows/PayrollEmployeeOnboarding'; export { From 9be675cfa83d049f98a77c9d7deee1c7718481b6 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Mon, 15 Jun 2026 13:48:20 +0200 Subject: [PATCH 06/14] test(gp): smoke tests for PayrollEmployeeOnboarding components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PEO components landed without unit tests in #1078/#1080, dropping branch coverage to 74.99% (threshold 75%) and failing CI on the parent PR. Add a single tests/components.test.tsx that covers every render-prop component and the submit handler with mocked context, exercising the key branches: - SubmitButton: forwards form id, disabled-on-isSubmitting, no-button throws - BackButton: goToPreviousStep + consumer onClick chain, no-button throws - PersonalDetailsStep / HomeAddressStep: pass step-keyed initialValues - BankAccountStep: returns null when bank substep not in selfOnboardingSubsteps - FederalTaxesStep / StateTaxesStep: returns null when taxStepsAvailability.*.isAvailable === false - useEmployeeStepSubmitHandler: success path advances, MutationError path routes through onError without advancing, non-MutationError falls back to plain shape Branches: 74.99% → 75.38%. PayrollEmployeeForm is stubbed since its react-hook-form wiring isn't what we're exercising here; behaviour-level tests for the form itself belong in a follow-up flow integration test. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../tests/components.test.tsx | 299 ++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx diff --git a/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx b/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx new file mode 100644 index 000000000..275c728e8 --- /dev/null +++ b/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx @@ -0,0 +1,299 @@ +import { fireEvent, render, screen } from '@testing-library/react'; +import { renderHook } from '@testing-library/react'; +import { BackButton } from '../components/BackButton'; +import { BankAccountStep } from '../components/BankAccountStep'; +import { FederalTaxesStep } from '../components/FederalTaxesStep'; +import { HomeAddressStep } from '../components/HomeAddressStep'; +import { PersonalDetailsStep } from '../components/PersonalDetailsStep'; +import { StateTaxesStep } from '../components/StateTaxesStep'; +import { SubmitButton } from '../components/SubmitButton'; +import { useEmployeeStepSubmitHandler } from '../components/useEmployeeStepSubmitHandler'; +import { usePayrollEmployeeOnboardingContext } from '../context'; +import { useFormFields } from '@/src/context'; +import { ButtonDefault } from '@/src/components/form/fields/default/ButtonDefault'; + +vi.mock('../context'); +vi.mock('@/src/context', async (importOriginal) => { + const actual = await importOriginal(); + return { ...actual, useFormFields: vi.fn() }; +}); +// Stub the form renderer — its real implementation pulls in react-hook-form +// resolvers we don't need to exercise here; the step components' branch +// behaviour is what we're after. +vi.mock('../components/PayrollEmployeeForm', () => ({ + PayrollEmployeeForm: (props: { defaultValues?: Record }) => ( +
+ ), +})); + +const mockUseCtx = vi.mocked(usePayrollEmployeeOnboardingContext); +const mockUseFormFields = vi.mocked(useFormFields); + +type Bag = ReturnType< + typeof usePayrollEmployeeOnboardingContext +>['employeeBag']; + +function buildBag(overrides: Partial = {}): Bag { + return { + isSubmitting: false, + selfOnboardingSubsteps: [], + initialValues: undefined, + goToPreviousStep: vi.fn(), + goToNextStep: vi.fn(), + onSubmit: vi.fn().mockResolvedValue({ data: 'ok' }), + taxStepsAvailability: { + federal_taxes: { isAvailable: true, unavailableReason: null }, + state_taxes: { isAvailable: true, unavailableReason: null }, + }, + ...overrides, + } as unknown as Bag; +} + +function mockContext(bag: Bag, formId = 'form-id') { + mockUseCtx.mockReturnValue({ formId, employeeBag: bag }); +} + +beforeEach(() => { + mockUseFormFields.mockReturnValue({ components: { button: ButtonDefault } }); +}); + +afterEach(() => { + vi.clearAllMocks(); +}); + +describe('SubmitButton', () => { + it('forwards form id and disables when bag.isSubmitting is true', () => { + mockContext(buildBag({ isSubmitting: true })); + render(Save); + const btn = screen.getByRole('button', { name: 'Save' }); + expect(btn).toBeDisabled(); + expect(btn).toHaveAttribute('form', 'form-id'); + }); + + it('respects explicit disabled prop when isSubmitting is false', () => { + mockContext(buildBag({ isSubmitting: false })); + render(Save); + expect(screen.getByRole('button')).toBeDisabled(); + }); + + it('throws when no button component is configured', () => { + mockContext(buildBag()); + mockUseFormFields.mockReturnValue({ + components: {} as ReturnType['components'], + }); + expect(() => render(Save)).toThrow( + /Button component not found/, + ); + }); +}); + +describe('BackButton', () => { + it('calls goToPreviousStep then the consumer onClick on click', () => { + const goToPreviousStep = vi.fn(); + const onClick = vi.fn(); + mockContext(buildBag({ goToPreviousStep })); + render(Back); + fireEvent.click(screen.getByRole('button', { name: 'Back' })); + expect(goToPreviousStep).toHaveBeenCalledTimes(1); + expect(onClick).toHaveBeenCalledTimes(1); + }); + + it('still calls goToPreviousStep when no onClick is supplied', () => { + const goToPreviousStep = vi.fn(); + mockContext(buildBag({ goToPreviousStep })); + render(Back); + fireEvent.click(screen.getByRole('button')); + expect(goToPreviousStep).toHaveBeenCalledTimes(1); + }); + + it('throws when no button component is configured', () => { + mockContext(buildBag()); + mockUseFormFields.mockReturnValue({ + components: {} as ReturnType['components'], + }); + expect(() => render(Back)).toThrow( + /Button component not found/, + ); + }); +}); + +describe('PersonalDetailsStep / HomeAddressStep', () => { + it('renders the form with personal_details initialValues', () => { + mockContext( + buildBag({ + initialValues: { personal_details: { given_name: 'A' } }, + }), + ); + render(); + expect(screen.getByTestId('payroll-employee-form')).toHaveAttribute( + 'data-default', + JSON.stringify({ given_name: 'A' }), + ); + }); + + it('renders the form with home_address initialValues', () => { + mockContext( + buildBag({ initialValues: { home_address: { city: 'Lagos' } } }), + ); + render(); + expect(screen.getByTestId('payroll-employee-form')).toHaveAttribute( + 'data-default', + JSON.stringify({ city: 'Lagos' }), + ); + }); +}); + +describe('BankAccountStep', () => { + it('returns null when bank substep is NOT required', () => { + mockContext(buildBag({ selfOnboardingSubsteps: [] })); + const { container } = render(); + expect(container).toBeEmptyDOMElement(); + }); + + it('renders the form when employee_provides_bank_details is in substeps', () => { + mockContext( + buildBag({ + selfOnboardingSubsteps: [ + { + id: 'employee_provides_bank_details', + type: 'employee_provides_bank_details', + label: 'Bank account', + status: 'not_started', + optional: false, + }, + ], + initialValues: { bank_account: { iban: 'XX' } }, + }), + ); + render(); + expect(screen.getByTestId('payroll-employee-form')).toHaveAttribute( + 'data-default', + JSON.stringify({ iban: 'XX' }), + ); + }); +}); + +describe('FederalTaxesStep / StateTaxesStep', () => { + it('FederalTaxesStep returns null when not available', () => { + mockContext( + buildBag({ + taxStepsAvailability: { + federal_taxes: { + isAvailable: false, + unavailableReason: 'pending_enrollment', + }, + state_taxes: { isAvailable: true, unavailableReason: null }, + }, + }), + ); + const { container } = render(); + expect(container).toBeEmptyDOMElement(); + }); + + it('FederalTaxesStep renders the form when available', () => { + mockContext( + buildBag({ + initialValues: { federal_taxes: { filing_status: 'single' } }, + }), + ); + render(); + expect(screen.getByTestId('payroll-employee-form')).toHaveAttribute( + 'data-default', + JSON.stringify({ filing_status: 'single' }), + ); + }); + + it('StateTaxesStep returns null when not available (e.g. no_jurisdiction)', () => { + mockContext( + buildBag({ + taxStepsAvailability: { + federal_taxes: { isAvailable: true, unavailableReason: null }, + state_taxes: { + isAvailable: false, + unavailableReason: 'no_jurisdiction', + }, + }, + }), + ); + const { container } = render(); + expect(container).toBeEmptyDOMElement(); + }); + + it('StateTaxesStep renders the form when available', () => { + mockContext( + buildBag({ + initialValues: { state_taxes: { filing_status: 'single' } }, + }), + ); + render(); + expect(screen.getByTestId('payroll-employee-form')).toHaveAttribute( + 'data-default', + JSON.stringify({ filing_status: 'single' }), + ); + }); +}); + +describe('useEmployeeStepSubmitHandler', () => { + it('calls onSubmit, bag.onSubmit, onSuccess, then advances', async () => { + const goToNextStep = vi.fn(); + const bagOnSubmit = vi.fn().mockResolvedValue({ id: '1' }); + mockContext(buildBag({ onSubmit: bagOnSubmit, goToNextStep })); + + const onSubmit = vi.fn(); + const onSuccess = vi.fn(); + const onError = vi.fn(); + const { result } = renderHook(() => + useEmployeeStepSubmitHandler({ onSubmit, onSuccess, onError }), + ); + await result.current({ a: 1 }); + expect(onSubmit).toHaveBeenCalledWith({ a: 1 }); + expect(bagOnSubmit).toHaveBeenCalledWith({ a: 1 }); + expect(onSuccess).toHaveBeenCalledWith({ id: '1' }); + expect(goToNextStep).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + }); + + it('routes mutation-shaped errors through onError without advancing', async () => { + const goToNextStep = vi.fn(); + const mutationErr = { + error: new Error('boom'), + rawError: { message: 'boom' }, + normalizedErrors: {}, + fieldErrors: [{ field: 'x', messages: ['bad'] }], + }; + const bagOnSubmit = vi.fn().mockRejectedValue(mutationErr); + mockContext(buildBag({ onSubmit: bagOnSubmit, goToNextStep })); + + const onError = vi.fn(); + const { result } = renderHook(() => + useEmployeeStepSubmitHandler({ onError }), + ); + await result.current({}); + expect(onError).toHaveBeenCalledWith({ + error: mutationErr.error, + rawError: mutationErr.rawError, + fieldErrors: mutationErr.fieldErrors, + }); + expect(goToNextStep).not.toHaveBeenCalled(); + }); + + it('falls back to plain-error shape when error is not a MutationError', async () => { + const plainErr = new Error('plain'); + const bagOnSubmit = vi.fn().mockRejectedValue(plainErr); + mockContext(buildBag({ onSubmit: bagOnSubmit })); + + const onError = vi.fn(); + const { result } = renderHook(() => + useEmployeeStepSubmitHandler({ onError }), + ); + await result.current({}); + expect(onError).toHaveBeenCalledWith({ + error: plainErr, + rawError: plainErr, + fieldErrors: [], + }); + }); +}); From a7786936a3629c339f9f211ea25976a6d42ca918 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Mon, 15 Jun 2026 14:32:21 +0200 Subject: [PATCH 07/14] fix(example): restore client_credentials for /countries* GET in proxy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #1078 changed the example app's proxy to route GET /v[12]/countries* to the user-token, which broke E2E tests in CI: the user token doesn't have access to the countries list, so the country dropdown never populates and selectOption('#country') times out. The original behaviour (pre-1078) used client_credentials for both GET /v[12]/countries$ and GET /v[12]/countries/:country_code/address_details since neither endpoint requires a user identity — they're public reference data. Restore that, leaving the schema endpoint GET /v[12]/countries/:country_code/:form on user-token where it belongs. Unblocks the CostCalculator E2E specs (add-estimation, annual-gross-salary, edit-estimation, hiring-budget) on the PR #1077 stack. Co-Authored-By: Claude Opus 4.7 (1M context) --- example/api/proxy.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/example/api/proxy.js b/example/api/proxy.js index 3cdf32b2f..820252e6d 100644 --- a/example/api/proxy.js +++ b/example/api/proxy.js @@ -16,10 +16,21 @@ function getTokenType(method, path) { // Extract pathname without query parameters const pathname = path.split('?')[0].toLowerCase(); - // GET /v1/countries or /v2/countries — user token works and is required when - // client_credentials isn't available (e.g. local dev without client secret) - if (normalizedMethod === 'GET' && /^\/v[12]\/countries/.test(pathname)) { - return 'user-token'; + // GET /v1/countries or /v2/countries — these don't require a user identity; + // use client_credentials so the call works in CI where no user token is + // available. Local dev without a client secret can opt into a user token + // by setting VITE_REMOTE_GATEWAY=... and ensuring VITE_CLIENT_TOKEN works. + if (normalizedMethod === 'GET' && /^\/v[12]\/countries$/.test(pathname)) { + return 'client-credentials'; + } + + // GET /v[12]/countries/{country_code}/address_details — public reference + // data; also use client credentials. + if ( + normalizedMethod === 'GET' && + /^\/v[12]\/countries\/[^/]+\/address_details$/.test(pathname) + ) { + return 'client-credentials'; } // GET /v1/company-currencies or /v2/company-currencies From 2d5b86fe25ee4deb92865a38ea0fede89245198c Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 12:32:51 +0200 Subject: [PATCH 08/14] fix(client): regenerate SDK from production gateway to restore auth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #1078 regenerated src/client/sdk.gen.ts against the local gateway OpenAPI spec, which is missing `security:` declarations on most endpoints. Hey-api's client gates auth injection on that field (src/client/client/client.gen.ts: `if (opts.security) { setAuthParams }`), so 234 SDK functions silently dropped their Bearer token — including getV1CostCalculatorCountries. The CostCalculator country dropdown never populated, timing out the four cost-calc E2E specs (add-estimation, annual-gross-salary, edit-estimation, hiring-budget). Regenerate from the production gateway (npm run openapi-ts), which restores security on every protected endpoint (263 declarations vs 20 on the broken branch). One naming ripple: production exposes the state-taxes mutation as putV1EmployeeStateTaxesJurisdiction (same URL, /v1/employee/state-taxes/{jurisdiction}); update the import + call in PayrollEmployeeOnboarding/api.ts to match. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/client/index.ts | 73 +- src/client/sdk.gen.ts | 9045 +++++++------ src/client/types.gen.ts | 13457 +++++++++---------- src/flows/PayrollEmployeeOnboarding/api.ts | 4 +- 4 files changed, 11733 insertions(+), 10846 deletions(-) diff --git a/src/client/index.ts b/src/client/index.ts index f63caefe1..631f92e02 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -39,6 +39,7 @@ export { getV1ContractorInvoiceSchedules, getV1ContractorInvoiceSchedulesId, getV1ContractorInvoicesId, + getV1ContractorsCorTerminationRequests, getV1ContractorsEmploymentsEmploymentIdContractDocumentsId, getV1ContractorsEmploymentsEmploymentIdContractorCurrencies, getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions, @@ -81,6 +82,8 @@ export { getV1EmploymentsEmploymentIdCompanyStructureNodes, getV1EmploymentsEmploymentIdContractDocuments, getV1EmploymentsEmploymentIdCustomFields, + getV1EmploymentsEmploymentIdEmploymentAgreementDownload, + getV1EmploymentsEmploymentIdEmploymentAgreementPreview, getV1EmploymentsEmploymentIdEngagementAgreementDetails, getV1EmploymentsEmploymentIdFiles, getV1EmploymentsEmploymentIdJob, @@ -100,6 +103,7 @@ export { getV1LeavePoliciesDetailsEmploymentId, getV1LeavePoliciesSummaryEmploymentId, getV1Offboardings, + getV1OffboardingsEmploymentsEmploymentId, getV1OffboardingsId, getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirements, getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId, @@ -135,6 +139,7 @@ export { getV1WebhookEvents, getV1WorkAuthorizationRequests, getV1WorkAuthorizationRequestsId, + getV2EmploymentsEmploymentIdBasicInformation, getV2EmploymentsEmploymentIdEngagementAgreementDetails, getV2Offboardings, getV2OffboardingsId, @@ -218,6 +223,7 @@ export { postV1SandboxBenefitRenewalRequests, postV1SandboxCompaniesCompanyIdBypassEligibilityChecks, postV1SandboxCompaniesCompanyIdLegalEntities, + postV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayroll, postV1SandboxEmployments, postV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove, postV1SandboxWebhookCallbacksTrigger, @@ -240,7 +246,7 @@ export { putV1EmployeeEmergencyContact, putV1EmployeeFederalTaxes, putV1EmployeePersonalDetails, - putV1EmployeeStateTaxes, + putV1EmployeeStateTaxesJurisdiction, putV1EmploymentsEmploymentIdBasicInformation, putV1EmploymentsEmploymentIdBenefitOffers, putV1EmploymentsEmploymentIdFederalTaxes, @@ -391,6 +397,7 @@ export type { ConvertCurrency, ConvertCurrencyParams, ConvertCurrencyResponse, + CorTerminationRequest, CorTerminationRequestCreatedResponse, CorTerminationRequestResponse, CostCalculatorBenefitParam, @@ -510,6 +517,7 @@ export type { Employment, EmploymentAddressDetailsParams, EmploymentAdministrativeDetailsParams, + EmploymentAgreementPreviewResponse, EmploymentBankAccountDetailsParams, EmploymentBasicInformationParams, EmploymentBasicResponse, @@ -530,7 +538,6 @@ export type { EmploymentEngagementAgreementDetailsParams, EmploymentEngagementAgreementDetailsResponse, EmploymentFederalTaxesParams, - EmploymentStateTaxesParams, EmploymentFullParams, EmploymentId, EmploymentImage, @@ -543,6 +550,7 @@ export type { EmploymentsBenefitOffersListBenefitOffers, EmploymentSeniorityDate, EmploymentShowResponse, + EmploymentStateTaxesParams, EmploymentStatus, EmploymentTermType, EmploymentUpdateParams, @@ -724,6 +732,11 @@ export type { GetV1ContractorInvoicesIdResponses, GetV1ContractorInvoicesResponse, GetV1ContractorInvoicesResponses, + GetV1ContractorsCorTerminationRequestsData, + GetV1ContractorsCorTerminationRequestsError, + GetV1ContractorsCorTerminationRequestsErrors, + GetV1ContractorsCorTerminationRequestsResponse, + GetV1ContractorsCorTerminationRequestsResponses, GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData, GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError, GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors, @@ -802,6 +815,11 @@ export type { GetV1EmployeeAddressErrors, GetV1EmployeeAddressResponse, GetV1EmployeeAddressResponses, + GetV1EmployeeBankAccountData, + GetV1EmployeeBankAccountError, + GetV1EmployeeBankAccountErrors, + GetV1EmployeeBankAccountResponse, + GetV1EmployeeBankAccountResponses, GetV1EmployeeCurrentData, GetV1EmployeeCurrentError, GetV1EmployeeCurrentErrors, @@ -847,11 +865,6 @@ export type { GetV1EmployeeLeavePoliciesSummaryErrors, GetV1EmployeeLeavePoliciesSummaryResponse, GetV1EmployeeLeavePoliciesSummaryResponses, - GetV1EmployeeBankAccountData, - GetV1EmployeeBankAccountError, - GetV1EmployeeBankAccountErrors, - GetV1EmployeeBankAccountResponse, - GetV1EmployeeBankAccountResponses, GetV1EmployeePayslipFilesData, GetV1EmployeePayslipFilesError, GetV1EmployeePayslipFilesErrors, @@ -924,6 +937,16 @@ export type { GetV1EmploymentsEmploymentIdCustomFieldsResponse, GetV1EmploymentsEmploymentIdCustomFieldsResponses, GetV1EmploymentsEmploymentIdData, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadError, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewError, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponse, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses, GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData, GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError, GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, @@ -1023,6 +1046,11 @@ export type { GetV1LeavePoliciesSummaryEmploymentIdResponse, GetV1LeavePoliciesSummaryEmploymentIdResponses, GetV1OffboardingsData, + GetV1OffboardingsEmploymentsEmploymentIdData, + GetV1OffboardingsEmploymentsEmploymentIdError, + GetV1OffboardingsEmploymentsEmploymentIdErrors, + GetV1OffboardingsEmploymentsEmploymentIdResponse, + GetV1OffboardingsEmploymentsEmploymentIdResponses, GetV1OffboardingsError, GetV1OffboardingsErrors, GetV1OffboardingsIdData, @@ -1200,6 +1228,11 @@ export type { GetV1WorkAuthorizationRequestsIdResponses, GetV1WorkAuthorizationRequestsResponse, GetV1WorkAuthorizationRequestsResponses, + GetV2EmploymentsEmploymentIdBasicInformationData, + GetV2EmploymentsEmploymentIdBasicInformationError, + GetV2EmploymentsEmploymentIdBasicInformationErrors, + GetV2EmploymentsEmploymentIdBasicInformationResponse, + GetV2EmploymentsEmploymentIdBasicInformationResponses, GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData, GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError, GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, @@ -1242,6 +1275,7 @@ export type { IncentiveResponse, IndexContractDocuments, IndexContractDocumentsResponse, + IndexCorTerminationRequestsResponse, IndexPreOnboardingDocumentRequirementsResponse, IntegrationsScimErrorResponse, IntegrationsScimGroup, @@ -1759,6 +1793,11 @@ export type { PostV1SandboxCompaniesCompanyIdLegalEntitiesData, PostV1SandboxCompaniesCompanyIdLegalEntitiesError, PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollData, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollError, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollErrors, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponse, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponses, PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse, PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses, PostV1SandboxEmploymentsData, @@ -1865,31 +1904,31 @@ export type { PutV1EmployeeAddressErrors, PutV1EmployeeAddressResponse, PutV1EmployeeAddressResponses, - PutV1EmployeeEmergencyContactData, - PutV1EmployeeEmergencyContactError, - PutV1EmployeeEmergencyContactErrors, - PutV1EmployeeEmergencyContactResponse, - PutV1EmployeeEmergencyContactResponses, PutV1EmployeeBankAccountData, PutV1EmployeeBankAccountError, PutV1EmployeeBankAccountErrors, PutV1EmployeeBankAccountResponse, PutV1EmployeeBankAccountResponses, + PutV1EmployeeEmergencyContactData, + PutV1EmployeeEmergencyContactError, + PutV1EmployeeEmergencyContactErrors, + PutV1EmployeeEmergencyContactResponse, + PutV1EmployeeEmergencyContactResponses, PutV1EmployeeFederalTaxesData, PutV1EmployeeFederalTaxesError, PutV1EmployeeFederalTaxesErrors, PutV1EmployeeFederalTaxesResponse, PutV1EmployeeFederalTaxesResponses, - PutV1EmployeeStateTaxesData, - PutV1EmployeeStateTaxesError, - PutV1EmployeeStateTaxesErrors, - PutV1EmployeeStateTaxesResponse, - PutV1EmployeeStateTaxesResponses, PutV1EmployeePersonalDetailsData, PutV1EmployeePersonalDetailsError, PutV1EmployeePersonalDetailsErrors, PutV1EmployeePersonalDetailsResponse, PutV1EmployeePersonalDetailsResponses, + PutV1EmployeeStateTaxesJurisdictionData, + PutV1EmployeeStateTaxesJurisdictionError, + PutV1EmployeeStateTaxesJurisdictionErrors, + PutV1EmployeeStateTaxesJurisdictionResponse, + PutV1EmployeeStateTaxesJurisdictionResponses, PutV1EmploymentsEmploymentIdBasicInformationData, PutV1EmploymentsEmploymentIdBasicInformationError, PutV1EmploymentsEmploymentIdBasicInformationErrors, diff --git a/src/client/sdk.gen.ts b/src/client/sdk.gen.ts index 11b046688..449c4e643 100644 --- a/src/client/sdk.gen.ts +++ b/src/client/sdk.gen.ts @@ -311,6 +311,9 @@ import type { GetV1LeavePoliciesSummaryEmploymentIdErrors, GetV1LeavePoliciesSummaryEmploymentIdResponses, GetV1OffboardingsData, + GetV1OffboardingsEmploymentsEmploymentIdData, + GetV1OffboardingsEmploymentsEmploymentIdErrors, + GetV1OffboardingsEmploymentsEmploymentIdResponses, GetV1OffboardingsErrors, GetV1OffboardingsIdData, GetV1OffboardingsIdErrors, @@ -408,24 +411,6 @@ import type { GetV1TravelLetterRequestsIdErrors, GetV1TravelLetterRequestsIdResponses, GetV1TravelLetterRequestsResponses, - GetV1WdGphPayDetailData, - GetV1WdGphPayDetailDataData, - GetV1WdGphPayDetailDataErrors, - GetV1WdGphPayDetailDataResponses, - GetV1WdGphPayDetailErrors, - GetV1WdGphPayDetailResponses, - GetV1WdGphPayProcessingFeatureData, - GetV1WdGphPayProcessingFeatureErrors, - GetV1WdGphPayProcessingFeatureResponses, - GetV1WdGphPayProgressData, - GetV1WdGphPayProgressErrors, - GetV1WdGphPayProgressResponses, - GetV1WdGphPaySummaryData, - GetV1WdGphPaySummaryErrors, - GetV1WdGphPaySummaryResponses, - GetV1WdGphPayVarianceData, - GetV1WdGphPayVarianceErrors, - GetV1WdGphPayVarianceResponses, GetV1WebhookEventsData, GetV1WebhookEventsErrors, GetV1WebhookEventsResponses, @@ -522,9 +507,6 @@ import type { PatchV2EmploymentsEmploymentIdData, PatchV2EmploymentsEmploymentIdErrors, PatchV2EmploymentsEmploymentIdResponses, - PostAuthOauth2Token2Data, - PostAuthOauth2Token2Errors, - PostAuthOauth2Token2Responses, PostAuthOauth2TokenData, PostAuthOauth2TokenErrors, PostAuthOauth2TokenResponses, @@ -686,6 +668,9 @@ import type { PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses, PostV1SandboxCompaniesCompanyIdLegalEntitiesData, PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollData, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollErrors, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponses, PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses, PostV1SandboxEmploymentsData, PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData, @@ -720,9 +705,6 @@ import type { PostV1TimeoffTimeoffIdDeclineData, PostV1TimeoffTimeoffIdDeclineErrors, PostV1TimeoffTimeoffIdDeclineResponses, - PostV1TimesheetsData, - PostV1TimesheetsErrors, - PostV1TimesheetsResponses, PostV1TimesheetsTimesheetIdApproveData, PostV1TimesheetsTimesheetIdApproveErrors, PostV1TimesheetsTimesheetIdApproveResponses, @@ -753,12 +735,12 @@ import type { PutV1EmployeeFederalTaxesData, PutV1EmployeeFederalTaxesErrors, PutV1EmployeeFederalTaxesResponses, - PutV1EmployeeStateTaxesData, - PutV1EmployeeStateTaxesErrors, - PutV1EmployeeStateTaxesResponses, PutV1EmployeePersonalDetailsData, PutV1EmployeePersonalDetailsErrors, PutV1EmployeePersonalDetailsResponses, + PutV1EmployeeStateTaxesJurisdictionData, + PutV1EmployeeStateTaxesJurisdictionErrors, + PutV1EmployeeStateTaxesJurisdictionResponses, PutV1EmploymentsEmploymentIdBasicInformationData, PutV1EmploymentsEmploymentIdBasicInformationErrors, PutV1EmploymentsEmploymentIdBasicInformationResponses, @@ -834,279 +816,318 @@ export type Options< }; /** - * Update administrative details - * - * Updates employment's administrative details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * List Offboarding * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Lists Offboarding requests. * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * ## Scopes * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + */ +export const getV1Offboardings = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1OffboardingsResponses, + GetV1OffboardingsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/offboardings', + ...options, + }); + +/** + * Create Offboarding * + * Creates an Offboarding request. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | - | Manage offboarding (`offboarding:write`) | * */ -export const putV2EmploymentsEmploymentIdAdministrativeDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV2EmploymentsEmploymentIdAdministrativeDetailsData, - ThrowOnError - >, +export const postV1Offboardings = ( + options?: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses, - PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors, + (options?.client ?? client).post< + PostV1OffboardingsResponses, + PostV1OffboardingsErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/administrative_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/offboardings', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Get engagement agreement details + * List Offboardings (v2) + * + * Lists offboardings for a company. * - * Returns the engagement agreement details for an employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const getV1EmploymentsEmploymentIdEngagementAgreementDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData, +export const getV2Offboardings = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV2OffboardingsResponses, + GetV2OffboardingsErrors, ThrowOnError - >, + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/offboardings', + ...options, + }); + +/** + * Show timesheet + * + * Shows a timesheet by its ID. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * + */ +export const getV1TimesheetsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + GetV1TimesheetsIdResponses, + GetV1TimesheetsIdErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/engagement-agreement-details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timesheets/{id}', ...options, }); /** - * Upsert engagement agreement details - * - * Creates or updates the engagement agreement details for an employment. + * Cancel onboarding * - * This endpoint requires country-specific data. The exact required fields will vary depending on - * which country the employment is in. To see the list of parameters for each country, see the - * **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * Cancel onboarding. * - * Please note that compliance requirements for each country are subject to change according to local laws. - * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended - * to avoid compliance issues and to have the latest version of a country's requirements. + * Requirements for the cancellation to succeed: * + * * Employment has to be in `invited`, `created`, `created_awaiting_reserve`, `created_reserve_paid`, `pre_hire` status + * * Employee must not have signed the employment contract * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | - | Manage onboarding (`onboarding:write`) | * */ -export const postV1EmploymentsEmploymentIdEngagementAgreementDetails = < +export const postV1CancelOnboardingEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).post< - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + PostV1CancelOnboardingEmploymentIdResponses, + PostV1CancelOnboardingEmploymentIdErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/engagement-agreement-details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/cancel-onboarding/{employment_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Convert currency using dynamic rates + * Show form schema + * + * Returns the json schema of the `contract_amendment` form for a specific employment. + * This endpoint requires a company access token, as forms are dependent on certain + * properties of companies and their current employments. * - * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const postV1CurrencyConverterEffective2 = < +export const getV1ContractAmendmentsSchema = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1CurrencyConverterEffective2Responses, - PostV1CurrencyConverterEffective2Errors, + (options.client ?? client).get< + GetV1ContractAmendmentsSchemaResponses, + GetV1ContractAmendmentsSchemaErrors, ThrowOnError >({ - url: '/v1/currency-converter', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contract-amendments/schema', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Submit employee federal taxes - * - * Submits the authenticated employee's US federal tax (W-4) details. - * - * Available for US Global Payroll employees once they reach the - * post-enrollment state. Calls made before then return a 404. - * - * This endpoint requires country-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_federal_taxes` - * as the form name to discover the schema for a given country. + * Bulk Create Pay Items * + * Bulk creates pay items for employments. Supports up to 500 items per request. + * Integration-specific fields (shift code, currency, pay amount, etc.) go in the `provider_data` object. + * Only Global Payroll employments are supported. Non-GP employments are returned as `employment_not_global_payroll`. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | + * | Manage payroll runs (`payroll`) | - | Manage pay items (`pay_item:write`) | * */ -export const putV1EmployeeFederalTaxes = ( - options?: Options, +export const postV1PayItemsBulk = ( + options: Options, ) => - (options?.client ?? client).put< - PutV1EmployeeFederalTaxesResponses, - PutV1EmployeeFederalTaxesErrors, + (options.client ?? client).post< + PostV1PayItemsBulkResponses, + PostV1PayItemsBulkErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/federal-taxes', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/pay-items/bulk', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Submit employee state taxes + * Show Offboarding (v2) + * + * Returns a single offboarding by its ID. + * * - * Submits the authenticated employee's US state tax details for a single - * jurisdiction (state). Available for US Global Payroll employees once they - * reach the post-enrollment state. Calls made before then return a 404. + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * - * This endpoint requires country- and jurisdiction-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with - * `global_payroll_state_taxes` as the form name to discover the schema for a given - * country and jurisdiction. */ -export const putV1EmployeeStateTaxes = ( - options: Options, +export const getV2OffboardingsId = ( + options: Options, ) => - (options.client ?? client).put< - PutV1EmployeeStateTaxesResponses, - PutV1EmployeeStateTaxesErrors, + (options.client ?? client).get< + GetV2OffboardingsIdResponses, + GetV2OffboardingsIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/state-taxes/{jurisdiction}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/offboardings/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List contractor subscriptions + * List pricing plans * - * Endpoint that can be used to list contractor subscriptions. + * List all pricing plans for a company. + * Currently the endpoint only returns the pricing plans for the EOR monthly product and the contractor products (Standard, Plus and COR). * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions = < +export const getV1CompaniesCompanyIdPricingPlans = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses, - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors, + GetV1CompaniesCompanyIdPricingPlansResponses, + GetV1CompaniesCompanyIdPricingPlansErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/pricing-plans', ...options, }); /** - * Convert currency using flat rates + * Create a pricing plan for a company + * + * Create a pricing plan for a company, in order to do that we have 2 ways: + * + * 1. Create a pricing plan from a partner template + * 2. Create a pricing plan from a product price + * + * The pricing plan is always created in the company's desired currency. * - * Convert currency using FX rates used in Remote’s estimation tools. - * These rates are not guaranteed to match final onboarding or contract rates. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | + * | Manage companies (`company_management`) | - | Manage pricing plans (`pricing_plan:write`) | * */ -export const postV1CurrencyConverterRaw = < +export const postV1CompaniesCompanyIdPricingPlans = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostV1CurrencyConverterRawResponses, - PostV1CurrencyConverterRawErrors, + PostV1CompaniesCompanyIdPricingPlansResponses, + PostV1CompaniesCompanyIdPricingPlansErrors, ThrowOnError >({ - url: '/v1/currency-converter/raw', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies/{company_id}/pricing-plans', ...options, headers: { 'Content-Type': 'application/json', @@ -1115,96 +1136,92 @@ export const postV1CurrencyConverterRaw = < }); /** - * List Incentives + * Show probation completion letter * - * Lists all Incentives of a company + * Show a single probation completion letter. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | * */ -export const getV1Incentives = ( - options: Options, +export const getV1ProbationCompletionLetterId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1IncentivesResponses, - GetV1IncentivesErrors, + GetV1ProbationCompletionLetterIdResponses, + GetV1ProbationCompletionLetterIdErrors, ThrowOnError - >({ url: '/v1/incentives', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/probation-completion-letter/{id}', + ...options, + }); /** - * Create Incentive - * - * Creates an Incentive. - * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * Show Contractor Invoice * + * Shows a single Contractor Invoice record. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postV1Incentives = ( - options: Options, +export const getV1ContractorInvoicesId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1IncentivesResponses, - PostV1IncentivesErrors, + (options.client ?? client).get< + GetV1ContractorInvoicesIdResponses, + GetV1ContractorInvoicesIdErrors, ThrowOnError >({ - url: '/v1/incentives', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoices/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List Benefit Offers By Employment - * - * List benefit offers by employment. + * Convert currency using flat rates * + * Convert currency using FX rates used in Remote’s estimation tools. + * These rates are not guaranteed to match final onboarding or contract rates. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | - * - */ -export const getV1BenefitOffers = ( - options: Options, -) => - (options.client ?? client).get< - GetV1BenefitOffersResponses, - GetV1BenefitOffersErrors, - ThrowOnError - >({ url: '/v1/benefit-offers', ...options }); - -/** - * Complete onboarding - * - * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | * - * @deprecated */ -export const postV1Ready = ( - options: Options, +export const postV1CurrencyConverterRaw = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1ReadyResponses, - PostV1ReadyErrors, + PostV1CurrencyConverterRawResponses, + PostV1CurrencyConverterRawErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/ready', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/currency-converter/raw', ...options, headers: { 'Content-Type': 'application/json', @@ -1213,31 +1230,42 @@ export const postV1Ready = ( }); /** - * Creates a cost estimation of employments + * Show contractor contract details + * + * Returns the contract details JSON Schema for contractors given a country + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * */ -export const postV1CostCalculatorEstimation = < +export const getV1CountriesCountryCodeContractorContractDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1CountriesCountryCodeContractorContractDetailsData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1CostCalculatorEstimationResponses, - PostV1CostCalculatorEstimationErrors, + (options.client ?? client).get< + GetV1CountriesCountryCodeContractorContractDetailsResponses, + GetV1CountriesCountryCodeContractorContractDetailsErrors, ThrowOnError >({ - url: '/v1/cost-calculator/estimation', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/countries/{country_code}/contractor-contract-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List Recurring Incentive - * - * List all Recurring Incentives of a company. + * List incentives for the authenticated employee * + * Returns all incentives for the authenticated employee. * * ## Scopes * @@ -1246,299 +1274,308 @@ export const postV1CostCalculatorEstimation = < * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getV1IncentivesRecurring = ( - options: Options, +export const getV1EmployeeIncentives = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1IncentivesRecurringResponses, - GetV1IncentivesRecurringErrors, + (options?.client ?? client).get< + GetV1EmployeeIncentivesResponses, + GetV1EmployeeIncentivesErrors, ThrowOnError - >({ url: '/v1/incentives/recurring', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/incentives', + ...options, + }); /** - * Create Recurring Incentive + * List employments * - * Create a Recurring Incentive, that is, a monthly paid incentive. + * Lists all employments, except for the deleted ones. * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * ## Scopes + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postV1IncentivesRecurring = ( - options: Options, +export const getV1Employments = ( + options: Options, ) => - (options.client ?? client).post< - PostV1IncentivesRecurringResponses, - PostV1IncentivesRecurringErrors, + (options.client ?? client).get< + GetV1EmploymentsResponses, + GetV1EmploymentsErrors, ThrowOnError >({ - url: '/v1/incentives/recurring', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employments', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List timesheets + * Create employment * - * Lists all timesheets. + * Creates an employment. We support creating employees and contractors. * - * ## Scopes + * ## Global Payroll Employees * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * To create a Global Payroll employee, pass `global_payroll_employee` as the `type` parameter, + * and provide the slug of the specific legal entity that the employee will be engaged by and billed to as the `engaged_by_entity_slug` parameter. + * + * ## HRIS Employees + * + * To create a HRIS employee, pass `hris` as the `type` parameter. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - */ -export const getV1Timesheets = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1TimesheetsResponses, - GetV1TimesheetsErrors, - ThrowOnError - >({ url: '/v1/timesheets', ...options }); - -/** - * Create timesheet * - * Creates a new timesheet. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1Timesheets = ( - options?: Options, +export const postV1Employments = ( + options: Options, ) => - (options?.client ?? client).post< - PostV1TimesheetsResponses, - PostV1TimesheetsErrors, + (options.client ?? client).post< + PostV1EmploymentsResponses, + PostV1EmploymentsErrors, ThrowOnError >({ - url: '/v1/timesheets', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Approve timesheet + * Get Onboarding Reserves Status for Employment + * + * Returns the onboarding reserves status for a specific employment. + * + * The status is the same as the credit risk status but takes the onboarding reserves policies into account. * - * Approves the given timesheet. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postV1TimesheetsTimesheetIdApprove = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).post< - PostV1TimesheetsTimesheetIdApproveResponses, - PostV1TimesheetsTimesheetIdApproveErrors, - ThrowOnError - >({ url: '/v1/timesheets/{timesheet_id}/approve', ...options }); +export const getV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus = + ( + options: Options< + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses, + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status', + ...options, + }); /** - * Show probation completion letter - * - * Show a single probation completion letter. + * Show employee bank account * - * ## Scopes + * Returns the authenticated employee's bank account details. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | + * This endpoint requires and returns country-specific data. The exact fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` + * as the form name to discover the schema for a given country. * - */ -export const getV1ProbationCompletionLetterId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1ProbationCompletionLetterIdResponses, - GetV1ProbationCompletionLetterIdErrors, - ThrowOnError - >({ url: '/v1/probation-completion-letter/{id}', ...options }); - -/** - * Show the current SSO Configuration * - * Shows the current SSO Configuration for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View SSO configuration (`sso_configuration:read`) | Manage SSO (`sso_configuration:write`) | + * | Manage employments (`employments`) | View bank accounts (`bank_account:read`) | Manage bank accounts (`bank_account:write`) | * */ -export const getV1SsoConfiguration = ( - options?: Options, +export const getV1EmployeeBankAccount = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1SsoConfigurationResponses, - GetV1SsoConfigurationErrors, + GetV1EmployeeBankAccountResponses, + GetV1EmployeeBankAccountErrors, ThrowOnError - >({ url: '/v1/sso-configuration', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/bank-account', + ...options, + }); /** - * Create the SSO Configuration + * Update employee bank account + * + * Upserts the authenticated employee's bank account details. + * + * This endpoint requires and returns country-specific data. The exact fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` + * as the form name to discover the schema for a given country. + * * - * Creates the SSO Configuration for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | + * | Manage employments (`employments`) | - | Manage bank accounts (`bank_account:write`) | * */ -export const postV1SsoConfiguration = ( - options: Options, +export const putV1EmployeeBankAccount = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1SsoConfigurationResponses, - PostV1SsoConfigurationErrors, + (options?.client ?? client).put< + PutV1EmployeeBankAccountResponses, + PutV1EmployeeBankAccountErrors, ThrowOnError >({ - url: '/v1/sso-configuration', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/bank-account', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * List Offboarding + * Get Help Center Article * - * Lists Offboarding requests. + * Get a help center article by its ID * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage company resources (`company_admin`) | View help articles (`help_center_article:read`) | - | * */ -export const getV1Offboardings = ( - options?: Options, +export const getV1HelpCenterArticlesId = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1OffboardingsResponses, - GetV1OffboardingsErrors, + (options.client ?? client).get< + GetV1HelpCenterArticlesIdResponses, + GetV1HelpCenterArticlesIdErrors, ThrowOnError - >({ url: '/v1/offboardings', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/help-center-articles/{id}', + ...options, + }); /** - * Create Offboarding - * - * Creates an Offboarding request. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage offboarding (`offboarding:write`) | + * Get user by ID via SCIM v2.0 * + * Retrieves a single user for the authenticated company by user ID */ -export const postV1Offboardings = ( - options?: Options, +export const getV1ScimV2UsersId = ( + options: Options, ) => - (options?.client ?? client).post< - PostV1OffboardingsResponses, - PostV1OffboardingsErrors, + (options.client ?? client).get< + GetV1ScimV2UsersIdResponses, + GetV1ScimV2UsersIdErrors, ThrowOnError >({ - url: '/v1/offboardings', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/scim/v2/Users/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Create a contract document for a contractor - * - * Create a contract document for a contractor. + * Get engagement agreement details * + * Returns the engagement agreement details for an employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdContractDocuments = < +export const getV2EmploymentsEmploymentIdEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData, + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses, - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors, + (options.client ?? client).get< + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/contract-documents', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/engagement-agreement-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update federal taxes - * - * Updates employment's federal taxes. - * - * Requirements to update federal taxes successfully: - * * Employment should be Global Payroll - * * Employment should be in the post-enrollment state - * * Employment should belong to USA - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Upsert engagement agreement details * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Creates or updates the engagement agreement details for an employment. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * This endpoint requires country-specific data. The exact required fields will vary depending on + * which country the employment is in. To see the list of parameters for each country, see the + * **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * Please note that compliance requirements for each country are subject to change according to local laws. + * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended + * to avoid compliance issues and to have the latest version of a country's requirements. * * * @@ -1549,17 +1586,24 @@ export const postV1ContractorsEmploymentsEmploymentIdContractDocuments = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV1EmploymentsEmploymentIdFederalTaxes = < +export const postV2EmploymentsEmploymentIdEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData, + ThrowOnError + >, ) => - (options.client ?? client).put< - PutV1EmploymentsEmploymentIdFederalTaxesResponses, - PutV1EmploymentsEmploymentIdFederalTaxesErrors, + (options.client ?? client).post< + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/federal-taxes', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/engagement-agreement-details', ...options, headers: { 'Content-Type': 'application/json', @@ -1568,59 +1612,76 @@ export const putV1EmploymentsEmploymentIdFederalTaxes = < }); /** - * List pricing plans - * - * List all pricing plans for a company. - * Currently the endpoint only returns the pricing plans for the EOR monthly product and the contractor products (Standard, Plus and COR). - * + * Download a document for the employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getV1CompaniesCompanyIdPricingPlans = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1EmployeeDocumentsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1CompaniesCompanyIdPricingPlansResponses, - GetV1CompaniesCompanyIdPricingPlansErrors, + GetV1EmployeeDocumentsIdResponses, + GetV1EmployeeDocumentsIdErrors, ThrowOnError - >({ url: '/v1/companies/{company_id}/pricing-plans', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/documents/{id}', + ...options, + }); /** - * Create a pricing plan for a company - * - * Create a pricing plan for a company, in order to do that we have 2 ways: - * - * 1. Create a pricing plan from a partner template - * 2. Create a pricing plan from a product price - * - * The pricing plan is always created in the company's desired currency. + * List Contractor Invoices * + * Lists Contractor Invoice records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage pricing plans (`pricing_plan:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postV1CompaniesCompanyIdPricingPlans = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1ContractorInvoices = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1ContractorInvoicesResponses, + GetV1ContractorInvoicesErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoices', + ...options, + }); + +/** + * Report SDK errors + * + * Receives error telemetry from the frontend SDK. + * Errors are logged to observability backend for monitoring and debugging. + * + */ +export const postV1SdkTelemetryErrors = ( + options: Options, ) => (options.client ?? client).post< - PostV1CompaniesCompanyIdPricingPlansResponses, - PostV1CompaniesCompanyIdPricingPlansErrors, + PostV1SdkTelemetryErrorsResponses, + PostV1SdkTelemetryErrorsErrors, ThrowOnError >({ - url: '/v1/companies/{company_id}/pricing-plans', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sdk/telemetry-errors', ...options, headers: { 'Content-Type': 'application/json', @@ -1629,123 +1690,132 @@ export const postV1CompaniesCompanyIdPricingPlans = < }); /** - * Show employee address - * - * Returns the authenticated employee's residential address. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. + * Show the SSO Configuration Details * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` - * as the form name to discover the schema for a given country. + * Shows the SSO Configuration details for the company. * - * - * - * ## Scopes + * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View addresses (`address:read`) | Manage addresses (`address:write`) | + * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | * */ -export const getV1EmployeeAddress = ( - options?: Options, +export const getV1SsoConfigurationDetails = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => (options?.client ?? client).get< - GetV1EmployeeAddressResponses, - GetV1EmployeeAddressErrors, + GetV1SsoConfigurationDetailsResponses, + GetV1SsoConfigurationDetailsErrors, ThrowOnError - >({ url: '/v1/employee/address', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sso-configuration/details', + ...options, + }); /** - * Update employee address - * - * Updates the authenticated employee's residential address. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. The token must be an employee-role token - * (typically obtained via the OAuth2 assertion grant with subject - * `urn:remote-api:employee:employment:`). - * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` - * as the form name to discover the schema for a given country. + * Creates a cost estimation of employments + */ +export const postV1CostCalculatorEstimation = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostV1CostCalculatorEstimationResponses, + PostV1CostCalculatorEstimationErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/cost-calculator/estimation', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Show form schema * + * Returns the json schema of the requested company form. + * Currently only supports the `address_details` form. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage addresses (`address:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const putV1EmployeeAddress = ( - options?: Options, +export const getV1CompaniesSchema = ( + options: Options, ) => - (options?.client ?? client).put< - PutV1EmployeeAddressResponses, - PutV1EmployeeAddressErrors, + (options.client ?? client).get< + GetV1CompaniesSchemaResponses, + GetV1CompaniesSchemaErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/address', + url: '/v1/companies/schema', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Update federal taxes - * - * Updates employment's federal taxes. - * - * Requirements to update federal taxes successfully: - * * Employment should be Global Payroll - * * Employment should be in the post-enrollment state - * * Employment should belong to USA - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. - * - * + * Get employment benefit offers * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const putV2EmploymentsEmploymentIdFederalTaxes = < +export const getV1EmploymentsEmploymentIdBenefitOffers = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, +) => + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdBenefitOffersResponses, + GetV1EmploymentsEmploymentIdBenefitOffersErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/benefit-offers', + ...options, + }); + +/** + * Upserts employment benefit offers + */ +export const putV1EmploymentsEmploymentIdBenefitOffers = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).put< - PutV2EmploymentsEmploymentIdFederalTaxesResponses, - PutV2EmploymentsEmploymentIdFederalTaxesErrors, + PutV1EmploymentsEmploymentIdBenefitOffersResponses, + PutV1EmploymentsEmploymentIdBenefitOffersErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/federal-taxes', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employments/{employment_id}/benefit-offers', ...options, headers: { 'Content-Type': 'application/json', @@ -1754,120 +1824,100 @@ export const putV2EmploymentsEmploymentIdFederalTaxes = < }); /** - * List travel letter requests - * - * List travel letter requests. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | + * Get Employment Profile * - */ -export const getV1TravelLetterRequests = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1TravelLetterRequestsResponses, - GetV1TravelLetterRequestsErrors, - ThrowOnError - >({ url: '/v1/travel-letter-requests', ...options }); - -/** - * Get engagement agreement details + * Gets necessary information to perform the identity verification of an employee. * - * Returns the engagement agreement details for an employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | View identity verification (`identity_verification:read`) | Manage identity verification (`identity_verification:write`) | * */ -export const getV2EmploymentsEmploymentIdEngagementAgreementDetails = < +export const getV1IdentityVerificationEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options< - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + GetV1IdentityVerificationEmploymentIdResponses, + GetV1IdentityVerificationEmploymentIdErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/engagement-agreement-details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/identity-verification/{employment_id}', ...options, }); /** - * Upsert engagement agreement details - * - * Creates or updates the engagement agreement details for an employment. - * - * This endpoint requires country-specific data. The exact required fields will vary depending on - * which country the employment is in. To see the list of parameters for each country, see the - * **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that compliance requirements for each country are subject to change according to local laws. - * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended - * to avoid compliance issues and to have the latest version of a country's requirements. + * List contractor subscriptions * + * Endpoint that can be used to list contractor subscriptions. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postV2EmploymentsEmploymentIdEngagementAgreementDetails = < +export const getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions = < ThrowOnError extends boolean = false, >( options: Options< - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData, + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses, - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors, + (options.client ?? client).get< + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses, + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/engagement-agreement-details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Payroll processing summary API resource + * List approved payslip files for the authenticated employee + * + * Returns a paginated list of payslip files belonging to the current employee. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | * - * API to retrieve summary data for processing pay groups */ -export const getV1WdGphPaySummary = ( - options?: Options, +export const getV1EmployeePayslips = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1WdGphPaySummaryResponses, - GetV1WdGphPaySummaryErrors, + GetV1EmployeePayslipsResponses, + GetV1EmployeePayslipsErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/wd/gph/paySummary', + url: '/v1/employee/payslips', ...options, }); /** - * Show employment job + * List contractor of record (COR) termination requests * - * Shows an employment job details. + * Lists Contractor of Record termination requests for your company, + * optionally filtered by employment and status. * * * ## Scopes @@ -1877,198 +1927,184 @@ export const getV1WdGphPaySummary = ( * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdJob = < +export const getV1ContractorsCorTerminationRequests = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdJobResponses, - GetV1EmploymentsEmploymentIdJobErrors, + (options?.client ?? client).get< + GetV1ContractorsCorTerminationRequestsResponses, + GetV1ContractorsCorTerminationRequestsErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/job', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/cor-termination-requests', + ...options, + }); /** - * Create bulk employment job + * List Webhook Events * - * Creates a job to bulk-create employments for multiple employees at once. Each employee payload must match the employment schema for the selected country. + * List all webhook events * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | * */ -export const postV1BulkEmploymentJobs = ( - options?: Options, +export const getV1WebhookEvents = ( + options?: Options, ) => - (options?.client ?? client).post< - PostV1BulkEmploymentJobsResponses, - PostV1BulkEmploymentJobsErrors, + (options?.client ?? client).get< + GetV1WebhookEventsResponses, + GetV1WebhookEventsErrors, ThrowOnError >({ - url: '/v1/bulk-employment-jobs', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/webhook-events', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * List Contract Amendment + * Pass KYB * - * List Contract Amendment requests. + * Pass KYB and credit risk for a company without the intervention of a Remote admin. * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const getV1ContractAmendments = ( - options: Options, -) => - (options.client ?? client).get< - GetV1ContractAmendmentsResponses, - GetV1ContractAmendmentsErrors, +export const postV1SandboxCompaniesCompanyIdBypassEligibilityChecks = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData, ThrowOnError - >({ url: '/v1/contract-amendments', ...options }); - -/** - * Create Contract Amendment - * - * Creates a Contract Amendment request. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. - * - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | - * - */ -export const postV1ContractAmendments = ( - options: Options, + >, ) => (options.client ?? client).post< - PostV1ContractAmendmentsResponses, - PostV1ContractAmendmentsErrors, + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses, + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors, ThrowOnError >({ - url: '/v1/contract-amendments', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Delete a Recurring Incentive - * - * Delete a Recurring Incentive, that is, a monthly paid incentive. - * - * Internally, Remote schedules upcoming incentives. As such, when you attempt to - * delete a recurring incentive, Remote will **ONLY** delete scheduled incentives - * with the `pending` status. + * Approve risk reserve proof of payment * - * Incentives payments that are already scheduled and cannot be deleted will be - * included in the response, in case you need to reference them. + * Approves a risk reserve proof of payment without the intervention of a Remote admin. * + * Triggers an `employment.cor_hiring.proof_of_payment_accepted` webhook event. * - * ## Scopes + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + */ +export const postV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove = + ( + options: Options< + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses, + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve', + ...options, + }); + +/** + * Get a mock JSON Schema * + * Get a mock JSON Schema for testing purposes */ -export const deleteV1IncentivesRecurringId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1TestSchema = ( + options?: Options, ) => - (options.client ?? client).delete< - DeleteV1IncentivesRecurringIdResponses, - DeleteV1IncentivesRecurringIdErrors, + (options?.client ?? client).get< + GetV1TestSchemaResponses, + unknown, ThrowOnError - >({ url: '/v1/incentives/recurring/{id}', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/test-schema', + ...options, + }); /** - * Show Benefit Renewal Request + * List all holidays of a country * - * Show Benefit Renewal Request details. + * List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | * */ -export const getV1BenefitRenewalRequestsBenefitRenewalRequestId = < +export const getV1CountriesCountryCodeHolidaysYear = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, + GetV1CountriesCountryCodeHolidaysYearResponses, + GetV1CountriesCountryCodeHolidaysYearErrors, ThrowOnError >({ - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/countries/{country_code}/holidays/{year}', ...options, }); /** - * Updates a Benefit Renewal Request Response + * Cancel Time Off * - * Updates a Benefit Renewal Request with the given response. + * Cancel a time off request that was already approved. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < +export const postV1TimeoffTimeoffIdCancel = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).post< - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, + PostV1TimeoffTimeoffIdCancelResponses, + PostV1TimeoffTimeoffIdCancelErrors, ThrowOnError >({ - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{timeoff_id}/cancel', ...options, headers: { 'Content-Type': 'application/json', @@ -2077,116 +2113,140 @@ export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < }); /** - * List all holidays of a country + * Show employment job + * + * Shows an employment job details. * - * List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1CountriesCountryCodeHolidaysYear = < +export const getV1EmploymentsEmploymentIdJob = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1CountriesCountryCodeHolidaysYearResponses, - GetV1CountriesCountryCodeHolidaysYearErrors, + GetV1EmploymentsEmploymentIdJobResponses, + GetV1EmploymentsEmploymentIdJobErrors, ThrowOnError - >({ url: '/v1/countries/{country_code}/holidays/{year}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/job', + ...options, + }); /** - * List custom field value for an employment + * List pricing plan partner templates + * + * List all pricing plan partner templates. * - * Returns a list of custom field values for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getV1EmploymentsEmploymentIdCustomFields = < +export const getV1PricingPlanPartnerTemplates = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdCustomFieldsResponses, - GetV1EmploymentsEmploymentIdCustomFieldsErrors, + (options?.client ?? client).get< + GetV1PricingPlanPartnerTemplatesResponses, + GetV1PricingPlanPartnerTemplatesErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/custom-fields', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/pricing-plan-partner-templates', + ...options, + }); /** - * Show timesheet + * List EOR Payroll Calendar * - * Shows a timesheet by its ID. + * List all active payroll calendars for EOR. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | * */ -export const getV1TimesheetsId = ( - options: Options, +export const getV1PayrollCalendars = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1TimesheetsIdResponses, - GetV1TimesheetsIdErrors, + (options?.client ?? client).get< + GetV1PayrollCalendarsResponses, + GetV1PayrollCalendarsErrors, ThrowOnError - >({ url: '/v1/timesheets/{id}', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/payroll-calendars', + ...options, + }); /** - * List Company Managers - * - * List all company managers of an integration. If filtered by the company_id param, - * it lists only company managers belonging to the specified company. + * Update Time Off as Employee * + * Updates a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getV1CompanyManagers = ( - options: Options, +export const patchV1EmployeeTimeoffId2 = ( + options: Options, ) => - (options.client ?? client).get< - GetV1CompanyManagersResponses, - GetV1CompanyManagersErrors, + (options.client ?? client).patch< + PatchV1EmployeeTimeoffId2Responses, + PatchV1EmployeeTimeoffId2Errors, ThrowOnError - >({ url: '/v1/company-managers', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/timeoff/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Create and invite a Company Manager + * Update Time Off as Employee * - * Create a Company Manager and sends the invitation email for signing in to the Remote Platform. + * Updates a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1CompanyManagers = ( - options: Options, +export const patchV1EmployeeTimeoffId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1CompanyManagersResponses, - PostV1CompanyManagersErrors, + (options.client ?? client).put< + PatchV1EmployeeTimeoffIdResponses, + PatchV1EmployeeTimeoffIdErrors, ThrowOnError >({ - url: '/v1/company-managers', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/timeoff/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -2195,105 +2255,62 @@ export const postV1CompanyManagers = ( }); /** - * List Employee Leave Policies Summary + * List Recurring Incentive * - * List the leave policies summary (balances and entitlements) for the current employee - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | - * - */ -export const getV1EmployeeLeavePoliciesSummary = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetV1EmployeeLeavePoliciesSummaryResponses, - GetV1EmployeeLeavePoliciesSummaryErrors, - ThrowOnError - >({ url: '/v1/employee/leave-policies/summary', ...options }); - -/** - * Bulk Create Pay Items - * - * Bulk creates pay items for employments. Supports up to 500 items per request. - * Integration-specific fields (shift code, currency, pay amount, etc.) go in the `provider_data` object. - * Only Global Payroll employments are supported. Non-GP employments are returned as `employment_not_global_payroll`. + * List all Recurring Incentives of a company. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | - | Manage pay items (`pay_item:write`) | + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const postV1PayItemsBulk = ( - options: Options, +export const getV1IncentivesRecurring = ( + options: Options, ) => - (options.client ?? client).post< - PostV1PayItemsBulkResponses, - PostV1PayItemsBulkErrors, + (options.client ?? client).get< + GetV1IncentivesRecurringResponses, + GetV1IncentivesRecurringErrors, ThrowOnError >({ - url: '/v1/pay-items/bulk', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/recurring', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show travel letter request - * - * Show a single travel letter request. - * - * ## Scopes + * Create Recurring Incentive * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | + * Create a Recurring Incentive, that is, a monthly paid incentive. * - */ -export const getV1TravelLetterRequestsId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1TravelLetterRequestsIdResponses, - GetV1TravelLetterRequestsIdErrors, - ThrowOnError - >({ url: '/v1/travel-letter-requests/{id}', ...options }); - -/** - * Updates a travel letter request + * Incentives use the currency of the employment specified provided in the `employment_id` field. * - * Updates a travel letter request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const patchV1TravelLetterRequestsId2 = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1IncentivesRecurring = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1TravelLetterRequestsId2Responses, - PatchV1TravelLetterRequestsId2Errors, + (options.client ?? client).post< + PostV1IncentivesRecurringResponses, + PostV1IncentivesRecurringErrors, ThrowOnError >({ - url: '/v1/travel-letter-requests/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/recurring', ...options, headers: { 'Content-Type': 'application/json', @@ -2302,28 +2319,27 @@ export const patchV1TravelLetterRequestsId2 = < }); /** - * Updates a travel letter request - * - * Updates a travel letter request - * - * ## Scopes + * Creates a Benefit Renewal Request * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | + * Creates a Benefit Renewal Request for a specific Benefit Group. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const patchV1TravelLetterRequestsId = < +export const postV1SandboxBenefitRenewalRequests = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchV1TravelLetterRequestsIdResponses, - PatchV1TravelLetterRequestsIdErrors, + (options.client ?? client).post< + PostV1SandboxBenefitRenewalRequestsResponses, + PostV1SandboxBenefitRenewalRequestsErrors, ThrowOnError >({ - url: '/v1/travel-letter-requests/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/benefit-renewal-requests', ...options, headers: { 'Content-Type': 'application/json', @@ -2332,143 +2348,182 @@ export const patchV1TravelLetterRequestsId = < }); /** - * Pass KYB + * Return a base64 encoded version of the contract document * - * Pass KYB and credit risk for a company without the intervention of a Remote admin. + * ## Scopes * - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const postV1SandboxCompaniesCompanyIdBypassEligibilityChecks = < +export const getV1ContractorsEmploymentsEmploymentIdContractDocumentsId = < ThrowOnError extends boolean = false, >( options: Options< - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData, + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses, - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors, + (options.client ?? client).get< + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses, + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors, ThrowOnError >({ - url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}', ...options, }); /** - * List Employee Leave Policies + * List contract documents for an employment * - * List the leave policies for the current employee + * Only contractor employment types are supported. Lists contract documents for a specific employment with pagination, filtering by status, and sorted by updated_at descending (latest first). * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getV1EmployeeLeavePolicies = < +export const getV1EmploymentsEmploymentIdContractDocuments = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + GetV1EmploymentsEmploymentIdContractDocumentsData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeeLeavePoliciesResponses, - GetV1EmployeeLeavePoliciesErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdContractDocumentsResponses, + GetV1EmploymentsEmploymentIdContractDocumentsErrors, ThrowOnError - >({ url: '/v1/employee/leave-policies', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/contract-documents', + ...options, + }); /** - * List Webhook Callbacks + * List expenses * - * List callbacks for a given company + * Lists all expenses records * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1CompaniesCompanyIdWebhookCallbacks = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1Expenses = ( + options: Options, ) => (options.client ?? client).get< - GetV1CompaniesCompanyIdWebhookCallbacksResponses, - GetV1CompaniesCompanyIdWebhookCallbacksErrors, + GetV1ExpensesResponses, + GetV1ExpensesErrors, ThrowOnError - >({ url: '/v1/companies/{company_id}/webhook-callbacks', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses', + ...options, + }); /** - * Download a billing document PDF + * Create expense * - * Downloads a billing document PDF + * Creates an **approved** expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * */ -export const getV1BillingDocumentsBillingDocumentIdPdf = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1Expenses = ( + options: Options, ) => - (options.client ?? client).get< - GetV1BillingDocumentsBillingDocumentIdPdfResponses, - GetV1BillingDocumentsBillingDocumentIdPdfErrors, + (options.client ?? client).post< + PostV1ExpensesResponses, + PostV1ExpensesErrors, ThrowOnError - >({ url: '/v1/billing-documents/{billing_document_id}/pdf', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Delete a Webhook Callback + * Show the current SSO Configuration * - * Delete a callback previously registered for webhooks + * Shows the current SSO Configuration for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage company resources (`company_admin`) | View SSO configuration (`sso_configuration:read`) | Manage SSO (`sso_configuration:write`) | * */ -export const deleteV1WebhookCallbacksId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1SsoConfiguration = ( + options?: Options, ) => - (options.client ?? client).delete< - DeleteV1WebhookCallbacksIdResponses, - DeleteV1WebhookCallbacksIdErrors, + (options?.client ?? client).get< + GetV1SsoConfigurationResponses, + GetV1SsoConfigurationErrors, ThrowOnError - >({ url: '/v1/webhook-callbacks/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sso-configuration', + ...options, + }); /** - * Update a Webhook Callback + * Create the SSO Configuration * - * Update a callback previously registered for webhooks + * Creates the SSO Configuration for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | * */ -export const patchV1WebhookCallbacksId = ( - options: Options, +export const postV1SsoConfiguration = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1WebhookCallbacksIdResponses, - PatchV1WebhookCallbacksIdErrors, + (options.client ?? client).post< + PostV1SsoConfigurationResponses, + PostV1SsoConfigurationErrors, ThrowOnError >({ - url: '/v1/webhook-callbacks/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sso-configuration', ...options, headers: { 'Content-Type': 'application/json', @@ -2477,84 +2532,42 @@ export const patchV1WebhookCallbacksId = ( }); /** - * List countries + * Create a contractor timesheet * - * Returns a list of all countries that are supported by Remote API alphabetically ordered. - * The supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema. - * The countries present in the list are the ones where creating a company is allowed. + * Creates a timesheet on behalf of a contractor employment. + * + * The submitted hours are immediately available to the contractor in the Remote UI for + * self-serve invoice creation (Invoices → Create invoice → "Use Time Tracking"). + * + * This endpoint is restricted to contractor employments. Calls against EOR or Global Payroll + * employments are rejected with `422`. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const getV1Countries = ( - options: Options, -) => - (options.client ?? client).get< - GetV1CountriesResponses, - GetV1CountriesErrors, - ThrowOnError - >({ url: '/v1/countries', ...options }); - -/** - * Show contractor eligibility and COR-supported countries for legal entity - * - * Returns which contractor products (standard, plus, cor) the legal entity is eligible to use, - * and the list of country codes where COR is supported for this legal entity. - * COR-supported countries exclude sanctioned and signup-prevented countries and apply entity rules (same-country, local-to-local). - * When the legal entity is not COR-eligible, `cor_supported_country_codes` is an empty list. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | - * - */ -export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility = - ( - options: Options< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses, - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors, - ThrowOnError - >({ - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility', - ...options, - }); - -/** - * Convert currency using dynamic rates - * - * Convert currency using the rates Remote applies during employment creation and invoicing. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | - * - */ -export const postV1CurrencyConverterEffective = < +export const postV1ContractorsEmploymentsEmploymentIdTimesheets = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1ContractorsEmploymentsEmploymentIdTimesheetsData, + ThrowOnError + >, ) => (options.client ?? client).post< - PostV1CurrencyConverterEffectiveResponses, - PostV1CurrencyConverterEffectiveErrors, + PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses, + PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors, ThrowOnError >({ - url: '/v1/currency-converter/effective', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/timesheets', ...options, headers: { 'Content-Type': 'application/json', @@ -2563,147 +2576,123 @@ export const postV1CurrencyConverterEffective = < }); /** - * Show personal information for the authenticated employee - * - * Returns personal information for the authenticated employee. + * Approve Contract Amendment * - * ## Scopes + * Approves a contract amendment request without the intervention of a Remote admin. + * Approvals done via this endpoint are effective immediately, + * regardless of the effective date entered on the contract amendment creation. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const getV1EmployeePersonalInformation = < +export const putV1SandboxContractAmendmentsContractAmendmentRequestIdApprove = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeePersonalInformationResponses, - GetV1EmployeePersonalInformationErrors, + (options.client ?? client).put< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses, + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors, ThrowOnError - >({ url: '/v1/employee/personal-information', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve', + ...options, + }); /** - * Show form schema - * - * Returns the json schema of a supported form. Possible form names are: - * ``` - * - address_details - * - administrative_details - * - bank_account_details - * - employment_basic_information - * - contractor_basic_information - * - contractor_contract_details - * - billing_address_details - * - contract_details - * - emergency_contact - * - emergency_contact_details - * - employment_document_details - * - personal_details - * - pricing_plan_details - * - company_basic_information - * - global_payroll_administrative_details - * - global_payroll_bank_account_details - * - global_payroll_basic_information - * - global_payroll_contract_details - * - global_payroll_federal_taxes - * - global_payroll_personal_details - * - benefit_renewal_request - * - hris_personal_details - * - * ``` - * - * Most forms require a company access token, as they are dependent on certain - * properties of companies and their current employments. However, the `address_details` - * and `company_basic_information` forms can be accessed using client_credentials - * authentication (without a company). - * + * List Employee Leave Policies * + * List the leave policies for the current employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1CountriesCountryCodeForm = < +export const getV1EmployeeLeavePolicies = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeFormResponses, - GetV1CountriesCountryCodeFormErrors, + (options?.client ?? client).get< + GetV1EmployeeLeavePoliciesResponses, + GetV1EmployeeLeavePoliciesErrors, ThrowOnError - >({ url: '/v1/countries/{country_code}/{form}', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/leave-policies', + ...options, + }); /** - * List Offboardings (v2) + * List all currencies for the contractor * - * Lists offboardings for a company. + * The currencies are listed in the following order: + * 1. billing currency of the company + * 2. currencies of contractor’s existing withdrawal methods + * 3. currency of the contractor’s country + * 4. the rest, alphabetical. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV2Offboardings = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV2OffboardingsResponses, - GetV2OffboardingsErrors, +export const getV1ContractorsEmploymentsEmploymentIdContractorCurrencies = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData, ThrowOnError - >({ url: '/v2/offboardings', ...options }); - -/** - * List Time Off - * - * Lists all Time Off records. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | - * - */ -export const getV1Timeoff = ( - options: Options, + >, ) => (options.client ?? client).get< - GetV1TimeoffResponses, - GetV1TimeoffErrors, + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses, + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors, ThrowOnError - >({ url: '/v1/timeoff', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contractor-currencies', + ...options, + }); /** - * Create Time Off + * Replay Webhook Events * - * Creates a Time Off record + * Replay webhook events * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const postV1Timeoff = ( - options: Options, +export const postV1WebhookEventsReplay = ( + options: Options, ) => (options.client ?? client).post< - PostV1TimeoffResponses, - PostV1TimeoffErrors, + PostV1WebhookEventsReplayResponses, + PostV1WebhookEventsReplayErrors, ThrowOnError >({ - url: '/v1/timeoff', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/webhook-events/replay', ...options, headers: { 'Content-Type': 'application/json', @@ -2712,56 +2701,39 @@ export const postV1Timeoff = ( }); /** - * List countries for Cost Calculator - * - * Lists active and processing countries - */ -export const getV1CostCalculatorCountries = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetV1CostCalculatorCountriesResponses, - unknown, - ThrowOnError - >({ url: '/v1/cost-calculator/countries', ...options }); - -/** - * Submit risk reserve proof of payment - * - * Submits a proof of payment document for a risk reserve associated with an employment. + * Create a contractor of record (COR) termination request * - * Triggers an `employment.cor_hiring.proof_of_payment_submitted` webhook event. + * Initiates a termination request for a Contractor of Record employment. + * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. + * Currently, only Contractor of Record employments can be terminated. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1EmploymentsEmploymentIdRiskReserveProofOfPayments = < +export const postV1ContractorsEmploymentsEmploymentIdCorTerminationRequests = < ThrowOnError extends boolean = false, >( options: Options< - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses, - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors, ThrowOnError >({ - ...formDataBodySerializer, - url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests', ...options, - headers: { - 'Content-Type': null, - ...options.headers, - }, }); /** @@ -2789,166 +2761,101 @@ export const getV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckId = < GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors, ThrowOnError >({ + security: [{ scheme: 'bearer', type: 'http' }], url: '/v1/employments/{employment_id}/background-checks/{background_check_id}', ...options, }); /** - * Show Time Off Balance - * - * Shows the time off balance for the given employment_id. + * Show benefit renewal request schema * - * Deprecated since February 2025 in favour of **[List Leave Policies Summary](#tag/Leave-Policies/operation/get_index_leave_policies_summary)** endpoint. + * Returns the json schema of the `benefit_renewal_request` form for a specific request. + * This endpoint requires a company access token, as forms are dependent on certain + * properties of companies and their current employments. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | - * + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * - * @deprecated */ -export const getV1TimeoffBalancesEmploymentId = < +export const getV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1TimeoffBalancesEmploymentIdResponses, - GetV1TimeoffBalancesEmploymentIdErrors, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors, ThrowOnError - >({ url: '/v1/timeoff-balances/{employment_id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema', + ...options, + }); /** - * List expenses for the authenticated employee - * - * Returns a paginated list of expenses belonging to the current employee. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * Magic links generator * - */ -export const getV1EmployeeExpenses = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1EmployeeExpensesResponses, - GetV1EmployeeExpensesErrors, - ThrowOnError - >({ url: '/v1/employee/expenses', ...options }); - -/** - * Create an expense for the authenticated employee + * Generates a magic link for a passwordless authentication. + * To create a magic link for a company admin, you need to provide the `user_id` parameter. + * To create a magic link for an employee, you need to provide the `employment_id` parameter. * - * Creates a new expense record for the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage company resources (`company_admin`) | - | Create magic links (`magic_link:write`) | * */ -export const postV1EmployeeExpenses = ( - options?: Options, +export const postV1MagicLink = ( + options: Options, ) => - (options?.client ?? client).post< - PostV1EmployeeExpensesResponses, - PostV1EmployeeExpensesErrors, + (options.client ?? client).post< + PostV1MagicLinkResponses, + PostV1MagicLinkErrors, ThrowOnError >({ - url: '/v1/employee/expenses', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/magic-link', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Download a resignation letter - * - * Downloads a resignation letter from an employment request. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View resignation letters (`resignation_letter:read`) | - | - * - */ -export const getV1ResignationsOffboardingRequestIdResignationLetter = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1ResignationsOffboardingRequestIdResignationLetterData, - ThrowOnError - >, -) => - (options.client ?? client).get< - GetV1ResignationsOffboardingRequestIdResignationLetterResponses, - GetV1ResignationsOffboardingRequestIdResignationLetterErrors, - ThrowOnError - >({ - url: '/v1/resignations/{offboarding_request_id}/resignation-letter', - ...options, - }); - -/** - * Deletes a Company Manager user - * - * Deletes a Company Manager user + * Get basic information * - * ## Scopes + * Returns the employment's basic information. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - */ -export const deleteV1CompanyManagersUserId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).delete< - DeleteV1CompanyManagersUserIdResponses, - DeleteV1CompanyManagersUserIdErrors, - ThrowOnError - >({ url: '/v1/company-managers/{user_id}', ...options }); - -/** - * Show company manager user + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. * - * Shows a single company manager user + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * ## Scopes + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - */ -export const getV1CompanyManagersUserId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1CompanyManagersUserIdResponses, - GetV1CompanyManagersUserIdErrors, - ThrowOnError - >({ url: '/v1/company-managers/{user_id}', ...options }); - -/** - * Show onboarding steps for an employment * - * Returns onboarding steps and substeps in a hierarchical, ordered structure. * * ## Scopes * @@ -2957,30 +2864,37 @@ export const getV1CompanyManagersUserId = < * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdOnboardingSteps = < +export const getV2EmploymentsEmploymentIdBasicInformation = < ThrowOnError extends boolean = false, >( options: Options< - GetV1EmploymentsEmploymentIdOnboardingStepsData, + GetV2EmploymentsEmploymentIdBasicInformationData, ThrowOnError >, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdOnboardingStepsResponses, - GetV1EmploymentsEmploymentIdOnboardingStepsErrors, + GetV2EmploymentsEmploymentIdBasicInformationResponses, + GetV2EmploymentsEmploymentIdBasicInformationErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/onboarding-steps', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/basic_information', + ...options, + }); /** - * Automatable Contract Amendment + * Update basic information * - * Check if a contract amendment request is automatable. - * If the contract amendment request is automatable, then after submission, it will instantly amend the employee's contract - * and send them an updated document. + * Updates employment's basic information. + * + * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * * Please note that the compliance requirements for each country are subject to change according to local * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid @@ -3000,20 +2914,27 @@ export const getV1EmploymentsEmploymentIdOnboardingSteps = < * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1ContractAmendmentsAutomatable = < +export const putV2EmploymentsEmploymentIdBasicInformation = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PutV2EmploymentsEmploymentIdBasicInformationData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1ContractAmendmentsAutomatableResponses, - PostV1ContractAmendmentsAutomatableErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdBasicInformationResponses, + PutV2EmploymentsEmploymentIdBasicInformationErrors, ThrowOnError >({ - url: '/v1/contract-amendments/automatable', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/basic_information', ...options, headers: { 'Content-Type': 'application/json', @@ -3022,30 +2943,47 @@ export const postV1ContractAmendmentsAutomatable = < }); /** - * List Company Payroll Runs + * Delete a Recurring Incentive + * + * Delete a Recurring Incentive, that is, a monthly paid incentive. + * + * Internally, Remote schedules upcoming incentives. As such, when you attempt to + * delete a recurring incentive, Remote will **ONLY** delete scheduled incentives + * with the `pending` status. + * + * Incentives payments that are already scheduled and cannot be deleted will be + * included in the response, in case you need to reference them. * - * Lists all payroll runs for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getV1PayrollRuns = ( - options?: Options, +export const deleteV1IncentivesRecurringId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetV1PayrollRunsResponses, - GetV1PayrollRunsErrors, + (options.client ?? client).delete< + DeleteV1IncentivesRecurringIdResponses, + DeleteV1IncentivesRecurringIdErrors, ThrowOnError - >({ url: '/v1/payroll-runs', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/recurring/{id}', + ...options, + }); /** - * List incentives for the authenticated employee + * List Incentives * - * Returns all incentives for the authenticated employee. + * Lists all Incentives of a company * * ## Scopes * @@ -3054,38 +2992,50 @@ export const getV1PayrollRuns = ( * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getV1EmployeeIncentives = ( - options?: Options, +export const getV1Incentives = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeIncentivesResponses, - GetV1EmployeeIncentivesErrors, + (options.client ?? client).get< + GetV1IncentivesResponses, + GetV1IncentivesErrors, ThrowOnError - >({ url: '/v1/employee/incentives', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives', + ...options, + }); /** - * Update employment + * Create Incentive * - * Updates an employment. Use this endpoint to: - * - modify employment states for testing - * - Backdate employment start dates + * Creates an Incentive. * - * This endpoint will respond with a 404 outside of the Sandbox environment. + * Incentives use the currency of the employment specified provided in the `employment_id` field. * - * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const patchV1SandboxEmploymentsEmploymentId2 = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1Incentives = ( + options: Options, ) => - (options.client ?? client).patch< - PatchV1SandboxEmploymentsEmploymentId2Responses, - PatchV1SandboxEmploymentsEmploymentId2Errors, + (options.client ?? client).post< + PostV1IncentivesResponses, + PostV1IncentivesErrors, ThrowOnError >({ - url: '/v1/sandbox/employments/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives', ...options, headers: { 'Content-Type': 'application/json', @@ -3094,28 +3044,32 @@ export const patchV1SandboxEmploymentsEmploymentId2 = < }); /** - * Update employment + * Create probation completion letter * - * Updates an employment. Use this endpoint to: - * - modify employment states for testing - * - Backdate employment start dates + * Create a new probation completion letter request. * - * This endpoint will respond with a 404 outside of the Sandbox environment. + * ## Scopes * - * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | * */ -export const patchV1SandboxEmploymentsEmploymentId = < +export const postV1ProbationCompletionLetter = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchV1SandboxEmploymentsEmploymentIdResponses, - PatchV1SandboxEmploymentsEmploymentIdErrors, + (options.client ?? client).post< + PostV1ProbationCompletionLetterResponses, + PostV1ProbationCompletionLetterErrors, ThrowOnError >({ - url: '/v1/sandbox/employments/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/probation-completion-letter', ...options, headers: { 'Content-Type': 'application/json', @@ -3124,81 +3078,96 @@ export const patchV1SandboxEmploymentsEmploymentId = < }); /** - * Show benefit renewal request schema - * - * Returns the json schema of the `benefit_renewal_request` form for a specific request. - * This endpoint requires a company access token, as forms are dependent on certain - * properties of companies and their current employments. + * Show Contractor Invoice Schedule * + * Shows a single Contractor Invoice Schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema = < +export const getV1ContractorInvoiceSchedulesId = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses, - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors, + GetV1ContractorInvoiceSchedulesIdResponses, + GetV1ContractorInvoiceSchedulesIdErrors, ThrowOnError >({ - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoice-schedules/{id}', ...options, }); /** - * Update billing address details - * - * Updates employment's billing address details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Updates Contractor Invoice Schedule * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * Updates a contractor invoice schedule record * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ## Scopes * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * + */ +export const patchV1ContractorInvoiceSchedulesId2 = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).patch< + PatchV1ContractorInvoiceSchedulesId2Responses, + PatchV1ContractorInvoiceSchedulesId2Errors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoice-schedules/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Updates Contractor Invoice Schedule * + * Updates a contractor invoice schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const putV2EmploymentsEmploymentIdBillingAddressDetails = < +export const patchV1ContractorInvoiceSchedulesId = < ThrowOnError extends boolean = false, >( - options: Options< - PutV2EmploymentsEmploymentIdBillingAddressDetailsData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).put< - PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses, - PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors, + PatchV1ContractorInvoiceSchedulesIdResponses, + PatchV1ContractorInvoiceSchedulesIdErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/billing_address_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoice-schedules/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3207,78 +3176,158 @@ export const putV2EmploymentsEmploymentIdBillingAddressDetails = < }); /** - * Delete an Incentive - * - * Delete an incentive. + * List pre-onboarding document requirements for an employment * - * `one_time` incentives that have the following status **CANNOT** be deleted: - * * `processing` - * * `paid` + * Returns the list of pre-onboarding document requirements (e.g. master service agreements, + * individual labour agreements) that must be fulfilled before the given employment can be onboarded. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const deleteV1IncentivesId = ( - options: Options, -) => - (options.client ?? client).delete< - DeleteV1IncentivesIdResponses, - DeleteV1IncentivesIdErrors, - ThrowOnError - >({ url: '/v1/incentives/{id}', ...options }); +export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirements = + ( + options: Options< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements', + ...options, + }); /** - * Show Incentive + * Show Billing Document + * + * Shows a billing document details. + * + * Please contact api-support@remote.com to request access to this endpoint. * - * Show an Incentive's details * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1IncentivesId = ( - options: Options, +export const getV1BillingDocumentsBillingDocumentId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1IncentivesIdResponses, - GetV1IncentivesIdErrors, + GetV1BillingDocumentsBillingDocumentIdResponses, + GetV1BillingDocumentsBillingDocumentIdErrors, ThrowOnError - >({ url: '/v1/incentives/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/billing-documents/{billing_document_id}', + ...options, + }); /** - * Update Incentive + * Creates PDF cost estimation of employments * - * Updates an Incentive. + * Creates a PDF cost estimation of employments based on the provided parameters. + */ +export const postV1CostCalculatorEstimationPdf = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).post< + PostV1CostCalculatorEstimationPdfResponses, + PostV1CostCalculatorEstimationPdfErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/cost-calculator/estimation-pdf', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Show work authorization request * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * Show a single work authorization request. * - * The API doesn't support updating paid incentives. + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | + * + */ +export const getV1WorkAuthorizationRequestsId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1WorkAuthorizationRequestsIdResponses, + GetV1WorkAuthorizationRequestsIdErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/work-authorization-requests/{id}', + ...options, + }); + +/** + * Update work authorization request * + * Updates a work authorization request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | * */ -export const patchV1IncentivesId2 = ( - options: Options, +export const patchV1WorkAuthorizationRequestsId2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).patch< - PatchV1IncentivesId2Responses, - PatchV1IncentivesId2Errors, + PatchV1WorkAuthorizationRequestsId2Responses, + PatchV1WorkAuthorizationRequestsId2Errors, ThrowOnError >({ - url: '/v1/incentives/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/work-authorization-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3287,31 +3336,32 @@ export const patchV1IncentivesId2 = ( }); /** - * Update Incentive - * - * Updates an Incentive. - * - * Incentives use the currency of the employment specified provided in the `employment_id` field. - * - * The API doesn't support updating paid incentives. + * Update work authorization request * + * Updates a work authorization request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | * */ -export const patchV1IncentivesId = ( - options: Options, +export const patchV1WorkAuthorizationRequestsId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).put< - PatchV1IncentivesIdResponses, - PatchV1IncentivesIdErrors, + PatchV1WorkAuthorizationRequestsIdResponses, + PatchV1WorkAuthorizationRequestsIdErrors, ThrowOnError >({ - url: '/v1/incentives/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/work-authorization-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3320,71 +3370,41 @@ export const patchV1IncentivesId = ( }); /** - * Show Legal Entity Administrative details - * - * Show administrative details of legal entity for the authorized company specified in the request. + * List Employee Leave Policies Summary * + * List the leave policies summary (balances and entitlements) for the current employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = - ( - options: Options< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, - ThrowOnError - >({ - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', - ...options, - }); +export const getV1EmployeeLeavePoliciesSummary = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeLeavePoliciesSummaryResponses, + GetV1EmployeeLeavePoliciesSummaryErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/leave-policies/summary', + ...options, + }); /** - * Update Legal Entity Administrative details - * - * Update administrative details of legal entity for the authorized company specified in the request. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * Update federal taxes * - */ -export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = - ( - options: Options< - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, - ThrowOnError - >, - ) => - (options.client ?? client).put< - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, - ThrowOnError - >({ - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * Update bank account details + * Updates employment's federal taxes. * - * Updates employment's bank account details. + * Requirements to update federal taxes successfully: + * * Employment should be Global Payroll + * * Employment should be in the post-enrollment state + * * Employment should belong to USA * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -3400,7 +3420,7 @@ export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDeta * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * * * @@ -3411,20 +3431,21 @@ export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDeta * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdBankAccountDetails = < +export const putV2EmploymentsEmploymentIdFederalTaxes = < ThrowOnError extends boolean = false, >( - options: Options< - PutV2EmploymentsEmploymentIdBankAccountDetailsData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).put< - PutV2EmploymentsEmploymentIdBankAccountDetailsResponses, - PutV2EmploymentsEmploymentIdBankAccountDetailsErrors, + PutV2EmploymentsEmploymentIdFederalTaxesResponses, + PutV2EmploymentsEmploymentIdFederalTaxesErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/bank_account_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/federal-taxes', ...options, headers: { 'Content-Type': 'application/json', @@ -3433,259 +3454,354 @@ export const putV2EmploymentsEmploymentIdBankAccountDetails = < }); /** - * List Contractor Invoices + * Create Probation Extension * - * Lists Contractor Invoice records. + * Create a probation extension request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | * */ -export const getV1ContractorInvoices = ( - options?: Options, +export const postV1ProbationExtensions = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1ContractorInvoicesResponses, - GetV1ContractorInvoicesErrors, + (options.client ?? client).post< + PostV1ProbationExtensionsResponses, + PostV1ProbationExtensionsErrors, ThrowOnError - >({ url: '/v1/contractor-invoices', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/probation-extensions', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * List expense categories + * Update billing address details + * + * Updates employment's billing address details. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * - * Lists the effective hierarchy of expense categories. At least one of employment_id, expense_id, or country_code must be provided. - */ -export const getV1ExpensesCategories = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1ExpensesCategoriesResponses, - GetV1ExpensesCategoriesErrors, - ThrowOnError - >({ url: '/v1/expenses/categories', ...options }); - -/** - * List contract documents for an employment * - * Only contractor employment types are supported. Lists contract documents for a specific employment with pagination, filtering by status, and sorted by updated_at descending (latest first). * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdContractDocuments = < +export const putV2EmploymentsEmploymentIdBillingAddressDetails = < ThrowOnError extends boolean = false, >( options: Options< - GetV1EmploymentsEmploymentIdContractDocumentsData, + PutV2EmploymentsEmploymentIdBillingAddressDetailsData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdContractDocumentsResponses, - GetV1EmploymentsEmploymentIdContractDocumentsErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses, + PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/contract-documents', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/billing_address_details', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Show contractor contract details + * Update address details + * + * Updates employment's address details. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * * - * Returns the contract details JSON Schema for contractors given a country * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1CountriesCountryCodeContractorContractDetails = < +export const putV2EmploymentsEmploymentIdAddressDetails = < ThrowOnError extends boolean = false, >( options: Options< - GetV1CountriesCountryCodeContractorContractDetailsData, + PutV2EmploymentsEmploymentIdAddressDetailsData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeContractorContractDetailsResponses, - GetV1CountriesCountryCodeContractorContractDetailsErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdAddressDetailsResponses, + PutV2EmploymentsEmploymentIdAddressDetailsErrors, ThrowOnError >({ - url: '/v1/countries/{country_code}/contractor-contract-details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/address_details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Get user by ID via SCIM v2.0 + * Create risk reserve + * + * Create a new risk reserve + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | * - * Retrieves a single user for the authenticated company by user ID */ -export const getV1ScimV2UsersId = ( - options: Options, +export const postV1RiskReserve = ( + options: Options, ) => - (options.client ?? client).get< - GetV1ScimV2UsersIdResponses, - GetV1ScimV2UsersIdErrors, + (options.client ?? client).post< + PostV1RiskReserveResponses, + PostV1RiskReserveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Users/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/risk-reserve', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List employment files + * Submit risk reserve proof of payment * - * Lists files associated with a specific employment. + * Submits a proof of payment document for a risk reserve associated with an employment. * - * Supports filtering by file type and sub_type. + * Triggers an `employment.cor_hiring.proof_of_payment_submitted` webhook event. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | * */ -export const getV1EmploymentsEmploymentIdFiles = < +export const postV1EmploymentsEmploymentIdRiskReserveProofOfPayments = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdFilesResponses, - GetV1EmploymentsEmploymentIdFilesErrors, + (options.client ?? client).post< + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses, + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/files', ...options }); + >({ + ...formDataBodySerializer, + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments', + ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, + }); /** - * Manage contractor plus subscription + * Get Company Compliance Profile * - * Endpoint that can be used to upgrade, assign or downgrade a contractor's subscription. - * This can be used when company admins desire to assign someone to the Contractor Plus plan, - * but also to change the contractor's subscription between Plus and Standard. + * Returns the KYB and credit risk status for the company's default legal entity. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription = - ( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses, - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors, - ThrowOnError - >({ - url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); +export const getV1CompaniesCompanyIdComplianceProfile = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdComplianceProfileResponses, + GetV1CompaniesCompanyIdComplianceProfileErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/compliance-profile', + ...options, + }); /** - * Submit eligibility questionnaire - * - * Submits an eligibility questionnaire for a contractor employment. - * - * The questionnaire determines if the contractor is eligible for certain products or features. - * The responses are validated against the JSON schema for the questionnaire type. + * Show product prices in the company's desired currency * - * **Requirements:** - * - Employment must be of type `contractor` - * - Employment must be in `created` status - * - Responses must conform to the questionnaire JSON schema + * list product prices in the company's desired currency. + * the endpoint currently only returns the product prices for the EOR monthly product and the contractor products (Standard, Plus and COR). + * the product prices are then used to create a pricing plan for the company. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const postV1ContractorsEligibilityQuestionnaire = < +export const getV1CompaniesCompanyIdProductPrices = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1ContractorsEligibilityQuestionnaireResponses, - PostV1ContractorsEligibilityQuestionnaireErrors, + (options.client ?? client).get< + GetV1CompaniesCompanyIdProductPricesResponses, + GetV1CompaniesCompanyIdProductPricesErrors, ThrowOnError >({ - url: '/v1/contractors/eligibility-questionnaire', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies/{company_id}/product-prices', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update basic information + * Show a company * - * Updates employment's basic information. + * Given an ID, shows a company. * - * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. + * If the used access token was issued by the OAuth 2.0 Authorization Code flow, + * then only the associated company can be accessed through the endpoint. * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * ## Scopes * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + */ +export const getV1CompaniesCompanyId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdResponses, + GetV1CompaniesCompanyIdErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}', + ...options, + }); + +/** + * Update a company * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * Given an ID and a request object with new information, updates a company. + * + * ### Getting a company and its owner to `active` status + * If you created a company using the + * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required + * request body parameters, you can use this endpoint to provide the missing data. Once the company + * and its owner have all the necessary data, both their statuses will be set to `active` and the company + * onboarding will be marked as "completed". * + * The following constitutes a company with "all the necessary data": + * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the + * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters + * are required). + * * Company `tax_number` or `registration_number` is not nil + * * Company `name` is not nil (already required when creating the company) + * * Company has a `desired_currency` in their bank account (already required when creating the company) + * * Company has accepted terms of service (already required when creating the company) * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const putV1EmploymentsEmploymentIdBasicInformation = < +export const patchV1CompaniesCompanyId2 = < ThrowOnError extends boolean = false, >( - options: Options< - PutV1EmploymentsEmploymentIdBasicInformationData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).put< - PutV1EmploymentsEmploymentIdBasicInformationResponses, - PutV1EmploymentsEmploymentIdBasicInformationErrors, + (options.client ?? client).patch< + PatchV1CompaniesCompanyId2Responses, + PatchV1CompaniesCompanyId2Errors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/basic_information', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies/{company_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3694,58 +3810,44 @@ export const putV1EmploymentsEmploymentIdBasicInformation = < }); /** - * Show a contractor of record (COR) termination request + * Update a company * - * Retrieves a Contractor of Record termination request by ID. + * Given an ID and a request object with new information, updates a company. + * + * ### Getting a company and its owner to `active` status + * If you created a company using the + * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required + * request body parameters, you can use this endpoint to provide the missing data. Once the company + * and its owner have all the necessary data, both their statuses will be set to `active` and the company + * onboarding will be marked as "completed". + * + * The following constitutes a company with "all the necessary data": + * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the + * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters + * are required). + * * Company `tax_number` or `registration_number` is not nil + * * Company `name` is not nil (already required when creating the company) + * * Company has a `desired_currency` in their bank account (already required when creating the company) + * * Company has accepted terms of service (already required when creating the company) * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | - * - */ -export const getV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId = - ( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses, - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors, - ThrowOnError - >({ - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}', - ...options, - }); - -/** - * Create a legal entity - * - * Create a new legal entity for a company in a given country, with KYB automatically passed. - * - * The entity is created with active status and can be set as the company's default - * using the reassign default entity endpoint. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const postV1SandboxCompaniesCompanyIdLegalEntities = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1SandboxCompaniesCompanyIdLegalEntitiesData, - ThrowOnError - >, +export const patchV1CompaniesCompanyId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses, - PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors, + (options.client ?? client).put< + PatchV1CompaniesCompanyIdResponses, + PatchV1CompaniesCompanyIdErrors, ThrowOnError >({ - url: '/v1/sandbox/companies/{company_id}/legal-entities', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies/{company_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3754,12 +3856,16 @@ export const postV1SandboxCompaniesCompanyIdLegalEntities = < }); /** - * Show employee personal details + * Show employee address * - * Returns the authenticated employee's personal details. + * Returns the authenticated employee's residential address. * - * This endpoint requires country-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` + * The employment is derived from the access token's subject — there is no + * employment id in the path. + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` * as the form name to discover the schema for a given country. * * @@ -3768,28 +3874,35 @@ export const postV1SandboxCompaniesCompanyIdLegalEntities = < * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | + * | Manage employments (`employments`) | View addresses (`address:read`) | Manage addresses (`address:write`) | * */ -export const getV1EmployeePersonalDetails = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getV1EmployeeAddress = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1EmployeePersonalDetailsResponses, - GetV1EmployeePersonalDetailsErrors, + GetV1EmployeeAddressResponses, + GetV1EmployeeAddressErrors, ThrowOnError - >({ url: '/v1/employee/personal-details', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/address', + ...options, + }); /** - * Update employee personal details + * Update employee address * - * Updates the authenticated employee's personal details (date of birth, - * national ID, nationality, etc.). + * Updates the authenticated employee's residential address. * - * This endpoint requires country-specific data. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` + * The employment is derived from the access token's subject — there is no + * employment id in the path. The token must be an employee-role token + * (typically obtained via the OAuth2 assertion grant with subject + * `urn:remote-api:employee:employment:`). + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` * as the form name to discover the schema for a given country. * * @@ -3798,21 +3911,19 @@ export const getV1EmployeePersonalDetails = < * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | + * | Manage employments (`employments`) | - | Manage addresses (`address:write`) | * */ -export const putV1EmployeePersonalDetails = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => +export const putV1EmployeeAddress = ( + options?: Options, +) => (options?.client ?? client).put< - PutV1EmployeePersonalDetailsResponses, - PutV1EmployeePersonalDetailsErrors, + PutV1EmployeeAddressResponses, + PutV1EmployeeAddressErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/personal-details', + url: '/v1/employee/address', ...options, headers: { 'Content-Type': 'application/json', @@ -3821,93 +3932,166 @@ export const putV1EmployeePersonalDetails = < }); /** - * Payroll processing details data API resource + * Download a resignation letter + * + * Downloads a resignation letter from an employment request. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View resignation letters (`resignation_letter:read`) | - | * - * API to retrieve the run details of a pay group */ -export const getV1WdGphPayDetailData = ( - options: Options, +export const getV1ResignationsOffboardingRequestIdResignationLetter = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1ResignationsOffboardingRequestIdResignationLetterData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1WdGphPayDetailDataResponses, - GetV1WdGphPayDetailDataErrors, + GetV1ResignationsOffboardingRequestIdResignationLetterResponses, + GetV1ResignationsOffboardingRequestIdResignationLetterErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/wd/gph/payDetailData', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/resignations/{offboarding_request_id}/resignation-letter', ...options, }); /** - * Show region fields + * Update federal taxes + * + * Updates employment's federal taxes. + * + * Requirements to update federal taxes successfully: + * * Employment should be Global Payroll + * * Employment should be in the post-enrollment state + * * Employment should belong to USA + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * - * Returns required fields JSON Schema for a given region. These are required in order to calculate - * the cost of employment for the region. These fields are based on employer contributions that are associated - * with the region or any of it's parent regions. */ -export const getV1CostCalculatorRegionsSlugFields = < +export const putV1EmploymentsEmploymentIdFederalTaxes = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetV1CostCalculatorRegionsSlugFieldsResponses, - GetV1CostCalculatorRegionsSlugFieldsErrors, + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdFederalTaxesResponses, + PutV1EmploymentsEmploymentIdFederalTaxesErrors, ThrowOnError - >({ url: '/v1/cost-calculator/regions/{slug}/fields', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/federal-taxes', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Cancel onboarding - * - * Cancel onboarding. - * - * Requirements for the cancellation to succeed: - * - * * Employment has to be in `invited`, `created`, `created_awaiting_reserve`, `created_reserve_paid`, `pre_hire` status - * * Employee must not have signed the employment contract + * List Contract Amendment * + * List Contract Amendment requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage onboarding (`onboarding:write`) | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const postV1CancelOnboardingEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1ContractAmendments = ( + options: Options, ) => - (options.client ?? client).post< - PostV1CancelOnboardingEmploymentIdResponses, - PostV1CancelOnboardingEmploymentIdErrors, + (options.client ?? client).get< + GetV1ContractAmendmentsResponses, + GetV1ContractAmendmentsErrors, ThrowOnError - >({ url: '/v1/cancel-onboarding/{employment_id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contract-amendments', + ...options, + }); /** - * Cancel Time Off as Employee + * Create Contract Amendment + * + * Creates a Contract Amendment request. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * * - * Cancels a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | * */ -export const postV1EmployeeTimeoffIdCancel = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1ContractAmendments = ( + options: Options, ) => (options.client ?? client).post< - PostV1EmployeeTimeoffIdCancelResponses, - PostV1EmployeeTimeoffIdCancelErrors, + PostV1ContractAmendmentsResponses, + PostV1ContractAmendmentsErrors, ThrowOnError >({ - url: '/v1/employee/timeoff/{id}/cancel', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contract-amendments', ...options, headers: { 'Content-Type': 'application/json', @@ -3916,139 +4100,201 @@ export const postV1EmployeeTimeoffIdCancel = < }); /** - * Download a receipt + * Download the Employment Agreement for an employment * - * Downloads an expense receipt. + * Downloads a PDF of the auto-generated Employment Agreement for an employment. * - * Deprecated since late February 2024 in favour of **[Download a receipt by id](#tag/Expenses/operation/get_download_by_id_expense_receipt)** endpoint. + * The document is rendered as a draft (no signatures) and is not persisted. EA preview is only + * available for countries that have a published Employment Agreement automation template — see the + * `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | - * + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * - * @deprecated */ -export const getV1ExpensesExpenseIdReceipt = < +export const getV1EmploymentsEmploymentIdEmploymentAgreementDownload = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1ExpensesExpenseIdReceiptResponses, - GetV1ExpensesExpenseIdReceiptErrors, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors, ThrowOnError - >({ url: '/v1/expenses/{expense_id}/receipt', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/employment-agreement/download', + ...options, + }); /** - * List Benefit Offers + * Show Company Payroll Runs * - * List benefit offers for each country. + * Given an ID, shows a payroll run. + * `employee_details` field is deprecated in favour of the `employee_details` endpoint and will be removed in the future. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const getV1BenefitOffersCountrySummaries = < +export const getV1PayrollRunsPayrollRunId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1BenefitOffersCountrySummariesResponses, - GetV1BenefitOffersCountrySummariesErrors, + GetV1PayrollRunsPayrollRunIdResponses, + GetV1PayrollRunsPayrollRunIdErrors, ThrowOnError - >({ url: '/v1/benefit-offers/country-summaries', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payroll-runs/{payroll_run_id}', + ...options, + }); /** - * List Leave Policies Details + * Download a receipt + * + * Downloads an expense receipt. + * + * Deprecated since late February 2024 in favour of **[Download a receipt by id](#tag/Expenses/operation/get_download_by_id_expense_receipt)** endpoint. * - * Describe the leave policies (custom or not) for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * * + * @deprecated */ -export const getV1LeavePoliciesDetailsEmploymentId = < +export const getV1ExpensesExpenseIdReceipt = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetV1LeavePoliciesDetailsEmploymentIdResponses, - GetV1LeavePoliciesDetailsEmploymentIdErrors, + GetV1ExpensesExpenseIdReceiptResponses, + GetV1ExpensesExpenseIdReceiptErrors, ThrowOnError - >({ url: '/v1/leave-policies/details/{employment_id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses/{expense_id}/receipt', + ...options, + }); /** - * List work authorization requests + * Show travel letter request * - * List work authorization requests. + * Show a single travel letter request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | + * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | * */ -export const getV1WorkAuthorizationRequests = < +export const getV1TravelLetterRequestsId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetV1WorkAuthorizationRequestsResponses, - GetV1WorkAuthorizationRequestsErrors, + (options.client ?? client).get< + GetV1TravelLetterRequestsIdResponses, + GetV1TravelLetterRequestsIdErrors, ThrowOnError - >({ url: '/v1/work-authorization-requests', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/travel-letter-requests/{id}', + ...options, + }); /** - * Get employment benefit offers + * Updates a travel letter request + * + * Updates a travel letter request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | * */ -export const getV1EmploymentsEmploymentIdBenefitOffers = < +export const patchV1TravelLetterRequestsId2 = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdBenefitOffersResponses, - GetV1EmploymentsEmploymentIdBenefitOffersErrors, + (options.client ?? client).patch< + PatchV1TravelLetterRequestsId2Responses, + PatchV1TravelLetterRequestsId2Errors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/benefit-offers', ...options }); - -/** - * Upserts employment benefit offers - */ -export const putV1EmploymentsEmploymentIdBenefitOffers = < - ThrowOnError extends boolean = false, + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/travel-letter-requests/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Updates a travel letter request + * + * Updates a travel letter request + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage travel letters (`travel_letter:write`) | + * + */ +export const patchV1TravelLetterRequestsId = < + ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).put< - PutV1EmploymentsEmploymentIdBenefitOffersResponses, - PutV1EmploymentsEmploymentIdBenefitOffersErrors, + PatchV1TravelLetterRequestsIdResponses, + PatchV1TravelLetterRequestsIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments/{employment_id}/benefit-offers', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/travel-letter-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -4057,54 +4303,46 @@ export const putV1EmploymentsEmploymentIdBenefitOffers = < }); /** - * List employments - * - * Lists all employments, except for the deleted ones. + * Show Time Off Balance * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * Shows the time off balance for the given employment_id. * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * Deprecated since February 2025 in favour of **[List Leave Policies Summary](#tag/Leave-Policies/operation/get_index_leave_policies_summary)** endpoint. * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ## Scopes * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * * + * @deprecated */ -export const getV1Employments = ( - options: Options, +export const getV1TimeoffBalancesEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsResponses, - GetV1EmploymentsErrors, + GetV1TimeoffBalancesEmploymentIdResponses, + GetV1TimeoffBalancesEmploymentIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff-balances/{employment_id}', ...options, }); /** - * Create employment - * - * Creates an employment. We support creating employees and contractors. - * - * ## Global Payroll Employees - * - * To create a Global Payroll employee, pass `global_payroll_employee` as the `type` parameter, - * and provide the slug of the specific legal entity that the employee will be engaged by and billed to as the `engaged_by_entity_slug` parameter. + * Update basic information * - * ## HRIS Employees + * Updates employment's basic information. * - * To create a HRIS employee, pass `hris` as the `type` parameter. + * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -4131,15 +4369,24 @@ export const getV1Employments = ( * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1Employments = ( - options: Options, +export const putV1EmploymentsEmploymentIdBasicInformation = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1EmploymentsEmploymentIdBasicInformationData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1EmploymentsResponses, - PostV1EmploymentsErrors, + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdBasicInformationResponses, + PutV1EmploymentsEmploymentIdBasicInformationErrors, ThrowOnError >({ - url: '/v1/employments', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/basic_information', ...options, headers: { 'Content-Type': 'application/json', @@ -4148,33 +4395,30 @@ export const postV1Employments = ( }); /** - * Show Time Off - * - * Shows a single Time Off record - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * List expense categories * + * Lists the effective hierarchy of expense categories. At least one of employment_id, expense_id, or country_code must be provided. */ -export const getV1TimeoffId = ( - options: Options, +export const getV1ExpensesCategories = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1TimeoffIdResponses, - GetV1TimeoffIdErrors, + (options?.client ?? client).get< + GetV1ExpensesCategoriesResponses, + GetV1ExpensesCategoriesErrors, ThrowOnError - >({ url: '/v1/timeoff/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses/categories', + ...options, + }); /** - * Update Time Off - * - * Updates a Time Off record. - * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. - * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. + * Cancel Time Off as Employee * + * Cancels a Time Off record as Employee * * ## Scopes * @@ -4183,15 +4427,18 @@ export const getV1TimeoffId = ( * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchV1TimeoffId2 = ( - options: Options, +export const postV1EmployeeTimeoffIdCancel = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).patch< - PatchV1TimeoffId2Responses, - PatchV1TimeoffId2Errors, + (options.client ?? client).post< + PostV1EmployeeTimeoffIdCancelResponses, + PostV1EmployeeTimeoffIdCancelErrors, ThrowOnError >({ - url: '/v1/timeoff/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/timeoff/{id}/cancel', ...options, headers: { 'Content-Type': 'application/json', @@ -4200,466 +4447,573 @@ export const patchV1TimeoffId2 = ( }); /** - * Update Time Off + * Show form schema + * + * Returns the json schema of a supported form. Possible form names are: + * ``` + * - address_details + * - administrative_details + * - bank_account_details + * - employment_basic_information + * - contractor_basic_information + * - contractor_contract_details + * - billing_address_details + * - contract_details + * - emergency_contact + * - emergency_contact_details + * - employment_document_details + * - personal_details + * - pricing_plan_details + * - company_basic_information + * - global_payroll_administrative_details + * - global_payroll_bank_account_details + * - global_payroll_basic_information + * - global_payroll_contract_details + * - global_payroll_federal_taxes + * - global_payroll_state_taxes + * - global_payroll_personal_details + * - benefit_renewal_request + * - hris_personal_details + * + * ``` + * + * Most forms require a company access token, as they are dependent on certain + * properties of companies and their current employments. However, the `address_details` + * and `company_basic_information` forms can be accessed using client_credentials + * authentication (without a company). * - * Updates a Time Off record. - * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. - * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const patchV1TimeoffId = ( - options: Options, +export const getV1CountriesCountryCodeForm = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).put< - PatchV1TimeoffIdResponses, - PatchV1TimeoffIdErrors, + (options.client ?? client).get< + GetV1CountriesCountryCodeFormResponses, + GetV1CountriesCountryCodeFormErrors, ThrowOnError >({ - url: '/v1/timeoff/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/countries/{country_code}/{form}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get token identity + * Download file * - * Shows information about the entities that can be controlled by the current auth token. + * Downloads a file. * - */ -export const getV1IdentityCurrent = ( - options: Options, -) => - (options.client ?? client).get< - GetV1IdentityCurrentResponses, - GetV1IdentityCurrentErrors, - ThrowOnError - >({ url: '/v1/identity/current', ...options }); - -/** - * Payroll Variance Analysis API resource * - * API to retrieve the variance analysis data of a pay group + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * */ -export const getV1WdGphPayVariance = ( - options: Options, +export const getV1FilesId = ( + options: Options, ) => (options.client ?? client).get< - GetV1WdGphPayVarianceResponses, - GetV1WdGphPayVarianceErrors, + GetV1FilesIdResponses, + GetV1FilesIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/wd/gph/payVariance', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/files/{id}', ...options, }); /** - * List Company Payroll Calendar + * Show Contract Amendment * - * List all payroll calendars for the company within the requested cycle. + * Show a single Contract Amendment request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const getV1PayrollCalendarsCycle = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1ContractAmendmentsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1PayrollCalendarsCycleResponses, - GetV1PayrollCalendarsCycleErrors, + GetV1ContractAmendmentsIdResponses, + GetV1ContractAmendmentsIdErrors, ThrowOnError - >({ url: '/v1/payroll-calendars/{cycle}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contract-amendments/{id}', + ...options, + }); /** - * Terminate contractor of record employment + * Update bank account details * - * **Deprecated.** Use `POST /contractors/employments/{employment_id}/cor-termination-requests` instead. + * Updates employment's bank account details. * - * Initiates a termination request for a Contractor of Record employment. - * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. - * Currently, only Contractor of Record employments can be terminated. + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * - * ## Scopes + * + * + * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * - * - * @deprecated */ -export const postV1ContractorsEmploymentsEmploymentIdTerminateCorEmployment = < +export const putV2EmploymentsEmploymentIdBankAccountDetails = < ThrowOnError extends boolean = false, >( options: Options< - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData, + PutV2EmploymentsEmploymentIdBankAccountDetailsData, ThrowOnError >, ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses, - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdBankAccountDetailsResponses, + PutV2EmploymentsEmploymentIdBankAccountDetailsErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/bank_account_details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Send back a timesheet for review or modification + * List Company Managers + * + * List all company managers of an integration. If filtered by the company_id param, + * it lists only company managers belonging to the specified company. * - * Sends the given timesheet back to the employee for review or modification. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | * */ -export const postV1TimesheetsTimesheetIdSendBack = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1CompanyManagers = ( + options: Options, ) => - (options.client ?? client).post< - PostV1TimesheetsTimesheetIdSendBackResponses, - PostV1TimesheetsTimesheetIdSendBackErrors, + (options.client ?? client).get< + GetV1CompanyManagersResponses, + GetV1CompanyManagersErrors, ThrowOnError >({ - url: '/v1/timesheets/{timesheet_id}/send-back', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-managers', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Sign a pre-onboarding document - * - * Signs the latest contract document associated with the given pre-onboarding document on behalf - * of the company signatory. + * Create and invite a Company Manager * + * Create a Company Manager and sends the invitation email for signing in to the Remote Platform. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | * */ -export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign = - ( - options: Options< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses, - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors, - ThrowOnError - >({ - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); +export const postV1CompanyManagers = ( + options: Options, +) => + (options.client ?? client).post< + PostV1CompanyManagersResponses, + PostV1CompanyManagersErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-managers', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * List Benefit Renewal Requests - * - * List Benefit Renewal Requests for each country. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | + * List countries for Cost Calculator * + * Lists active and processing countries */ -export const getV1BenefitRenewalRequests = < +export const getV1CostCalculatorCountries = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1BenefitRenewalRequestsResponses, - GetV1BenefitRenewalRequestsErrors, + (options?.client ?? client).get< + GetV1CostCalculatorCountriesResponses, + unknown, ThrowOnError - >({ url: '/v1/benefit-renewal-requests', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/cost-calculator/countries', + ...options, + }); /** - * Reassign default legal entity + * Decline Identity Verification * - * Set a different legal entity as the company's default entity. + * Declines the identity verification of an employee. * - * The default entity is used when creating new employments without an explicit entity. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | * */ -export const putV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId = < +export const postV1IdentityVerificationEmploymentIdDecline = < ThrowOnError extends boolean = false, >( options: Options< - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData, + PostV1IdentityVerificationEmploymentIdDeclineData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses, - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors, + (options.client ?? client).post< + PostV1IdentityVerificationEmploymentIdDeclineResponses, + PostV1IdentityVerificationEmploymentIdDeclineErrors, ThrowOnError >({ - url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/identity-verification/{employment_id}/decline', ...options, }); /** - * List Employment Contract. + * Retrieve a pre-onboarding document with its rendered PDF content + * + * Returns the rendered contract PDF (base64-encoded) and the list of signatories for the given + * pre-onboarding document. The `content` field is prefixed with `data:application/pdf;base64,` so + * it can be embedded directly in a document viewer. * - * Get the employment contract history for a given employment. If `only_active` is true, it will return only the active or last active contract. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contracts (`contract:read`) | - | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getV1EmploymentContracts = ( - options: Options, +export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1EmploymentContractsResponses, - GetV1EmploymentContractsErrors, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors, ThrowOnError - >({ url: '/v1/employment-contracts', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}', + ...options, + }); /** - * Cancel Contract Amendment + * Show engagement agreement details * - * Use this endpoint to cancel an existing contract amendment request. + * Returns the engagement agreement details JSON Schema for a country. Only DEU country is supported for now. * - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const putV1SandboxContractAmendmentsContractAmendmentRequestIdCancel = < +export const getV1CountriesCountryCodeEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( options: Options< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData, + GetV1CountriesCountryCodeEngagementAgreementDetailsData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses, - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors, + (options.client ?? client).get< + GetV1CountriesCountryCodeEngagementAgreementDetailsResponses, + GetV1CountriesCountryCodeEngagementAgreementDetailsErrors, ThrowOnError >({ - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/countries/{country_code}/engagement-agreement-details', ...options, }); /** - * Download payslip in the PDF format - * - * Given a Payslip ID, downloads a payslip. - * It is important to note that each country has a different payslip format and they are not authored by Remote. + * List Billing Documents * + * List billing documents for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1PayslipsPayslipIdPdf = ( - options: Options, +export const getV1BillingDocuments = ( + options: Options, ) => (options.client ?? client).get< - GetV1PayslipsPayslipIdPdfResponses, - GetV1PayslipsPayslipIdPdfErrors, + GetV1BillingDocumentsResponses, + GetV1BillingDocumentsErrors, ThrowOnError - >({ url: '/v1/payslips/{payslip_id}/pdf', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/billing-documents', + ...options, + }); /** - * Approve Time Off + * Delete a Webhook Callback * - * Approve a time off request. + * Delete a callback previously registered for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const postV1TimeoffTimeoffIdApprove = < +export const deleteV1WebhookCallbacksId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdApproveResponses, - PostV1TimeoffTimeoffIdApproveErrors, + (options.client ?? client).delete< + DeleteV1WebhookCallbacksIdResponses, + DeleteV1WebhookCallbacksIdErrors, ThrowOnError >({ - url: '/v1/timeoff/{timeoff_id}/approve', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/webhook-callbacks/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List all companies + * Update a Webhook Callback * - * List all companies that authorized your integration to act on their behalf. In other words, these are all the companies that your integration can manage. Any company that has completed the authorization flow for your integration will be included in the response. + * Update a callback previously registered for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const getV1Companies = ( - options: Options, +export const patchV1WebhookCallbacksId = ( + options: Options, ) => - (options.client ?? client).get< - GetV1CompaniesResponses, - GetV1CompaniesErrors, + (options.client ?? client).patch< + PatchV1WebhookCallbacksIdResponses, + PatchV1WebhookCallbacksIdErrors, ThrowOnError - >({ url: '/v1/companies', ...options }); - -/** - * Create a company - * - * Creates a new company. - * - * ### Creating a company with only the required request body parameters - * When you call this endpoint and omit all the optional parameters in the request body, - * the following resources get created upon a successful response: - * * A new company with status `pending`. - * * A company owner for the new company with status `initiated`. - * - * See the [update a company endpoint](#tag/Companies/operation/patch_update_company) for - * more details on how to get your company and its owner to `active` status. - * - * If you'd like to create a company and its owner with `active` status in a single request, - * please provide the optional `address_details` parameter as well. - * - * ### Accepting the Terms of Service + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/webhook-callbacks/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Submit employee federal taxes * - * A required step for creating a company in Remote is to accept our Terms of Service (ToS). + * Submits the authenticated employee's US federal tax (W-4) details. * - * Company managers need to be aware of our Terms of Service and Privacy Policy, - * hence **it's the responsibility of our partners to advise and ensure company managers read - * and accept the ToS**. The terms have to be accepted only once, before creating a company, - * and the Remote API will collect the acceptance timestamp as its confirmation. + * Available for US Global Payroll employees once they reach the + * post-enrollment state. Calls made before then return a 404. * - * To ensure users read the most recent version of Remote's Terms of Service, their **acceptance - * must be done within the last fifteen minutes prior the company creation action**. + * This endpoint requires country-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_federal_taxes` + * as the form name to discover the schema for a given country. * - * To retrieve this information, partners can provide an element with any text and a description - * explaining that by performing that action they are accepting Remote's Term of Service. For - * instance, the partner can add a checkbox or a "Create Remote Account" button followed by a - * description saying "By creating an account, you agree to - * [Remote's Terms of Service](https://remote.com/terms-of-service). Also see Remote's - * [Privacy Policy](https://remote.com/privacy-policy)". * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | * */ -export const postV1Companies = ( - options: Options, +export const putV1EmployeeFederalTaxes = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1CompaniesResponses, - PostV1CompaniesErrors, + (options?.client ?? client).put< + PutV1EmployeeFederalTaxesResponses, + PutV1EmployeeFederalTaxesErrors, ThrowOnError >({ - url: '/v1/companies', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/federal-taxes', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * List company structure nodes - * - * Shows all the company structure nodes of an employment. + * List timesheets for the authenticated employee * + * Returns a paginated list of timesheets for the authenticated employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View company structure (`company_structure:read`) | - | + * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const getV1EmploymentsEmploymentIdCompanyStructureNodes = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdCompanyStructureNodesData, - ThrowOnError - >, +export const getV1EmployeeTimesheets = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses, - GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors, + (options?.client ?? client).get< + GetV1EmployeeTimesheetsResponses, + GetV1EmployeeTimesheetsErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/company-structure-nodes', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/timesheets', ...options, }); /** - * Update employment + * Update personal details + * + * Updates employment's personal details. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * */ -export const patchV2EmploymentsEmploymentId2 = < +export const putV1EmploymentsEmploymentIdPersonalDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PutV1EmploymentsEmploymentIdPersonalDetailsData, + ThrowOnError + >, ) => - (options.client ?? client).patch< - PatchV2EmploymentsEmploymentId2Responses, - PatchV2EmploymentsEmploymentId2Errors, + (options.client ?? client).put< + PutV1EmploymentsEmploymentIdPersonalDetailsResponses, + PutV1EmploymentsEmploymentIdPersonalDetailsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v2/employments/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/personal_details', ...options, headers: { 'Content-Type': 'application/json', @@ -4668,242 +5022,267 @@ export const patchV2EmploymentsEmploymentId2 = < }); /** - * Update employment + * List travel letter requests + * + * List travel letter requests. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | View travel letters (`travel_letter:read`) | Manage travel letters (`travel_letter:write`) | + * */ -export const patchV2EmploymentsEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1TravelLetterRequests = ( + options?: Options, ) => - (options.client ?? client).put< - PatchV2EmploymentsEmploymentIdResponses, - PatchV2EmploymentsEmploymentIdErrors, + (options?.client ?? client).get< + GetV1TravelLetterRequestsResponses, + GetV1TravelLetterRequestsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v2/employments/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/travel-letter-requests', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Create probation completion letter + * List Benefit Renewal Requests * - * Create a new probation completion letter request. + * List Benefit Renewal Requests for each country. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const postV1ProbationCompletionLetter = < +export const getV1BenefitRenewalRequests = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostV1ProbationCompletionLetterResponses, - PostV1ProbationCompletionLetterErrors, + (options.client ?? client).get< + GetV1BenefitRenewalRequestsResponses, + GetV1BenefitRenewalRequestsErrors, ThrowOnError >({ - url: '/v1/probation-completion-letter', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/benefit-renewal-requests', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Creates PDF cost estimation of employments + * Create a Webhook Callback + * + * Register a callback to be used for webhooks + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * - * Creates a PDF cost estimation of employments based on the provided parameters. */ -export const postV1CostCalculatorEstimationPdf = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const postV1WebhookCallbacks = ( + options: Options, ) => - (options?.client ?? client).post< - PostV1CostCalculatorEstimationPdfResponses, - PostV1CostCalculatorEstimationPdfErrors, + (options.client ?? client).post< + PostV1WebhookCallbacksResponses, + PostV1WebhookCallbacksErrors, ThrowOnError >({ - url: '/v1/cost-calculator/estimation-pdf', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/webhook-callbacks', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Token + * Approve timesheet + * + * Approves the given timesheet. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * - * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows */ -export const postAuthOauth2Token2 = ( - options?: Options, +export const postV1TimesheetsTimesheetIdApprove = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).post< - PostAuthOauth2Token2Responses, - PostAuthOauth2Token2Errors, + (options.client ?? client).post< + PostV1TimesheetsTimesheetIdApproveResponses, + PostV1TimesheetsTimesheetIdApproveErrors, ThrowOnError >({ - url: '/auth/oauth2/token', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timesheets/{timesheet_id}/approve', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Download a document for the employee + * Show payslip + * + * Given an ID, shows a payslip. + * + * Please contact api-support@remote.com to request access to this endpoint. + * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | * */ -export const getV1EmployeeDocumentsId = ( - options: Options, +export const getV1PayslipsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1EmployeeDocumentsIdResponses, - GetV1EmployeeDocumentsIdErrors, + GetV1PayslipsIdResponses, + GetV1PayslipsIdErrors, ThrowOnError - >({ url: '/v1/employee/documents/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payslips/{id}', + ...options, + }); /** - * Replay Webhook Events + * List Leave Policies Summary * - * Replay webhook events + * List all the data related to time off for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const postV1WebhookEventsReplay = ( - options: Options, -) => - (options.client ?? client).post< - PostV1WebhookEventsReplayResponses, - PostV1WebhookEventsReplayErrors, - ThrowOnError - >({ - url: '/v1/webhook-events/replay', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); - -/** - * Trigger a Webhook - * - * Triggers a callback previously registered for webhooks. Use this endpoint to - * emit a webhook for testing in the Sandbox environment. This endpoint will - * respond with a 404 outside of the Sandbox environment. - * - */ -export const postV1SandboxWebhookCallbacksTrigger = < +export const getV1LeavePoliciesSummaryEmploymentId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).post< - PostV1SandboxWebhookCallbacksTriggerResponses, - PostV1SandboxWebhookCallbacksTriggerErrors, + (options.client ?? client).get< + GetV1LeavePoliciesSummaryEmploymentIdResponses, + GetV1LeavePoliciesSummaryEmploymentIdErrors, ThrowOnError >({ - url: '/v1/sandbox/webhook-callbacks/trigger', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/leave-policies/summary/{employment_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Show bulk employment job + * List expense categories for the authenticated employee + * + * Returns the flat list of expense categories applicable to the current employee. Only active categories are returned, filtered by the employee's country / legal-entity visibility rules. Leaf nodes have `is_selectable: true`; parent nodes are excluded unless `include_parents=true`. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1BulkEmploymentJobsJobId = < +export const getV1EmployeeExpenseCategories = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1BulkEmploymentJobsJobIdResponses, - GetV1BulkEmploymentJobsJobIdErrors, + (options?.client ?? client).get< + GetV1EmployeeExpenseCategoriesResponses, + GetV1EmployeeExpenseCategoriesErrors, ThrowOnError - >({ url: '/v1/bulk-employment-jobs/{job_id}', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/expense-categories', + ...options, + }); /** - * List bulk employment rows + * List Company Departments + * + * Lists all departments for the authorized company specified in the request. * - * Returns grouped bulk employment rows, including field-level validation errors in `errors`, row-level failures in `row_errors`, and submission-phase failures in `submission_errors`. If a row passes validation but later fails during Global Payroll activation, that failure is surfaced here after submission rather than in the initial create response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View departments (`company_department:read`) | Manage departments (`company_department:write`) | * */ -export const getV1BulkEmploymentJobsJobIdRows = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1CompanyDepartments = ( + options: Options, ) => (options.client ?? client).get< - GetV1BulkEmploymentJobsJobIdRowsResponses, - GetV1BulkEmploymentJobsJobIdRowsErrors, + GetV1CompanyDepartmentsResponses, + GetV1CompanyDepartmentsErrors, ThrowOnError - >({ url: '/v1/bulk-employment-jobs/{job_id}/rows', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-departments', + ...options, + }); /** - * Magic links generator - * - * Generates a magic link for a passwordless authentication. - * To create a magic link for a company admin, you need to provide the `user_id` parameter. - * To create a magic link for an employee, you need to provide the `employment_id` parameter. + * Create New Department * + * Creates a new department in the specified company. Department names may be non-unique and must be non-empty with no more than 255 characters (Unicode code points). * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Create magic links (`magic_link:write`) | + * | Manage company resources (`company_admin`) | - | Manage departments (`company_department:write`) | * */ -export const postV1MagicLink = ( - options: Options, +export const postV1CompanyDepartments = ( + options: Options, ) => (options.client ?? client).post< - PostV1MagicLinkResponses, - PostV1MagicLinkErrors, + PostV1CompanyDepartmentsResponses, + PostV1CompanyDepartmentsErrors, ThrowOnError >({ - url: '/v1/magic-link', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-departments', ...options, headers: { 'Content-Type': 'application/json', @@ -4912,70 +5291,66 @@ export const postV1MagicLink = ( }); /** - * Show a company - * - * Given an ID, shows a company. - * - * If the used access token was issued by the OAuth 2.0 Authorization Code flow, - * then only the associated company can be accessed through the endpoint. + * List Offboardings for Employment * + * Lists Offboarding requests for a specific employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const getV1CompaniesCompanyId = ( - options: Options, +export const getV1OffboardingsEmploymentsEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1CompaniesCompanyIdResponses, - GetV1CompaniesCompanyIdErrors, + GetV1OffboardingsEmploymentsEmploymentIdResponses, + GetV1OffboardingsEmploymentsEmploymentIdErrors, ThrowOnError - >({ url: '/v1/companies/{company_id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/offboardings/employments/{employment_id}', + ...options, + }); /** - * Update a company - * - * Given an ID and a request object with new information, updates a company. - * - * ### Getting a company and its owner to `active` status - * If you created a company using the - * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required - * request body parameters, you can use this endpoint to provide the missing data. Once the company - * and its owner have all the necessary data, both their statuses will be set to `active` and the company - * onboarding will be marked as "completed". + * Decline a time off cancellation request * - * The following constitutes a company with "all the necessary data": - * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the - * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters - * are required). - * * Company `tax_number` or `registration_number` is not nil - * * Company `name` is not nil (already required when creating the company) - * * Company has a `desired_currency` in their bank account (already required when creating the company) - * * Company has accepted terms of service (already required when creating the company) + * Decline a time off cancellation request. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchV1CompaniesCompanyId2 = < +export const postV1TimeoffTimeoffIdCancelRequestDecline = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostV1TimeoffTimeoffIdCancelRequestDeclineData, + ThrowOnError + >, ) => - (options.client ?? client).patch< - PatchV1CompaniesCompanyId2Responses, - PatchV1CompaniesCompanyId2Errors, + (options.client ?? client).post< + PostV1TimeoffTimeoffIdCancelRequestDeclineResponses, + PostV1TimeoffTimeoffIdCancelRequestDeclineErrors, ThrowOnError >({ - url: '/v1/companies/{company_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{timeoff_id}/cancel-request/decline', ...options, headers: { 'Content-Type': 'application/json', @@ -4984,43 +5359,53 @@ export const patchV1CompaniesCompanyId2 = < }); /** - * Update a company + * Update administrative details * - * Given an ID and a request object with new information, updates a company. + * Updates employment's administrative details. * - * ### Getting a company and its owner to `active` status - * If you created a company using the - * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required - * request body parameters, you can use this endpoint to provide the missing data. Once the company - * and its owner have all the necessary data, both their statuses will be set to `active` and the company - * onboarding will be marked as "completed". + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * - * The following constitutes a company with "all the necessary data": - * * Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the - * [show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters - * are required). - * * Company `tax_number` or `registration_number` is not nil - * * Company `name` is not nil (already required when creating the company) - * * Company has a `desired_currency` in their bank account (already required when creating the company) - * * Company has accepted terms of service (already required when creating the company) * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const patchV1CompaniesCompanyId = ( - options: Options, +export const putV2EmploymentsEmploymentIdAdministrativeDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV2EmploymentsEmploymentIdAdministrativeDetailsData, + ThrowOnError + >, ) => (options.client ?? client).put< - PatchV1CompaniesCompanyIdResponses, - PatchV1CompaniesCompanyIdErrors, + PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses, + PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors, ThrowOnError >({ - url: '/v1/companies/{company_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/administrative_details', ...options, headers: { 'Content-Type': 'application/json', @@ -5029,164 +5414,173 @@ export const patchV1CompaniesCompanyId = ( }); /** - * Show form schema - * - * Returns the json schema of the requested company form. - * Currently only supports the `address_details` form. - * + * Get a employment benefit offers JSON schema * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const getV1CompaniesSchema = ( - options: Options, +export const getV1EmploymentsEmploymentIdBenefitOffersSchema = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentsEmploymentIdBenefitOffersSchemaData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1CompaniesSchemaResponses, - GetV1CompaniesSchemaErrors, + GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses, + GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors, ThrowOnError - >({ url: '/v1/companies/schema', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/benefit-offers/schema', + ...options, + }); /** - * Get employee token identity + * Submit eligibility questionnaire * - * Returns user and company information for the authenticated employee. - */ -export const getV1EmployeeCurrent = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1EmployeeCurrentResponses, - GetV1EmployeeCurrentErrors, - ThrowOnError - >({ url: '/v1/employee/current', ...options }); - -/** - * List pricing plan partner templates + * Submits an eligibility questionnaire for a contractor employment. * - * List all pricing plan partner templates. + * The questionnaire determines if the contractor is eligible for certain products or features. + * The responses are validated against the JSON schema for the questionnaire type. + * + * **Requirements:** + * - Employment must be of type `contractor` + * - Employment must be in `created` status + * - Responses must conform to the questionnaire JSON schema * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1PricingPlanPartnerTemplates = < +export const postV1ContractorsEligibilityQuestionnaire = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetV1PricingPlanPartnerTemplatesResponses, - GetV1PricingPlanPartnerTemplatesErrors, + (options.client ?? client).post< + PostV1ContractorsEligibilityQuestionnaireResponses, + PostV1ContractorsEligibilityQuestionnaireErrors, ThrowOnError - >({ url: '/v1/pricing-plan-partner-templates', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/eligibility-questionnaire', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Show engagement agreement details - * - * Returns the engagement agreement details JSON Schema for a country. Only DEU country is supported for now. + * Show personal information for the authenticated employee * + * Returns personal information for the authenticated employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | * */ -export const getV1CountriesCountryCodeEngagementAgreementDetails = < +export const getV1EmployeePersonalInformation = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1CountriesCountryCodeEngagementAgreementDetailsData, - ThrowOnError - >, + options?: Options, ) => - (options.client ?? client).get< - GetV1CountriesCountryCodeEngagementAgreementDetailsResponses, - GetV1CountriesCountryCodeEngagementAgreementDetailsErrors, + (options?.client ?? client).get< + GetV1EmployeePersonalInformationResponses, + GetV1EmployeePersonalInformationErrors, ThrowOnError >({ - url: '/v1/countries/{country_code}/engagement-agreement-details', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/personal-information', ...options, }); /** - * Show employee bank account - * - * Returns the authenticated employee's bank account details. - * - * This endpoint requires and returns country-specific data. The exact fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` - * as the form name to discover the schema for a given country. - * + * List timesheets * + * Lists all timesheets. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View bank accounts (`bank_account:read`) | Manage bank accounts (`bank_account:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const getV1EmployeeBankAccount = ( - options?: Options, +export const getV1Timesheets = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1EmployeeBankAccountResponses, - GetV1EmployeeBankAccountErrors, + GetV1TimesheetsResponses, + GetV1TimesheetsErrors, ThrowOnError - >({ url: '/v1/employee/bank-account', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timesheets', + ...options, + }); /** - * Update employee bank account - * - * Upserts the authenticated employee's bank account details. - * - * This endpoint requires and returns country-specific data. The exact fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` - * as the form name to discover the schema for a given country. - * - * + * Create a legal entity * - * ## Scopes + * Create a new legal entity for a company in a given country, with KYB automatically passed. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage bank accounts (`bank_account:write`) | + * The entity is created with active status and can be set as the company's default + * using the reassign default entity endpoint. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const putV1EmployeeBankAccount = ( - options?: Options, +export const postV1SandboxCompaniesCompanyIdLegalEntities = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1SandboxCompaniesCompanyIdLegalEntitiesData, + ThrowOnError + >, ) => - (options?.client ?? client).put< - PutV1EmployeeBankAccountResponses, - PutV1EmployeeBankAccountErrors, + (options.client ?? client).post< + PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses, + PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/bank-account', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/companies/{company_id}/legal-entities', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Update contract details + * Show employment * - * Updates employment's contract details. + * Shows all the information of an employment. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -5202,7 +5596,7 @@ export const putV1EmployeeBankAccount = ( * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * * * @@ -5210,213 +5604,622 @@ export const putV1EmployeeBankAccount = ( * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdContractDetails = < +export const getV1EmploymentsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options< - PutV2EmploymentsEmploymentIdContractDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdContractDetailsResponses, - PutV2EmploymentsEmploymentIdContractDetailsErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdResponses, + GetV1EmploymentsEmploymentIdErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/contract_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show product prices in the company's desired currency + * Update employment * - * list product prices in the company's desired currency. - * the endpoint currently only returns the product prices for the EOR monthly product and the contractor products (Standard, Plus and COR). - * the product prices are then used to create a pricing plan for the company. + * Updates an employment. * + * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. * - * ## Scopes + * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * **For `invited` employments:** You can update the work_email. * - */ -export const getV1CompaniesCompanyIdProductPrices = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdProductPricesResponses, - GetV1CompaniesCompanyIdProductPricesErrors, - ThrowOnError - >({ url: '/v1/companies/{company_id}/product-prices', ...options }); - -/** - * Create a new token for a company + * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. + * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. + * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. + * Currently, these amendments can only be done through the Remote UI. * - * Creates new tokens for a given company - */ -export const postV1CompaniesCompanyIdCreateToken = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).post< - PostV1CompaniesCompanyIdCreateTokenResponses, - PostV1CompaniesCompanyIdCreateTokenErrors, - ThrowOnError - >({ url: '/v1/companies/{company_id}/create-token', ...options }); - -/** - * Get Employment Profile + * It is possible to update the `external_id` of the employment for all employment statuses. * - * Gets necessary information to perform the identity verification of an employee. + * ## Global Payroll Employees * + * To update a Global Payment employment your input data must comply with the global payroll json schemas. * - * ## Scopes + * **For `active` employments:** In addition to the above list, you can update personal_details. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View identity verification (`identity_verification:read`) | Manage identity verification (`identity_verification:write`) | + * ## Direct Employees * - */ -export const getV1IdentityVerificationEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1IdentityVerificationEmploymentIdResponses, - GetV1IdentityVerificationEmploymentIdErrors, - ThrowOnError - >({ url: '/v1/identity-verification/{employment_id}', ...options }); - -/** - * Download a receipt by id + * To update an HRIS employment your input data must comply with the HRIS json schemas. * - * Download a receipt by id. + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. * - * ## Scopes + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. * - */ -export const getV1ExpensesExpenseIdReceiptsReceiptId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1ExpensesExpenseIdReceiptsReceiptIdResponses, - GetV1ExpensesExpenseIdReceiptsReceiptIdErrors, - ThrowOnError - >({ url: '/v1/expenses/{expense_id}/receipts/{receipt_id}', ...options }); - -/** - * Preview the Employment Agreement for an employment + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * - * Returns a base64-encoded PDF preview of the auto-generated Employment Agreement for an employment. + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. * - * The document is rendered as a draft (no signatures) and is not persisted. EA preview is only - * available for countries that have a published Employment Agreement automation template — see the - * `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. + * + * Please contact Remote if you need to update contractors via API since it's currently not supported. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1EmploymentsEmploymentIdEmploymentAgreementPreview = < +export const patchV1EmploymentsEmploymentId2 = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses, - GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors, + (options.client ?? client).patch< + PatchV1EmploymentsEmploymentId2Responses, + PatchV1EmploymentsEmploymentId2Errors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/employment-agreement/preview', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List groups via SCIM v2.0 + * Update employment * - * Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard - */ -export const getV1ScimV2Groups = ( - options?: Options, + * Updates an employment. + * + * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. + * + * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. + * + * **For `invited` employments:** You can update the work_email. + * + * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. + * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. + * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. + * Currently, these amendments can only be done through the Remote UI. + * + * It is possible to update the `external_id` of the employment for all employment statuses. + * + * ## Global Payroll Employees + * + * To update a Global Payment employment your input data must comply with the global payroll json schemas. + * + * **For `active` employments:** In addition to the above list, you can update personal_details. + * + * ## Direct Employees + * + * To update an HRIS employment your input data must comply with the HRIS json schemas. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * + * + * Please contact Remote if you need to update contractors via API since it's currently not supported. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * + */ +export const patchV1EmploymentsEmploymentId = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).put< + PatchV1EmploymentsEmploymentIdResponses, + PatchV1EmploymentsEmploymentIdErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * List users via SCIM v2.0 + * + * Retrieves a list of users for the authenticated company following SCIM 2.0 standard + */ +export const getV1ScimV2Users = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1ScimV2GroupsResponses, - GetV1ScimV2GroupsErrors, + GetV1ScimV2UsersResponses, + GetV1ScimV2UsersErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Groups', + url: '/v1/scim/v2/Users', ...options, }); /** - * Show expense + * List Company Payroll Calendar * - * Shows a single expense record + * List all payroll calendars for the company within the requested cycle. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | * */ -export const getV1ExpensesId = ( - options: Options, +export const getV1PayrollCalendarsCycle = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1ExpensesIdResponses, - GetV1ExpensesIdErrors, + GetV1PayrollCalendarsCycleResponses, + GetV1PayrollCalendarsCycleErrors, ThrowOnError - >({ url: '/v1/expenses/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payroll-calendars/{cycle}', + ...options, + }); /** - * Update an expense + * Show Legal Entity Administrative details + * + * Show administrative details of legal entity for the authorized company specified in the request. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * + */ +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = + ( + options: Options< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', + ...options, + }); + +/** + * Update Legal Entity Administrative details + * + * Update administrative details of legal entity for the authorized company specified in the request. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | + * + */ +export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails = + ( + options: Options< + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData, + ThrowOnError + >, + ) => + (options.client ?? client).put< + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses, + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Update contract details + * + * Updates employment's contract details. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * + */ +export const putV2EmploymentsEmploymentIdContractDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV2EmploymentsEmploymentIdContractDetailsData, + ThrowOnError + >, +) => + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdContractDetailsResponses, + PutV2EmploymentsEmploymentIdContractDetailsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/contract_details', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Show region fields + * + * Returns required fields JSON Schema for a given region. These are required in order to calculate + * the cost of employment for the region. These fields are based on employer contributions that are associated + * with the region or any of it's parent regions. + */ +export const getV1CostCalculatorRegionsSlugFields = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1CostCalculatorRegionsSlugFieldsResponses, + GetV1CostCalculatorRegionsSlugFieldsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/cost-calculator/regions/{slug}/fields', + ...options, + }); + +/** + * Show Offboarding + * + * Shows an Offboarding request. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * + */ +export const getV1OffboardingsId = ( + options: Options, +) => + (options.client ?? client).get< + GetV1OffboardingsIdResponses, + GetV1OffboardingsIdErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/offboardings/{id}', + ...options, + }); + +/** + * Get Employee Details for a Payroll Run + * + * Gets the employee details for a payroll run + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * + */ +export const getV1PayrollRunsPayrollRunIdEmployeeDetails = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1PayrollRunsPayrollRunIdEmployeeDetailsData, + ThrowOnError + >, +) => + (options.client ?? client).get< + GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses, + GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payroll-runs/{payroll_run_id}/employee-details', + ...options, + }); + +/** + * List bulk employment rows + * + * Returns grouped bulk employment rows, including field-level validation errors in `errors`, row-level failures in `row_errors`, and submission-phase failures in `submission_errors`. If a row passes validation but later fails during Global Payroll activation, that failure is surfaced here after submission rather than in the initial create response. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * + */ +export const getV1BulkEmploymentJobsJobIdRows = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetV1BulkEmploymentJobsJobIdRowsResponses, + GetV1BulkEmploymentJobsJobIdRowsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/bulk-employment-jobs/{job_id}/rows', + ...options, + }); + +/** + * Show employee emergency contact + * + * Returns the authenticated employee's emergency contact. + * + * The employment is derived from the access token's subject — there is no + * employment id in the path. + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` + * as the form name to discover the schema for a given country. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View emergency contacts (`emergency_contact:read`) | Manage emergency contacts (`emergency_contact:write`) | + * + */ +export const getV1EmployeeEmergencyContact = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeEmergencyContactResponses, + GetV1EmployeeEmergencyContactErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/emergency-contact', + ...options, + }); + +/** + * Update employee emergency contact + * + * Updates the authenticated employee's emergency contact. + * + * The employment is derived from the access token's subject — there is no + * employment id in the path. The token must be an employee-role token + * (typically obtained via the OAuth2 assertion grant with subject + * `urn:remote-api:employee:employment:`). + * + * This endpoint requires country-specific data. The exact required fields vary depending on which + * country the authenticated employee's employment is in. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` + * as the form name to discover the schema for a given country. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage emergency contacts (`emergency_contact:write`) | + * + */ +export const putV1EmployeeEmergencyContact = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).put< + PutV1EmployeeEmergencyContactResponses, + PutV1EmployeeEmergencyContactErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/emergency-contact', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Create employment + * + * Creates an employment without provisional_start_date validation. + * + * This endpoint is only available in Sandbox and allows creating employments which + * `provisional_start_date` is in the past. This is especially helpful for: + * * Testing the Timeoff Balance endpoints + * * Testing the Offboarding endpoints + * * Testing features around probation periods + * + * This endpoint will respond with a 404 outside of the Sandbox environment. + * + * For creating an employment's parameters outside of testing purposes, use [this + * Employment create endpoint](#operation/post_create_employment) + * + */ +export const postV1SandboxEmployments = ( + options: Options, +) => + (options.client ?? client).post< + PostV1SandboxEmploymentsResponses, + PostV1SandboxEmploymentsErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/employments', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Create contract eligibility + * + * Create contract eligibility for an employment. + * + * This will create a new contract eligibility for the employment. * - * Updates an expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage contract eligibility (`contract_eligibility:write`) | * */ -export const patchV1ExpensesId2 = ( - options: Options, +export const postV1EmploymentsEmploymentIdContractEligibility = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1EmploymentsEmploymentIdContractEligibilityData, + ThrowOnError + >, ) => - (options.client ?? client).patch< - PatchV1ExpensesId2Responses, - PatchV1ExpensesId2Errors, + (options.client ?? client).post< + PostV1EmploymentsEmploymentIdContractEligibilityResponses, + PostV1EmploymentsEmploymentIdContractEligibilityErrors, ThrowOnError >({ - url: '/v1/expenses/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/contract-eligibility', ...options, headers: { 'Content-Type': 'application/json', @@ -5425,146 +6228,117 @@ export const patchV1ExpensesId2 = ( }); /** - * Update an expense + * List countries + * + * Returns a list of all countries that are supported by Remote API alphabetically ordered. + * The supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema. + * The countries present in the list are the ones where creating a company is allowed. * - * Updates an expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | * */ -export const patchV1ExpensesId = ( - options: Options, +export const getV1Countries = ( + options: Options, ) => - (options.client ?? client).put< - PatchV1ExpensesIdResponses, - PatchV1ExpensesIdErrors, + (options.client ?? client).get< + GetV1CountriesResponses, + GetV1CountriesErrors, ThrowOnError >({ - url: '/v1/expenses/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/countries', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update emergency contact - * - * Updates the employment's emergency contact details. - * - * This endpoint requires country-specific data. Query the **Show form schema** endpoint - * passing the country code and `emergency_contact_details` as path parameters to see - * the required fields for a given country. + * List payslip files for the authenticated employee * + * Returns a paginated list of payslip files belonging to the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | * */ -export const putV2EmploymentsEmploymentIdEmergencyContact = < - ThrowOnError extends boolean = false, ->( - options: Options< - PutV2EmploymentsEmploymentIdEmergencyContactData, - ThrowOnError - >, +export const getV1EmployeePayslipFiles = ( + options?: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdEmergencyContactResponses, - PutV2EmploymentsEmploymentIdEmergencyContactErrors, + (options?.client ?? client).get< + GetV1EmployeePayslipFilesResponses, + GetV1EmployeePayslipFilesErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/emergency_contact', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/payslip-files', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Creates a Benefit Renewal Request - * - * Creates a Benefit Renewal Request for a specific Benefit Group. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * Create a new token for a company * + * Creates new tokens for a given company */ -export const postV1SandboxBenefitRenewalRequests = < +export const postV1CompaniesCompanyIdCreateToken = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostV1SandboxBenefitRenewalRequestsResponses, - PostV1SandboxBenefitRenewalRequestsErrors, + PostV1CompaniesCompanyIdCreateTokenResponses, + PostV1CompaniesCompanyIdCreateTokenErrors, ThrowOnError >({ - url: '/v1/sandbox/benefit-renewal-requests', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies/{company_id}/create-token', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get basic information - * - * Returns the employment's basic information. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * List Company Legal Entities * + * Lists all active legal entities for the authorized company specified in the request. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const getV2EmploymentsEmploymentIdBasicInformation = < +export const getV1CompaniesCompanyIdLegalEntities = < ThrowOnError extends boolean = false, >( - options: Options< - GetV2EmploymentsEmploymentIdBasicInformationData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV2EmploymentsEmploymentIdBasicInformationResponses, - GetV2EmploymentsEmploymentIdBasicInformationErrors, + GetV1CompaniesCompanyIdLegalEntitiesResponses, + GetV1CompaniesCompanyIdLegalEntitiesErrors, ThrowOnError - >({ url: '/v2/employments/{employment_id}/basic_information', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/legal-entities', + ...options, + }); /** - * Update basic information - * - * Updates employment's basic information. + * Update personal details * - * Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. + * Updates employment's personal details. * * This endpoint requires and returns country-specific data. The exact required and returned fields will * vary depending on which country the employment is in. To see the list of parameters for each country, @@ -5580,7 +6354,7 @@ export const getV2EmploymentsEmploymentIdBasicInformation = < * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. * * * @@ -5591,20 +6365,24 @@ export const getV2EmploymentsEmploymentIdBasicInformation = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdBasicInformation = < +export const putV2EmploymentsEmploymentIdPersonalDetails = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdBasicInformationData, + PutV2EmploymentsEmploymentIdPersonalDetailsData, ThrowOnError >, ) => (options.client ?? client).put< - PutV2EmploymentsEmploymentIdBasicInformationResponses, - PutV2EmploymentsEmploymentIdBasicInformationErrors, + PutV2EmploymentsEmploymentIdPersonalDetailsResponses, + PutV2EmploymentsEmploymentIdPersonalDetailsErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/basic_information', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/personal_details', ...options, headers: { 'Content-Type': 'application/json', @@ -5613,51 +6391,22 @@ export const putV2EmploymentsEmploymentIdBasicInformation = < }); /** - * List Leave Policies Summary - * - * List all the data related to time off for a given employment - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | - * - */ -export const getV1LeavePoliciesSummaryEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1LeavePoliciesSummaryEmploymentIdResponses, - GetV1LeavePoliciesSummaryEmploymentIdErrors, - ThrowOnError - >({ url: '/v1/leave-policies/summary/{employment_id}', ...options }); - -/** - * Cancel Time Off - * - * Cancel a time off request that was already approved. - * - * ## Scopes + * Complete onboarding * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status * + * @deprecated */ -export const postV1TimeoffTimeoffIdCancel = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1Ready = ( + options: Options, ) => (options.client ?? client).post< - PostV1TimeoffTimeoffIdCancelResponses, - PostV1TimeoffTimeoffIdCancelErrors, + PostV1ReadyResponses, + PostV1ReadyErrors, ThrowOnError >({ - url: '/v1/timeoff/{timeoff_id}/cancel', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/ready', ...options, headers: { 'Content-Type': 'application/json', @@ -5666,389 +6415,345 @@ export const postV1TimeoffTimeoffIdCancel = < }); /** - * Get Help Center Article - * - * Get a help center article by its ID - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | View help articles (`help_center_article:read`) | - | - * - */ -export const getV1HelpCenterArticlesId = ( - options: Options, -) => - (options.client ?? client).get< - GetV1HelpCenterArticlesIdResponses, - GetV1HelpCenterArticlesIdErrors, - ThrowOnError - >({ url: '/v1/help-center-articles/{id}', ...options }); - -/** - * Upload file - * - * Uploads a file associated with a specified employment. - * - * Please contact api-support@remote.com to request access to this endpoint. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | - * - */ -export const postV1Documents = ( - options: Options, -) => - (options.client ?? client).post< - PostV1DocumentsResponses, - PostV1DocumentsErrors, - ThrowOnError - >({ - ...formDataBodySerializer, - url: '/v1/documents', - ...options, - headers: { - 'Content-Type': null, - ...options.headers, - }, - }); - -/** - * Verify Employment Identity - * - * Endpoint to confirms the employment profile is from the actual employee + * List Leave Policies Details * + * Describe the leave policies (custom or not) for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const postV1IdentityVerificationEmploymentIdVerify = < +export const getV1LeavePoliciesDetailsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1IdentityVerificationEmploymentIdVerifyData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).post< - PostV1IdentityVerificationEmploymentIdVerifyResponses, - PostV1IdentityVerificationEmploymentIdVerifyErrors, + (options.client ?? client).get< + GetV1LeavePoliciesDetailsEmploymentIdResponses, + GetV1LeavePoliciesDetailsEmploymentIdErrors, ThrowOnError - >({ url: '/v1/identity-verification/{employment_id}/verify', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/leave-policies/details/{employment_id}', + ...options, + }); /** - * Lists custom fields definitions + * List Time Off Types + * + * Lists all time off types that can be used for the `timeoff_type` parameter. + * + * **Backward compatibility:** Calling this endpoint without the `type` query parameter returns the same response as before (time off types for full-time employments). Existing integrations do not need to change. + * + * Optionally, pass `type=contractor` to get time off types for contractor employments, or `type=full_time` for full-time employments (same as omitting the parameter). * - * Returns custom fields definitions * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom fields (`custom_field:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1CustomFields = ( - options?: Options, +export const getV1TimeoffTypes = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1CustomFieldsResponses, - GetV1CustomFieldsErrors, + (options.client ?? client).get< + GetV1TimeoffTypesResponses, + GetV1TimeoffTypesErrors, ThrowOnError - >({ url: '/v1/custom-fields', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/types', + ...options, + }); /** - * Create Custom Field Definition - * - * Creates a new custom field definition. - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | View custom fields (`custom_field:read`) | Manage custom fields (`custom_field:write`) | + * Creates a CSV cost estimation of employments * + * Creates CSV cost estimation of employments */ -export const postV1CustomFields = ( - options: Options, +export const postV1CostCalculatorEstimationCsv = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => - (options.client ?? client).post< - PostV1CustomFieldsResponses, - PostV1CustomFieldsErrors, + (options?.client ?? client).post< + PostV1CostCalculatorEstimationCsvResponses, + PostV1CostCalculatorEstimationCsvErrors, ThrowOnError >({ - url: '/v1/custom-fields', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/cost-calculator/estimation-csv', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Approve risk reserve proof of payment + * Activate Global Payroll for a legal entity * - * Approves a risk reserve proof of payment without the intervention of a Remote admin. + * Enables the Global Payroll product on a legal entity so that GP employees can be created against it. * - * Triggers an `employment.cor_hiring.proof_of_payment_accepted` webhook event. + * Performs three idempotent steps: + * * Adds the Global Payroll product to the company. + * * Flips `global_payroll_enabled` on the legal entity's settings. + * * Ensures a Global Payroll pricing plan exists for the legal entity's country. * * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const postV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove = +export const postV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayroll = ( options: Options< - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses, - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponses, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollErrors, ThrowOnError >({ - url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/companies/{company_id}/legal-entities/{legal_entity_id}/activate-global-payroll', ...options, }); /** - * Create a Webhook Callback + * Show employee personal details + * + * Returns the authenticated employee's personal details. + * + * This endpoint requires country-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` + * as the form name to discover the schema for a given country. + * * - * Register a callback to be used for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage employments (`employments`) | View personal details (`personal_detail:read`) | Manage personal details (`personal_detail:write`) | * */ -export const postV1WebhookCallbacks = ( - options: Options, +export const getV1EmployeePersonalDetails = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => - (options.client ?? client).post< - PostV1WebhookCallbacksResponses, - PostV1WebhookCallbacksErrors, + (options?.client ?? client).get< + GetV1EmployeePersonalDetailsResponses, + GetV1EmployeePersonalDetailsErrors, ThrowOnError >({ - url: '/v1/webhook-callbacks', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/personal-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List pre-onboarding document requirements for an employment - * - * Returns the list of pre-onboarding document requirements (e.g. master service agreements, - * individual labour agreements) that must be fulfilled before the given employment can be onboarded. - * + * Update employee personal details * - * ## Scopes + * Updates the authenticated employee's personal details (date of birth, + * national ID, nationality, etc.). * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * This endpoint requires country-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` + * as the form name to discover the schema for a given country. * - */ -export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirements = - ( - options: Options< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData, - ThrowOnError - >, - ) => - (options.client ?? client).get< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses, - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors, - ThrowOnError - >({ - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements', - ...options, - }); - -/** - * Show the SSO Configuration Details * - * Shows the SSO Configuration details for the company. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | + * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | * */ -export const getV1SsoConfigurationDetails = < +export const putV1EmployeePersonalDetails = < ThrowOnError extends boolean = false, >( - options?: Options, + options?: Options, ) => - (options?.client ?? client).get< - GetV1SsoConfigurationDetailsResponses, - GetV1SsoConfigurationDetailsErrors, + (options?.client ?? client).put< + PutV1EmployeePersonalDetailsResponses, + PutV1EmployeePersonalDetailsErrors, ThrowOnError - >({ url: '/v1/sso-configuration/details', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/personal-details', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); /** - * Sign a document for a contractor - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * List groups via SCIM v2.0 * + * Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard */ -export const postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign = - ( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses, - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors, - ThrowOnError - >({ - url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, - }); +export const getV1ScimV2Groups = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1ScimV2GroupsResponses, + GetV1ScimV2GroupsErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/scim/v2/Groups', + ...options, + }); /** - * List Pay Items + * Create a contract document for a contractor + * + * Create a contract document for a contractor. * - * Lists pay items for a company with optional filtering by employment, date range, and pagination. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View pay items (`pay_item:read`) | Manage pay items (`pay_item:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV1PayItems = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1PayItemsResponses, - GetV1PayItemsErrors, +export const postV1ContractorsEmploymentsEmploymentIdContractDocuments = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData, ThrowOnError - >({ url: '/v1/pay-items', ...options }); - -/** - * List users via SCIM v2.0 - * - * Retrieves a list of users for the authenticated company following SCIM 2.0 standard - */ -export const getV1ScimV2Users = ( - options?: Options, + >, ) => - (options?.client ?? client).get< - GetV1ScimV2UsersResponses, - GetV1ScimV2UsersErrors, + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Users', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contract-documents', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show Resignation - * - * Shows the details of a resignation with status `submitted`. - * - * ## Scopes + * Trigger a Webhook * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | View resignations (`resignation:read`) | Manage resignations (`resignation:write`) | + * Triggers a callback previously registered for webhooks. Use this endpoint to + * emit a webhook for testing in the Sandbox environment. This endpoint will + * respond with a 404 outside of the Sandbox environment. * */ -export const getV1ResignationsOffboardingRequestId = < +export const postV1SandboxWebhookCallbacksTrigger = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).get< - GetV1ResignationsOffboardingRequestIdResponses, - GetV1ResignationsOffboardingRequestIdErrors, + (options?.client ?? client).post< + PostV1SandboxWebhookCallbacksTriggerResponses, + PostV1SandboxWebhookCallbacksTriggerErrors, ThrowOnError - >({ url: '/v1/resignations/{offboarding_request_id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/webhook-callbacks/trigger', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); /** - * Get Billing Document Breakdown + * Download payslip in the PDF format + * + * Given a Payslip ID, downloads a payslip. + * It is important to note that each country has a different payslip format and they are not authored by Remote. * - * Get billing document breakdown * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | * */ -export const getV1BillingDocumentsBillingDocumentIdBreakdown = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1BillingDocumentsBillingDocumentIdBreakdownData, - ThrowOnError - >, +export const getV1PayslipsPayslipIdPdf = ( + options: Options, ) => (options.client ?? client).get< - GetV1BillingDocumentsBillingDocumentIdBreakdownResponses, - GetV1BillingDocumentsBillingDocumentIdBreakdownErrors, + GetV1PayslipsPayslipIdPdfResponses, + GetV1PayslipsPayslipIdPdfErrors, ThrowOnError >({ - url: '/v1/billing-documents/{billing_document_id}/breakdown', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payslips/{payslip_id}/pdf', ...options, }); /** - * Decline a time off cancellation request - * - * Decline a time off cancellation request. + * Convert currency using dynamic rates * + * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | * */ -export const postV1TimeoffTimeoffIdCancelRequestDecline = < +export const postV1CurrencyConverterEffective = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1TimeoffTimeoffIdCancelRequestDeclineData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).post< - PostV1TimeoffTimeoffIdCancelRequestDeclineResponses, - PostV1TimeoffTimeoffIdCancelRequestDeclineErrors, + PostV1CurrencyConverterEffectiveResponses, + PostV1CurrencyConverterEffectiveErrors, ThrowOnError >({ - url: '/v1/timeoff/{timeoff_id}/cancel-request/decline', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/currency-converter/effective', ...options, headers: { 'Content-Type': 'application/json', @@ -6057,122 +6762,107 @@ export const postV1TimeoffTimeoffIdCancelRequestDecline = < }); /** - * List EOR Payroll Calendar + * Show Time Off * - * List all active payroll calendars for EOR. + * Shows a single Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | - * - */ -export const getV1PayrollCalendars = ( - options?: Options, -) => - (options?.client ?? client).get< - GetV1PayrollCalendarsResponses, - GetV1PayrollCalendarsErrors, - ThrowOnError - >({ url: '/v1/payroll-calendars', ...options }); - -/** - * Payroll processing details API resource + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * - * API to retrieve header details of a pay group */ -export const getV1WdGphPayDetail = ( - options: Options, +export const getV1TimeoffId = ( + options: Options, ) => (options.client ?? client).get< - GetV1WdGphPayDetailResponses, - GetV1WdGphPayDetailErrors, + GetV1TimeoffIdResponses, + GetV1TimeoffIdErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/wd/gph/payDetail', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{id}', ...options, }); /** - * Show form schema + * Update Time Off * - * Returns the json schema of the `contract_amendment` form for a specific employment. - * This endpoint requires a company access token, as forms are dependent on certain - * properties of companies and their current employments. + * Updates a Time Off record. + * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. + * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | - * - */ -export const getV1ContractAmendmentsSchema = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1ContractAmendmentsSchemaResponses, - GetV1ContractAmendmentsSchemaErrors, - ThrowOnError - >({ url: '/v1/contract-amendments/schema', ...options }); - -/** - * Get a mock JSON Schema + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * - * Get a mock JSON Schema for testing purposes */ -export const getV1TestSchema = ( - options?: Options, +export const patchV1TimeoffId2 = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1TestSchemaResponses, - unknown, + (options.client ?? client).patch< + PatchV1TimeoffId2Responses, + PatchV1TimeoffId2Errors, ThrowOnError - >({ url: '/v1/test-schema', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Download the Employment Agreement for an employment - * - * Downloads a PDF of the auto-generated Employment Agreement for an employment. + * Update Time Off * - * The document is rendered as a draft (no signatures) and is not persisted. EA preview is only - * available for countries that have a published Employment Agreement automation template — see the - * `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. + * Updates a Time Off record. + * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. + * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getV1EmploymentsEmploymentIdEmploymentAgreementDownload = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData, - ThrowOnError - >, +export const patchV1TimeoffId = ( + options: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses, - GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors, + (options.client ?? client).put< + PatchV1TimeoffIdResponses, + PatchV1TimeoffIdErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/employment-agreement/download', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Update Time Off as Employee + * Decline Time Off * - * Updates a Time Off record as Employee + * Decline a time off request. Please note that only time off requests on the `requested` status can be declined. * * ## Scopes * @@ -6181,15 +6871,21 @@ export const getV1EmploymentsEmploymentIdEmploymentAgreementDownload = < * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchV1EmployeeTimeoffId2 = ( - options: Options, +export const postV1TimeoffTimeoffIdDecline = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).patch< - PatchV1EmployeeTimeoffId2Responses, - PatchV1EmployeeTimeoffId2Errors, + (options.client ?? client).post< + PostV1TimeoffTimeoffIdDeclineResponses, + PostV1TimeoffTimeoffIdDeclineErrors, ThrowOnError >({ - url: '/v1/employee/timeoff/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{timeoff_id}/decline', ...options, headers: { 'Content-Type': 'application/json', @@ -6198,26 +6894,52 @@ export const patchV1EmployeeTimeoffId2 = ( }); /** - * Update Time Off as Employee + * Automatable Contract Amendment + * + * Check if a contract amendment request is automatable. + * If the contract amendment request is automatable, then after submission, it will instantly amend the employee's contract + * and send them an updated document. + * + * This endpoint requires and returns country-specific data. The exact required and returned fields will + * vary depending on which country the employment is in. To see the list of parameters for each country, + * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. + * + * Please note that the compliance requirements for each country are subject to change according to local + * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid + * compliance issues and to have the latest version of a country requirements. + * + * If you are using this endpoint to build an integration, make sure you are dynamically collecting or + * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * + * To learn how you can dynamically generate forms to display in your UI, see the documentation for + * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * * - * Updates a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | * */ -export const patchV1EmployeeTimeoffId = ( - options: Options, +export const postV1ContractAmendmentsAutomatable = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).put< - PatchV1EmployeeTimeoffIdResponses, - PatchV1EmployeeTimeoffIdErrors, + (options.client ?? client).post< + PostV1ContractAmendmentsAutomatableResponses, + PostV1ContractAmendmentsAutomatableErrors, ThrowOnError >({ - url: '/v1/employee/timeoff/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contract-amendments/automatable', ...options, headers: { 'Content-Type': 'application/json', @@ -6226,127 +6948,125 @@ export const patchV1EmployeeTimeoffId = ( }); /** - * Get group by ID via SCIM v2.0 + * Approve Time Off + * + * Approve a time off request. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * - * Retrieves a single group (department) for the authenticated company by group ID */ -export const getV1ScimV2GroupsId = ( - options: Options, +export const postV1TimeoffTimeoffIdApprove = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetV1ScimV2GroupsIdResponses, - GetV1ScimV2GroupsIdErrors, + (options.client ?? client).post< + PostV1TimeoffTimeoffIdApproveResponses, + PostV1TimeoffTimeoffIdApproveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Groups/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{timeoff_id}/approve', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); - -/** - * Show legal entity administrative details form schema - * - * Returns the json schema of a supported form. Possible form names are: - * ``` - * - administrative_details - * ``` + +/** + * List employment files * - * Most forms require a company access token, as they are dependent on certain - * properties of companies and their current employments. + * Lists files associated with a specific employment. * + * Supports filtering by file type and sub_type. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getV1CountriesCountryCodeLegalEntityFormsForm = < +export const getV1EmploymentsEmploymentIdFiles = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1CountriesCountryCodeLegalEntityFormsFormData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1CountriesCountryCodeLegalEntityFormsFormResponses, - GetV1CountriesCountryCodeLegalEntityFormsFormErrors, + GetV1EmploymentsEmploymentIdFilesResponses, + GetV1EmploymentsEmploymentIdFilesErrors, ThrowOnError >({ - url: '/v1/countries/{country_code}/legal_entity_forms/{form}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/files', ...options, }); /** - * Get employment contract pending changes + * Lists custom fields definitions * - * Get all the pending changes (waiting for aproval or signature) for the employment contract. + * Returns custom fields definitions * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contracts (`contract:read`) | - | + * | Manage employments (`employments`) | - | Manage custom fields (`custom_field:write`) | * */ -export const getV1EmploymentContractsEmploymentIdPendingChanges = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentContractsEmploymentIdPendingChangesData, - ThrowOnError - >, +export const getV1CustomFields = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1EmploymentContractsEmploymentIdPendingChangesResponses, - GetV1EmploymentContractsEmploymentIdPendingChangesErrors, + (options?.client ?? client).get< + GetV1CustomFieldsResponses, + GetV1CustomFieldsErrors, ThrowOnError >({ - url: '/v1/employment-contracts/{employment_id}/pending-changes', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/custom-fields', ...options, }); /** - * Show Offboarding (v2) - * - * Returns a single offboarding by its ID. + * Create Custom Field Definition * + * Creates a new custom field definition. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | - * - */ -export const getV2OffboardingsId = ( - options: Options, -) => - (options.client ?? client).get< - GetV2OffboardingsIdResponses, - GetV2OffboardingsIdErrors, - ThrowOnError - >({ url: '/v2/offboardings/{id}', ...options }); - -/** - * Report SDK errors - * - * Receives error telemetry from the frontend SDK. - * Errors are logged to observability backend for monitoring and debugging. + * | Manage employments (`employments`) | View custom fields (`custom_field:read`) | Manage custom fields (`custom_field:write`) | * */ -export const postV1SdkTelemetryErrors = ( - options: Options, +export const postV1CustomFields = ( + options: Options, ) => (options.client ?? client).post< - PostV1SdkTelemetryErrorsResponses, - PostV1SdkTelemetryErrorsErrors, + PostV1CustomFieldsResponses, + PostV1CustomFieldsErrors, ThrowOnError >({ - url: '/v1/sdk/telemetry-errors', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/custom-fields', ...options, headers: { 'Content-Type': 'application/json', @@ -6355,271 +7075,331 @@ export const postV1SdkTelemetryErrors = ( }); /** - * Get Company Compliance Profile - * - * Returns the KYB and credit risk status for the company's default legal entity. + * List company supported currencies * + * List company supported currencies * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage company resources (`company_admin`) | View company currencies (`company_currencies:read`) | - | * */ -export const getV1CompaniesCompanyIdComplianceProfile = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1CompanyCurrencies = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdComplianceProfileResponses, - GetV1CompaniesCompanyIdComplianceProfileErrors, + (options?.client ?? client).get< + GetV1CompanyCurrenciesResponses, + GetV1CompanyCurrenciesErrors, ThrowOnError - >({ url: '/v1/companies/{company_id}/compliance-profile', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-currencies', + ...options, + }); /** - * Show payslip - * - * Given an ID, shows a payslip. - * - * Please contact api-support@remote.com to request access to this endpoint. + * Update employment * + * Updates an employment. Use this endpoint to: + * - modify employment states for testing + * - Backdate employment start dates * - * ## Scopes + * This endpoint will respond with a 404 outside of the Sandbox environment. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). * */ -export const getV1PayslipsId = ( - options: Options, +export const patchV1SandboxEmploymentsEmploymentId2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetV1PayslipsIdResponses, - GetV1PayslipsIdErrors, + (options.client ?? client).patch< + PatchV1SandboxEmploymentsEmploymentId2Responses, + PatchV1SandboxEmploymentsEmploymentId2Errors, ThrowOnError - >({ url: '/v1/payslips/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/employments/{employment_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Approve a time off cancellation request - * - * Approve a time off cancellation request. - * In order to approve a time off cancellation request, the timeoff status must be `cancel_requested`. + * Update employment * + * Updates an employment. Use this endpoint to: + * - modify employment states for testing + * - Backdate employment start dates * - * ## Scopes + * This endpoint will respond with a 404 outside of the Sandbox environment. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). * */ -export const postV1TimeoffTimeoffIdCancelRequestApprove = < +export const patchV1SandboxEmploymentsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1TimeoffTimeoffIdCancelRequestApproveData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdCancelRequestApproveResponses, - PostV1TimeoffTimeoffIdCancelRequestApproveErrors, + (options.client ?? client).put< + PatchV1SandboxEmploymentsEmploymentIdResponses, + PatchV1SandboxEmploymentsEmploymentIdErrors, ThrowOnError - >({ url: '/v1/timeoff/{timeoff_id}/cancel-request/approve', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/employments/{employment_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * List Webhook Events + * Get employment contract pending changes * - * List all webhook events + * Get all the pending changes (waiting for aproval or signature) for the employment contract. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | + * | Manage employments (`employments`) | View contracts (`contract:read`) | - | * */ -export const getV1WebhookEvents = ( - options?: Options, +export const getV1EmploymentContractsEmploymentIdPendingChanges = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentContractsEmploymentIdPendingChangesData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1WebhookEventsResponses, - GetV1WebhookEventsErrors, + (options.client ?? client).get< + GetV1EmploymentContractsEmploymentIdPendingChangesResponses, + GetV1EmploymentContractsEmploymentIdPendingChangesErrors, ThrowOnError - >({ url: '/v1/webhook-events', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employment-contracts/{employment_id}/pending-changes', + ...options, + }); /** - * List Time Off Types - * - * Lists all time off types that can be used for the `timeoff_type` parameter. - * - * **Backward compatibility:** Calling this endpoint without the `type` query parameter returns the same response as before (time off types for full-time employments). Existing integrations do not need to change. - * - * Optionally, pass `type=contractor` to get time off types for contractor employments, or `type=full_time` for full-time employments (same as omitting the parameter). + * Show Resignation * + * Shows the details of a resignation with status `submitted`. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | View resignations (`resignation:read`) | Manage resignations (`resignation:write`) | * */ -export const getV1TimeoffTypes = ( - options: Options, +export const getV1ResignationsOffboardingRequestId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1TimeoffTypesResponses, - GetV1TimeoffTypesErrors, + GetV1ResignationsOffboardingRequestIdResponses, + GetV1ResignationsOffboardingRequestIdErrors, ThrowOnError - >({ url: '/v1/timeoff/types', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/resignations/{offboarding_request_id}', + ...options, + }); /** - * List Company Legal Entities + * Upload file * - * Lists all active legal entities for the authorized company specified in the request. + * Uploads a file associated with a specified employment. + * + * Please contact api-support@remote.com to request access to this endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getV1CompaniesCompanyIdLegalEntities = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1Documents = ( + options: Options, ) => - (options.client ?? client).get< - GetV1CompaniesCompanyIdLegalEntitiesResponses, - GetV1CompaniesCompanyIdLegalEntitiesErrors, + (options.client ?? client).post< + PostV1DocumentsResponses, + PostV1DocumentsErrors, ThrowOnError - >({ url: '/v1/companies/{company_id}/legal-entities', ...options }); + >({ + ...formDataBodySerializer, + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/documents', + ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, + }); /** - * Create contract eligibility + * Invite employment + * + * Invite an employment to start the self-enrollment. + * + * Requirements for the invitation to succeed: + * + * * Employment needs to have the following JSON Schema forms filled: `contract_details` and `pricing_plan_details` + * * `provisional_start_date` must consider the minimum onboarding time of the employment's country + * + * If there are validations errors, they are returned with a Conflict HTTP Status (409) and a descriptive message. + * HTTP Status OK (200) is returned in case of success. * - * Create contract eligibility for an employment. + * In case of the following error message: + * `"Please reselect benefits - the previous selection is no longer available"` + * it means that the benefit options have been updated and the employment's benefits are no longer compliant with the new schema. * - * This will create a new contract eligibility for the employment. + * In this case, reselect benefits by updating `contract_details` JSON Schema form. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage contract eligibility (`contract_eligibility:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postV1EmploymentsEmploymentIdContractEligibility = < +export const postV1EmploymentsEmploymentIdInvite = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1EmploymentsEmploymentIdContractEligibilityData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).post< - PostV1EmploymentsEmploymentIdContractEligibilityResponses, - PostV1EmploymentsEmploymentIdContractEligibilityErrors, + PostV1EmploymentsEmploymentIdInviteResponses, + PostV1EmploymentsEmploymentIdInviteErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/contract-eligibility', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/invite', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List all currencies for the contractor - * - * The currencies are listed in the following order: - * 1. billing currency of the company - * 2. currencies of contractor’s existing withdrawal methods - * 3. currency of the contractor’s country - * 4. the rest, alphabetical. + * Show expense * + * Shows a single expense record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1ContractorsEmploymentsEmploymentIdContractorCurrencies = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData, - ThrowOnError - >, +export const getV1ExpensesId = ( + options: Options, ) => (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses, - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors, + GetV1ExpensesIdResponses, + GetV1ExpensesIdErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/contractor-currencies', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses/{id}', ...options, }); /** - * List payslips - * - * Lists all payslips belonging to a company. Can also filter for a single employment belonging - * to that company. + * Update an expense * + * Updates an expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * */ -export const getV1Payslips = ( - options?: Options, +export const patchV1ExpensesId2 = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1PayslipsResponses, - GetV1PayslipsErrors, + (options.client ?? client).patch< + PatchV1ExpensesId2Responses, + PatchV1ExpensesId2Errors, ThrowOnError - >({ url: '/v1/payslips', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Create employment - * - * Creates an employment without provisional_start_date validation. + * Update an expense * - * This endpoint is only available in Sandbox and allows creating employments which - * `provisional_start_date` is in the past. This is especially helpful for: - * * Testing the Timeoff Balance endpoints - * * Testing the Offboarding endpoints - * * Testing features around probation periods + * Updates an expense * - * This endpoint will respond with a 404 outside of the Sandbox environment. + * ## Scopes * - * For creating an employment's parameters outside of testing purposes, use [this - * Employment create endpoint](#operation/post_create_employment) + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * */ -export const postV1SandboxEmployments = ( - options: Options, +export const patchV1ExpensesId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1SandboxEmploymentsResponses, - PostV1SandboxEmploymentsErrors, + (options.client ?? client).put< + PatchV1ExpensesIdResponses, + PatchV1ExpensesIdErrors, ThrowOnError >({ - url: '/v1/sandbox/employments', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -6628,168 +7408,220 @@ export const postV1SandboxEmployments = ( }); /** - * Show employee emergency contact - * - * Returns the authenticated employee's emergency contact. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. - * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` - * as the form name to discover the schema for a given country. - * + * Show Benefit Renewal Request * + * Show Benefit Renewal Request details. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View emergency contacts (`emergency_contact:read`) | Manage emergency contacts (`emergency_contact:write`) | + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const getV1EmployeeEmergencyContact = < +export const getV1BenefitRenewalRequestsBenefitRenewalRequestId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData, + ThrowOnError + >, ) => - (options?.client ?? client).get< - GetV1EmployeeEmergencyContactResponses, - GetV1EmployeeEmergencyContactErrors, + (options.client ?? client).get< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, ThrowOnError - >({ url: '/v1/employee/emergency-contact', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', + ...options, + }); /** - * Update employee emergency contact - * - * Updates the authenticated employee's emergency contact. - * - * The employment is derived from the access token's subject — there is no - * employment id in the path. The token must be an employee-role token - * (typically obtained via the OAuth2 assertion grant with subject - * `urn:remote-api:employee:employment:`). - * - * This endpoint requires country-specific data. The exact required fields vary depending on which - * country the authenticated employee's employment is in. Query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` - * as the form name to discover the schema for a given country. - * + * Updates a Benefit Renewal Request Response * + * Updates a Benefit Renewal Request with the given response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage emergency contacts (`emergency_contact:write`) | + * | Manage company resources (`company_admin`) | - | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const putV1EmployeeEmergencyContact = < +export const postV1BenefitRenewalRequestsBenefitRenewalRequestId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options< + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData, + ThrowOnError + >, ) => - (options?.client ?? client).put< - PutV1EmployeeEmergencyContactResponses, - PutV1EmployeeEmergencyContactErrors, + (options.client ?? client).post< + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses, + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors, ThrowOnError >({ - url: '/v1/employee/emergency-contact', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Show Company Payroll Runs - * - * Given an ID, shows a payroll run. - * `employee_details` field is deprecated in favour of the `employee_details` endpoint and will be removed in the future. + * Show onboarding steps for an employment * + * Returns onboarding steps and substeps in a hierarchical, ordered structure. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1PayrollRunsPayrollRunId = < +export const getV1EmploymentsEmploymentIdOnboardingSteps = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1EmploymentsEmploymentIdOnboardingStepsData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1PayrollRunsPayrollRunIdResponses, - GetV1PayrollRunsPayrollRunIdErrors, + GetV1EmploymentsEmploymentIdOnboardingStepsResponses, + GetV1EmploymentsEmploymentIdOnboardingStepsErrors, ThrowOnError - >({ url: '/v1/payroll-runs/{payroll_run_id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/onboarding-steps', + ...options, + }); /** - * Show Offboarding + * Get employee token identity + * + * Returns user and company information for the authenticated employee. + */ +export const getV1EmployeeCurrent = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeCurrentResponses, + GetV1EmployeeCurrentErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/current', + ...options, + }); + +/** + * List company structure nodes + * + * Shows all the company structure nodes of an employment. * - * Shows an Offboarding request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | + * | Manage company resources (`company_admin`) | View company structure (`company_structure:read`) | - | * */ -export const getV1OffboardingsId = ( - options: Options, +export const getV1EmploymentsEmploymentIdCompanyStructureNodes = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1EmploymentsEmploymentIdCompanyStructureNodesData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1OffboardingsIdResponses, - GetV1OffboardingsIdErrors, + GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses, + GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors, ThrowOnError - >({ url: '/v1/offboardings/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/company-structure-nodes', + ...options, + }); /** - * List expenses + * List custom field value for an employment * - * Lists all expenses records + * Returns a list of custom field values for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | * */ -export const getV1Expenses = ( - options: Options, +export const getV1EmploymentsEmploymentIdCustomFields = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1ExpensesResponses, - GetV1ExpensesErrors, + GetV1EmploymentsEmploymentIdCustomFieldsResponses, + GetV1EmploymentsEmploymentIdCustomFieldsErrors, ThrowOnError - >({ url: '/v1/expenses', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/custom-fields', + ...options, + }); /** - * Create expense + * Validate resignation request * - * Creates an **approved** expense + * Validates a resignation employment request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage employments (`employments`) | - | Manage resignations (`resignation:write`) | * */ -export const postV1Expenses = ( - options: Options, +export const putV1ResignationsOffboardingRequestIdValidate = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1ResignationsOffboardingRequestIdValidateData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1ExpensesResponses, - PostV1ExpensesErrors, + (options.client ?? client).put< + PutV1ResignationsOffboardingRequestIdValidateResponses, + PutV1ResignationsOffboardingRequestIdValidateErrors, ThrowOnError >({ - url: '/v1/expenses', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/resignations/{offboarding_request_id}/validate', ...options, headers: { 'Content-Type': 'application/json', @@ -6798,85 +7630,164 @@ export const postV1Expenses = ( }); /** - * List payslip files for the authenticated employee + * Reassign default legal entity * - * Returns a paginated list of payslip files belonging to the current employee. + * Set a different legal entity as the company's default entity. + * + * The default entity is used when creating new employments without an explicit entity. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + */ +export const putV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData, + ThrowOnError + >, +) => + (options.client ?? client).put< + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses, + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}', + ...options, + }); + +/** + * List Webhook Callbacks + * + * List callbacks for a given company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage company resources (`company_admin`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | * */ -export const getV1EmployeePayslipFiles = ( - options?: Options, +export const getV1CompaniesCompanyIdWebhookCallbacks = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeePayslipFilesResponses, - GetV1EmployeePayslipFilesErrors, + (options.client ?? client).get< + GetV1CompaniesCompanyIdWebhookCallbacksResponses, + GetV1CompaniesCompanyIdWebhookCallbacksErrors, ThrowOnError - >({ url: '/v1/employee/payslip-files', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/webhook-callbacks', + ...options, + }); /** - * Invite employment - * - * Invite an employment to start the self-enrollment. + * Show contractor eligibility and COR-supported countries for legal entity * - * Requirements for the invitation to succeed: + * Returns which contractor products (standard, plus, cor) the legal entity is eligible to use, + * and the list of country codes where COR is supported for this legal entity. + * COR-supported countries exclude sanctioned and signup-prevented countries and apply entity rules (same-country, local-to-local). + * When the legal entity is not COR-eligible, `cor_supported_country_codes` is an empty list. * - * * Employment needs to have the following JSON Schema forms filled: `contract_details` and `pricing_plan_details` - * * `provisional_start_date` must consider the minimum onboarding time of the employment's country * - * If there are validations errors, they are returned with a Conflict HTTP Status (409) and a descriptive message. - * HTTP Status OK (200) is returned in case of success. + * ## Scopes * - * In case of the following error message: - * `"Please reselect benefits - the previous selection is no longer available"` - * it means that the benefit options have been updated and the employment's benefits are no longer compliant with the new schema. + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * - * In this case, reselect benefits by updating `contract_details` JSON Schema form. + */ +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility = + ( + options: Options< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData, + ThrowOnError + >, + ) => + (options.client ?? client).get< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility', + ...options, + }); + +/** + * Show a custom field value * + * Returns a custom field value for a given employment * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | * */ -export const postV1EmploymentsEmploymentIdInvite = < +export const getV1CustomFieldsCustomFieldIdValuesEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1EmploymentsEmploymentIdInviteResponses, - PostV1EmploymentsEmploymentIdInviteErrors, + (options.client ?? client).get< + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}/invite', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + ...options, + }); /** - * Create Probation Extension + * Update a Custom Field Value * - * Create a probation extension request. + * Updates a custom field value for a given employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | + * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | * */ -export const postV1ProbationExtensions = ( - options: Options, +export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2 = < + ThrowOnError extends boolean = false, +>( + options: Options< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1ProbationExtensionsResponses, - PostV1ProbationExtensionsErrors, + (options.client ?? client).patch< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors, ThrowOnError >({ - url: '/v1/probation-extensions', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -6885,63 +7796,46 @@ export const postV1ProbationExtensions = ( }); /** - * List contractor of record (COR) termination requests - * - * Lists Contractor of Record termination requests for your company, - * optionally filtered by employment and status. + * Update a Custom Field Value * + * Updates a custom field value for a given employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | - * - */ -export const getV1ContractorsCorTerminationRequests = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetV1ContractorsCorTerminationRequestsResponses, - GetV1ContractorsCorTerminationRequestsErrors, - ThrowOnError - >({ url: '/v1/contractors/cor-termination-requests', ...options }); - -/** - * Approve Contract Amendment - * - * Approves a contract amendment request without the intervention of a Remote admin. - * Approvals done via this endpoint are effective immediately, - * regardless of the effective date entered on the contract amendment creation. - * - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | * */ -export const putV1SandboxContractAmendmentsContractAmendmentRequestIdApprove = < +export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId = < ThrowOnError extends boolean = false, >( options: Options< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData, ThrowOnError >, ) => (options.client ?? client).put< - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses, - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, ThrowOnError >({ - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Get Onboarding Reserves Status for Employment - * - * Returns the onboarding reserves status for a specific employment. + * Show a contractor of record (COR) termination request * - * The status is the same as the credit risk status but takes the onboarding reserves policies into account. + * Retrieves a Contractor of Record termination request by ID. * * * ## Scopes @@ -6951,177 +7845,251 @@ export const putV1SandboxContractAmendmentsContractAmendmentRequestIdApprove = < * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus = +export const getV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId = ( options: Options< - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData, + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData, ThrowOnError >, ) => (options.client ?? client).get< - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses, - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors, + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses, + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors, ThrowOnError >({ - url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}', ...options, }); /** - * Show Contractor Invoice + * Terminate contractor of record employment + * + * **Deprecated.** Use `POST /contractors/employments/{employment_id}/cor-termination-requests` instead. + * + * Initiates a termination request for a Contractor of Record employment. + * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. + * Currently, only Contractor of Record employments can be terminated. * - * Shows a single Contractor Invoice record. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * + * + * @deprecated */ -export const getV1ContractorInvoicesId = ( - options: Options, +export const postV1ContractorsEmploymentsEmploymentIdTerminateCorEmployment = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetV1ContractorInvoicesIdResponses, - GetV1ContractorInvoicesIdErrors, + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses, + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors, ThrowOnError - >({ url: '/v1/contractor-invoices/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment', + ...options, + }); + +/** + * Sign a document for a contractor + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * + */ +export const postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign = + ( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Payroll Feature API resource + * Get token identity * - * API to retrieve feature properties from the vendor system - */ -export const getV1WdGphPayProcessingFeature = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetV1WdGphPayProcessingFeatureResponses, - GetV1WdGphPayProcessingFeatureErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/wd/gph/payProcessingFeature', - ...options, - }); - -/** - * Payroll processing progress API resource + * Shows information about the entities that can be controlled by the current auth token. * - * API to retrieve the processing stages of a pay group */ -export const getV1WdGphPayProgress = ( - options: Options, +export const getV1IdentityCurrent = ( + options: Options, ) => (options.client ?? client).get< - GetV1WdGphPayProgressResponses, - GetV1WdGphPayProgressErrors, + GetV1IdentityCurrentResponses, + GetV1IdentityCurrentErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/wd/gph/payProgress', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/identity/current', ...options, }); /** - * List company supported currencies + * Delete an Incentive + * + * Delete an incentive. + * + * `one_time` incentives that have the following status **CANNOT** be deleted: + * * `processing` + * * `paid` * - * List company supported currencies * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View company currencies (`company_currencies:read`) | - | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getV1CompanyCurrencies = ( - options?: Options, +export const deleteV1IncentivesId = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1CompanyCurrenciesResponses, - GetV1CompanyCurrenciesErrors, + (options.client ?? client).delete< + DeleteV1IncentivesIdResponses, + DeleteV1IncentivesIdErrors, ThrowOnError - >({ url: '/v1/company-currencies', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/{id}', + ...options, + }); /** - * Get a employment benefit offers JSON schema + * Show Incentive + * + * Show an Incentive's details * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getV1EmploymentsEmploymentIdBenefitOffersSchema = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1EmploymentsEmploymentIdBenefitOffersSchemaData, - ThrowOnError - >, +export const getV1IncentivesId = ( + options: Options, ) => (options.client ?? client).get< - GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses, - GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors, + GetV1IncentivesIdResponses, + GetV1IncentivesIdErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/benefit-offers/schema', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/{id}', ...options, }); /** - * List Contractor Invoice Schedules + * Update Incentive + * + * Updates an Incentive. + * + * Incentives use the currency of the employment specified provided in the `employment_id` field. + * + * The API doesn't support updating paid incentives. * - * Lists Contractor Invoice Schedule records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getV1ContractorInvoiceSchedules = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const patchV1IncentivesId2 = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1ContractorInvoiceSchedulesResponses, - GetV1ContractorInvoiceSchedulesErrors, + (options.client ?? client).patch< + PatchV1IncentivesId2Responses, + PatchV1IncentivesId2Errors, ThrowOnError - >({ url: '/v1/contractor-invoice-schedules', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Create Contractor Invoice Schedules + * Update Incentive * - * Creates many invoice schedules records. - * It's supposed to return two lists: one containing created records, and another one containing the schedules that failed to be inserted. + * Updates an Incentive. + * + * Incentives use the currency of the employment specified provided in the `employment_id` field. + * + * The API doesn't support updating paid incentives. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postV1ContractorInvoiceSchedules = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchV1IncentivesId = ( + options: Options, ) => - (options.client ?? client).post< - PostV1ContractorInvoiceSchedulesResponses, - PostV1ContractorInvoiceSchedulesErrors, + (options.client ?? client).put< + PatchV1IncentivesIdResponses, + PatchV1IncentivesIdErrors, ThrowOnError >({ - url: '/v1/contractor-invoice-schedules', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/incentives/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7130,275 +8098,286 @@ export const postV1ContractorInvoiceSchedules = < }); /** - * Show work authorization request + * Get eligibility questionnaire schema + * + * Returns the JSON schema for the eligibility questionnaire by type. + * + * The schema defines the structure and validation rules for the questionnaire responses. + * Supports versioning to allow for schema evolution while maintaining backwards compatibility. * - * Show a single work authorization request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getV1WorkAuthorizationRequestsId = < +export const getV1ContractorsSchemasEligibilityQuestionnaire = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1ContractorsSchemasEligibilityQuestionnaireData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1WorkAuthorizationRequestsIdResponses, - GetV1WorkAuthorizationRequestsIdErrors, + GetV1ContractorsSchemasEligibilityQuestionnaireResponses, + GetV1ContractorsSchemasEligibilityQuestionnaireErrors, ThrowOnError - >({ url: '/v1/work-authorization-requests/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/schemas/eligibility-questionnaire', + ...options, + }); /** - * Update work authorization request + * List work authorization requests * - * Updates a work authorization request. + * List work authorization requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | + * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | * */ -export const patchV1WorkAuthorizationRequestsId2 = < +export const getV1WorkAuthorizationRequests = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).patch< - PatchV1WorkAuthorizationRequestsId2Responses, - PatchV1WorkAuthorizationRequestsId2Errors, + (options?.client ?? client).get< + GetV1WorkAuthorizationRequestsResponses, + GetV1WorkAuthorizationRequestsErrors, ThrowOnError >({ - url: '/v1/work-authorization-requests/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/work-authorization-requests', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update work authorization request - * - * Updates a work authorization request. + * Show bulk employment job * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage work authorizations (`work_authorization:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const patchV1WorkAuthorizationRequestsId = < +export const getV1BulkEmploymentJobsJobId = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchV1WorkAuthorizationRequestsIdResponses, - PatchV1WorkAuthorizationRequestsIdErrors, + (options.client ?? client).get< + GetV1BulkEmploymentJobsJobIdResponses, + GetV1BulkEmploymentJobsJobIdErrors, ThrowOnError >({ - url: '/v1/work-authorization-requests/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/bulk-employment-jobs/{job_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Decline Time Off + * List Pay Items * - * Decline a time off request. Please note that only time off requests on the `requested` status can be declined. + * Lists pay items for a company with optional filtering by employment, date range, and pagination. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage payroll runs (`payroll`) | View pay items (`pay_item:read`) | Manage pay items (`pay_item:write`) | * */ -export const postV1TimeoffTimeoffIdDecline = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getV1PayItems = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1TimeoffTimeoffIdDeclineResponses, - PostV1TimeoffTimeoffIdDeclineErrors, + (options?.client ?? client).get< + GetV1PayItemsResponses, + GetV1PayItemsErrors, ThrowOnError >({ - url: '/v1/timeoff/{timeoff_id}/decline', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/pay-items', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get eligibility questionnaire schema - * - * Returns the JSON schema for the eligibility questionnaire by type. + * List Benefit Offers * - * The schema defines the structure and validation rules for the questionnaire responses. - * Supports versioning to allow for schema evolution while maintaining backwards compatibility. + * List benefit offers for each country. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const getV1ContractorsSchemasEligibilityQuestionnaire = < +export const getV1BenefitOffersCountrySummaries = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1ContractorsSchemasEligibilityQuestionnaireData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1ContractorsSchemasEligibilityQuestionnaireResponses, - GetV1ContractorsSchemasEligibilityQuestionnaireErrors, - ThrowOnError - >({ url: '/v1/contractors/schemas/eligibility-questionnaire', ...options }); - -/** - * Token - * - * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows - */ -export const postAuthOauth2Token = ( - options?: Options, -) => - (options?.client ?? client).post< - PostAuthOauth2TokenResponses, - PostAuthOauth2TokenErrors, + GetV1BenefitOffersCountrySummariesResponses, + GetV1BenefitOffersCountrySummariesErrors, ThrowOnError >({ - url: '/oauth2/token', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/benefit-offers/country-summaries', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Delete contractor of record subscription intent + * List Benefit Offers By Employment * - * Deletes Contractor of Record subscription intent. + * List benefit offers by employment. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = - ( - options: Options< - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, - ThrowOnError - >, - ) => - (options.client ?? client).delete< - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, - ThrowOnError - >({ - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', - ...options, - }); +export const getV1BenefitOffers = ( + options: Options, +) => + (options.client ?? client).get< + GetV1BenefitOffersResponses, + GetV1BenefitOffersErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/benefit-offers', + ...options, + }); /** - * Create contractor of record subscription intent + * Cancel Contract Amendment * - * Assigns Contractor of Record subscription in pending state to employment. - * Once risk analysis is performed, subscription may start upon contract signing, - * or might be denied. + * Use this endpoint to cancel an existing contract amendment request. * - * Requires a non-blocking eligibility questionnaire to be submitted before creating the subscription intent. + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * + */ +export const putV1SandboxContractAmendmentsContractAmendmentRequestIdCancel = < + ThrowOnError extends boolean = false, +>( + options: Options< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData, + ThrowOnError + >, +) => + (options.client ?? client).put< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses, + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel', + ...options, + }); + +/** + * List employee time offs * + * Lists the current employee's time off records * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = - ( - options: Options< - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, - ThrowOnError - >, - ) => - (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, - ThrowOnError - >({ - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', - ...options, - }); +export const getV1EmployeeTimeoff = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeTimeoffResponses, + GetV1EmployeeTimeoffErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/timeoff', + ...options, + }); /** - * Update personal details - * - * Updates employment's personal details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. - * + * Create a Pending Time Off * + * Creates a pending Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const putV2EmploymentsEmploymentIdPersonalDetails = < +export const postV1EmployeeTimeoff = ( + options: Options, +) => + (options.client ?? client).post< + PostV1EmployeeTimeoffResponses, + PostV1EmployeeTimeoffErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/timeoff', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * Update employment + */ +export const patchV2EmploymentsEmploymentId2 = < ThrowOnError extends boolean = false, >( - options: Options< - PutV2EmploymentsEmploymentIdPersonalDetailsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdPersonalDetailsResponses, - PutV2EmploymentsEmploymentIdPersonalDetailsErrors, + (options.client ?? client).patch< + PatchV2EmploymentsEmploymentId2Responses, + PatchV2EmploymentsEmploymentId2Errors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/personal_details', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v2/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7407,34 +8386,20 @@ export const putV2EmploymentsEmploymentIdPersonalDetails = < }); /** - * Find or create a pre-onboarding document for an employment - * - * Finds an existing unsigned pre-onboarding document for the given requirement, or creates a new one. - * Idempotent: repeated calls with the same `pre_onboarding_document_requirement_slug` return the same - * document until it is signed. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | - * + * Update employment */ -export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocuments = < +export const patchV2EmploymentsEmploymentId = < ThrowOnError extends boolean = false, >( - options: Options< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).post< - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses, - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors, + (options.client ?? client).put< + PatchV2EmploymentsEmploymentIdResponses, + PatchV2EmploymentsEmploymentIdErrors, ThrowOnError >({ - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v2/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7443,57 +8408,70 @@ export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocuments = < }); /** - * Show Contract Amendment + * Show Probation Extension + * + * Shows a Probation Extension Request. * - * Show a single Contract Amendment request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | + * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | * */ -export const getV1ContractAmendmentsId = ( - options: Options, +export const getV1ProbationExtensionsId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetV1ContractAmendmentsIdResponses, - GetV1ContractAmendmentsIdErrors, + GetV1ProbationExtensionsIdResponses, + GetV1ProbationExtensionsIdErrors, ThrowOnError - >({ url: '/v1/contract-amendments/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/probation-extensions/{id}', + ...options, + }); /** - * Decline Identity Verification + * List payslips * - * Declines the identity verification of an employee. + * Lists all payslips belonging to a company. Can also filter for a single employment belonging + * to that company. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | + * | Manage employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | * */ -export const postV1IdentityVerificationEmploymentIdDecline = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostV1IdentityVerificationEmploymentIdDeclineData, - ThrowOnError - >, +export const getV1Payslips = ( + options?: Options, ) => - (options.client ?? client).post< - PostV1IdentityVerificationEmploymentIdDeclineResponses, - PostV1IdentityVerificationEmploymentIdDeclineErrors, + (options?.client ?? client).get< + GetV1PayslipsResponses, + GetV1PayslipsErrors, ThrowOnError - >({ url: '/v1/identity-verification/{employment_id}/decline', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payslips', + ...options, + }); /** - * List expense categories for the authenticated employee + * Download a receipt by id * - * Returns the flat list of expense categories applicable to the current employee. Only active categories are returned, filtered by the employee's country / legal-entity visibility rules. Leaf nodes have `is_selectable: true`; parent nodes are excluded unless `include_parents=true`. + * Download a receipt by id. * * ## Scopes * @@ -7502,33 +8480,39 @@ export const postV1IdentityVerificationEmploymentIdDecline = < * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getV1EmployeeExpenseCategories = < +export const getV1ExpensesExpenseIdReceiptsReceiptId = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeExpenseCategoriesResponses, - GetV1EmployeeExpenseCategoriesErrors, + (options.client ?? client).get< + GetV1ExpensesExpenseIdReceiptsReceiptIdResponses, + GetV1ExpensesExpenseIdReceiptsReceiptIdErrors, ThrowOnError - >({ url: '/v1/employee/expense-categories', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/expenses/{expense_id}/receipts/{receipt_id}', + ...options, + }); /** - * Creates a CSV cost estimation of employments - * - * Creates CSV cost estimation of employments - */ -export const postV1CostCalculatorEstimationCsv = < - ThrowOnError extends boolean = false, ->( - options?: Options, + * Token + * + * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows + */ +export const postAuthOauth2Token = ( + options?: Options, ) => (options?.client ?? client).post< - PostV1CostCalculatorEstimationCsvResponses, - PostV1CostCalculatorEstimationCsvErrors, + PostAuthOauth2TokenResponses, + PostAuthOauth2TokenErrors, ThrowOnError >({ - url: '/v1/cost-calculator/estimation-csv', + security: [{ scheme: 'basic', type: 'http' }], + url: '/auth/oauth2/token', ...options, headers: { 'Content-Type': 'application/json', @@ -7537,227 +8521,246 @@ export const postV1CostCalculatorEstimationCsv = < }); /** - * Retrieve a pre-onboarding document with its rendered PDF content + * Update pricing plan details * - * Returns the rendered contract PDF (base64-encoded) and the list of signatories for the given - * pre-onboarding document. The `content` field is prefixed with `data:application/pdf;base64,` so - * it can be embedded directly in a document viewer. + * Updates the pricing plan for an employment. The frequency determines how often Remote bills the + * employer for management fees. Annual billing typically offers a discount. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId = < +export const putV2EmploymentsEmploymentIdPricingPlanDetails = < ThrowOnError extends boolean = false, >( options: Options< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData, + PutV2EmploymentsEmploymentIdPricingPlanDetailsData, ThrowOnError >, ) => - (options.client ?? client).get< - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses, - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses, + PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors, ThrowOnError >({ - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/pricing_plan_details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Billing Documents + * Show legal entity administrative details form schema + * + * Returns the json schema of a supported form. Possible form names are: + * ``` + * - administrative_details + * ``` + * + * Most forms require a company access token, as they are dependent on certain + * properties of companies and their current employments. + * * - * List billing documents for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const getV1BillingDocuments = ( - options: Options, +export const getV1CountriesCountryCodeLegalEntityFormsForm = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1CountriesCountryCodeLegalEntityFormsFormData, + ThrowOnError + >, ) => (options.client ?? client).get< - GetV1BillingDocumentsResponses, - GetV1BillingDocumentsErrors, + GetV1CountriesCountryCodeLegalEntityFormsFormResponses, + GetV1CountriesCountryCodeLegalEntityFormsFormErrors, ThrowOnError - >({ url: '/v1/billing-documents', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/countries/{country_code}/legal_entity_forms/{form}', + ...options, + }); /** - * Show Billing Document - * - * Shows a billing document details. + * Manage contractor plus subscription * - * Please contact api-support@remote.com to request access to this endpoint. + * Endpoint that can be used to upgrade, assign or downgrade a contractor's subscription. + * This can be used when company admins desire to assign someone to the Contractor Plus plan, + * but also to change the contractor's subscription between Plus and Standard. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getV1BillingDocumentsBillingDocumentId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1BillingDocumentsBillingDocumentIdResponses, - GetV1BillingDocumentsBillingDocumentIdErrors, - ThrowOnError - >({ url: '/v1/billing-documents/{billing_document_id}', ...options }); +export const postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription = + ( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses, + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Indexes all the documents for the employee + * List Time Off + * + * Lists all Time Off records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getV1EmployeeDocuments = ( - options?: Options, +export const getV1Timeoff = ( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeDocumentsResponses, - GetV1EmployeeDocumentsErrors, + (options.client ?? client).get< + GetV1TimeoffResponses, + GetV1TimeoffErrors, ThrowOnError - >({ url: '/v1/employee/documents', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff', + ...options, + }); /** - * Upload employee file - * - * Uploads a file owned by the authenticated employee, for example - * identity documents or tax forms. + * Create Time Off * + * Creates a Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1EmployeeDocuments = ( - options: Options, +export const postV1Timeoff = ( + options: Options, ) => (options.client ?? client).post< - PostV1EmployeeDocumentsResponses, - PostV1EmployeeDocumentsErrors, + PostV1TimeoffResponses, + PostV1TimeoffErrors, ThrowOnError >({ - ...formDataBodySerializer, - url: '/v1/employee/documents', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff', ...options, headers: { - 'Content-Type': null, + 'Content-Type': 'application/json', ...options.headers, }, }); /** - * List employee time offs + * List Company Payroll Runs * - * Lists the current employee's time off records + * Lists all payroll runs for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | + * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const getV1EmployeeTimeoff = ( - options?: Options, +export const getV1PayrollRuns = ( + options?: Options, ) => (options?.client ?? client).get< - GetV1EmployeeTimeoffResponses, - GetV1EmployeeTimeoffErrors, - ThrowOnError - >({ url: '/v1/employee/timeoff', ...options }); - -/** - * Create a Pending Time Off - * - * Creates a pending Time Off record - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | - * - */ -export const postV1EmployeeTimeoff = ( - options: Options, -) => - (options.client ?? client).post< - PostV1EmployeeTimeoffResponses, - PostV1EmployeeTimeoffErrors, + GetV1PayrollRunsResponses, + GetV1PayrollRunsErrors, ThrowOnError >({ - url: '/v1/employee/timeoff', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/payroll-runs', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update personal details - * - * Updates employment's personal details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * Find or create a pre-onboarding document for an employment * + * Finds an existing unsigned pre-onboarding document for the given requirement, or creates a new one. + * Idempotent: repeated calls with the same `pre_onboarding_document_requirement_slug` return the same + * document until it is signed. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const putV1EmploymentsEmploymentIdPersonalDetails = < +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocuments = < ThrowOnError extends boolean = false, >( options: Options< - PutV1EmploymentsEmploymentIdPersonalDetailsData, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV1EmploymentsEmploymentIdPersonalDetailsResponses, - PutV1EmploymentsEmploymentIdPersonalDetailsErrors, + (options.client ?? client).post< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}/personal_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents', ...options, headers: { 'Content-Type': 'application/json', @@ -7766,94 +8769,79 @@ export const putV1EmploymentsEmploymentIdPersonalDetails = < }); /** - * Show Probation Extension - * - * Shows a Probation Extension Request. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | - * - */ -export const getV1ProbationExtensionsId = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetV1ProbationExtensionsIdResponses, - GetV1ProbationExtensionsIdErrors, - ThrowOnError - >({ url: '/v1/probation-extensions/{id}', ...options }); - -/** - * Download file - * - * Downloads a file. - * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * Get group by ID via SCIM v2.0 * + * Retrieves a single group (department) for the authenticated company by group ID */ -export const getV1FilesId = ( - options: Options, +export const getV1ScimV2GroupsId = ( + options: Options, ) => (options.client ?? client).get< - GetV1FilesIdResponses, - GetV1FilesIdErrors, + GetV1ScimV2GroupsIdResponses, + GetV1ScimV2GroupsIdErrors, ThrowOnError - >({ url: '/v1/files/{id}', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/scim/v2/Groups/{id}', + ...options, + }); /** - * List Company Departments - * - * Lists all departments for the authorized company specified in the request. + * List Employment Contract. * + * Get the employment contract history for a given employment. If `only_active` is true, it will return only the active or last active contract. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View departments (`company_department:read`) | Manage departments (`company_department:write`) | + * | Manage employments (`employments`) | View contracts (`contract:read`) | - | * */ -export const getV1CompanyDepartments = ( - options: Options, +export const getV1EmploymentContracts = ( + options: Options, ) => (options.client ?? client).get< - GetV1CompanyDepartmentsResponses, - GetV1CompanyDepartmentsErrors, + GetV1EmploymentContractsResponses, + GetV1EmploymentContractsErrors, ThrowOnError - >({ url: '/v1/company-departments', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employment-contracts', + ...options, + }); /** - * Create New Department + * Convert currency using dynamic rates * - * Creates a new department in the specified company. Department names may be non-unique and must be non-empty with no more than 255 characters (Unicode code points). + * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage departments (`company_department:write`) | + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | * */ -export const postV1CompanyDepartments = ( - options: Options, +export const postV1CurrencyConverterEffective2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostV1CompanyDepartmentsResponses, - PostV1CompanyDepartmentsErrors, + PostV1CurrencyConverterEffective2Responses, + PostV1CurrencyConverterEffective2Errors, ThrowOnError >({ - url: '/v1/company-departments', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/currency-converter', ...options, headers: { 'Content-Type': 'application/json', @@ -7862,119 +8850,95 @@ export const postV1CompanyDepartments = ( }); /** - * Get Employee Details for a Payroll Run + * List all companies * - * Gets the employee details for a payroll run + * List all companies that authorized your integration to act on their behalf. In other words, these are all the companies that your integration can manage. Any company that has completed the authorization flow for your integration will be included in the response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const getV1PayrollRunsPayrollRunIdEmployeeDetails = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1PayrollRunsPayrollRunIdEmployeeDetailsData, - ThrowOnError - >, +export const getV1Companies = ( + options: Options, ) => (options.client ?? client).get< - GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses, - GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors, + GetV1CompaniesResponses, + GetV1CompaniesErrors, ThrowOnError - >({ url: '/v1/payroll-runs/{payroll_run_id}/employee-details', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies', + ...options, + }); /** - * Show employment + * Create a company * - * Shows all the information of an employment. + * Creates a new company. * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * ### Creating a company with only the required request body parameters + * When you call this endpoint and omit all the optional parameters in the request body, + * the following resources get created upon a successful response: + * * A new company with status `pending`. + * * A company owner for the new company with status `initiated`. * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. + * See the [update a company endpoint](#tag/Companies/operation/patch_update_company) for + * more details on how to get your company and its owner to `active` status. * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. + * If you'd like to create a company and its owner with `active` status in a single request, + * please provide the optional `address_details` parameter as well. * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * ### Accepting the Terms of Service * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. + * A required step for creating a company in Remote is to accept our Terms of Service (ToS). + * + * Company managers need to be aware of our Terms of Service and Privacy Policy, + * hence **it's the responsibility of our partners to advise and ensure company managers read + * and accept the ToS**. The terms have to be accepted only once, before creating a company, + * and the Remote API will collect the acceptance timestamp as its confirmation. + * + * To ensure users read the most recent version of Remote's Terms of Service, their **acceptance + * must be done within the last fifteen minutes prior the company creation action**. * + * To retrieve this information, partners can provide an element with any text and a description + * explaining that by performing that action they are accepting Remote's Term of Service. For + * instance, the partner can add a checkbox or a "Create Remote Account" button followed by a + * description saying "By creating an account, you agree to + * [Remote's Terms of Service](https://remote.com/terms-of-service). Also see Remote's + * [Privacy Policy](https://remote.com/privacy-policy)". * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const getV1EmploymentsEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1Companies = ( + options: Options, ) => - (options.client ?? client).get< - GetV1EmploymentsEmploymentIdResponses, - GetV1EmploymentsEmploymentIdErrors, + (options.client ?? client).post< + PostV1CompaniesResponses, + PostV1CompaniesErrors, ThrowOnError - >({ url: '/v1/employments/{employment_id}', ...options }); + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/companies', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Update employment - * - * Updates an employment. - * - * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. - * - * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. - * - * **For `invited` employments:** You can update the work_email. - * - * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. - * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. - * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. - * Currently, these amendments can only be done through the Remote UI. - * - * It is possible to update the `external_id` of the employment for all employment statuses. - * - * ## Global Payroll Employees - * - * To update a Global Payment employment your input data must comply with the global payroll json schemas. - * - * **For `active` employments:** In addition to the above list, you can update personal_details. - * - * ## Direct Employees - * - * To update an HRIS employment your input data must comply with the HRIS json schemas. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. - * - * - * Please contact Remote if you need to update contractors via API since it's currently not supported. + * Create bulk employment job * + * Creates a job to bulk-create employments for multiple employees at once. Each employee payload must match the employment schema for the selected country. * * ## Scopes * @@ -7983,90 +8947,53 @@ export const getV1EmploymentsEmploymentId = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const patchV1EmploymentsEmploymentId2 = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postV1BulkEmploymentJobs = ( + options?: Options, ) => - (options.client ?? client).patch< - PatchV1EmploymentsEmploymentId2Responses, - PatchV1EmploymentsEmploymentId2Errors, + (options?.client ?? client).post< + PostV1BulkEmploymentJobsResponses, + PostV1BulkEmploymentJobsErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/bulk-employment-jobs', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Update employment - * - * Updates an employment. - * - * **For `created` employments:** You can change all basic params and onboarding tasks or perform a per onboarding task update. You can also update basic_information. - * - * **For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email. - * - * **For `invited` employments:** You can update the work_email. - * - * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`. - * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited. - * We block updates to some employment data because employees need to agree to amendments in certain cases, such as when there are changes to their contract_details. - * Currently, these amendments can only be done through the Remote UI. - * - * It is possible to update the `external_id` of the employment for all employment statuses. - * - * ## Global Payroll Employees - * - * To update a Global Payment employment your input data must comply with the global payroll json schemas. - * - * **For `active` employments:** In addition to the above list, you can update personal_details. - * - * ## Direct Employees - * - * To update an HRIS employment your input data must comply with the HRIS json schemas. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. - * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. - * - * - * Please contact Remote if you need to update contractors via API since it's currently not supported. + * Send back a timesheet for review or modification * + * Sends the given timesheet back to the employee for review or modification. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const patchV1EmploymentsEmploymentId = < +export const postV1TimesheetsTimesheetIdSendBack = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchV1EmploymentsEmploymentIdResponses, - PatchV1EmploymentsEmploymentIdErrors, + (options.client ?? client).post< + PostV1TimesheetsTimesheetIdSendBackResponses, + PostV1TimesheetsTimesheetIdSendBackErrors, ThrowOnError >({ - url: '/v1/employments/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timesheets/{timesheet_id}/send-back', ...options, headers: { 'Content-Type': 'application/json', @@ -8075,81 +9002,100 @@ export const patchV1EmploymentsEmploymentId = < }); /** - * List timesheets for the authenticated employee + * Deletes a Company Manager user * - * Returns a paginated list of timesheets for the authenticated employee. + * Deletes a Company Manager user * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | * */ -export const getV1EmployeeTimesheets = ( - options?: Options, +export const deleteV1CompanyManagersUserId = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeeTimesheetsResponses, - GetV1EmployeeTimesheetsErrors, + (options.client ?? client).delete< + DeleteV1CompanyManagersUserIdResponses, + DeleteV1CompanyManagersUserIdErrors, ThrowOnError - >({ url: '/v1/employee/timesheets', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-managers/{user_id}', + ...options, + }); /** - * Show a custom field value + * Show company manager user * - * Returns a custom field value for a given employment + * Shows a single company manager user * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View custom field values (`custom_field_value:read`) | Manage custom field values (`custom_field_value:write`) | + * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | * */ -export const getV1CustomFieldsCustomFieldIdValuesEmploymentId = < +export const getV1CompanyManagersUserId = < ThrowOnError extends boolean = false, >( - options: Options< - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, + GetV1CompanyManagersUserIdResponses, + GetV1CompanyManagersUserIdErrors, ThrowOnError >({ - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/company-managers/{user_id}', ...options, }); /** - * Update a Custom Field Value + * Update emergency contact + * + * Updates the employment's emergency contact details. + * + * This endpoint requires country-specific data. Query the **Show form schema** endpoint + * passing the country code and `emergency_contact_details` as path parameters to see + * the required fields for a given country. * - * Updates a custom field value for a given employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2 = < +export const putV2EmploymentsEmploymentIdEmergencyContact = < ThrowOnError extends boolean = false, >( options: Options< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data, + PutV2EmploymentsEmploymentIdEmergencyContactData, ThrowOnError >, ) => - (options.client ?? client).patch< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses, - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors, + (options.client ?? client).put< + PutV2EmploymentsEmploymentIdEmergencyContactResponses, + PutV2EmploymentsEmploymentIdEmergencyContactErrors, ThrowOnError >({ - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v2/employments/{employment_id}/emergency_contact', ...options, headers: { 'Content-Type': 'application/json', @@ -8158,117 +9104,267 @@ export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2 = < }); /** - * Update a Custom Field Value + * List expenses for the authenticated employee * - * Updates a custom field value for a given employment. + * Returns a paginated list of expenses belonging to the current employee. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId = < - ThrowOnError extends boolean = false, ->( - options: Options< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData, +export const getV1EmployeeExpenses = ( + options?: Options, +) => + (options?.client ?? client).get< + GetV1EmployeeExpensesResponses, + GetV1EmployeeExpensesErrors, ThrowOnError - >, + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/expenses', + ...options, + }); + +/** + * Create an expense for the authenticated employee + * + * Creates a new expense record for the current employee. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * + */ +export const postV1EmployeeExpenses = ( + options?: Options, ) => - (options.client ?? client).put< - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses, - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors, + (options?.client ?? client).post< + PostV1EmployeeExpensesResponses, + PostV1EmployeeExpensesErrors, ThrowOnError >({ - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/expenses', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Validate resignation request + * Delete contractor of record subscription intent + * + * Deletes Contractor of Record subscription intent. * - * Validates a resignation employment request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage resignations (`resignation:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV1ResignationsOffboardingRequestIdValidate = < +export const deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = + ( + options: Options< + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, + ThrowOnError + >, + ) => + (options.client ?? client).delete< + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', + ...options, + }); + +/** + * Create contractor of record subscription intent + * + * Assigns Contractor of Record subscription in pending state to employment. + * Once risk analysis is performed, subscription may start upon contract signing, + * or might be denied. + * + * Requires a non-blocking eligibility questionnaire to be submitted before creating the subscription intent. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * + */ +export const postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription = + ( + options: Options< + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses, + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', + ...options, + }); + +/** + * Sign a pre-onboarding document + * + * Signs the latest contract document associated with the given pre-onboarding document on behalf + * of the company signatory. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * + */ +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign = + ( + options: Options< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData, + ThrowOnError + >, + ) => + (options.client ?? client).post< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * List Contractor Invoice Schedules + * + * Lists Contractor Invoice Schedule records. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * + */ +export const getV1ContractorInvoiceSchedules = < ThrowOnError extends boolean = false, >( - options: Options< - PutV1ResignationsOffboardingRequestIdValidateData, - ThrowOnError - >, + options?: Options, ) => - (options.client ?? client).put< - PutV1ResignationsOffboardingRequestIdValidateResponses, - PutV1ResignationsOffboardingRequestIdValidateErrors, + (options?.client ?? client).get< + GetV1ContractorInvoiceSchedulesResponses, + GetV1ContractorInvoiceSchedulesErrors, ThrowOnError >({ - url: '/v1/resignations/{offboarding_request_id}/validate', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoice-schedules', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show Contractor Invoice Schedule + * Create Contractor Invoice Schedules + * + * Creates many invoice schedules records. + * It's supposed to return two lists: one containing created records, and another one containing the schedules that failed to be inserted. * - * Shows a single Contractor Invoice Schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const getV1ContractorInvoiceSchedulesId = < +export const postV1ContractorInvoiceSchedules = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetV1ContractorInvoiceSchedulesIdResponses, - GetV1ContractorInvoiceSchedulesIdErrors, + (options.client ?? client).post< + PostV1ContractorInvoiceSchedulesResponses, + PostV1ContractorInvoiceSchedulesErrors, ThrowOnError - >({ url: '/v1/contractor-invoice-schedules/{id}', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/contractor-invoice-schedules', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); /** - * Updates Contractor Invoice Schedule + * Submit employee state taxes + * + * Submits the authenticated employee's US state tax withholding answers for a + * single jurisdiction (e.g. `NY`). + * + * Available for US Global Payroll employees once they reach the post-enrollment + * state, at which point the per-jurisdiction state tax task exists. + * + * This endpoint requires country/jurisdiction-specific data. Query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_state_taxes` + * as the form name to discover the schema for a given country. + * * - * Updates a contractor invoice schedule record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage employments (`employments`) | - | Manage personal details (`personal_detail:write`) | * */ -export const patchV1ContractorInvoiceSchedulesId2 = < +export const putV1EmployeeStateTaxesJurisdiction = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).patch< - PatchV1ContractorInvoiceSchedulesId2Responses, - PatchV1ContractorInvoiceSchedulesId2Errors, + (options.client ?? client).put< + PutV1EmployeeStateTaxesJurisdictionResponses, + PutV1EmployeeStateTaxesJurisdictionErrors, ThrowOnError >({ - url: '/v1/contractor-invoice-schedules/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/state-taxes/{jurisdiction}', ...options, headers: { 'Content-Type': 'application/json', @@ -8277,40 +9373,51 @@ export const patchV1ContractorInvoiceSchedulesId2 = < }); /** - * Updates Contractor Invoice Schedule + * Get engagement agreement details * - * Updates a contractor invoice schedule record + * Returns the engagement agreement details for an employment. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const patchV1ContractorInvoiceSchedulesId = < +export const getV1EmploymentsEmploymentIdEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData, + ThrowOnError + >, ) => - (options.client ?? client).put< - PatchV1ContractorInvoiceSchedulesIdResponses, - PatchV1ContractorInvoiceSchedulesIdErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - url: '/v1/contractor-invoice-schedules/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/engagement-agreement-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update pricing plan details + * Upsert engagement agreement details + * + * Creates or updates the engagement agreement details for an employment. + * + * This endpoint requires country-specific data. The exact required fields will vary depending on + * which country the employment is in. To see the list of parameters for each country, see the + * **Show form schema** endpoint under the [Countries](#tag/Countries) category. + * + * Please note that compliance requirements for each country are subject to change according to local laws. + * Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended + * to avoid compliance issues and to have the latest version of a country's requirements. * - * Updates the pricing plan for an employment. The frequency determines how often Remote bills the - * employer for management fees. Annual billing typically offers a discount. * * * ## Scopes @@ -8320,20 +9427,24 @@ export const patchV1ContractorInvoiceSchedulesId = < * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const putV2EmploymentsEmploymentIdPricingPlanDetails = < +export const postV1EmploymentsEmploymentIdEngagementAgreementDetails = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdPricingPlanDetailsData, + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses, - PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors, + (options.client ?? client).post< + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses, + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/pricing_plan_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/engagement-agreement-details', ...options, headers: { 'Content-Type': 'application/json', @@ -8342,86 +9453,78 @@ export const putV2EmploymentsEmploymentIdPricingPlanDetails = < }); /** - * Create risk reserve + * Get Billing Document Breakdown * - * Create a new risk reserve + * Get billing document breakdown * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage risk reserves (`risk_reserve:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postV1RiskReserve = ( - options: Options, +export const getV1BillingDocumentsBillingDocumentIdBreakdown = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetV1BillingDocumentsBillingDocumentIdBreakdownData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostV1RiskReserveResponses, - PostV1RiskReserveErrors, + (options.client ?? client).get< + GetV1BillingDocumentsBillingDocumentIdBreakdownResponses, + GetV1BillingDocumentsBillingDocumentIdBreakdownErrors, ThrowOnError >({ - url: '/v1/risk-reserve', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/billing-documents/{billing_document_id}/breakdown', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update address details - * - * Updates employment's address details. - * - * This endpoint requires and returns country-specific data. The exact required and returned fields will - * vary depending on which country the employment is in. To see the list of parameters for each country, - * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. - * - * Please note that the compliance requirements for each country are subject to change according to local - * laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid - * compliance issues and to have the latest version of a country requirements. - * - * If you are using this endpoint to build an integration, make sure you are dynamically collecting or - * displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Preview the Employment Agreement for an employment * - * To learn how you can dynamically generate forms to display in your UI, see the documentation for - * the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. + * Returns a base64-encoded PDF preview of the auto-generated Employment Agreement for an employment. * + * The document is rendered as a draft (no signatures) and is not persisted. EA preview is only + * available for countries that have a published Employment Agreement automation template — see the + * `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const putV2EmploymentsEmploymentIdAddressDetails = < +export const getV1EmploymentsEmploymentIdEmploymentAgreementPreview = < ThrowOnError extends boolean = false, >( options: Options< - PutV2EmploymentsEmploymentIdAddressDetailsData, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData, ThrowOnError >, ) => - (options.client ?? client).put< - PutV2EmploymentsEmploymentIdAddressDetailsResponses, - PutV2EmploymentsEmploymentIdAddressDetailsErrors, + (options.client ?? client).get< + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors, ThrowOnError >({ - url: '/v2/employments/{employment_id}/address_details', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/employments/{employment_id}/employment-agreement/preview', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Return a base64 encoded version of the contract document + * Indexes all the documents for the employee * * ## Scopes * @@ -8430,112 +9533,146 @@ export const putV2EmploymentsEmploymentIdAddressDetails = < * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getV1ContractorsEmploymentsEmploymentIdContractDocumentsId = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData, - ThrowOnError - >, +export const getV1EmployeeDocuments = ( + options?: Options, ) => - (options.client ?? client).get< - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses, - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors, + (options?.client ?? client).get< + GetV1EmployeeDocumentsResponses, + GetV1EmployeeDocumentsErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/documents', ...options, }); /** - * Create a contractor timesheet + * Upload employee file * - * Creates a timesheet on behalf of a contractor employment. + * Uploads a file owned by the authenticated employee, for example + * identity documents or tax forms. * - * The submitted hours are immediately available to the contractor in the Remote UI for - * self-serve invoice creation (Invoices → Create invoice → "Use Time Tracking"). * - * This endpoint is restricted to contractor employments. Calls against EOR or Global Payroll - * employments are rejected with `422`. + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * + */ +export const postV1EmployeeDocuments = ( + options: Options, +) => + (options.client ?? client).post< + PostV1EmployeeDocumentsResponses, + PostV1EmployeeDocumentsErrors, + ThrowOnError + >({ + ...formDataBodySerializer, + security: [{ scheme: 'bearer', type: 'http' }], + url: '/v1/employee/documents', + ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, + }); + +/** + * Approve a time off cancellation request + * + * Approve a time off cancellation request. + * In order to approve a time off cancellation request, the timeoff status must be `cancel_requested`. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdTimesheets = < +export const postV1TimeoffTimeoffIdCancelRequestApprove = < ThrowOnError extends boolean = false, >( options: Options< - PostV1ContractorsEmploymentsEmploymentIdTimesheetsData, + PostV1TimeoffTimeoffIdCancelRequestApproveData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses, - PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors, + PostV1TimeoffTimeoffIdCancelRequestApproveResponses, + PostV1TimeoffTimeoffIdCancelRequestApproveErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/timesheets', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/timeoff/{timeoff_id}/cancel-request/approve', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Create a contractor of record (COR) termination request + * Verify Employment Identity * - * Initiates a termination request for a Contractor of Record employment. - * When a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived. - * Currently, only Contractor of Record employments can be terminated. + * Endpoint to confirms the employment profile is from the actual employee * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | * */ -export const postV1ContractorsEmploymentsEmploymentIdCorTerminationRequests = < +export const postV1IdentityVerificationEmploymentIdVerify = < ThrowOnError extends boolean = false, >( options: Options< - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData, + PostV1IdentityVerificationEmploymentIdVerifyData, ThrowOnError >, ) => (options.client ?? client).post< - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses, - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors, + PostV1IdentityVerificationEmploymentIdVerifyResponses, + PostV1IdentityVerificationEmploymentIdVerifyErrors, ThrowOnError >({ - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/identity-verification/{employment_id}/verify', ...options, }); /** - * List approved payslip files for the authenticated employee + * Download a billing document PDF * - * Returns a paginated list of payslip files belonging to the current employee. + * Downloads a billing document PDF * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payslips (`payslip:read`) | - | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getV1EmployeePayslips = ( - options?: Options, +export const getV1BillingDocumentsBillingDocumentIdPdf = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetV1EmployeePayslipsResponses, - GetV1EmployeePayslipsErrors, + (options.client ?? client).get< + GetV1BillingDocumentsBillingDocumentIdPdfResponses, + GetV1BillingDocumentsBillingDocumentIdPdfErrors, ThrowOnError - >({ url: '/v1/employee/payslips', ...options }); + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/v1/billing-documents/{billing_document_id}/pdf', + ...options, + }); diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts index a9df7ba6f..f7896ea0e 100644 --- a/src/client/types.gen.ts +++ b/src/client/types.gen.ts @@ -1,7 +1,10 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: string; + baseUrl: + | 'https://gateway.remote.com/' + | 'https://gateway.remote-sandbox.com/' + | (string & {}); }; /** @@ -5322,11 +5325,7 @@ export type BillingDocumentsResponse = { | 'reconciliation_invoice' | 'prefunding_invoice' | 'supplemental_service_invoice' - | 'reconciliation_credit_note' - | 'peo_payroll_invoice' - | 'contractor_management_invoice' - | 'remote_plan_invoice' - | 'credit_note'; + | 'reconciliation_credit_note'; /** * The unique identifier (UUID) of the billing document. */ @@ -10396,23 +10395,6 @@ export type EmploymentFederalTaxesParams = { }; }; -/** - * EmploymentStateTaxesParams - * - * State taxes schema compatible params, submitted one jurisdiction at a time. - */ -export type EmploymentStateTaxesParams = { - /** - * State taxes params for the jurisdiction in the path. As its properties vary depending - * on the country and jurisdiction, you must query the - * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code - * and `global_payroll_state_taxes` as path parameters. - */ - state_taxes: { - [key: string]: unknown; - }; -}; - /** * BenefitTier * @@ -11355,6 +11337,24 @@ export type CompanyNotEligibleForCreationErrorResponse = { resource_type?: string; }; +/** + * EmploymentStateTaxesParams + * + * State taxes schema compatible params, submitted one jurisdiction at a time. + * + */ +export type EmploymentStateTaxesParams = { + /** + * State taxes params for the jurisdiction in the path. As its properties vary depending + * on the country and jurisdiction, you must query the + * [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code + * and `global_payroll_state_taxes` as path parameters. + */ + state_taxes: { + [key: string]: unknown; + }; +}; + /** * MinimalContractAmendment * @@ -12476,22 +12476,37 @@ export type ContractorInvoiceScheduleCreateResponseSuccess = { start_date: string; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsData = { - /** - * Employment administrative details params - */ - body?: EmploymentAdministrativeDetailsParams; - path: { +export type GetV1OffboardingsData = { + body?: never; + path?: never; + query?: { /** - * Employment ID + * Filter by Employment ID */ - employment_id: string; + employment_id?: string; + /** + * Filter by offboarding type + */ + type?: string; + /** + * By default, the results do not include confidential termination requests. + * Send `include_confidential=true` to include confidential requests in the response. + * + */ + include_confidential?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v2/employments/{employment_id}/administrative_details'; + url: '/v1/offboardings'; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors = { +export type GetV1OffboardingsErrors = { /** * Bad Request */ @@ -12500,62 +12515,52 @@ export type PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsError = - PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors]; +export type GetV1OffboardingsError = + GetV1OffboardingsErrors[keyof GetV1OffboardingsErrors]; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses = { +export type GetV1OffboardingsResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ListOffboardingResponse; }; -export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponse = - PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses]; +export type GetV1OffboardingsResponse = + GetV1OffboardingsResponses[keyof GetV1OffboardingsResponses]; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; +export type PostV1OffboardingsData = { + /** + * Offboarding + */ + body?: CreateOffboardingParams; + path?: never; query?: never; - url: '/v1/employments/{employment_id}/engagement-agreement-details'; + url: '/v1/offboardings'; }; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { +export type PostV1OffboardingsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -12565,90 +12570,107 @@ export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; + /** + * Internal Server Error + */ + 500: RequestError; }; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError = - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type PostV1OffboardingsError = + PostV1OffboardingsErrors[keyof PostV1OffboardingsErrors]; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type PostV1OffboardingsResponses = { /** * Success */ - 200: EmploymentEngagementAgreementDetailsResponse; + 201: OffboardingResponse; }; -export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type PostV1OffboardingsResponse = + PostV1OffboardingsResponses[keyof PostV1OffboardingsResponses]; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { - /** - * Employment engagement agreement details params - */ - body?: EmploymentEngagementAgreementDetailsParams; - path: { +export type GetV2OffboardingsData = { + body?: never; + path?: never; + query?: { /** - * Employment ID + * Filter by Employment ID */ - employment_id: string; + employment_id?: string; + /** + * Filter by offboarding type. Only `termination` and `resignation` offboardings are supported. + */ + type?: 'termination' | 'resignation'; + /** + * By default, the results do not include confidential termination requests. + * Send `include_confidential=true` to include confidential requests in the response. + * + */ + include_confidential?: boolean; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v1/employments/{employment_id}/engagement-agreement-details'; + url: '/v2/offboardings'; }; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { +export type GetV2OffboardingsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsError = - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type GetV2OffboardingsError = + GetV2OffboardingsErrors[keyof GetV2OffboardingsErrors]; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type GetV2OffboardingsResponses = { /** * Success */ - 200: SuccessResponse; + 200: V2ListOffboardingResponse; }; -export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type GetV2OffboardingsResponse = + GetV2OffboardingsResponses[keyof GetV2OffboardingsResponses]; -export type PostV1CurrencyConverterEffective2Data = { - /** - * Convert currency parameters - */ - body: ConvertCurrencyParams; - path?: never; +export type GetV1TimesheetsIdData = { + body?: never; + path: { + /** + * Timesheet ID + */ + id: string; + }; query?: never; - url: '/v1/currency-converter'; + url: '/v1/timesheets/{id}'; }; -export type PostV1CurrencyConverterEffective2Errors = { +export type GetV1TimesheetsIdErrors = { /** * Unauthorized */ @@ -12663,42 +12685,103 @@ export type PostV1CurrencyConverterEffective2Errors = { 422: UnprocessableEntityResponse; }; -export type PostV1CurrencyConverterEffective2Error = - PostV1CurrencyConverterEffective2Errors[keyof PostV1CurrencyConverterEffective2Errors]; +export type GetV1TimesheetsIdError = + GetV1TimesheetsIdErrors[keyof GetV1TimesheetsIdErrors]; -export type PostV1CurrencyConverterEffective2Responses = { +export type GetV1TimesheetsIdResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: TimesheetResponse; }; -export type PostV1CurrencyConverterEffective2Response = - PostV1CurrencyConverterEffective2Responses[keyof PostV1CurrencyConverterEffective2Responses]; +export type GetV1TimesheetsIdResponse = + GetV1TimesheetsIdResponses[keyof GetV1TimesheetsIdResponses]; -export type PutV1EmployeeFederalTaxesData = { - /** - * Employee federal taxes params - */ - body?: EmploymentFederalTaxesParams; - path?: never; - query?: never; - url: '/v1/employee/federal-taxes'; +export type PostV1CancelOnboardingEmploymentIdData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Whether the request should be performed async + * + */ + async?: boolean; + }; + url: '/v1/cancel-onboarding/{employment_id}'; }; -export type PutV1EmployeeFederalTaxesErrors = { +export type PostV1CancelOnboardingEmploymentIdErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Unprocessable Entity */ - 401: UnauthorizedResponse; + 422: UnprocessableEntityResponse; /** - * Forbidden + * Unprocessable Entity */ - 403: ForbiddenResponse; + 429: TooManyRequestsResponse; +}; + +export type PostV1CancelOnboardingEmploymentIdError = + PostV1CancelOnboardingEmploymentIdErrors[keyof PostV1CancelOnboardingEmploymentIdErrors]; + +export type PostV1CancelOnboardingEmploymentIdResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type PostV1CancelOnboardingEmploymentIdResponse = + PostV1CancelOnboardingEmploymentIdResponses[keyof PostV1CancelOnboardingEmploymentIdResponses]; + +export type GetV1ContractAmendmentsSchemaData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path?: never; + query: { + /** + * The ID of the employment concerned by the contract amendment request. + */ + employment_id: string; + /** + * Country code according to ISO 3-digit alphabetic codes. + */ + country_code: string; + /** + * Name of the desired form + */ + form?: 'contract_amendment'; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/contract-amendments/schema'; +}; + +export type GetV1ContractAmendmentsSchemaErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -12707,57 +12790,44 @@ export type PutV1EmployeeFederalTaxesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV1EmployeeFederalTaxesError = - PutV1EmployeeFederalTaxesErrors[keyof PutV1EmployeeFederalTaxesErrors]; +export type GetV1ContractAmendmentsSchemaError = + GetV1ContractAmendmentsSchemaErrors[keyof GetV1ContractAmendmentsSchemaErrors]; -export type PutV1EmployeeFederalTaxesResponses = { +export type GetV1ContractAmendmentsSchemaResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractAmendmentFormResponse; }; -export type PutV1EmployeeFederalTaxesResponse = - PutV1EmployeeFederalTaxesResponses[keyof PutV1EmployeeFederalTaxesResponses]; +export type GetV1ContractAmendmentsSchemaResponse = + GetV1ContractAmendmentsSchemaResponses[keyof GetV1ContractAmendmentsSchemaResponses]; -export type PutV1EmployeeStateTaxesData = { +export type PostV1PayItemsBulkData = { /** - * Employee state taxes params for the given jurisdiction + * Pay Items */ - body?: EmploymentStateTaxesParams; - path: { - /** - * Jurisdiction code (e.g. US state abbreviation like 'CA', 'NY'). - */ - jurisdiction: string; - }; + body: BulkCreatePayItemsParams; + path?: never; query?: never; - url: '/v1/employee/state-taxes/{jurisdiction}'; + url: '/v1/pay-items/bulk'; }; -export type PutV1EmployeeStateTaxesErrors = { +export type PostV1PayItemsBulkErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -12768,73 +12838,36 @@ export type PutV1EmployeeStateTaxesErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmployeeStateTaxesError = - PutV1EmployeeStateTaxesErrors[keyof PutV1EmployeeStateTaxesErrors]; +export type PostV1PayItemsBulkError = + PostV1PayItemsBulkErrors[keyof PostV1PayItemsBulkErrors]; -export type PutV1EmployeeStateTaxesResponses = { +export type PostV1PayItemsBulkResponses = { /** * Success */ - 200: SuccessResponse; + 200: BulkCreatePayItemsResponse; }; -export type PutV1EmployeeStateTaxesResponse = - PutV1EmployeeStateTaxesResponses[keyof PutV1EmployeeStateTaxesResponses]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions'; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsError = - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors]; +export type PostV1PayItemsBulkResponse = + PostV1PayItemsBulkResponses[keyof PostV1PayItemsBulkResponses]; -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses = - { +export type GetV2OffboardingsIdData = { + body?: never; + path: { /** - * Success + * Offboarding ID */ - 200: ContractorSubscriptionSummariesResponse; + id: string; }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponse = - GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses]; - -export type PostV1CurrencyConverterRawData = { - /** - * Convert currency parameters - */ - body: ConvertCurrencyParams; - path?: never; query?: never; - url: '/v1/currency-converter/raw'; + url: '/v2/offboardings/{id}'; }; -export type PostV1CurrencyConverterRawErrors = { +export type GetV2OffboardingsIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -12847,63 +12880,38 @@ export type PostV1CurrencyConverterRawErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1CurrencyConverterRawError = - PostV1CurrencyConverterRawErrors[keyof PostV1CurrencyConverterRawErrors]; +export type GetV2OffboardingsIdError = + GetV2OffboardingsIdErrors[keyof GetV2OffboardingsIdErrors]; -export type PostV1CurrencyConverterRawResponses = { +export type GetV2OffboardingsIdResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: V2OffboardingResponse; }; -export type PostV1CurrencyConverterRawResponse = - PostV1CurrencyConverterRawResponses[keyof PostV1CurrencyConverterRawResponses]; +export type GetV2OffboardingsIdResponse = + GetV2OffboardingsIdResponses[keyof GetV2OffboardingsIdResponses]; -export type GetV1IncentivesData = { +export type GetV1CompaniesCompanyIdPricingPlansData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: { - /** - * Filter by Employment ID - */ - employment_id?: string; - /** - * Filter by Incentive status - */ - status?: string; - /** - * Filter by Recurring Incentive id - */ - recurring_incentive_id?: string; - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Company ID */ - page_size?: number; + company_id: UuidSlug; }; - url: '/v1/incentives'; + query?: never; + url: '/v1/companies/{company_id}/pricing-plans'; }; -export type GetV1IncentivesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CompaniesCompanyIdPricingPlansErrors = { /** * Unauthorized */ @@ -12916,49 +12924,37 @@ export type GetV1IncentivesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1IncentivesError = - GetV1IncentivesErrors[keyof GetV1IncentivesErrors]; +export type GetV1CompaniesCompanyIdPricingPlansError = + GetV1CompaniesCompanyIdPricingPlansErrors[keyof GetV1CompaniesCompanyIdPricingPlansErrors]; -export type GetV1IncentivesResponses = { +export type GetV1CompaniesCompanyIdPricingPlansResponses = { /** * Success */ - 200: ListIncentivesResponse; + 200: ListCompanyPricingPlansResponse; }; -export type GetV1IncentivesResponse = - GetV1IncentivesResponses[keyof GetV1IncentivesResponses]; +export type GetV1CompaniesCompanyIdPricingPlansResponse = + GetV1CompaniesCompanyIdPricingPlansResponses[keyof GetV1CompaniesCompanyIdPricingPlansResponses]; -export type PostV1IncentivesData = { +export type PostV1CompaniesCompanyIdPricingPlansData = { /** - * Incentive + * Create Pricing Plan parameters */ - body?: CreateOneTimeIncentiveParams; - headers: { + body: CreatePricingPlanParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Company ID */ - Authorization: string; + company_id: UuidSlug; }; - path?: never; query?: never; - url: '/v1/incentives'; + url: '/v1/companies/{company_id}/pricing-plans'; }; -export type PostV1IncentivesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1CompaniesCompanyIdPricingPlansErrors = { /** * Unauthorized */ @@ -12971,126 +12967,120 @@ export type PostV1IncentivesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1IncentivesError = - PostV1IncentivesErrors[keyof PostV1IncentivesErrors]; +export type PostV1CompaniesCompanyIdPricingPlansError = + PostV1CompaniesCompanyIdPricingPlansErrors[keyof PostV1CompaniesCompanyIdPricingPlansErrors]; -export type PostV1IncentivesResponses = { +export type PostV1CompaniesCompanyIdPricingPlansResponses = { /** * Success */ - 201: IncentiveResponse; + 200: CreatePricingPlanResponse; }; -export type PostV1IncentivesResponse = - PostV1IncentivesResponses[keyof PostV1IncentivesResponses]; +export type PostV1CompaniesCompanyIdPricingPlansResponse = + PostV1CompaniesCompanyIdPricingPlansResponses[keyof PostV1CompaniesCompanyIdPricingPlansResponses]; -export type GetV1BenefitOffersData = { +export type GetV1ProbationCompletionLetterIdData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * probation completion letter ID */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/benefit-offers'; + url: '/v1/probation-completion-letter/{id}'; }; -export type GetV1BenefitOffersErrors = { +export type GetV1ProbationCompletionLetterIdErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1BenefitOffersError = - GetV1BenefitOffersErrors[keyof GetV1BenefitOffersErrors]; +export type GetV1ProbationCompletionLetterIdError = + GetV1ProbationCompletionLetterIdErrors[keyof GetV1ProbationCompletionLetterIdErrors]; -export type GetV1BenefitOffersResponses = { +export type GetV1ProbationCompletionLetterIdResponses = { /** * Success */ - 200: BenefitOfferByEmploymentResponse; + 200: ProbationCompletionLetterResponse; }; -export type GetV1BenefitOffersResponse = - GetV1BenefitOffersResponses[keyof GetV1BenefitOffersResponses]; +export type GetV1ProbationCompletionLetterIdResponse = + GetV1ProbationCompletionLetterIdResponses[keyof GetV1ProbationCompletionLetterIdResponses]; -export type PostV1ReadyData = { - /** - * Employment slug - */ - body?: CompleteOnboarding; - headers: { +export type GetV1ContractorInvoicesIdData = { + body?: never; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Resource unique identifier */ - Authorization: string; + id: UuidSlug; }; - path?: never; query?: never; - url: '/v1/ready'; + url: '/v1/contractor-invoices/{id}'; }; -export type PostV1ReadyErrors = { +export type GetV1ContractorInvoicesIdErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1ReadyError = PostV1ReadyErrors[keyof PostV1ReadyErrors]; +export type GetV1ContractorInvoicesIdError = + GetV1ContractorInvoicesIdErrors[keyof GetV1ContractorInvoicesIdErrors]; -export type PostV1ReadyResponses = { +export type GetV1ContractorInvoicesIdResponses = { /** * Success */ - 200: EmploymentResponse; + 200: ContractorInvoiceResponse; }; -export type PostV1ReadyResponse = - PostV1ReadyResponses[keyof PostV1ReadyResponses]; +export type GetV1ContractorInvoicesIdResponse = + GetV1ContractorInvoicesIdResponses[keyof GetV1ContractorInvoicesIdResponses]; -export type PostV1CostCalculatorEstimationData = { +export type PostV1CurrencyConverterRawData = { /** - * Estimate params + * Convert currency parameters */ - body: CostCalculatorEstimateParams; + body: ConvertCurrencyParams; path?: never; query?: never; - url: '/v1/cost-calculator/estimation'; + url: '/v1/currency-converter/raw'; }; -export type PostV1CostCalculatorEstimationErrors = { +export type PostV1CurrencyConverterRawErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -13101,57 +13091,41 @@ export type PostV1CostCalculatorEstimationErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CostCalculatorEstimationError = - PostV1CostCalculatorEstimationErrors[keyof PostV1CostCalculatorEstimationErrors]; +export type PostV1CurrencyConverterRawError = + PostV1CurrencyConverterRawErrors[keyof PostV1CurrencyConverterRawErrors]; -export type PostV1CostCalculatorEstimationResponses = { +export type PostV1CurrencyConverterRawResponses = { /** * Success */ - 200: CostCalculatorEstimateResponse; + 200: ConvertCurrencyResponse; }; -export type PostV1CostCalculatorEstimationResponse = - PostV1CostCalculatorEstimationResponses[keyof PostV1CostCalculatorEstimationResponses]; +export type PostV1CurrencyConverterRawResponse = + PostV1CurrencyConverterRawResponses[keyof PostV1CurrencyConverterRawResponses]; -export type GetV1IncentivesRecurringData = { +export type GetV1CountriesCountryCodeContractorContractDetailsData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Country code according to ISO 3-digit alphabetic codes */ - Authorization: string; + country_code: string; }; - path?: never; query?: { /** - * Filter by recurring incentive status: active or deactive. - */ - status?: string; - /** - * Filter by recurring incentive type. - */ - type?: string; - /** - * Filter by recurring incentives that contain the value in their notes. - */ - note?: string; - /** - * Starts fetching records after the given page + * Employment ID */ - page?: number; + employment_id?: string; /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Version of the form schema */ - page_size?: number; + json_schema_version?: number | 'latest'; }; - url: '/v1/incentives/recurring'; + url: '/v1/countries/{country_code}/contractor-contract-details'; }; -export type GetV1IncentivesRecurringErrors = { +export type GetV1CountriesCountryCodeContractorContractDetailsErrors = { /** * Bad Request */ @@ -13169,265 +13143,269 @@ export type GetV1IncentivesRecurringErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1IncentivesRecurringError = - GetV1IncentivesRecurringErrors[keyof GetV1IncentivesRecurringErrors]; +export type GetV1CountriesCountryCodeContractorContractDetailsError = + GetV1CountriesCountryCodeContractorContractDetailsErrors[keyof GetV1CountriesCountryCodeContractorContractDetailsErrors]; -export type GetV1IncentivesRecurringResponses = { +export type GetV1CountriesCountryCodeContractorContractDetailsResponses = { /** * Success */ - 201: ListRecurringIncentivesResponse; + 200: ContractorContractDetailsResponse; }; -export type GetV1IncentivesRecurringResponse = - GetV1IncentivesRecurringResponses[keyof GetV1IncentivesRecurringResponses]; +export type GetV1CountriesCountryCodeContractorContractDetailsResponse = + GetV1CountriesCountryCodeContractorContractDetailsResponses[keyof GetV1CountriesCountryCodeContractorContractDetailsResponses]; -export type PostV1IncentivesRecurringData = { - /** - * RecurringIncentive - */ - body?: CreateRecurringIncentiveParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type GetV1EmployeeIncentivesData = { + body?: never; path?: never; query?: never; - url: '/v1/incentives/recurring'; + url: '/v1/employee/incentives'; }; -export type PostV1IncentivesRecurringErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmployeeIncentivesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity + * Forbidden */ - 422: UnprocessableEntityResponse; + 403: ForbiddenResponse; /** - * Too many requests + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PostV1IncentivesRecurringError = - PostV1IncentivesRecurringErrors[keyof PostV1IncentivesRecurringErrors]; +export type GetV1EmployeeIncentivesError = + GetV1EmployeeIncentivesErrors[keyof GetV1EmployeeIncentivesErrors]; -export type PostV1IncentivesRecurringResponses = { +export type GetV1EmployeeIncentivesResponses = { /** * Success */ - 201: RecurringIncentiveResponse; + 200: SuccessResponse; }; -export type PostV1IncentivesRecurringResponse = - PostV1IncentivesRecurringResponses[keyof PostV1IncentivesRecurringResponses]; +export type GetV1EmployeeIncentivesResponse = + GetV1EmployeeIncentivesResponses[keyof GetV1EmployeeIncentivesResponses]; -export type GetV1TimesheetsData = { +export type GetV1EmploymentsData = { body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; query?: { /** - * Filter timesheets by their status + * Company ID */ - status?: TimesheetStatus; + company_id?: string; /** - * Sort order + * Filters the results by employments whose login email matches the value */ - order?: 'asc' | 'desc'; + email?: string; /** - * Field to sort by + * Filters the results by employments whose status matches the value. + * Supports multiple values separated by commas. + * Also supports the value `incomplete` to get all employments that are not onboarded yet. + * */ - sort_by?: 'submitted_at'; + status?: string; /** - * Starts fetching records after the given page + * Filters the results by employments whose employment product type matches the value */ - page?: number; + employment_type?: string; /** - * Number of items per page + * Filters the results by employments whose employment model matches the value. + * Possible values: `global_payroll`, `peo`, `eor` + * */ - page_size?: number; - }; - url: '/v1/timesheets'; + employment_model?: 'global_payroll' | 'peo' | 'eor'; + /** + * Filters the results by the employment's short ID. Returns at most one result. + */ + short_id?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/employments'; }; -export type GetV1TimesheetsErrors = { +export type GetV1EmploymentsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1TimesheetsError = - GetV1TimesheetsErrors[keyof GetV1TimesheetsErrors]; +export type GetV1EmploymentsError = + GetV1EmploymentsErrors[keyof GetV1EmploymentsErrors]; -export type GetV1TimesheetsResponses = { +export type GetV1EmploymentsResponses = { /** * Success */ - 200: ListTimesheetsResponse; + 200: ListEmploymentsResponse; }; -export type GetV1TimesheetsResponse = - GetV1TimesheetsResponses[keyof GetV1TimesheetsResponses]; +export type GetV1EmploymentsResponse = + GetV1EmploymentsResponses[keyof GetV1EmploymentsResponses]; -export type PostV1TimesheetsData = { +export type PostV1EmploymentsData = { /** - * Timesheet + * Employment params */ - body?: CreateTimesheetParams; + body?: EmploymentCreateParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; - query?: never; - url: '/v1/timesheets'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/employments'; }; -export type PostV1TimesheetsErrors = { +export type PostV1EmploymentsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; -}; - -export type PostV1TimesheetsError = - PostV1TimesheetsErrors[keyof PostV1TimesheetsErrors]; - -export type PostV1TimesheetsResponses = { - /** - * Success - */ - 200: TimesheetResponse; -}; - -export type PostV1TimesheetsResponse = - PostV1TimesheetsResponses[keyof PostV1TimesheetsResponses]; - -export type PostV1TimesheetsTimesheetIdApproveData = { - body?: never; - path: { - /** - * Timesheet ID - */ - timesheet_id: string; - }; - query?: never; - url: '/v1/timesheets/{timesheet_id}/approve'; -}; - -export type PostV1TimesheetsTimesheetIdApproveErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PostV1TimesheetsTimesheetIdApproveError = - PostV1TimesheetsTimesheetIdApproveErrors[keyof PostV1TimesheetsTimesheetIdApproveErrors]; +export type PostV1EmploymentsError = + PostV1EmploymentsErrors[keyof PostV1EmploymentsErrors]; -export type PostV1TimesheetsTimesheetIdApproveResponses = { +export type PostV1EmploymentsResponses = { /** * Success */ - 200: MinimalTimesheetResponse; + 200: EmploymentCreationResponse; }; -export type PostV1TimesheetsTimesheetIdApproveResponse = - PostV1TimesheetsTimesheetIdApproveResponses[keyof PostV1TimesheetsTimesheetIdApproveResponses]; +export type PostV1EmploymentsResponse = + PostV1EmploymentsResponses[keyof PostV1EmploymentsResponses]; -export type GetV1ProbationCompletionLetterIdData = { - body?: never; - path: { +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData = + { + body?: never; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + /** + * Employment ID + */ + employment_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status'; + }; + +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors = + { /** - * probation completion letter ID + * Unauthorized */ - id: string; + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; }; - query?: never; - url: '/v1/probation-completion-letter/{id}'; -}; - -export type GetV1ProbationCompletionLetterIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; -export type GetV1ProbationCompletionLetterIdError = - GetV1ProbationCompletionLetterIdErrors[keyof GetV1ProbationCompletionLetterIdErrors]; +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusError = + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors]; -export type GetV1ProbationCompletionLetterIdResponses = { - /** - * Success - */ - 200: ProbationCompletionLetterResponse; -}; +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses = + { + /** + * Success + */ + 200: OnboardingReservesStatusResponse; + }; -export type GetV1ProbationCompletionLetterIdResponse = - GetV1ProbationCompletionLetterIdResponses[keyof GetV1ProbationCompletionLetterIdResponses]; +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponse = + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses]; -export type GetV1SsoConfigurationData = { +export type GetV1EmployeeBankAccountData = { body?: never; path?: never; - query?: never; - url: '/v1/sso-configuration'; + query?: { + /** + * Version of the bank_account_details form schema + */ + bank_account_details_json_schema_version?: number | 'latest'; + }; + url: '/v1/employee/bank-account'; }; -export type GetV1SsoConfigurationErrors = { +export type GetV1EmployeeBankAccountErrors = { /** * Bad Request */ @@ -13436,6 +13414,10 @@ export type GetV1SsoConfigurationErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -13446,30 +13428,35 @@ export type GetV1SsoConfigurationErrors = { 429: TooManyRequestsResponse; }; -export type GetV1SsoConfigurationError = - GetV1SsoConfigurationErrors[keyof GetV1SsoConfigurationErrors]; +export type GetV1EmployeeBankAccountError = + GetV1EmployeeBankAccountErrors[keyof GetV1EmployeeBankAccountErrors]; -export type GetV1SsoConfigurationResponses = { +export type GetV1EmployeeBankAccountResponses = { /** * Success */ - 200: SsoConfigurationResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1SsoConfigurationResponse = - GetV1SsoConfigurationResponses[keyof GetV1SsoConfigurationResponses]; +export type GetV1EmployeeBankAccountResponse = + GetV1EmployeeBankAccountResponses[keyof GetV1EmployeeBankAccountResponses]; -export type PostV1SsoConfigurationData = { +export type PutV1EmployeeBankAccountData = { /** - * CreateSSOConfiguration + * Employee bank account details params */ - body: CreateSsoConfigurationParams; + body?: EmploymentBankAccountDetailsParams; path?: never; - query?: never; - url: '/v1/sso-configuration'; + query?: { + /** + * Version of the bank_account_details form schema + */ + bank_account_details_json_schema_version?: number | 'latest'; + }; + url: '/v1/employee/bank-account'; }; -export type PostV1SsoConfigurationErrors = { +export type PutV1EmployeeBankAccountErrors = { /** * Bad Request */ @@ -13479,13 +13466,13 @@ export type PostV1SsoConfigurationErrors = { */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -13496,140 +13483,93 @@ export type PostV1SsoConfigurationErrors = { 429: TooManyRequestsResponse; }; -export type PostV1SsoConfigurationError = - PostV1SsoConfigurationErrors[keyof PostV1SsoConfigurationErrors]; +export type PutV1EmployeeBankAccountError = + PutV1EmployeeBankAccountErrors[keyof PutV1EmployeeBankAccountErrors]; -export type PostV1SsoConfigurationResponses = { +export type PutV1EmployeeBankAccountResponses = { /** - * Created + * Success */ - 201: CreateSsoConfigurationResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1SsoConfigurationResponse = - PostV1SsoConfigurationResponses[keyof PostV1SsoConfigurationResponses]; +export type PutV1EmployeeBankAccountResponse = + PutV1EmployeeBankAccountResponses[keyof PutV1EmployeeBankAccountResponses]; -export type GetV1OffboardingsData = { +export type GetV1HelpCenterArticlesIdData = { body?: never; - path?: never; - query?: { - /** - * Filter by Employment ID - */ - employment_id?: string; - /** - * Filter by offboarding type - */ - type?: string; - /** - * By default, the results do not include confidential termination requests. - * Send `include_confidential=true` to include confidential requests in the response. - * - */ - include_confidential?: string; - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Help Center Article Zendesk ID */ - page_size?: number; + id: number; }; - url: '/v1/offboardings'; + query?: never; + url: '/v1/help-center-articles/{id}'; }; -export type GetV1OffboardingsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1HelpCenterArticlesIdErrors = { /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1OffboardingsError = - GetV1OffboardingsErrors[keyof GetV1OffboardingsErrors]; +export type GetV1HelpCenterArticlesIdError = + GetV1HelpCenterArticlesIdErrors[keyof GetV1HelpCenterArticlesIdErrors]; -export type GetV1OffboardingsResponses = { +export type GetV1HelpCenterArticlesIdResponses = { /** * Success */ - 200: ListOffboardingResponse; + 200: HelpCenterArticleResponse; }; -export type GetV1OffboardingsResponse = - GetV1OffboardingsResponses[keyof GetV1OffboardingsResponses]; +export type GetV1HelpCenterArticlesIdResponse = + GetV1HelpCenterArticlesIdResponses[keyof GetV1HelpCenterArticlesIdResponses]; -export type PostV1OffboardingsData = { - /** - * Offboarding - */ - body?: CreateOffboardingParams; - path?: never; +export type GetV1ScimV2UsersIdData = { + body?: never; + path: { + /** + * User ID (slug) + */ + id: string; + }; query?: never; - url: '/v1/offboardings'; + url: '/v1/scim/v2/Users/{id}'; }; -export type PostV1OffboardingsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ScimV2UsersIdErrors = { /** * Unauthorized */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; + 401: IntegrationsScimErrorResponse; /** - * Too many requests + * Forbidden */ - 429: TooManyRequestsResponse; + 403: IntegrationsScimErrorResponse; /** - * Internal Server Error + * Not Found */ - 500: RequestError; + 404: IntegrationsScimErrorResponse; }; -export type PostV1OffboardingsError = - PostV1OffboardingsErrors[keyof PostV1OffboardingsErrors]; +export type GetV1ScimV2UsersIdError = + GetV1ScimV2UsersIdErrors[keyof GetV1ScimV2UsersIdErrors]; -export type PostV1OffboardingsResponses = { +export type GetV1ScimV2UsersIdResponses = { /** * Success */ - 201: OffboardingResponse; + 200: IntegrationsScimUser; }; -export type PostV1OffboardingsResponse = - PostV1OffboardingsResponses[keyof PostV1OffboardingsResponses]; +export type GetV1ScimV2UsersIdResponse = + GetV1ScimV2UsersIdResponses[keyof GetV1ScimV2UsersIdResponses]; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData = { - /** - * CreateContractDocumentParams - */ - body: CreateContractDocument; +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { + body?: never; path: { /** * Employment ID @@ -13637,14 +13577,18 @@ export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData = { employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents'; + url: '/v2/employments/{employment_id}/engagement-agreement-details'; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors = { +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -13653,27 +13597,30 @@ export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsError = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors]; +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError = + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses = - { - /** - * Success - */ - 200: CreateContractDocumentResponse; - }; +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { + /** + * Success + */ + 200: EmploymentEngagementAgreementDetailsResponse; +}; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponse = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses]; +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type PutV1EmploymentsEmploymentIdFederalTaxesData = { +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { /** - * Employment federal taxes params + * Employment engagement agreement details params */ - body?: EmploymentFederalTaxesParams; + body?: EmploymentEngagementAgreementDetailsParams; path: { /** * Employment ID @@ -13681,10 +13628,10 @@ export type PutV1EmploymentsEmploymentIdFederalTaxesData = { employment_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/federal-taxes'; + url: '/v2/employments/{employment_id}/engagement-agreement-details'; }; -export type PutV1EmploymentsEmploymentIdFederalTaxesErrors = { +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** * Bad Request */ @@ -13711,75 +13658,32 @@ export type PutV1EmploymentsEmploymentIdFederalTaxesErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmploymentsEmploymentIdFederalTaxesError = - PutV1EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV1EmploymentsEmploymentIdFederalTaxesErrors]; +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsError = + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type PutV1EmploymentsEmploymentIdFederalTaxesResponses = { +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ 200: SuccessResponse; }; -export type PutV1EmploymentsEmploymentIdFederalTaxesResponse = - PutV1EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV1EmploymentsEmploymentIdFederalTaxesResponses]; +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type GetV1CompaniesCompanyIdPricingPlansData = { +export type GetV1EmployeeDocumentsIdData = { body?: never; path: { /** - * Company ID - */ - company_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/pricing-plans'; -}; - -export type GetV1CompaniesCompanyIdPricingPlansErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1CompaniesCompanyIdPricingPlansError = - GetV1CompaniesCompanyIdPricingPlansErrors[keyof GetV1CompaniesCompanyIdPricingPlansErrors]; - -export type GetV1CompaniesCompanyIdPricingPlansResponses = { - /** - * Success - */ - 200: ListCompanyPricingPlansResponse; -}; - -export type GetV1CompaniesCompanyIdPricingPlansResponse = - GetV1CompaniesCompanyIdPricingPlansResponses[keyof GetV1CompaniesCompanyIdPricingPlansResponses]; - -export type PostV1CompaniesCompanyIdPricingPlansData = { - /** - * Create Pricing Plan parameters - */ - body: CreatePricingPlanParams; - path: { - /** - * Company ID + * Document ID */ - company_id: UuidSlug; + id: string; }; query?: never; - url: '/v1/companies/{company_id}/pricing-plans'; + url: '/v1/employee/documents/{id}'; }; -export type PostV1CompaniesCompanyIdPricingPlansErrors = { +export type GetV1EmployeeDocumentsIdErrors = { /** * Unauthorized */ @@ -13794,36 +13698,84 @@ export type PostV1CompaniesCompanyIdPricingPlansErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CompaniesCompanyIdPricingPlansError = - PostV1CompaniesCompanyIdPricingPlansErrors[keyof PostV1CompaniesCompanyIdPricingPlansErrors]; +export type GetV1EmployeeDocumentsIdError = + GetV1EmployeeDocumentsIdErrors[keyof GetV1EmployeeDocumentsIdErrors]; -export type PostV1CompaniesCompanyIdPricingPlansResponses = { +export type GetV1EmployeeDocumentsIdResponses = { /** * Success */ - 200: CreatePricingPlanResponse; + 200: DownloadDocumentResponse; }; -export type PostV1CompaniesCompanyIdPricingPlansResponse = - PostV1CompaniesCompanyIdPricingPlansResponses[keyof PostV1CompaniesCompanyIdPricingPlansResponses]; +export type GetV1EmployeeDocumentsIdResponse = + GetV1EmployeeDocumentsIdResponses[keyof GetV1EmployeeDocumentsIdResponses]; -export type GetV1EmployeeAddressData = { +export type GetV1ContractorInvoicesData = { body?: never; path?: never; query?: { /** - * Version of the address_details form schema + * Filters contractor invoices by status matching the value. */ - address_details_json_schema_version?: number | 'latest'; - }; - url: '/v1/employee/address'; -}; - -export type GetV1EmployeeAddressErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; + status?: ContractorInvoiceStatus; + /** + * Filters contractor invoices by invoice schedule ID matching the value. + */ + contractor_invoice_schedule_id?: UuidSlug; + /** + * Filters contractor invoices by date greater than or equal to the value. + */ + date_from?: Date; + /** + * Filters contractor invoices by date less than or equal to the value. + */ + date_to?: Date; + /** + * Filters contractor invoices by due date greater than or equal to the value. + */ + due_date_from?: Date; + /** + * Filters contractor invoices by due date less than or equal to the value. + */ + due_date_to?: Date; + /** + * Filters contractor invoices by approved date greater than or equal to the value. + */ + approved_date_from?: Date; + /** + * Filters contractor invoices by approved date less than or equal to the value. + */ + approved_date_to?: Date; + /** + * Filters contractor invoices by paid out date greater than or equal to the value. + */ + paid_out_date_from?: Date; + /** + * Filters contractor invoices by paid out date less than or equal to the value. + */ + paid_out_date_to?: Date; + /** + * Field to sort by + */ + sort_by?: 'date' | 'due_date' | 'approved_at' | 'paid_out_at'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/contractor-invoices'; +}; + +export type GetV1ContractorInvoicesErrors = { /** * Unauthorized */ @@ -13839,38 +13791,61 @@ export type GetV1EmployeeAddressErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeAddressError = - GetV1EmployeeAddressErrors[keyof GetV1EmployeeAddressErrors]; +export type GetV1ContractorInvoicesError = + GetV1ContractorInvoicesErrors[keyof GetV1ContractorInvoicesErrors]; -export type GetV1EmployeeAddressResponses = { +export type GetV1ContractorInvoicesResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ListContractorInvoicesResponse; }; -export type GetV1EmployeeAddressResponse = - GetV1EmployeeAddressResponses[keyof GetV1EmployeeAddressResponses]; +export type GetV1ContractorInvoicesResponse = + GetV1ContractorInvoicesResponses[keyof GetV1ContractorInvoicesResponses]; -export type PutV1EmployeeAddressData = { +export type PostV1SdkTelemetryErrorsData = { /** - * Employee address details params + * SDK Error Report */ - body?: EmploymentAddressDetailsParams; + body: SdkErrorPayload; path?: never; - query?: { - /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - }; - url: '/v1/employee/address'; + query?: never; + url: '/v1/sdk/telemetry-errors'; }; -export type PutV1EmployeeAddressErrors = { +export type PostV1SdkTelemetryErrorsErrors = { + /** + * Bad Request + */ + 400: ErrorResponse; + /** + * Too Many Requests + */ + 429: RateLimitResponse; +}; + +export type PostV1SdkTelemetryErrorsError = + PostV1SdkTelemetryErrorsErrors[keyof PostV1SdkTelemetryErrorsErrors]; + +export type PostV1SdkTelemetryErrorsResponses = { + /** + * No Content + */ + 204: unknown; +}; + +export type GetV1SsoConfigurationDetailsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/sso-configuration/details'; +}; + +export type GetV1SsoConfigurationDetailsErrors = { /** * Bad Request */ @@ -13879,135 +13854,88 @@ export type PutV1EmployeeAddressErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PutV1EmployeeAddressError = - PutV1EmployeeAddressErrors[keyof PutV1EmployeeAddressErrors]; +export type GetV1SsoConfigurationDetailsError = + GetV1SsoConfigurationDetailsErrors[keyof GetV1SsoConfigurationDetailsErrors]; -export type PutV1EmployeeAddressResponses = { +export type GetV1SsoConfigurationDetailsResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: SsoConfigurationDetailsResponse; }; -export type PutV1EmployeeAddressResponse = - PutV1EmployeeAddressResponses[keyof PutV1EmployeeAddressResponses]; +export type GetV1SsoConfigurationDetailsResponse = + GetV1SsoConfigurationDetailsResponses[keyof GetV1SsoConfigurationDetailsResponses]; -export type PutV2EmploymentsEmploymentIdFederalTaxesData = { +export type PostV1CostCalculatorEstimationData = { /** - * Employment federal taxes params + * Estimate params */ - body?: EmploymentFederalTaxesParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; + body: CostCalculatorEstimateParams; + path?: never; query?: never; - url: '/v2/employments/{employment_id}/federal-taxes'; + url: '/v1/cost-calculator/estimation'; }; -export type PutV2EmploymentsEmploymentIdFederalTaxesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; +export type PostV1CostCalculatorEstimationErrors = { /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdFederalTaxesError = - PutV2EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV2EmploymentsEmploymentIdFederalTaxesErrors]; +export type PostV1CostCalculatorEstimationError = + PostV1CostCalculatorEstimationErrors[keyof PostV1CostCalculatorEstimationErrors]; -export type PutV2EmploymentsEmploymentIdFederalTaxesResponses = { +export type PostV1CostCalculatorEstimationResponses = { /** * Success */ - 200: SuccessResponse; + 200: CostCalculatorEstimateResponse; }; -export type PutV2EmploymentsEmploymentIdFederalTaxesResponse = - PutV2EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV2EmploymentsEmploymentIdFederalTaxesResponses]; +export type PostV1CostCalculatorEstimationResponse = + PostV1CostCalculatorEstimationResponses[keyof PostV1CostCalculatorEstimationResponses]; -export type GetV1TravelLetterRequestsData = { +export type GetV1CompaniesSchemaData = { body?: never; path?: never; - query?: { - /** - * Filter results on the given status - */ - status?: - | 'pending' - | 'cancelled' - | 'declined_by_manager' - | 'declined_by_remote' - | 'approved_by_manager' - | 'approved_by_remote'; - /** - * Filter results on the given employment slug - */ - employment_id?: string; - /** - * Filter results on the given employee name - */ - employee_name?: string; - /** - * Sort order - */ - order?: 'asc' | 'desc'; + query: { /** - * Field to sort by + * Country code according to ISO 3-digit alphabetic codes. */ - sort_by?: 'submitted_at'; + country_code: string; /** - * Starts fetching records after the given page + * Name of the desired form */ - page?: number; + form: 'address_details'; /** - * Number of items per page + * Version of the form schema */ - page_size?: number; + json_schema_version?: number | 'latest'; }; - url: '/v1/travel-letter-requests'; + url: '/v1/companies/schema'; }; -export type GetV1TravelLetterRequestsErrors = { +export type GetV1CompaniesSchemaErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -14018,36 +13946,45 @@ export type GetV1TravelLetterRequestsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1TravelLetterRequestsError = - GetV1TravelLetterRequestsErrors[keyof GetV1TravelLetterRequestsErrors]; +export type GetV1CompaniesSchemaError = + GetV1CompaniesSchemaErrors[keyof GetV1CompaniesSchemaErrors]; -export type GetV1TravelLetterRequestsResponses = { +export type GetV1CompaniesSchemaResponses = { /** * Success */ - 200: ListTravelLettersResponse; + 200: CompanyFormResponse; }; -export type GetV1TravelLetterRequestsResponse = - GetV1TravelLetterRequestsResponses[keyof GetV1TravelLetterRequestsResponses]; +export type GetV1CompaniesSchemaResponse = + GetV1CompaniesSchemaResponses[keyof GetV1CompaniesSchemaResponses]; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { +export type GetV1EmploymentsEmploymentIdBenefitOffersData = { body?: never; path: { /** - * Employment ID + * Unique identifier of the employment */ - employment_id: string; + employment_id: UuidSlug; }; - query?: never; - url: '/v2/employments/{employment_id}/engagement-agreement-details'; -}; - -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/employments/{employment_id}/benefit-offers'; +}; + +export type GetV1EmploymentsEmploymentIdBenefitOffersErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ @@ -14060,45 +13997,46 @@ export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError = - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type GetV1EmploymentsEmploymentIdBenefitOffersError = + GetV1EmploymentsEmploymentIdBenefitOffersErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersErrors]; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type GetV1EmploymentsEmploymentIdBenefitOffersResponses = { /** * Success */ - 200: EmploymentEngagementAgreementDetailsResponse; + 200: EmploymentsBenefitOffersListBenefitOffers; }; -export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; +export type GetV1EmploymentsEmploymentIdBenefitOffersResponse = + GetV1EmploymentsEmploymentIdBenefitOffersResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersResponses]; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsData = { +export type PutV1EmploymentsEmploymentIdBenefitOffersData = { /** - * Employment engagement agreement details params + * Upsert employment benefit offers request */ - body?: EmploymentEngagementAgreementDetailsParams; + body: UnifiedEmploymentUpsertBenefitOffersRequest; path: { /** - * Employment ID + * Unique identifier of the employment */ - employment_id: string; + employment_id: UuidSlug; }; - query?: never; - url: '/v2/employments/{employment_id}/engagement-agreement-details'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/employments/{employment_id}/benefit-offers'; }; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { +export type PutV1EmploymentsEmploymentIdBenefitOffersErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ @@ -14107,84 +14045,26 @@ export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsError = - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; +export type PutV1EmploymentsEmploymentIdBenefitOffersError = + PutV1EmploymentsEmploymentIdBenefitOffersErrors[keyof PutV1EmploymentsEmploymentIdBenefitOffersErrors]; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { +export type PutV1EmploymentsEmploymentIdBenefitOffersResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponse = - PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV2EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; - -export type GetV1WdGphPaySummaryData = { - body?: never; - headers?: { - /** - * The preferred language of the inquiring user in Workday - */ - accept_language?: string; - }; - path?: never; - query?: { - /** - * The pay group ids to lookup (comma separated). Returns all pay groups if not provided - */ - payGroupExternalId?: string; - /** - * Optional country filter (ISO 3166 alpha-2, comma separated) - */ - countryCode?: string; - }; - url: '/v1/wd/gph/paySummary'; -}; - -export type GetV1WdGphPaySummaryErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1WdGphPaySummaryError = - GetV1WdGphPaySummaryErrors[keyof GetV1WdGphPaySummaryErrors]; - -export type GetV1WdGphPaySummaryResponses = { - /** - * Success - */ - 200: PaySummaryResponse; -}; - -export type GetV1WdGphPaySummaryResponse = - GetV1WdGphPaySummaryResponses[keyof GetV1WdGphPaySummaryResponses]; +export type PutV1EmploymentsEmploymentIdBenefitOffersResponse = + PutV1EmploymentsEmploymentIdBenefitOffersResponses[keyof PutV1EmploymentsEmploymentIdBenefitOffersResponses]; -export type GetV1EmploymentsEmploymentIdJobData = { +export type GetV1IdentityVerificationEmploymentIdData = { body?: never; path: { /** @@ -14193,10 +14073,10 @@ export type GetV1EmploymentsEmploymentIdJobData = { employment_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/job'; + url: '/v1/identity-verification/{employment_id}'; }; -export type GetV1EmploymentsEmploymentIdJobErrors = { +export type GetV1IdentityVerificationEmploymentIdErrors = { /** * Unauthorized */ @@ -14211,82 +14091,118 @@ export type GetV1EmploymentsEmploymentIdJobErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentsEmploymentIdJobError = - GetV1EmploymentsEmploymentIdJobErrors[keyof GetV1EmploymentsEmploymentIdJobErrors]; +export type GetV1IdentityVerificationEmploymentIdError = + GetV1IdentityVerificationEmploymentIdErrors[keyof GetV1IdentityVerificationEmploymentIdErrors]; -export type GetV1EmploymentsEmploymentIdJobResponses = { +export type GetV1IdentityVerificationEmploymentIdResponses = { /** * Success */ - 200: EmploymentJobResponse; + 200: IdentityVerificationResponse; }; -export type GetV1EmploymentsEmploymentIdJobResponse = - GetV1EmploymentsEmploymentIdJobResponses[keyof GetV1EmploymentsEmploymentIdJobResponses]; +export type GetV1IdentityVerificationEmploymentIdResponse = + GetV1IdentityVerificationEmploymentIdResponses[keyof GetV1IdentityVerificationEmploymentIdResponses]; -export type PostV1BulkEmploymentJobsData = { - /** - * Bulk employment params - */ - body?: BulkEmploymentCreateParams; +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions'; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsError = + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsErrors]; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses = + { + /** + * Success + */ + 200: ContractorSubscriptionSummariesResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponse = + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsResponses]; + +export type GetV1EmployeePayslipsData = { + body?: never; path?: never; - query?: never; - url: '/v1/bulk-employment-jobs'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/employee/payslips'; }; -export type PostV1BulkEmploymentJobsErrors = { +export type GetV1EmployeePayslipsErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PostV1BulkEmploymentJobsError = - PostV1BulkEmploymentJobsErrors[keyof PostV1BulkEmploymentJobsErrors]; +export type GetV1EmployeePayslipsError = + GetV1EmployeePayslipsErrors[keyof GetV1EmployeePayslipsErrors]; -export type PostV1BulkEmploymentJobsResponses = { +export type GetV1EmployeePayslipsResponses = { /** - * Accepted + * Success */ - 202: BulkEmploymentImportJobResponse; + 200: ListEmployeePayslipsResponse; }; -export type PostV1BulkEmploymentJobsResponse = - PostV1BulkEmploymentJobsResponses[keyof PostV1BulkEmploymentJobsResponses]; +export type GetV1EmployeePayslipsResponse = + GetV1EmployeePayslipsResponses[keyof GetV1EmployeePayslipsResponses]; -export type GetV1ContractAmendmentsData = { +export type GetV1ContractorsCorTerminationRequestsData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path?: never; query?: { /** - * Employment ID + * Filter termination requests by employment ID. */ - employment_id?: string; + employment_id?: UuidSlug; /** - * Contract Amendment status + * Filter termination requests by status. */ - status?: ContractAmendmentStatus; + status?: 'initiated' | 'executed' | 'cancelled'; /** * Starts fetching records after the given page */ @@ -14296,62 +14212,78 @@ export type GetV1ContractAmendmentsData = { */ page_size?: number; }; - url: '/v1/contract-amendments'; + url: '/v1/contractors/cor-termination-requests'; }; -export type GetV1ContractAmendmentsErrors = { +export type GetV1ContractorsCorTerminationRequestsErrors = { /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetV1ContractAmendmentsError = - GetV1ContractAmendmentsErrors[keyof GetV1ContractAmendmentsErrors]; +export type GetV1ContractorsCorTerminationRequestsError = + GetV1ContractorsCorTerminationRequestsErrors[keyof GetV1ContractorsCorTerminationRequestsErrors]; -export type GetV1ContractAmendmentsResponses = { +export type GetV1ContractorsCorTerminationRequestsResponses = { /** * Success */ - 200: ListContractAmendmentResponse; + 200: IndexCorTerminationRequestsResponse; }; -export type GetV1ContractAmendmentsResponse = - GetV1ContractAmendmentsResponses[keyof GetV1ContractAmendmentsResponses]; +export type GetV1ContractorsCorTerminationRequestsResponse = + GetV1ContractorsCorTerminationRequestsResponses[keyof GetV1ContractorsCorTerminationRequestsResponses]; -export type PostV1ContractAmendmentsData = { - /** - * Contract Amendment - */ - body?: CreateContractAmendmentParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type GetV1WebhookEventsData = { + body?: never; path?: never; query?: { /** - * Version of the form schema + * Filter by webhook event type */ - json_schema_version?: number | 'latest'; + event_type?: string; + /** + * Filter by delivery status (true = 200, false = 4xx/5xx) + */ + successfully_delivered?: boolean; + /** + * Filter by company ID + */ + company_id?: string; + /** + * Filter by date before (ISO 8601 format) + */ + before?: string; + /** + * Filter by date after (ISO 8601 format) + */ + after?: string; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'first_triggered_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/contract-amendments'; + url: '/v1/webhook-events'; }; -export type PostV1ContractAmendmentsErrors = { +export type GetV1WebhookEventsErrors = { /** * Unauthorized */ @@ -14366,20 +14298,20 @@ export type PostV1ContractAmendmentsErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1ContractAmendmentsError = - PostV1ContractAmendmentsErrors[keyof PostV1ContractAmendmentsErrors]; +export type GetV1WebhookEventsError = + GetV1WebhookEventsErrors[keyof GetV1WebhookEventsErrors]; -export type PostV1ContractAmendmentsResponses = { +export type GetV1WebhookEventsResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: ListWebhookEventsResponse; }; -export type PostV1ContractAmendmentsResponse = - PostV1ContractAmendmentsResponses[keyof PostV1ContractAmendmentsResponses]; +export type GetV1WebhookEventsResponse = + GetV1WebhookEventsResponses[keyof GetV1WebhookEventsResponses]; -export type DeleteV1IncentivesRecurringIdData = { +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData = { body?: never; headers: { /** @@ -14392,15 +14324,15 @@ export type DeleteV1IncentivesRecurringIdData = { }; path: { /** - * Recurring Incentive ID + * Company ID */ - id: string; + company_id: string; }; query?: never; - url: '/v1/incentives/recurring/{id}'; + url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks'; }; -export type DeleteV1IncentivesRecurringIdErrors = { +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors = { /** * Bad Request */ @@ -14423,124 +14355,91 @@ export type DeleteV1IncentivesRecurringIdErrors = { 429: TooManyRequestsResponse; }; -export type DeleteV1IncentivesRecurringIdError = - DeleteV1IncentivesRecurringIdErrors[keyof DeleteV1IncentivesRecurringIdErrors]; +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksError = + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors]; -export type DeleteV1IncentivesRecurringIdResponses = { +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses = { /** * Success */ - 200: DeleteRecurringIncentiveResponse; + 200: SuccessResponse; }; -export type DeleteV1IncentivesRecurringIdResponse = - DeleteV1IncentivesRecurringIdResponses[keyof DeleteV1IncentivesRecurringIdResponses]; +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponse = + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses]; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { - body?: never; - headers: { +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve'; + }; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Bad Request */ - Authorization: string; - }; - path: { + 400: BadRequestResponse; /** - * Benefit Renewal Request Id + * Unauthorized */ - benefit_renewal_request_id: UuidSlug; - }; - query?: never; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; -}; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdError = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { - /** - * Success - */ - 200: BenefitRenewalRequestsBenefitRenewalRequestResponse; -}; - -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; - -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { - /** - * Benefit Renewal Request Response - */ - body?: BenefitRenewalRequestsUpdateBenefitRenewalRequest; - headers: { + 401: UnauthorizedResponse; /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Not Found */ - Authorization: string; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; - path: { + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveError = + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors]; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses = + { /** - * Benefit Renewal Request Id + * Success */ - benefit_renewal_request_id: UuidSlug; + 200: RiskReserveProofOfPaymentResponse; }; + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponse = + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses]; + +export type GetV1TestSchemaData = { + body?: never; + path?: never; query?: { /** * Version of the form schema */ json_schema_version?: number | 'latest'; }; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; -}; - -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; + url: '/v1/test-schema'; }; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdError = - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; - -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { +export type GetV1TestSchemaResponses = { /** * Success */ - 200: SuccessResponse; + 200: CompanyFormResponse; }; -export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = - PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; +export type GetV1TestSchemaResponse = + GetV1TestSchemaResponses[keyof GetV1TestSchemaResponses]; export type GetV1CountriesCountryCodeHolidaysYearData = { body?: never; @@ -14600,30 +14499,28 @@ export type GetV1CountriesCountryCodeHolidaysYearResponses = { export type GetV1CountriesCountryCodeHolidaysYearResponse = GetV1CountriesCountryCodeHolidaysYearResponses[keyof GetV1CountriesCountryCodeHolidaysYearResponses]; -export type GetV1EmploymentsEmploymentIdCustomFieldsData = { - body?: never; +export type PostV1TimeoffTimeoffIdCancelData = { + /** + * CancelTimeoff + */ + body: CancelTimeoffParams; path: { /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Time Off ID */ - page_size?: number; + timeoff_id: string; }; - url: '/v1/employments/{employment_id}/custom-fields'; + query?: never; + url: '/v1/timeoff/{timeoff_id}/cancel'; }; -export type GetV1EmploymentsEmploymentIdCustomFieldsErrors = { +export type PostV1TimeoffTimeoffIdCancelErrors = { /** - * Unauthorized + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized */ 401: UnauthorizedResponse; /** @@ -14634,34 +14531,38 @@ export type GetV1EmploymentsEmploymentIdCustomFieldsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdCustomFieldsError = - GetV1EmploymentsEmploymentIdCustomFieldsErrors[keyof GetV1EmploymentsEmploymentIdCustomFieldsErrors]; +export type PostV1TimeoffTimeoffIdCancelError = + PostV1TimeoffTimeoffIdCancelErrors[keyof PostV1TimeoffTimeoffIdCancelErrors]; -export type GetV1EmploymentsEmploymentIdCustomFieldsResponses = { +export type PostV1TimeoffTimeoffIdCancelResponses = { /** * Success */ - 200: ListEmploymentCustomFieldValuePaginatedResponse; + 200: TimeoffResponse; }; -export type GetV1EmploymentsEmploymentIdCustomFieldsResponse = - GetV1EmploymentsEmploymentIdCustomFieldsResponses[keyof GetV1EmploymentsEmploymentIdCustomFieldsResponses]; +export type PostV1TimeoffTimeoffIdCancelResponse = + PostV1TimeoffTimeoffIdCancelResponses[keyof PostV1TimeoffTimeoffIdCancelResponses]; -export type GetV1TimesheetsIdData = { +export type GetV1EmploymentsEmploymentIdJobData = { body?: never; path: { /** - * Timesheet ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/timesheets/{id}'; + url: '/v1/employments/{employment_id}/job'; }; -export type GetV1TimesheetsIdErrors = { +export type GetV1EmploymentsEmploymentIdJobErrors = { /** * Unauthorized */ @@ -14676,53 +14577,27 @@ export type GetV1TimesheetsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1TimesheetsIdError = - GetV1TimesheetsIdErrors[keyof GetV1TimesheetsIdErrors]; +export type GetV1EmploymentsEmploymentIdJobError = + GetV1EmploymentsEmploymentIdJobErrors[keyof GetV1EmploymentsEmploymentIdJobErrors]; -export type GetV1TimesheetsIdResponses = { +export type GetV1EmploymentsEmploymentIdJobResponses = { /** * Success */ - 200: TimesheetResponse; + 200: EmploymentJobResponse; }; -export type GetV1TimesheetsIdResponse = - GetV1TimesheetsIdResponses[keyof GetV1TimesheetsIdResponses]; +export type GetV1EmploymentsEmploymentIdJobResponse = + GetV1EmploymentsEmploymentIdJobResponses[keyof GetV1EmploymentsEmploymentIdJobResponses]; -export type GetV1CompanyManagersData = { +export type GetV1PricingPlanPartnerTemplatesData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path?: never; - query?: { - /** - * A Company ID to filter the results (only applicable for Integration Partners). - */ - company_id?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 - */ - page_size?: number; - }; - url: '/v1/company-managers'; + query?: never; + url: '/v1/pricing-plan-partner-templates'; }; -export type GetV1CompanyManagersErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1PricingPlanPartnerTemplatesErrors = { /** * Unauthorized */ @@ -14735,57 +14610,46 @@ export type GetV1CompanyManagersErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1CompanyManagersError = - GetV1CompanyManagersErrors[keyof GetV1CompanyManagersErrors]; +export type GetV1PricingPlanPartnerTemplatesError = + GetV1PricingPlanPartnerTemplatesErrors[keyof GetV1PricingPlanPartnerTemplatesErrors]; -export type GetV1CompanyManagersResponses = { +export type GetV1PricingPlanPartnerTemplatesResponses = { /** * Success */ - 200: CompanyManagersResponse; + 200: ListPricingPlanPartnerTemplatesResponse; }; -export type GetV1CompanyManagersResponse = - GetV1CompanyManagersResponses[keyof GetV1CompanyManagersResponses]; +export type GetV1PricingPlanPartnerTemplatesResponse = + GetV1PricingPlanPartnerTemplatesResponses[keyof GetV1PricingPlanPartnerTemplatesResponses]; -export type PostV1CompanyManagersData = { - /** - * Company Manager params - */ - body?: CompanyManagerParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type GetV1PayrollCalendarsData = { + body?: never; path?: never; query?: { /** - * Complementary action(s) to perform when creating a company manager: - * - * - `no_invite` skips the email invitation step - * + * Filter payroll calendars by country code */ - actions?: string; + country_code?: string; + /** + * Filter payroll calendars by year + */ + year?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/company-managers'; + url: '/v1/payroll-calendars'; }; -export type PostV1CompanyManagersErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1PayrollCalendarsErrors = { /** * Unauthorized */ @@ -14798,79 +14662,49 @@ export type PostV1CompanyManagersErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; -}; - -export type PostV1CompanyManagersError = - PostV1CompanyManagersErrors[keyof PostV1CompanyManagersErrors]; - -export type PostV1CompanyManagersResponses = { - /** - * Success - */ - 201: CompanyManagerData; -}; - -export type PostV1CompanyManagersResponse = - PostV1CompanyManagersResponses[keyof PostV1CompanyManagersResponses]; - -export type GetV1EmployeeLeavePoliciesSummaryData = { - body?: never; - path?: never; - query?: never; - url: '/v1/employee/leave-policies/summary'; -}; - -export type GetV1EmployeeLeavePoliciesSummaryErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; }; -export type GetV1EmployeeLeavePoliciesSummaryError = - GetV1EmployeeLeavePoliciesSummaryErrors[keyof GetV1EmployeeLeavePoliciesSummaryErrors]; +export type GetV1PayrollCalendarsError = + GetV1PayrollCalendarsErrors[keyof GetV1PayrollCalendarsErrors]; -export type GetV1EmployeeLeavePoliciesSummaryResponses = { +export type GetV1PayrollCalendarsResponses = { /** * Success */ - 200: ListLeavePoliciesSummaryResponse; + 200: PayrollCalendarsEorResponse; }; -export type GetV1EmployeeLeavePoliciesSummaryResponse = - GetV1EmployeeLeavePoliciesSummaryResponses[keyof GetV1EmployeeLeavePoliciesSummaryResponses]; +export type GetV1PayrollCalendarsResponse = + GetV1PayrollCalendarsResponses[keyof GetV1PayrollCalendarsResponses]; -export type PostV1PayItemsBulkData = { +export type PatchV1EmployeeTimeoffId2Data = { /** - * Pay Items + * UpdateTimeoff */ - body: BulkCreatePayItemsParams; - path?: never; + body: UpdateEmployeeTimeoffParams; + path: { + /** + * Timeoff ID + */ + id: string; + }; query?: never; - url: '/v1/pay-items/bulk'; + url: '/v1/employee/timeoff/{id}'; }; -export type PostV1PayItemsBulkErrors = { +export type PatchV1EmployeeTimeoffId2Errors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -14881,32 +14715,39 @@ export type PostV1PayItemsBulkErrors = { 429: TooManyRequestsResponse; }; -export type PostV1PayItemsBulkError = - PostV1PayItemsBulkErrors[keyof PostV1PayItemsBulkErrors]; +export type PatchV1EmployeeTimeoffId2Error = + PatchV1EmployeeTimeoffId2Errors[keyof PatchV1EmployeeTimeoffId2Errors]; -export type PostV1PayItemsBulkResponses = { +export type PatchV1EmployeeTimeoffId2Responses = { /** * Success */ - 200: BulkCreatePayItemsResponse; + 200: TimeoffResponse; }; -export type PostV1PayItemsBulkResponse = - PostV1PayItemsBulkResponses[keyof PostV1PayItemsBulkResponses]; +export type PatchV1EmployeeTimeoffId2Response = + PatchV1EmployeeTimeoffId2Responses[keyof PatchV1EmployeeTimeoffId2Responses]; -export type GetV1TravelLetterRequestsIdData = { - body?: never; +export type PatchV1EmployeeTimeoffIdData = { + /** + * UpdateTimeoff + */ + body: UpdateEmployeeTimeoffParams; path: { /** - * travel letter request ID + * Timeoff ID */ - id: UuidSlug; + id: string; }; query?: never; - url: '/v1/travel-letter-requests/{id}'; + url: '/v1/employee/timeoff/{id}'; }; -export type GetV1TravelLetterRequestsIdErrors = { +export type PatchV1EmployeeTimeoffIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -14919,37 +14760,67 @@ export type GetV1TravelLetterRequestsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1TravelLetterRequestsIdError = - GetV1TravelLetterRequestsIdErrors[keyof GetV1TravelLetterRequestsIdErrors]; +export type PatchV1EmployeeTimeoffIdError = + PatchV1EmployeeTimeoffIdErrors[keyof PatchV1EmployeeTimeoffIdErrors]; -export type GetV1TravelLetterRequestsIdResponses = { +export type PatchV1EmployeeTimeoffIdResponses = { /** * Success */ - 200: TravelLetterResponse; + 200: TimeoffResponse; }; -export type GetV1TravelLetterRequestsIdResponse = - GetV1TravelLetterRequestsIdResponses[keyof GetV1TravelLetterRequestsIdResponses]; +export type PatchV1EmployeeTimeoffIdResponse = + PatchV1EmployeeTimeoffIdResponses[keyof PatchV1EmployeeTimeoffIdResponses]; -export type PatchV1TravelLetterRequestsId2Data = { - /** - * Travel letter Request - */ - body: UpdateTravelLetterRequestParams; - path: { +export type GetV1IncentivesRecurringData = { + body?: never; + headers: { /** - * Travel letter Request ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - id: string; + Authorization: string; }; - query?: never; - url: '/v1/travel-letter-requests/{id}'; + path?: never; + query?: { + /** + * Filter by recurring incentive status: active or deactive. + */ + status?: string; + /** + * Filter by recurring incentive type. + */ + type?: string; + /** + * Filter by recurring incentives that contain the value in their notes. + */ + note?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; + }; + url: '/v1/incentives/recurring'; }; -export type PatchV1TravelLetterRequestsId2Errors = { +export type GetV1IncentivesRecurringErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -14962,37 +14833,49 @@ export type PatchV1TravelLetterRequestsId2Errors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PatchV1TravelLetterRequestsId2Error = - PatchV1TravelLetterRequestsId2Errors[keyof PatchV1TravelLetterRequestsId2Errors]; +export type GetV1IncentivesRecurringError = + GetV1IncentivesRecurringErrors[keyof GetV1IncentivesRecurringErrors]; -export type PatchV1TravelLetterRequestsId2Responses = { +export type GetV1IncentivesRecurringResponses = { /** * Success */ - 200: TravelLetterResponse; + 201: ListRecurringIncentivesResponse; }; -export type PatchV1TravelLetterRequestsId2Response = - PatchV1TravelLetterRequestsId2Responses[keyof PatchV1TravelLetterRequestsId2Responses]; +export type GetV1IncentivesRecurringResponse = + GetV1IncentivesRecurringResponses[keyof GetV1IncentivesRecurringResponses]; -export type PatchV1TravelLetterRequestsIdData = { +export type PostV1IncentivesRecurringData = { /** - * Travel letter Request + * RecurringIncentive */ - body: UpdateTravelLetterRequestParams; - path: { + body?: CreateRecurringIncentiveParams; + headers: { /** - * Travel letter Request ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - id: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/travel-letter-requests/{id}'; + url: '/v1/incentives/recurring'; }; -export type PatchV1TravelLetterRequestsIdErrors = { +export type PostV1IncentivesRecurringErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15005,23 +14888,30 @@ export type PatchV1TravelLetterRequestsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PatchV1TravelLetterRequestsIdError = - PatchV1TravelLetterRequestsIdErrors[keyof PatchV1TravelLetterRequestsIdErrors]; +export type PostV1IncentivesRecurringError = + PostV1IncentivesRecurringErrors[keyof PostV1IncentivesRecurringErrors]; -export type PatchV1TravelLetterRequestsIdResponses = { +export type PostV1IncentivesRecurringResponses = { /** * Success */ - 200: TravelLetterResponse; + 201: RecurringIncentiveResponse; }; -export type PatchV1TravelLetterRequestsIdResponse = - PatchV1TravelLetterRequestsIdResponses[keyof PatchV1TravelLetterRequestsIdResponses]; +export type PostV1IncentivesRecurringResponse = + PostV1IncentivesRecurringResponses[keyof PostV1IncentivesRecurringResponses]; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData = { - body?: never; +export type PostV1SandboxBenefitRenewalRequestsData = { + /** + * Benefit Renewal Request + */ + body: BenefitRenewalRequestsCreateBenefitRenewalRequest; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -15031,17 +14921,12 @@ export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksData = { */ Authorization: string; }; - path: { - /** - * Company ID - */ - company_id: string; - }; + path?: never; query?: never; - url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks'; + url: '/v1/sandbox/benefit-renewal-requests'; }; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors = { +export type PostV1SandboxBenefitRenewalRequestsErrors = { /** * Bad Request */ @@ -15050,41 +14935,46 @@ export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksError = - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksErrors]; +export type PostV1SandboxBenefitRenewalRequestsError = + PostV1SandboxBenefitRenewalRequestsErrors[keyof PostV1SandboxBenefitRenewalRequestsErrors]; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses = { +export type PostV1SandboxBenefitRenewalRequestsResponses = { /** * Success */ - 200: SuccessResponse; + 200: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse; }; -export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponse = - PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses[keyof PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksResponses]; +export type PostV1SandboxBenefitRenewalRequestsResponse = + PostV1SandboxBenefitRenewalRequestsResponses[keyof PostV1SandboxBenefitRenewalRequestsResponses]; -export type GetV1EmployeeLeavePoliciesData = { +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData = { body?: never; - path?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Document ID + */ + id: string; + }; query?: never; - url: '/v1/employee/leave-policies'; + url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}'; }; -export type GetV1EmployeeLeavePoliciesErrors = { +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors = { /** * Unauthorized */ @@ -15093,34 +14983,56 @@ export type GetV1EmployeeLeavePoliciesErrors = { * Not Found */ 404: NotFoundResponse; -}; - -export type GetV1EmployeeLeavePoliciesError = - GetV1EmployeeLeavePoliciesErrors[keyof GetV1EmployeeLeavePoliciesErrors]; - -export type GetV1EmployeeLeavePoliciesResponses = { /** - * Success + * Unprocessable Entity */ - 200: ListLeavePoliciesDetailsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeLeavePoliciesResponse = - GetV1EmployeeLeavePoliciesResponses[keyof GetV1EmployeeLeavePoliciesResponses]; +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError = + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors]; -export type GetV1CompaniesCompanyIdWebhookCallbacksData = { +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses = + { + /** + * Success + */ + 200: ContractDocumentResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponse = + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses]; + +export type GetV1EmploymentsEmploymentIdContractDocumentsData = { body?: never; path: { /** - * Company ID + * Employment ID */ - company_id: string; + employment_id: string; }; - query?: never; - url: '/v1/companies/{company_id}/webhook-callbacks'; + query?: { + /** + * Filter by contract document statuses + */ + statuses?: Array; + /** + * Exclude contract documents with specific statuses + */ + except_statuses?: Array; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/employments/{employment_id}/contract-documents'; }; -export type GetV1CompaniesCompanyIdWebhookCallbacksErrors = { +export type GetV1EmploymentsEmploymentIdContractDocumentsErrors = { /** * Unauthorized */ @@ -15129,22 +15041,26 @@ export type GetV1CompaniesCompanyIdWebhookCallbacksErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1CompaniesCompanyIdWebhookCallbacksError = - GetV1CompaniesCompanyIdWebhookCallbacksErrors[keyof GetV1CompaniesCompanyIdWebhookCallbacksErrors]; +export type GetV1EmploymentsEmploymentIdContractDocumentsError = + GetV1EmploymentsEmploymentIdContractDocumentsErrors[keyof GetV1EmploymentsEmploymentIdContractDocumentsErrors]; -export type GetV1CompaniesCompanyIdWebhookCallbacksResponses = { +export type GetV1EmploymentsEmploymentIdContractDocumentsResponses = { /** * Success */ - 200: ListWebhookCallbacksResponse; + 200: IndexContractDocumentsResponse; }; -export type GetV1CompaniesCompanyIdWebhookCallbacksResponse = - GetV1CompaniesCompanyIdWebhookCallbacksResponses[keyof GetV1CompaniesCompanyIdWebhookCallbacksResponses]; +export type GetV1EmploymentsEmploymentIdContractDocumentsResponse = + GetV1EmploymentsEmploymentIdContractDocumentsResponses[keyof GetV1EmploymentsEmploymentIdContractDocumentsResponses]; -export type GetV1BillingDocumentsBillingDocumentIdPdfData = { +export type GetV1ExpensesData = { body?: never; headers: { /** @@ -15155,17 +15071,25 @@ export type GetV1BillingDocumentsBillingDocumentIdPdfData = { */ Authorization: string; }; - path: { + path?: never; + query?: { /** - * The billing document's ID + * Starts fetching records after the given page */ - billing_document_id: string; + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v1/billing-documents/{billing_document_id}/pdf'; + url: '/v1/expenses'; }; -export type GetV1BillingDocumentsBillingDocumentIdPdfErrors = { +export type GetV1ExpensesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15178,23 +15102,29 @@ export type GetV1BillingDocumentsBillingDocumentIdPdfErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdPdfError = - GetV1BillingDocumentsBillingDocumentIdPdfErrors[keyof GetV1BillingDocumentsBillingDocumentIdPdfErrors]; +export type GetV1ExpensesError = GetV1ExpensesErrors[keyof GetV1ExpensesErrors]; -export type GetV1BillingDocumentsBillingDocumentIdPdfResponses = { +export type GetV1ExpensesResponses = { /** * Success */ - 200: GenericFile; + 201: ListExpenseResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdPdfResponse = - GetV1BillingDocumentsBillingDocumentIdPdfResponses[keyof GetV1BillingDocumentsBillingDocumentIdPdfResponses]; +export type GetV1ExpensesResponse = + GetV1ExpensesResponses[keyof GetV1ExpensesResponses]; -export type DeleteV1WebhookCallbacksIdData = { - body?: never; +export type PostV1ExpensesData = { + /** + * Expenses + */ + body?: ParamsToCreateExpense; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -15204,17 +15134,16 @@ export type DeleteV1WebhookCallbacksIdData = { */ Authorization: string; }; - path: { - /** - * Webhook Callback ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/webhook-callbacks/{id}'; + url: '/v1/expenses'; }; -export type DeleteV1WebhookCallbacksIdErrors = { +export type PostV1ExpensesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15227,37 +15156,79 @@ export type DeleteV1WebhookCallbacksIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type DeleteV1WebhookCallbacksIdError = - DeleteV1WebhookCallbacksIdErrors[keyof DeleteV1WebhookCallbacksIdErrors]; +export type PostV1ExpensesError = + PostV1ExpensesErrors[keyof PostV1ExpensesErrors]; -export type DeleteV1WebhookCallbacksIdResponses = { +export type PostV1ExpensesResponses = { /** * Success */ - 200: SuccessResponse; + 201: ExpenseResponse; }; -export type DeleteV1WebhookCallbacksIdResponse = - DeleteV1WebhookCallbacksIdResponses[keyof DeleteV1WebhookCallbacksIdResponses]; +export type PostV1ExpensesResponse = + PostV1ExpensesResponses[keyof PostV1ExpensesResponses]; -export type PatchV1WebhookCallbacksIdData = { +export type GetV1SsoConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/v1/sso-configuration'; +}; + +export type GetV1SsoConfigurationErrors = { /** - * WebhookCallback + * Bad Request */ - body?: UpdateWebhookCallbackParams; - path: { - /** - * Webhook Callback ID - */ - id: string; - }; + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type GetV1SsoConfigurationError = + GetV1SsoConfigurationErrors[keyof GetV1SsoConfigurationErrors]; + +export type GetV1SsoConfigurationResponses = { + /** + * Success + */ + 200: SsoConfigurationResponse; +}; + +export type GetV1SsoConfigurationResponse = + GetV1SsoConfigurationResponses[keyof GetV1SsoConfigurationResponses]; + +export type PostV1SsoConfigurationData = { + /** + * CreateSSOConfiguration + */ + body: CreateSsoConfigurationParams; + path?: never; query?: never; - url: '/v1/webhook-callbacks/{id}'; + url: '/v1/sso-configuration'; }; -export type PatchV1WebhookCallbacksIdErrors = { +export type PostV1SsoConfigurationErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15266,41 +15237,49 @@ export type PatchV1WebhookCallbacksIdErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PatchV1WebhookCallbacksIdError = - PatchV1WebhookCallbacksIdErrors[keyof PatchV1WebhookCallbacksIdErrors]; +export type PostV1SsoConfigurationError = + PostV1SsoConfigurationErrors[keyof PostV1SsoConfigurationErrors]; -export type PatchV1WebhookCallbacksIdResponses = { +export type PostV1SsoConfigurationResponses = { /** - * Success + * Created */ - 200: WebhookCallbackResponse; + 201: CreateSsoConfigurationResponse; }; -export type PatchV1WebhookCallbacksIdResponse = - PatchV1WebhookCallbacksIdResponses[keyof PatchV1WebhookCallbacksIdResponses]; +export type PostV1SsoConfigurationResponse = + PostV1SsoConfigurationResponses[keyof PostV1SsoConfigurationResponses]; -export type GetV1CountriesData = { - body?: never; - headers: { +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsData = { + /** + * ContractorCreateTimesheetParams + */ + body: ContractorCreateTimesheetParams; + path: { /** - * This endpoint works with any of the access tokens provided. You can use an access - * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. - * + * Contractor employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; query?: never; - url: '/v1/countries'; + url: '/v1/contractors/employments/{employment_id}/timesheets'; }; -export type GetV1CountriesErrors = { +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { /** * Bad Request */ @@ -15309,6 +15288,10 @@ export type GetV1CountriesErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -15317,44 +15300,40 @@ export type GetV1CountriesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1CountriesError = - GetV1CountriesErrors[keyof GetV1CountriesErrors]; +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsError = + PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors]; -export type GetV1CountriesResponses = { +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses = { /** * Success */ - 200: CountriesResponse; + 200: ContractorTimesheetResponse; }; -export type GetV1CountriesResponse = - GetV1CountriesResponses[keyof GetV1CountriesResponses]; +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponse = + PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses]; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData = +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData = { body?: never; path: { /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID + * Contract amendment request ID */ - legal_entity_id: UuidSlug; + contract_amendment_request_id: string; }; query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility'; + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve'; }; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors = +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15363,33 +15342,38 @@ export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibili * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityError = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors]; +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors]; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses = +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses = { /** * Success */ - 200: ContractorEligibilityResponse; + 200: ContractAmendmentResponse; }; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponse = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses]; +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponse = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses]; -export type PostV1CurrencyConverterEffectiveData = { - /** - * Convert currency parameters - */ - body: ConvertCurrencyParams; +export type GetV1EmployeeLeavePoliciesData = { + body?: never; path?: never; query?: never; - url: '/v1/currency-converter/effective'; + url: '/v1/employee/leave-policies'; }; -export type PostV1CurrencyConverterEffectiveErrors = { +export type GetV1EmployeeLeavePoliciesErrors = { /** * Unauthorized */ @@ -15398,107 +15382,83 @@ export type PostV1CurrencyConverterEffectiveErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PostV1CurrencyConverterEffectiveError = - PostV1CurrencyConverterEffectiveErrors[keyof PostV1CurrencyConverterEffectiveErrors]; +export type GetV1EmployeeLeavePoliciesError = + GetV1EmployeeLeavePoliciesErrors[keyof GetV1EmployeeLeavePoliciesErrors]; -export type PostV1CurrencyConverterEffectiveResponses = { +export type GetV1EmployeeLeavePoliciesResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: ListLeavePoliciesDetailsResponse; }; -export type PostV1CurrencyConverterEffectiveResponse = - PostV1CurrencyConverterEffectiveResponses[keyof PostV1CurrencyConverterEffectiveResponses]; +export type GetV1EmployeeLeavePoliciesResponse = + GetV1EmployeeLeavePoliciesResponses[keyof GetV1EmployeeLeavePoliciesResponses]; -export type GetV1EmployeePersonalInformationData = { +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData = { body?: never; - path?: never; - query?: never; - url: '/v1/employee/personal-information'; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Restrict to currencies which payout is guaranteed (default: true) + */ + restrict_to_guaranteed_pay_out_currencies?: boolean; + }; + url: '/v1/contractors/employments/{employment_id}/contractor-currencies'; }; -export type GetV1EmployeePersonalInformationErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1EmployeePersonalInformationError = - GetV1EmployeePersonalInformationErrors[keyof GetV1EmployeePersonalInformationErrors]; - -export type GetV1EmployeePersonalInformationResponses = { - /** - * Success - */ - 200: SuccessResponse; -}; - -export type GetV1EmployeePersonalInformationResponse = - GetV1EmployeePersonalInformationResponses[keyof GetV1EmployeePersonalInformationResponses]; - -export type GetV1CountriesCountryCodeFormData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors = + { /** - * Name of the desired form + * Unauthorized */ - form: string; - }; - query?: { + 401: UnauthorizedResponse; /** - * Required for `contract_amendment` form + * Forbidden */ - employment_id?: string; + 403: ForbiddenResponse; /** - * FOR TESTING PURPOSES ONLY: Include scheduled benefit groups. + * Not Found */ - only_for_testing_include_scheduled_benefit_groups?: boolean; + 404: NotFoundResponse; /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + * Internal Server Error */ - skip_benefits?: boolean; + 500: InternalServerErrorResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesError = + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors]; + +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses = + { /** - * Version of the form schema + * Success */ - json_schema_version?: number | 'latest'; + 200: ContractorCurrencyResponse; }; - url: '/v1/countries/{country_code}/{form}'; -}; -export type GetV1CountriesCountryCodeFormErrors = { +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponse = + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses]; + +export type PostV1WebhookEventsReplayData = { /** - * Bad Request + * WebhookEvent */ - 400: BadRequestResponse; + body: ReplayWebhookEventsParams; + path?: never; + query?: never; + url: '/v1/webhook-events/replay'; +}; + +export type PostV1WebhookEventsReplayErrors = { /** * Unauthorized */ @@ -15511,60 +15471,142 @@ export type GetV1CountriesCountryCodeFormErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeFormError = - GetV1CountriesCountryCodeFormErrors[keyof GetV1CountriesCountryCodeFormErrors]; +export type PostV1WebhookEventsReplayError = + PostV1WebhookEventsReplayErrors[keyof PostV1WebhookEventsReplayErrors]; -export type GetV1CountriesCountryCodeFormResponses = { +export type PostV1WebhookEventsReplayResponses = { /** * Success */ - 200: CountryFormResponse; + 200: SuccessResponse; }; -export type GetV1CountriesCountryCodeFormResponse = - GetV1CountriesCountryCodeFormResponses[keyof GetV1CountriesCountryCodeFormResponses]; +export type PostV1WebhookEventsReplayResponse = + PostV1WebhookEventsReplayResponses[keyof PostV1WebhookEventsReplayResponses]; -export type GetV2OffboardingsData = { - body?: never; - path?: never; - query?: { +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors = + { /** - * Filter by Employment ID + * Bad Request */ - employment_id?: string; + 400: BadRequestResponse; /** - * Filter by offboarding type. Only `termination` and `resignation` offboardings are supported. + * Forbidden */ - type?: 'termination' | 'resignation'; + 403: ForbiddenResponse; /** - * By default, the results do not include confidential termination requests. - * Send `include_confidential=true` to include confidential requests in the response. + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsError = + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors]; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses = + { + /** + * Created + */ + 201: CorTerminationRequestCreatedResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponse = + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses]; + +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdData = + { + body?: never; + path: { + /** + * Employment Id + */ + employment_id: UuidSlug; + /** + * Background Check Id + */ + background_check_id: UuidSlug; + }; + query?: never; + url: '/v1/employments/{employment_id}/background-checks/{background_check_id}'; + }; + +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + }; + +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdError = + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors]; + +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses = + { + /** + * Success + */ + 200: BackgroundChecksBackgroundCheckResponse; + }; + +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponse = + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses]; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. * */ - include_confidential?: boolean; + Authorization: string; + }; + path: { /** - * Starts fetching records after the given page + * Benefit Renewal Request Id */ - page?: number; + benefit_renewal_request_id: UuidSlug; + }; + query?: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Version of the form schema */ - page_size?: number; + json_schema_version?: number | 'latest'; }; - url: '/v2/offboardings'; + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema'; }; -export type GetV2OffboardingsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors = { /** * Unauthorized */ @@ -15577,133 +15619,87 @@ export type GetV2OffboardingsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; -}; - -export type GetV2OffboardingsError = - GetV2OffboardingsErrors[keyof GetV2OffboardingsErrors]; - -export type GetV2OffboardingsResponses = { - /** - * Success - */ - 200: V2ListOffboardingResponse; }; -export type GetV2OffboardingsResponse = - GetV2OffboardingsResponses[keyof GetV2OffboardingsResponses]; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaError = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors]; -export type GetV1TimeoffData = { - body?: never; - headers: { +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Success */ - Authorization: string; + 200: BenefitRenewalRequestsBenefitRenewalRequestFormResponse; }; - path?: never; - query?: { - /** - * Only show time off for a specific employment - */ - employment_id?: string; - /** - * Filter time off by its type - */ - timeoff_type?: TimeoffType; - /** - * Filter time off by its status - */ - status?: TimeoffStatus; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Field to sort by - */ - sort_by?: 'timeoff_type' | 'status'; - /** - * Starts fetching records after the given page - */ - page?: number; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponse = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses]; + +export type PostV1MagicLinkData = { + /** + * Magic links generator body + */ + body: MagicLinkParams; + headers: { /** - * Number of items per page + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - page_size?: number; + Authorization: string; }; - url: '/v1/timeoff'; + path?: never; + query?: never; + url: '/v1/magic-link'; }; -export type GetV1TimeoffErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; +export type PostV1MagicLinkErrors = { /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1TimeoffError = GetV1TimeoffErrors[keyof GetV1TimeoffErrors]; +export type PostV1MagicLinkError = + PostV1MagicLinkErrors[keyof PostV1MagicLinkErrors]; -export type GetV1TimeoffResponses = { +export type PostV1MagicLinkResponses = { /** * Success */ - 200: ListTimeoffResponse; + 200: MagicLinkResponse; }; -export type GetV1TimeoffResponse = - GetV1TimeoffResponses[keyof GetV1TimeoffResponses]; +export type PostV1MagicLinkResponse = + PostV1MagicLinkResponses[keyof PostV1MagicLinkResponses]; -export type PostV1TimeoffData = { - /** - * Timeoff - */ - body: CreateApprovedTimeoffParams; - headers: { +export type GetV2EmploymentsEmploymentIdBasicInformationData = { + body?: never; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; - query?: never; - url: '/v1/timeoff'; + query?: { + /** + * Version of the employment_basic_information form schema + */ + employment_basic_information_json_schema_version?: number | 'latest'; + }; + url: '/v2/employments/{employment_id}/basic_information'; }; -export type PostV1TimeoffErrors = { +export type GetV2EmploymentsEmploymentIdBasicInformationErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ @@ -15718,131 +15714,76 @@ export type PostV1TimeoffErrors = { 429: TooManyRequestsResponse; }; -export type PostV1TimeoffError = PostV1TimeoffErrors[keyof PostV1TimeoffErrors]; - -export type PostV1TimeoffResponses = { - /** - * Created - */ - 201: TimeoffResponse; -}; - -export type PostV1TimeoffResponse = - PostV1TimeoffResponses[keyof PostV1TimeoffResponses]; - -export type GetV1CostCalculatorCountriesData = { - body?: never; - path?: never; - query?: { - /** - * If the premium benefits should be included in the response - */ - include_premium_benefits?: boolean; - }; - url: '/v1/cost-calculator/countries'; -}; +export type GetV2EmploymentsEmploymentIdBasicInformationError = + GetV2EmploymentsEmploymentIdBasicInformationErrors[keyof GetV2EmploymentsEmploymentIdBasicInformationErrors]; -export type GetV1CostCalculatorCountriesResponses = { +export type GetV2EmploymentsEmploymentIdBasicInformationResponses = { /** * Success */ - 200: CostCalculatorListCountryResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1CostCalculatorCountriesResponse = - GetV1CostCalculatorCountriesResponses[keyof GetV1CostCalculatorCountriesResponses]; +export type GetV2EmploymentsEmploymentIdBasicInformationResponse = + GetV2EmploymentsEmploymentIdBasicInformationResponses[keyof GetV2EmploymentsEmploymentIdBasicInformationResponses]; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData = { +export type PutV2EmploymentsEmploymentIdBasicInformationData = { /** - * Proof of Payment + * Employment basic information params */ - body: CreateRiskReserveProofOfPaymentParams; + body?: EmploymentBasicInformationParams; path: { /** * Employment ID */ employment_id: string; }; - query?: never; - url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments'; + query?: { + /** + * Version of the employment_basic_information form schema + */ + employment_basic_information_json_schema_version?: number | 'latest'; + }; + url: '/v2/employments/{employment_id}/basic_information'; }; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors = { +export type PutV2EmploymentsEmploymentIdBasicInformationErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsError = - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors]; +export type PutV2EmploymentsEmploymentIdBasicInformationError = + PutV2EmploymentsEmploymentIdBasicInformationErrors[keyof PutV2EmploymentsEmploymentIdBasicInformationErrors]; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses = { +export type PutV2EmploymentsEmploymentIdBasicInformationResponses = { /** * Success */ - 200: RiskReserveProofOfPaymentResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponse = - PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses]; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdData = - { - body?: never; - path: { - /** - * Employment Id - */ - employment_id: UuidSlug; - /** - * Background Check Id - */ - background_check_id: UuidSlug; - }; - query?: never; - url: '/v1/employments/{employment_id}/background-checks/{background_check_id}'; - }; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdError = - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdErrors]; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses = - { - /** - * Success - */ - 200: BackgroundChecksBackgroundCheckResponse; - }; - -export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponse = - GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses[keyof GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdResponses]; +export type PutV2EmploymentsEmploymentIdBasicInformationResponse = + PutV2EmploymentsEmploymentIdBasicInformationResponses[keyof PutV2EmploymentsEmploymentIdBasicInformationResponses]; -export type GetV1TimeoffBalancesEmploymentIdData = { +export type DeleteV1IncentivesRecurringIdData = { body?: never; headers: { /** @@ -15855,15 +15796,15 @@ export type GetV1TimeoffBalancesEmploymentIdData = { }; path: { /** - * Employment ID for which to show the time off balance + * Recurring Incentive ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/timeoff-balances/{employment_id}'; + url: '/v1/incentives/recurring/{id}'; }; -export type GetV1TimeoffBalancesEmploymentIdErrors = { +export type DeleteV1IncentivesRecurringIdErrors = { /** * Bad Request */ @@ -15873,9 +15814,9 @@ export type GetV1TimeoffBalancesEmploymentIdErrors = { */ 401: UnauthorizedResponse; /** - * TimeoffBalanceNotFoundResponse + * Not Found */ - 404: TimeoffBalanceNotFoundResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -15886,65 +15827,112 @@ export type GetV1TimeoffBalancesEmploymentIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1TimeoffBalancesEmploymentIdError = - GetV1TimeoffBalancesEmploymentIdErrors[keyof GetV1TimeoffBalancesEmploymentIdErrors]; +export type DeleteV1IncentivesRecurringIdError = + DeleteV1IncentivesRecurringIdErrors[keyof DeleteV1IncentivesRecurringIdErrors]; -export type GetV1TimeoffBalancesEmploymentIdResponses = { +export type DeleteV1IncentivesRecurringIdResponses = { /** * Success */ - 200: TimeoffBalanceResponse; + 200: DeleteRecurringIncentiveResponse; }; -export type GetV1TimeoffBalancesEmploymentIdResponse = - GetV1TimeoffBalancesEmploymentIdResponses[keyof GetV1TimeoffBalancesEmploymentIdResponses]; +export type DeleteV1IncentivesRecurringIdResponse = + DeleteV1IncentivesRecurringIdResponses[keyof DeleteV1IncentivesRecurringIdResponses]; -export type GetV1EmployeeExpensesData = { +export type GetV1IncentivesData = { body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; - query?: never; - url: '/v1/employee/expenses'; + query?: { + /** + * Filter by Employment ID + */ + employment_id?: string; + /** + * Filter by Incentive status + */ + status?: string; + /** + * Filter by Recurring Incentive id + */ + recurring_incentive_id?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; + }; + url: '/v1/incentives'; }; -export type GetV1EmployeeExpensesErrors = { +export type GetV1IncentivesErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmployeeExpensesError = - GetV1EmployeeExpensesErrors[keyof GetV1EmployeeExpensesErrors]; +export type GetV1IncentivesError = + GetV1IncentivesErrors[keyof GetV1IncentivesErrors]; -export type GetV1EmployeeExpensesResponses = { +export type GetV1IncentivesResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListIncentivesResponse; }; -export type GetV1EmployeeExpensesResponse = - GetV1EmployeeExpensesResponses[keyof GetV1EmployeeExpensesResponses]; +export type GetV1IncentivesResponse = + GetV1IncentivesResponses[keyof GetV1IncentivesResponses]; -export type PostV1EmployeeExpensesData = { +export type PostV1IncentivesData = { /** - * Expense params + * Incentive */ - body?: ParamsToCreateEmployeeExpense; + body?: CreateOneTimeIncentiveParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; query?: never; - url: '/v1/employee/expenses'; + url: '/v1/incentives'; }; -export type PostV1EmployeeExpensesErrors = { +export type PostV1IncentivesErrors = { /** * Bad Request */ @@ -15954,53 +15942,47 @@ export type PostV1EmployeeExpensesErrors = { */ 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: ForbiddenResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostV1EmployeeExpensesError = - PostV1EmployeeExpensesErrors[keyof PostV1EmployeeExpensesErrors]; +export type PostV1IncentivesError = + PostV1IncentivesErrors[keyof PostV1IncentivesErrors]; -export type PostV1EmployeeExpensesResponses = { +export type PostV1IncentivesResponses = { /** - * Created + * Success */ - 201: SuccessResponse; + 201: IncentiveResponse; }; -export type PostV1EmployeeExpensesResponse = - PostV1EmployeeExpensesResponses[keyof PostV1EmployeeExpensesResponses]; +export type PostV1IncentivesResponse = + PostV1IncentivesResponses[keyof PostV1IncentivesResponses]; -export type GetV1ResignationsOffboardingRequestIdResignationLetterData = { - body?: never; - path: { - /** - * Offboarding request ID - */ - offboarding_request_id: string; - }; +export type PostV1ProbationCompletionLetterData = { + /** + * Work Authorization Request + */ + body: CreateProbationCompletionLetterParams; + path?: never; query?: never; - url: '/v1/resignations/{offboarding_request_id}/resignation-letter'; + url: '/v1/probation-completion-letter'; }; -export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1ProbationCompletionLetterErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -16009,47 +15991,34 @@ export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1ResignationsOffboardingRequestIdResignationLetterError = - GetV1ResignationsOffboardingRequestIdResignationLetterErrors[keyof GetV1ResignationsOffboardingRequestIdResignationLetterErrors]; +export type PostV1ProbationCompletionLetterError = + PostV1ProbationCompletionLetterErrors[keyof PostV1ProbationCompletionLetterErrors]; -export type GetV1ResignationsOffboardingRequestIdResignationLetterResponses = { +export type PostV1ProbationCompletionLetterResponses = { /** * Success */ - 200: GenericFile; + 200: ProbationCompletionLetterResponse; }; -export type GetV1ResignationsOffboardingRequestIdResignationLetterResponse = - GetV1ResignationsOffboardingRequestIdResignationLetterResponses[keyof GetV1ResignationsOffboardingRequestIdResignationLetterResponses]; +export type PostV1ProbationCompletionLetterResponse = + PostV1ProbationCompletionLetterResponses[keyof PostV1ProbationCompletionLetterResponses]; -export type DeleteV1CompanyManagersUserIdData = { +export type GetV1ContractorInvoiceSchedulesIdData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path: { /** - * User ID + * Resource unique identifier */ - user_id: string; + id: UuidSlug; }; query?: never; - url: '/v1/company-managers/{user_id}'; + url: '/v1/contractor-invoice-schedules/{id}'; }; -export type DeleteV1CompanyManagersUserIdErrors = { +export type GetV1ContractorInvoiceSchedulesIdErrors = { /** * Bad Request */ @@ -16058,6 +16027,10 @@ export type DeleteV1CompanyManagersUserIdErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -16067,45 +16040,48 @@ export type DeleteV1CompanyManagersUserIdErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type DeleteV1CompanyManagersUserIdError = - DeleteV1CompanyManagersUserIdErrors[keyof DeleteV1CompanyManagersUserIdErrors]; +export type GetV1ContractorInvoiceSchedulesIdError = + GetV1ContractorInvoiceSchedulesIdErrors[keyof GetV1ContractorInvoiceSchedulesIdErrors]; -export type DeleteV1CompanyManagersUserIdResponses = { +export type GetV1ContractorInvoiceSchedulesIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type DeleteV1CompanyManagersUserIdResponse = - DeleteV1CompanyManagersUserIdResponses[keyof DeleteV1CompanyManagersUserIdResponses]; +export type GetV1ContractorInvoiceSchedulesIdResponse = + GetV1ContractorInvoiceSchedulesIdResponses[keyof GetV1ContractorInvoiceSchedulesIdResponses]; -export type GetV1CompanyManagersUserIdData = { - body?: never; +export type PatchV1ContractorInvoiceSchedulesId2Data = { + /** + * Update parameters + */ + body: UpdateScheduleContractorInvoiceParams; path: { /** - * User ID + * Resource unique identifier */ - user_id: string; + id: UuidSlug; }; query?: never; - url: '/v1/company-managers/{user_id}'; + url: '/v1/contractor-invoice-schedules/{id}'; }; -export type GetV1CompanyManagersUserIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1ContractorInvoiceSchedulesId2Errors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -16114,66 +16090,113 @@ export type GetV1CompanyManagersUserIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1CompanyManagersUserIdError = - GetV1CompanyManagersUserIdErrors[keyof GetV1CompanyManagersUserIdErrors]; +export type PatchV1ContractorInvoiceSchedulesId2Error = + PatchV1ContractorInvoiceSchedulesId2Errors[keyof PatchV1ContractorInvoiceSchedulesId2Errors]; -export type GetV1CompanyManagersUserIdResponses = { +export type PatchV1ContractorInvoiceSchedulesId2Responses = { /** * Success */ - 200: CompanyManagerResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type GetV1CompanyManagersUserIdResponse = - GetV1CompanyManagersUserIdResponses[keyof GetV1CompanyManagersUserIdResponses]; +export type PatchV1ContractorInvoiceSchedulesId2Response = + PatchV1ContractorInvoiceSchedulesId2Responses[keyof PatchV1ContractorInvoiceSchedulesId2Responses]; -export type GetV1EmploymentsEmploymentIdOnboardingStepsData = { - body?: never; +export type PatchV1ContractorInvoiceSchedulesIdData = { + /** + * Update parameters + */ + body: UpdateScheduleContractorInvoiceParams; path: { /** - * Employment ID + * Resource unique identifier */ - employment_id: UuidSlug; + id: UuidSlug; }; query?: never; - url: '/v1/employments/{employment_id}/onboarding-steps'; + url: '/v1/contractor-invoice-schedules/{id}'; }; -export type GetV1EmploymentsEmploymentIdOnboardingStepsErrors = { +export type PatchV1ContractorInvoiceSchedulesIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentsEmploymentIdOnboardingStepsError = - GetV1EmploymentsEmploymentIdOnboardingStepsErrors[keyof GetV1EmploymentsEmploymentIdOnboardingStepsErrors]; - -export type GetV1EmploymentsEmploymentIdOnboardingStepsResponses = { +export type PatchV1ContractorInvoiceSchedulesIdError = + PatchV1ContractorInvoiceSchedulesIdErrors[keyof PatchV1ContractorInvoiceSchedulesIdErrors]; + +export type PatchV1ContractorInvoiceSchedulesIdResponses = { /** * Success */ - 200: EmploymentOnboardingStepsResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type GetV1EmploymentsEmploymentIdOnboardingStepsResponse = - GetV1EmploymentsEmploymentIdOnboardingStepsResponses[keyof GetV1EmploymentsEmploymentIdOnboardingStepsResponses]; +export type PatchV1ContractorInvoiceSchedulesIdResponse = + PatchV1ContractorInvoiceSchedulesIdResponses[keyof PatchV1ContractorInvoiceSchedulesIdResponses]; -export type PostV1ContractAmendmentsAutomatableData = { - /** - * Contract Amendment - */ - body?: CreateContractAmendmentParams; +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements'; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsError = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors]; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses = + { + /** + * Success + */ + 200: IndexPreOnboardingDocumentRequirementsResponse; + }; + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponse = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses]; + +export type GetV1BillingDocumentsBillingDocumentIdData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -16183,17 +16206,26 @@ export type PostV1ContractAmendmentsAutomatableData = { */ Authorization: string; }; - path?: never; + path: { + /** + * The billing document's ID + */ + billing_document_id: string; + }; query?: { /** - * Version of the form schema + * When true, includes billing document items whose type is not part of the standard set for the invoice type. */ - json_schema_version?: number | 'latest'; + include_unrecognized_types?: boolean; }; - url: '/v1/contract-amendments/automatable'; + url: '/v1/billing-documents/{billing_document_id}'; }; -export type PostV1ContractAmendmentsAutomatableErrors = { +export type GetV1BillingDocumentsBillingDocumentIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -16206,46 +16238,36 @@ export type PostV1ContractAmendmentsAutomatableErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractAmendmentsAutomatableError = - PostV1ContractAmendmentsAutomatableErrors[keyof PostV1ContractAmendmentsAutomatableErrors]; +export type GetV1BillingDocumentsBillingDocumentIdError = + GetV1BillingDocumentsBillingDocumentIdErrors[keyof GetV1BillingDocumentsBillingDocumentIdErrors]; -export type PostV1ContractAmendmentsAutomatableResponses = { +export type GetV1BillingDocumentsBillingDocumentIdResponses = { /** * Success */ - 200: ContractAmendmentAutomatableResponse; + 200: BillingDocumentResponse; }; -export type PostV1ContractAmendmentsAutomatableResponse = - PostV1ContractAmendmentsAutomatableResponses[keyof PostV1ContractAmendmentsAutomatableResponses]; +export type GetV1BillingDocumentsBillingDocumentIdResponse = + GetV1BillingDocumentsBillingDocumentIdResponses[keyof GetV1BillingDocumentsBillingDocumentIdResponses]; -export type GetV1PayrollRunsData = { - body?: never; +export type PostV1CostCalculatorEstimationPdfData = { + /** + * Estimate params + */ + body?: CostCalculatorEstimateParams; path?: never; - query?: { - /** - * Filters payroll runs where period_start or period_end match the given date - */ - payroll_period?: Date; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/payroll-runs'; + query?: never; + url: '/v1/cost-calculator/estimation-pdf'; }; -export type GetV1PayrollRunsErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostV1CostCalculatorEstimationPdfErrors = { /** * Not Found */ @@ -16256,83 +16278,71 @@ export type GetV1PayrollRunsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1PayrollRunsError = - GetV1PayrollRunsErrors[keyof GetV1PayrollRunsErrors]; +export type PostV1CostCalculatorEstimationPdfError = + PostV1CostCalculatorEstimationPdfErrors[keyof PostV1CostCalculatorEstimationPdfErrors]; -export type GetV1PayrollRunsResponses = { +export type PostV1CostCalculatorEstimationPdfResponses = { /** * Success */ - 200: ListPayrollRunResponse; + 200: CostCalculatorEstimatePdfResponse; }; -export type GetV1PayrollRunsResponse = - GetV1PayrollRunsResponses[keyof GetV1PayrollRunsResponses]; +export type PostV1CostCalculatorEstimationPdfResponse = + PostV1CostCalculatorEstimationPdfResponses[keyof PostV1CostCalculatorEstimationPdfResponses]; -export type GetV1EmployeeIncentivesData = { +export type GetV1WorkAuthorizationRequestsIdData = { body?: never; - path?: never; + path: { + /** + * work authorization request ID + */ + id: string; + }; query?: never; - url: '/v1/employee/incentives'; + url: '/v1/work-authorization-requests/{id}'; }; -export type GetV1EmployeeIncentivesErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; +export type GetV1WorkAuthorizationRequestsIdErrors = { /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeIncentivesError = - GetV1EmployeeIncentivesErrors[keyof GetV1EmployeeIncentivesErrors]; +export type GetV1WorkAuthorizationRequestsIdError = + GetV1WorkAuthorizationRequestsIdErrors[keyof GetV1WorkAuthorizationRequestsIdErrors]; -export type GetV1EmployeeIncentivesResponses = { +export type GetV1WorkAuthorizationRequestsIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: WorkAuthorizationRequestResponse; }; -export type GetV1EmployeeIncentivesResponse = - GetV1EmployeeIncentivesResponses[keyof GetV1EmployeeIncentivesResponses]; +export type GetV1WorkAuthorizationRequestsIdResponse = + GetV1WorkAuthorizationRequestsIdResponses[keyof GetV1WorkAuthorizationRequestsIdResponses]; -export type PatchV1SandboxEmploymentsEmploymentId2Data = { +export type PatchV1WorkAuthorizationRequestsId2Data = { /** - * Employment params + * Work Authorization Request */ - body?: EmploymentUpdateParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; + body: UpdateWorkAuthorizationRequestParams; path: { /** - * Employment ID + * work authorization request ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/sandbox/employments/{employment_id}'; + url: '/v1/work-authorization-requests/{id}'; }; -export type PatchV1SandboxEmploymentsEmploymentId2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1WorkAuthorizationRequestsId2Errors = { /** * Unauthorized */ @@ -16341,62 +16351,41 @@ export type PatchV1SandboxEmploymentsEmploymentId2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1SandboxEmploymentsEmploymentId2Error = - PatchV1SandboxEmploymentsEmploymentId2Errors[keyof PatchV1SandboxEmploymentsEmploymentId2Errors]; +export type PatchV1WorkAuthorizationRequestsId2Error = + PatchV1WorkAuthorizationRequestsId2Errors[keyof PatchV1WorkAuthorizationRequestsId2Errors]; -export type PatchV1SandboxEmploymentsEmploymentId2Responses = { +export type PatchV1WorkAuthorizationRequestsId2Responses = { /** * Success */ - 200: EmploymentResponse; + 200: WorkAuthorizationRequestResponse; }; -export type PatchV1SandboxEmploymentsEmploymentId2Response = - PatchV1SandboxEmploymentsEmploymentId2Responses[keyof PatchV1SandboxEmploymentsEmploymentId2Responses]; +export type PatchV1WorkAuthorizationRequestsId2Response = + PatchV1WorkAuthorizationRequestsId2Responses[keyof PatchV1WorkAuthorizationRequestsId2Responses]; -export type PatchV1SandboxEmploymentsEmploymentIdData = { +export type PatchV1WorkAuthorizationRequestsIdData = { /** - * Employment params + * Work Authorization Request */ - body?: EmploymentUpdateParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; + body: UpdateWorkAuthorizationRequestParams; path: { /** - * Employment ID + * work authorization request ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/sandbox/employments/{employment_id}'; + url: '/v1/work-authorization-requests/{id}'; }; -export type PatchV1SandboxEmploymentsEmploymentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1WorkAuthorizationRequestsIdErrors = { /** * Unauthorized */ @@ -16405,60 +16394,33 @@ export type PatchV1SandboxEmploymentsEmploymentIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1SandboxEmploymentsEmploymentIdError = - PatchV1SandboxEmploymentsEmploymentIdErrors[keyof PatchV1SandboxEmploymentsEmploymentIdErrors]; +export type PatchV1WorkAuthorizationRequestsIdError = + PatchV1WorkAuthorizationRequestsIdErrors[keyof PatchV1WorkAuthorizationRequestsIdErrors]; -export type PatchV1SandboxEmploymentsEmploymentIdResponses = { +export type PatchV1WorkAuthorizationRequestsIdResponses = { /** * Success */ - 200: EmploymentResponse; + 200: WorkAuthorizationRequestResponse; }; -export type PatchV1SandboxEmploymentsEmploymentIdResponse = - PatchV1SandboxEmploymentsEmploymentIdResponses[keyof PatchV1SandboxEmploymentsEmploymentIdResponses]; +export type PatchV1WorkAuthorizationRequestsIdResponse = + PatchV1WorkAuthorizationRequestsIdResponses[keyof PatchV1WorkAuthorizationRequestsIdResponses]; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaData = { +export type GetV1EmployeeLeavePoliciesSummaryData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Benefit Renewal Request Id - */ - benefit_renewal_request_id: UuidSlug; - }; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema'; + path?: never; + query?: never; + url: '/v1/employee/leave-policies/summary'; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors = { +export type GetV1EmployeeLeavePoliciesSummaryErrors = { /** * Unauthorized */ @@ -16467,55 +16429,41 @@ export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaError = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaErrors]; +export type GetV1EmployeeLeavePoliciesSummaryError = + GetV1EmployeeLeavePoliciesSummaryErrors[keyof GetV1EmployeeLeavePoliciesSummaryErrors]; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses = - { - /** - * Success - */ - 200: BenefitRenewalRequestsBenefitRenewalRequestFormResponse; - }; +export type GetV1EmployeeLeavePoliciesSummaryResponses = { + /** + * Success + */ + 200: ListLeavePoliciesSummaryResponse; +}; -export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponse = - GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaResponses]; +export type GetV1EmployeeLeavePoliciesSummaryResponse = + GetV1EmployeeLeavePoliciesSummaryResponses[keyof GetV1EmployeeLeavePoliciesSummaryResponses]; -export type PutV2EmploymentsEmploymentIdBillingAddressDetailsData = { +export type PutV2EmploymentsEmploymentIdFederalTaxesData = { /** - * Employment billing address details params + * Employment federal taxes params */ - body?: EmploymentBillingAddressDetailsParams; + body?: EmploymentFederalTaxesParams; path: { /** * Employment ID */ employment_id: string; }; - query?: { - /** - * Version of the billing_address_details form schema - */ - billing_address_details_json_schema_version?: number | 'latest'; - }; - url: '/v2/employments/{employment_id}/billing_address_details'; + query?: never; + url: '/v2/employments/{employment_id}/federal-taxes'; }; -export type PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors = { +export type PutV2EmploymentsEmploymentIdFederalTaxesErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ @@ -16538,41 +16486,30 @@ export type PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdBillingAddressDetailsError = - PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors[keyof PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors]; +export type PutV2EmploymentsEmploymentIdFederalTaxesError = + PutV2EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV2EmploymentsEmploymentIdFederalTaxesErrors]; -export type PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses = { +export type PutV2EmploymentsEmploymentIdFederalTaxesResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: SuccessResponse; }; -export type PutV2EmploymentsEmploymentIdBillingAddressDetailsResponse = - PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses]; +export type PutV2EmploymentsEmploymentIdFederalTaxesResponse = + PutV2EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV2EmploymentsEmploymentIdFederalTaxesResponses]; -export type DeleteV1IncentivesIdData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Incentive ID - */ - id: string; - }; +export type PostV1ProbationExtensionsData = { + /** + * ProbationExtension + */ + body: CreateProbationExtensionParams; + path?: never; query?: never; - url: '/v1/incentives/{id}'; + url: '/v1/probation-extensions'; }; -export type DeleteV1IncentivesIdErrors = { +export type PostV1ProbationExtensionsErrors = { /** * Bad Request */ @@ -16585,55 +16522,46 @@ export type DeleteV1IncentivesIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type DeleteV1IncentivesIdError = - DeleteV1IncentivesIdErrors[keyof DeleteV1IncentivesIdErrors]; +export type PostV1ProbationExtensionsError = + PostV1ProbationExtensionsErrors[keyof PostV1ProbationExtensionsErrors]; -export type DeleteV1IncentivesIdResponses = { +export type PostV1ProbationExtensionsResponses = { /** * Success */ - 200: SuccessResponse; + 200: ProbationExtensionResponse; }; -export type DeleteV1IncentivesIdResponse = - DeleteV1IncentivesIdResponses[keyof DeleteV1IncentivesIdResponses]; +export type PostV1ProbationExtensionsResponse = + PostV1ProbationExtensionsResponses[keyof PostV1ProbationExtensionsResponses]; -export type GetV1IncentivesIdData = { - body?: never; - headers: { +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsData = { + /** + * Employment billing address details params + */ + body?: EmploymentBillingAddressDetailsParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path: { + query?: { /** - * Incentive ID + * Version of the billing_address_details form schema */ - id: string; + billing_address_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/incentives/{id}'; + url: '/v2/employments/{employment_id}/billing_address_details'; }; -export type GetV1IncentivesIdErrors = { +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors = { /** * Bad Request */ @@ -16642,58 +16570,62 @@ export type GetV1IncentivesIdErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1IncentivesIdError = - GetV1IncentivesIdErrors[keyof GetV1IncentivesIdErrors]; +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsError = + PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors[keyof PutV2EmploymentsEmploymentIdBillingAddressDetailsErrors]; -export type GetV1IncentivesIdResponses = { +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses = { /** * Success */ - 200: IncentiveResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1IncentivesIdResponse = - GetV1IncentivesIdResponses[keyof GetV1IncentivesIdResponses]; +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsResponse = + PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdBillingAddressDetailsResponses]; -export type PatchV1IncentivesId2Data = { +export type PutV2EmploymentsEmploymentIdAddressDetailsData = { /** - * Incentive + * Employment address details params */ - body?: UpdateIncentiveParams; - headers: { + body?: EmploymentAddressDetailsParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path: { + query?: { /** - * Incentive ID + * Version of the address_details form schema */ - id: string; + address_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/incentives/{id}'; + url: '/v2/employments/{employment_id}/address_details'; }; -export type PatchV1IncentivesId2Errors = { +export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { /** * Bad Request */ @@ -16702,6 +16634,10 @@ export type PatchV1IncentivesId2Errors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -16715,53 +16651,35 @@ export type PatchV1IncentivesId2Errors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PatchV1IncentivesId2Error = - PatchV1IncentivesId2Errors[keyof PatchV1IncentivesId2Errors]; +export type PutV2EmploymentsEmploymentIdAddressDetailsError = + PutV2EmploymentsEmploymentIdAddressDetailsErrors[keyof PutV2EmploymentsEmploymentIdAddressDetailsErrors]; -export type PatchV1IncentivesId2Responses = { +export type PutV2EmploymentsEmploymentIdAddressDetailsResponses = { /** * Success */ - 200: IncentiveResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PatchV1IncentivesId2Response = - PatchV1IncentivesId2Responses[keyof PatchV1IncentivesId2Responses]; +export type PutV2EmploymentsEmploymentIdAddressDetailsResponse = + PutV2EmploymentsEmploymentIdAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdAddressDetailsResponses]; -export type PatchV1IncentivesIdData = { +export type PostV1RiskReserveData = { /** - * Incentive + * Risk Reserve */ - body?: UpdateIncentiveParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Incentive ID - */ - id: string; - }; + body: CreateRiskReserveParams; + path?: never; query?: never; - url: '/v1/incentives/{id}'; + url: '/v1/risk-reserve'; }; -export type PatchV1IncentivesIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1RiskReserveErrors = { /** * Unauthorized */ @@ -16770,283 +16688,178 @@ export type PatchV1IncentivesIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1IncentivesIdError = - PatchV1IncentivesIdErrors[keyof PatchV1IncentivesIdErrors]; +export type PostV1RiskReserveError = + PostV1RiskReserveErrors[keyof PostV1RiskReserveErrors]; -export type PatchV1IncentivesIdResponses = { +export type PostV1RiskReserveResponses = { /** * Success */ - 200: IncentiveResponse; + 200: SuccessResponse; }; -export type PatchV1IncentivesIdResponse = - PatchV1IncentivesIdResponses[keyof PatchV1IncentivesIdResponses]; - -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = - { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID - */ - legal_entity_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; - }; +export type PostV1RiskReserveResponse = + PostV1RiskReserveResponses[keyof PostV1RiskReserveResponses]; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsData = { + /** + * Proof of Payment + */ + body: CreateRiskReserveProofOfPaymentParams; + path: { /** - * Not Found + * Employment ID */ - 404: NotFoundResponse; + employment_id: string; }; + query?: never; + url: '/v1/employments/{employment_id}/risk-reserve-proof-of-payments'; +}; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = - { - /** - * ShowLegalEntityAdministrativeDetailsResponse - * - * Country specific json schema driven administrative details for legal entities - */ - 200: { - data: { - [key: string]: unknown; - }; - }; - }; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsError = + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsErrors]; -export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = - GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses = { + /** + * Success + */ + 200: RiskReserveProofOfPaymentResponse; +}; -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = - { - /** - * Legal entity administrative details params - */ - body?: AdministrativeDetailsParams; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID - */ - legal_entity_id: UuidSlug; - }; - query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; - }; +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponse = + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses[keyof PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsResponses]; -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; +export type GetV1CompaniesCompanyIdComplianceProfileData = { + body?: never; + path: { /** - * Unprocessable Entity + * Company ID */ - 429: TooManyRequestsResponse; + company_id: UuidSlug; }; + query?: never; + url: '/v1/companies/{company_id}/compliance-profile'; +}; -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; - -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = - { - /** - * ShowLegalEntityAdministrativeDetailsResponse - * - * Country specific json schema driven administrative details for legal entities - */ - 200: { - data: { - [key: string]: unknown; - }; - }; - }; +export type GetV1CompaniesCompanyIdComplianceProfileErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; -export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = - PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; +export type GetV1CompaniesCompanyIdComplianceProfileError = + GetV1CompaniesCompanyIdComplianceProfileErrors[keyof GetV1CompaniesCompanyIdComplianceProfileErrors]; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsData = { +export type GetV1CompaniesCompanyIdComplianceProfileResponses = { /** - * Employment bank account details params + * Success */ - body?: EmploymentBankAccountDetailsParams; + 200: CompanyComplianceProfileResponse; +}; + +export type GetV1CompaniesCompanyIdComplianceProfileResponse = + GetV1CompaniesCompanyIdComplianceProfileResponses[keyof GetV1CompaniesCompanyIdComplianceProfileResponses]; + +export type GetV1CompaniesCompanyIdProductPricesData = { + body?: never; path: { /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Version of the bank_account_details form schema + * Company ID */ - bank_account_details_json_schema_version?: number | 'latest'; + company_id: UuidSlug; }; - url: '/v2/employments/{employment_id}/bank_account_details'; + query?: never; + url: '/v1/companies/{company_id}/product-prices'; }; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CompaniesCompanyIdProductPricesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsError = - PutV2EmploymentsEmploymentIdBankAccountDetailsErrors[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsErrors]; +export type GetV1CompaniesCompanyIdProductPricesError = + GetV1CompaniesCompanyIdProductPricesErrors[keyof GetV1CompaniesCompanyIdProductPricesErrors]; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponses = { +export type GetV1CompaniesCompanyIdProductPricesResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ListProductPricesResponse; }; -export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponse = - PutV2EmploymentsEmploymentIdBankAccountDetailsResponses[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsResponses]; +export type GetV1CompaniesCompanyIdProductPricesResponse = + GetV1CompaniesCompanyIdProductPricesResponses[keyof GetV1CompaniesCompanyIdProductPricesResponses]; -export type GetV1ContractorInvoicesData = { +export type GetV1CompaniesCompanyIdData = { body?: never; - path?: never; - query?: { + headers: { /** - * Filters contractor invoices by status matching the value. - */ - status?: ContractorInvoiceStatus; - /** - * Filters contractor invoices by invoice schedule ID matching the value. - */ - contractor_invoice_schedule_id?: UuidSlug; - /** - * Filters contractor invoices by date greater than or equal to the value. - */ - date_from?: Date; - /** - * Filters contractor invoices by date less than or equal to the value. - */ - date_to?: Date; - /** - * Filters contractor invoices by due date greater than or equal to the value. - */ - due_date_from?: Date; - /** - * Filters contractor invoices by due date less than or equal to the value. - */ - due_date_to?: Date; - /** - * Filters contractor invoices by approved date greater than or equal to the value. - */ - approved_date_from?: Date; - /** - * Filters contractor invoices by approved date less than or equal to the value. - */ - approved_date_to?: Date; - /** - * Filters contractor invoices by paid out date greater than or equal to the value. - */ - paid_out_date_from?: Date; - /** - * Filters contractor invoices by paid out date less than or equal to the value. - */ - paid_out_date_to?: Date; - /** - * Field to sort by - */ - sort_by?: 'date' | 'due_date' | 'approved_at' | 'paid_out_at'; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Starts fetching records after the given page + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - page?: number; + Authorization: string; + }; + path: { /** - * Number of items per page + * Company ID */ - page_size?: number; + company_id: string; }; - url: '/v1/contractor-invoices'; + query?: never; + url: '/v1/companies/{company_id}'; }; -export type GetV1ContractorInvoicesErrors = { +export type GetV1CompaniesCompanyIdErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -17055,46 +16868,60 @@ export type GetV1ContractorInvoicesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoicesError = - GetV1ContractorInvoicesErrors[keyof GetV1ContractorInvoicesErrors]; +export type GetV1CompaniesCompanyIdError = + GetV1CompaniesCompanyIdErrors[keyof GetV1CompaniesCompanyIdErrors]; -export type GetV1ContractorInvoicesResponses = { +export type GetV1CompaniesCompanyIdResponses = { /** * Success */ - 200: ListContractorInvoicesResponse; + 200: CompanyResponse; }; -export type GetV1ContractorInvoicesResponse = - GetV1ContractorInvoicesResponses[keyof GetV1ContractorInvoicesResponses]; +export type GetV1CompaniesCompanyIdResponse = + GetV1CompaniesCompanyIdResponses[keyof GetV1CompaniesCompanyIdResponses]; -export type GetV1ExpensesCategoriesData = { - body?: never; - path?: never; - query?: { +export type PatchV1CompaniesCompanyId2Data = { + /** + * Update Company params + */ + body?: UpdateCompanyParams; + headers: { /** - * The employment ID for which to list categories. Required if neither expense_id nor country_code is provided. + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id?: string; + Authorization: string; + }; + path: { /** - * The expense ID for which to list categories (includes the expense's category, even if it is not selectable by default). If provided without employment_id, will use the expense's employment context. + * Company ID + * */ - expense_id?: string; + company_id: string; + }; + query?: { /** - * Include un-selectable intermediate categories in the response + * Version of the address_details form schema */ - include_parents?: boolean; + address_details_json_schema_version?: number | 'latest'; /** - * Filter categories by country (ISO 3166-1 alpha-3 code, e.g. "GBR"). Only used when neither employment_id nor expense_id is provided. + * Version of the bank_account_details form schema */ - country_code?: string; + bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v1/expenses/categories'; + url: '/v1/companies/{company_id}'; }; -export type GetV1ExpensesCategoriesErrors = { +export type PatchV1CompaniesCompanyId2Errors = { /** * Bad Request */ @@ -17117,49 +16944,58 @@ export type GetV1ExpensesCategoriesErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ExpensesCategoriesError = - GetV1ExpensesCategoriesErrors[keyof GetV1ExpensesCategoriesErrors]; +export type PatchV1CompaniesCompanyId2Error = + PatchV1CompaniesCompanyId2Errors[keyof PatchV1CompaniesCompanyId2Errors]; -export type GetV1ExpensesCategoriesResponses = { +export type PatchV1CompaniesCompanyId2Responses = { /** * Success */ - 200: ListExpenseCategoriesResponse; + 200: CompanyResponse; }; -export type GetV1ExpensesCategoriesResponse = - GetV1ExpensesCategoriesResponses[keyof GetV1ExpensesCategoriesResponses]; +export type PatchV1CompaniesCompanyId2Response = + PatchV1CompaniesCompanyId2Responses[keyof PatchV1CompaniesCompanyId2Responses]; -export type GetV1EmploymentsEmploymentIdContractDocumentsData = { - body?: never; - path: { +export type PatchV1CompaniesCompanyIdData = { + /** + * Update Company params + */ + body?: UpdateCompanyParams; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: { - /** - * Filter by contract document statuses - */ - statuses?: Array; + path: { /** - * Exclude contract documents with specific statuses + * Company ID + * */ - except_statuses?: Array; + company_id: string; + }; + query?: { /** - * Starts fetching records after the given page + * Version of the address_details form schema */ - page?: number; + address_details_json_schema_version?: number | 'latest'; /** - * Number of items per page + * Version of the bank_account_details form schema */ - page_size?: number; + bank_account_details_json_schema_version?: number | 'latest'; }; - url: '/v1/employments/{employment_id}/contract-documents'; + url: '/v1/companies/{company_id}'; }; -export type GetV1EmploymentsEmploymentIdContractDocumentsErrors = { +export type PatchV1CompaniesCompanyIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -17172,43 +17008,38 @@ export type GetV1EmploymentsEmploymentIdContractDocumentsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdContractDocumentsError = - GetV1EmploymentsEmploymentIdContractDocumentsErrors[keyof GetV1EmploymentsEmploymentIdContractDocumentsErrors]; +export type PatchV1CompaniesCompanyIdError = + PatchV1CompaniesCompanyIdErrors[keyof PatchV1CompaniesCompanyIdErrors]; -export type GetV1EmploymentsEmploymentIdContractDocumentsResponses = { +export type PatchV1CompaniesCompanyIdResponses = { /** * Success */ - 200: IndexContractDocumentsResponse; + 200: CompanyResponse; }; -export type GetV1EmploymentsEmploymentIdContractDocumentsResponse = - GetV1EmploymentsEmploymentIdContractDocumentsResponses[keyof GetV1EmploymentsEmploymentIdContractDocumentsResponses]; +export type PatchV1CompaniesCompanyIdResponse = + PatchV1CompaniesCompanyIdResponses[keyof PatchV1CompaniesCompanyIdResponses]; -export type GetV1CountriesCountryCodeContractorContractDetailsData = { +export type GetV1EmployeeAddressData = { body?: never; - path: { - /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; - }; + path?: never; query?: { /** - * Employment ID - */ - employment_id?: string; - /** - * Version of the form schema + * Version of the address_details form schema */ - json_schema_version?: number | 'latest'; + address_details_json_schema_version?: number | 'latest'; }; - url: '/v1/countries/{country_code}/contractor-contract-details'; + url: '/v1/employee/address'; }; -export type GetV1CountriesCountryCodeContractorContractDetailsErrors = { +export type GetV1EmployeeAddressErrors = { /** * Bad Request */ @@ -17218,106 +17049,60 @@ export type GetV1CountriesCountryCodeContractorContractDetailsErrors = { */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeContractorContractDetailsError = - GetV1CountriesCountryCodeContractorContractDetailsErrors[keyof GetV1CountriesCountryCodeContractorContractDetailsErrors]; +export type GetV1EmployeeAddressError = + GetV1EmployeeAddressErrors[keyof GetV1EmployeeAddressErrors]; -export type GetV1CountriesCountryCodeContractorContractDetailsResponses = { +export type GetV1EmployeeAddressResponses = { /** * Success */ - 200: ContractorContractDetailsResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1CountriesCountryCodeContractorContractDetailsResponse = - GetV1CountriesCountryCodeContractorContractDetailsResponses[keyof GetV1CountriesCountryCodeContractorContractDetailsResponses]; +export type GetV1EmployeeAddressResponse = + GetV1EmployeeAddressResponses[keyof GetV1EmployeeAddressResponses]; -export type GetV1ScimV2UsersIdData = { - body?: never; - path: { +export type PutV1EmployeeAddressData = { + /** + * Employee address details params + */ + body?: EmploymentAddressDetailsParams; + path?: never; + query?: { /** - * User ID (slug) + * Version of the address_details form schema */ - id: string; + address_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/scim/v2/Users/{id}'; + url: '/v1/employee/address'; }; -export type GetV1ScimV2UsersIdErrors = { - /** - * Unauthorized - */ - 401: IntegrationsScimErrorResponse; - /** - * Forbidden - */ - 403: IntegrationsScimErrorResponse; - /** - * Not Found - */ - 404: IntegrationsScimErrorResponse; -}; - -export type GetV1ScimV2UsersIdError = - GetV1ScimV2UsersIdErrors[keyof GetV1ScimV2UsersIdErrors]; - -export type GetV1ScimV2UsersIdResponses = { +export type PutV1EmployeeAddressErrors = { /** - * Success + * Bad Request */ - 200: IntegrationsScimUser; -}; - -export type GetV1ScimV2UsersIdResponse = - GetV1ScimV2UsersIdResponses[keyof GetV1ScimV2UsersIdResponses]; - -export type GetV1EmploymentsEmploymentIdFilesData = { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Filter by file type (optional) - */ - type?: string; - /** - * Filter by file sub_type (optional) - */ - sub_type?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/employments/{employment_id}/files'; -}; - -export type GetV1EmploymentsEmploymentIdFilesErrors = { + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -17326,79 +17111,42 @@ export type GetV1EmploymentsEmploymentIdFilesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdFilesError = - GetV1EmploymentsEmploymentIdFilesErrors[keyof GetV1EmploymentsEmploymentIdFilesErrors]; +export type PutV1EmployeeAddressError = + PutV1EmployeeAddressErrors[keyof PutV1EmployeeAddressErrors]; -export type GetV1EmploymentsEmploymentIdFilesResponses = { +export type PutV1EmployeeAddressResponses = { /** * Success */ - 200: ListFilesResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1EmploymentsEmploymentIdFilesResponse = - GetV1EmploymentsEmploymentIdFilesResponses[keyof GetV1EmploymentsEmploymentIdFilesResponses]; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData = - { - /** - * Manage Contractor Plus subscription params - */ - body: ManageContractorPlusSubscriptionOperationsParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionError = - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors]; +export type PutV1EmployeeAddressResponse = + PutV1EmployeeAddressResponses[keyof PutV1EmployeeAddressResponses]; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses = - { +export type GetV1ResignationsOffboardingRequestIdResignationLetterData = { + body?: never; + path: { /** - * Success + * Offboarding request ID */ - 200: SuccessResponse; + offboarding_request_id: string; }; + query?: never; + url: '/v1/resignations/{offboarding_request_id}/resignation-letter'; +}; -export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponse = - PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses]; - -export type PostV1ContractorsEligibilityQuestionnaireData = { +export type GetV1ResignationsOffboardingRequestIdResignationLetterErrors = { /** - * Eligibility questionnaire submission + * Bad Request */ - body: SubmitEligibilityQuestionnaireRequest; - path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/contractors/eligibility-questionnaire'; -}; - -export type PostV1ContractorsEligibilityQuestionnaireErrors = { + 400: BadRequestResponse; /** * Unauthorized */ @@ -17408,33 +17156,37 @@ export type PostV1ContractorsEligibilityQuestionnaireErrors = { */ 403: ForbiddenResponse; /** - * Conflict + * Not Found */ - 409: ConflictErrorResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractorsEligibilityQuestionnaireError = - PostV1ContractorsEligibilityQuestionnaireErrors[keyof PostV1ContractorsEligibilityQuestionnaireErrors]; +export type GetV1ResignationsOffboardingRequestIdResignationLetterError = + GetV1ResignationsOffboardingRequestIdResignationLetterErrors[keyof GetV1ResignationsOffboardingRequestIdResignationLetterErrors]; -export type PostV1ContractorsEligibilityQuestionnaireResponses = { +export type GetV1ResignationsOffboardingRequestIdResignationLetterResponses = { /** - * Questionnaire submitted successfully + * Success */ - 201: EligibilityQuestionnaireResponse; + 200: GenericFile; }; -export type PostV1ContractorsEligibilityQuestionnaireResponse = - PostV1ContractorsEligibilityQuestionnaireResponses[keyof PostV1ContractorsEligibilityQuestionnaireResponses]; +export type GetV1ResignationsOffboardingRequestIdResignationLetterResponse = + GetV1ResignationsOffboardingRequestIdResignationLetterResponses[keyof GetV1ResignationsOffboardingRequestIdResignationLetterResponses]; -export type PutV1EmploymentsEmploymentIdBasicInformationData = { +export type PutV1EmploymentsEmploymentIdFederalTaxesData = { /** - * Employment basic information params + * Employment federal taxes params */ - body?: EmploymentBasicInformationParams; + body?: EmploymentFederalTaxesParams; path: { /** * Employment ID @@ -17442,10 +17194,10 @@ export type PutV1EmploymentsEmploymentIdBasicInformationData = { employment_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/basic_information'; + url: '/v1/employments/{employment_id}/federal-taxes'; }; -export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { +export type PutV1EmploymentsEmploymentIdFederalTaxesErrors = { /** * Bad Request */ @@ -17454,6 +17206,10 @@ export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { * Forbidden */ 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Conflict */ @@ -17468,72 +17224,21 @@ export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmploymentsEmploymentIdBasicInformationError = - PutV1EmploymentsEmploymentIdBasicInformationErrors[keyof PutV1EmploymentsEmploymentIdBasicInformationErrors]; +export type PutV1EmploymentsEmploymentIdFederalTaxesError = + PutV1EmploymentsEmploymentIdFederalTaxesErrors[keyof PutV1EmploymentsEmploymentIdFederalTaxesErrors]; -export type PutV1EmploymentsEmploymentIdBasicInformationResponses = { +export type PutV1EmploymentsEmploymentIdFederalTaxesResponses = { /** * Success */ - 200: EmploymentResponse; + 200: SuccessResponse; }; -export type PutV1EmploymentsEmploymentIdBasicInformationResponse = - PutV1EmploymentsEmploymentIdBasicInformationResponses[keyof PutV1EmploymentsEmploymentIdBasicInformationResponses]; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Termination Request ID - */ - termination_request_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}'; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors = - { - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdError = - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses = - { - /** - * Success - */ - 200: CorTerminationRequestResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponse = - GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses]; +export type PutV1EmploymentsEmploymentIdFederalTaxesResponse = + PutV1EmploymentsEmploymentIdFederalTaxesResponses[keyof PutV1EmploymentsEmploymentIdFederalTaxesResponses]; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesData = { - /** - * Create legal entity params - */ - body?: { - /** - * ISO 3166-1 alpha-3 country code - */ - country_code: string; - }; +export type GetV1ContractAmendmentsData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -17543,21 +17248,29 @@ export type PostV1SandboxCompaniesCompanyIdLegalEntitiesData = { */ Authorization: string; }; - path: { + path?: never; + query?: { /** - * Company ID + * Employment ID */ - company_id: string; - }; - query?: never; - url: '/v1/sandbox/companies/{company_id}/legal-entities'; -}; - -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; + employment_id?: string; + /** + * Contract Amendment status + */ + status?: ContractAmendmentStatus; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/contract-amendments'; +}; + +export type GetV1ContractAmendmentsErrors = { /** * Unauthorized */ @@ -17570,65 +17283,50 @@ export type PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesError = - PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors]; +export type GetV1ContractAmendmentsError = + GetV1ContractAmendmentsErrors[keyof GetV1ContractAmendmentsErrors]; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses = { +export type GetV1ContractAmendmentsResponses = { /** - * Legal entity created + * Success */ - 201: { - data?: { - /** - * Legal entity slug - */ - legal_entity_id?: string; - /** - * Legal entity name - */ - name?: string; - /** - * Legal entity status - */ - status?: string; - }; - }; + 200: ListContractAmendmentResponse; }; -export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse = - PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses]; +export type GetV1ContractAmendmentsResponse = + GetV1ContractAmendmentsResponses[keyof GetV1ContractAmendmentsResponses]; -export type GetV1EmployeePersonalDetailsData = { - body?: never; +export type PostV1ContractAmendmentsData = { + /** + * Contract Amendment + */ + body?: CreateContractAmendmentParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; query?: { /** - * Version of the personal_details form schema + * Version of the form schema */ - personal_details_json_schema_version?: number | 'latest'; + json_schema_version?: number | 'latest'; }; - url: '/v1/employee/personal-details'; + url: '/v1/contract-amendments'; }; -export type GetV1EmployeePersonalDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1ContractAmendmentsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -17636,50 +17334,39 @@ export type GetV1EmployeePersonalDetailsErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeePersonalDetailsError = - GetV1EmployeePersonalDetailsErrors[keyof GetV1EmployeePersonalDetailsErrors]; +export type PostV1ContractAmendmentsError = + PostV1ContractAmendmentsErrors[keyof PostV1ContractAmendmentsErrors]; -export type GetV1EmployeePersonalDetailsResponses = { +export type PostV1ContractAmendmentsResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ContractAmendmentResponse; }; -export type GetV1EmployeePersonalDetailsResponse = - GetV1EmployeePersonalDetailsResponses[keyof GetV1EmployeePersonalDetailsResponses]; +export type PostV1ContractAmendmentsResponse = + PostV1ContractAmendmentsResponses[keyof PostV1ContractAmendmentsResponses]; -export type PutV1EmployeePersonalDetailsData = { - /** - * Employee personal details params - */ - body?: EmploymentPersonalDetailsParams; - path?: never; - query?: { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData = { + body?: never; + path: { /** - * Version of the personal_details form schema + * Employment ID */ - personal_details_json_schema_version?: number | 'latest'; + employment_id: string; }; - url: '/v1/employee/personal-details'; + query?: never; + url: '/v1/employments/{employment_id}/employment-agreement/download'; }; -export type PutV1EmployeePersonalDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -17688,60 +17375,34 @@ export type PutV1EmployeePersonalDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV1EmployeePersonalDetailsError = - PutV1EmployeePersonalDetailsErrors[keyof PutV1EmployeePersonalDetailsErrors]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadError = + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors]; -export type PutV1EmployeePersonalDetailsResponses = { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: GenericFile; }; -export type PutV1EmployeePersonalDetailsResponse = - PutV1EmployeePersonalDetailsResponses[keyof PutV1EmployeePersonalDetailsResponses]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse = + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses]; -export type GetV1WdGphPayDetailDataData = { +export type GetV1PayrollRunsPayrollRunIdData = { body?: never; - headers?: { - /** - * The preferred language of the inquiring user in Workday - */ - accept_language?: string; - }; - path?: never; - query: { - /** - * The pay group ID for identifying the pay group at the vendor system - */ - payGroupExternalId: string; - /** - * The run type id provided in the paySummary API - */ - runTypeId: string; - /** - * The cycle type id, defaults to the main run if not provided - */ - cycleTypeId?: string; + path: { /** - * The period end date in question, defaults to current period if not provided + * Payroll run ID */ - periodEndDate?: Date; + payroll_run_id: string; }; - url: '/v1/wd/gph/payDetailData'; + query?: never; + url: '/v1/payroll-runs/{payroll_run_id}'; }; -export type GetV1WdGphPayDetailDataErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1PayrollRunsPayrollRunIdErrors = { /** * Unauthorized */ @@ -17750,128 +17411,133 @@ export type GetV1WdGphPayDetailDataErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1WdGphPayDetailDataError = - GetV1WdGphPayDetailDataErrors[keyof GetV1WdGphPayDetailDataErrors]; +export type GetV1PayrollRunsPayrollRunIdError = + GetV1PayrollRunsPayrollRunIdErrors[keyof GetV1PayrollRunsPayrollRunIdErrors]; -export type GetV1WdGphPayDetailDataResponses = { +export type GetV1PayrollRunsPayrollRunIdResponses = { /** * Success */ - 200: PayDetailDataResponse; + 200: PayrollRunResponse; }; -export type GetV1WdGphPayDetailDataResponse = - GetV1WdGphPayDetailDataResponses[keyof GetV1WdGphPayDetailDataResponses]; +export type GetV1PayrollRunsPayrollRunIdResponse = + GetV1PayrollRunsPayrollRunIdResponses[keyof GetV1PayrollRunsPayrollRunIdResponses]; -export type GetV1CostCalculatorRegionsSlugFieldsData = { +export type GetV1ExpensesExpenseIdReceiptData = { body?: never; path: { /** - * Slug - */ - slug: string; - }; - query?: { - /** - * If the premium benefits should be included in the response + * The expense ID */ - include_premium_benefits?: boolean; + expense_id: string; }; - url: '/v1/cost-calculator/regions/{slug}/fields'; + query?: never; + url: '/v1/expenses/{expense_id}/receipt'; }; -export type GetV1CostCalculatorRegionsSlugFieldsErrors = { +export type GetV1ExpensesExpenseIdReceiptErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Internal Server Error + * Forbidden */ - 500: InternalServerErrorResponse; + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1CostCalculatorRegionsSlugFieldsError = - GetV1CostCalculatorRegionsSlugFieldsErrors[keyof GetV1CostCalculatorRegionsSlugFieldsErrors]; +export type GetV1ExpensesExpenseIdReceiptError = + GetV1ExpensesExpenseIdReceiptErrors[keyof GetV1ExpensesExpenseIdReceiptErrors]; -export type GetV1CostCalculatorRegionsSlugFieldsResponses = { +export type GetV1ExpensesExpenseIdReceiptResponses = { /** * Success */ - 200: JsonSchemaResponse; + 200: GenericFile; }; -export type GetV1CostCalculatorRegionsSlugFieldsResponse = - GetV1CostCalculatorRegionsSlugFieldsResponses[keyof GetV1CostCalculatorRegionsSlugFieldsResponses]; +export type GetV1ExpensesExpenseIdReceiptResponse = + GetV1ExpensesExpenseIdReceiptResponses[keyof GetV1ExpensesExpenseIdReceiptResponses]; -export type PostV1CancelOnboardingEmploymentIdData = { +export type GetV1TravelLetterRequestsIdData = { body?: never; path: { /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Whether the request should be performed async - * + * travel letter request ID */ - async?: boolean; + id: UuidSlug; }; - url: '/v1/cancel-onboarding/{employment_id}'; + query?: never; + url: '/v1/travel-letter-requests/{id}'; }; -export type PostV1CancelOnboardingEmploymentIdErrors = { +export type GetV1TravelLetterRequestsIdErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type PostV1CancelOnboardingEmploymentIdError = - PostV1CancelOnboardingEmploymentIdErrors[keyof PostV1CancelOnboardingEmploymentIdErrors]; +export type GetV1TravelLetterRequestsIdError = + GetV1TravelLetterRequestsIdErrors[keyof GetV1TravelLetterRequestsIdErrors]; -export type PostV1CancelOnboardingEmploymentIdResponses = { +export type GetV1TravelLetterRequestsIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: TravelLetterResponse; }; -export type PostV1CancelOnboardingEmploymentIdResponse = - PostV1CancelOnboardingEmploymentIdResponses[keyof PostV1CancelOnboardingEmploymentIdResponses]; +export type GetV1TravelLetterRequestsIdResponse = + GetV1TravelLetterRequestsIdResponses[keyof GetV1TravelLetterRequestsIdResponses]; -export type PostV1EmployeeTimeoffIdCancelData = { +export type PatchV1TravelLetterRequestsId2Data = { /** - * CancelTimeoff + * Travel letter Request */ - body: CancelTimeoffParams; + body: UpdateTravelLetterRequestParams; path: { /** - * Timeoff ID + * Travel letter Request ID */ id: string; }; query?: never; - url: '/v1/employee/timeoff/{id}/cancel'; + url: '/v1/travel-letter-requests/{id}'; }; -export type PostV1EmployeeTimeoffIdCancelErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1TravelLetterRequestsId2Errors = { /** * Unauthorized */ @@ -17884,50 +17550,41 @@ export type PostV1EmployeeTimeoffIdCancelErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1EmployeeTimeoffIdCancelError = - PostV1EmployeeTimeoffIdCancelErrors[keyof PostV1EmployeeTimeoffIdCancelErrors]; +export type PatchV1TravelLetterRequestsId2Error = + PatchV1TravelLetterRequestsId2Errors[keyof PatchV1TravelLetterRequestsId2Errors]; -export type PostV1EmployeeTimeoffIdCancelResponses = { +export type PatchV1TravelLetterRequestsId2Responses = { /** * Success */ - 200: TimeoffResponse; + 200: TravelLetterResponse; }; -export type PostV1EmployeeTimeoffIdCancelResponse = - PostV1EmployeeTimeoffIdCancelResponses[keyof PostV1EmployeeTimeoffIdCancelResponses]; +export type PatchV1TravelLetterRequestsId2Response = + PatchV1TravelLetterRequestsId2Responses[keyof PatchV1TravelLetterRequestsId2Responses]; -export type GetV1ExpensesExpenseIdReceiptData = { - body?: never; +export type PatchV1TravelLetterRequestsIdData = { + /** + * Travel letter Request + */ + body: UpdateTravelLetterRequestParams; path: { /** - * The expense ID + * Travel letter Request ID */ - expense_id: string; + id: string; }; query?: never; - url: '/v1/expenses/{expense_id}/receipt'; + url: '/v1/travel-letter-requests/{id}'; }; -export type GetV1ExpensesExpenseIdReceiptErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1TravelLetterRequestsIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -17936,26 +17593,22 @@ export type GetV1ExpensesExpenseIdReceiptErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1ExpensesExpenseIdReceiptError = - GetV1ExpensesExpenseIdReceiptErrors[keyof GetV1ExpensesExpenseIdReceiptErrors]; +export type PatchV1TravelLetterRequestsIdError = + PatchV1TravelLetterRequestsIdErrors[keyof PatchV1TravelLetterRequestsIdErrors]; -export type GetV1ExpensesExpenseIdReceiptResponses = { +export type PatchV1TravelLetterRequestsIdResponses = { /** * Success */ - 200: GenericFile; + 200: TravelLetterResponse; }; -export type GetV1ExpensesExpenseIdReceiptResponse = - GetV1ExpensesExpenseIdReceiptResponses[keyof GetV1ExpensesExpenseIdReceiptResponses]; +export type PatchV1TravelLetterRequestsIdResponse = + PatchV1TravelLetterRequestsIdResponses[keyof PatchV1TravelLetterRequestsIdResponses]; -export type GetV1BenefitOffersCountrySummariesData = { +export type GetV1TimeoffBalancesEmploymentIdData = { body?: never; headers: { /** @@ -17966,37 +17619,57 @@ export type GetV1BenefitOffersCountrySummariesData = { */ Authorization: string; }; - path?: never; + path: { + /** + * Employment ID for which to show the time off balance + */ + employment_id: string; + }; query?: never; - url: '/v1/benefit-offers/country-summaries'; + url: '/v1/timeoff-balances/{employment_id}'; }; -export type GetV1BenefitOffersCountrySummariesErrors = { +export type GetV1TimeoffBalancesEmploymentIdErrors = { /** - * Not Found + * Bad Request */ - 404: NotFoundResponse; + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * TimeoffBalanceNotFoundResponse + */ + 404: TimeoffBalanceNotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1BenefitOffersCountrySummariesError = - GetV1BenefitOffersCountrySummariesErrors[keyof GetV1BenefitOffersCountrySummariesErrors]; +export type GetV1TimeoffBalancesEmploymentIdError = + GetV1TimeoffBalancesEmploymentIdErrors[keyof GetV1TimeoffBalancesEmploymentIdErrors]; -export type GetV1BenefitOffersCountrySummariesResponses = { +export type GetV1TimeoffBalancesEmploymentIdResponses = { /** * Success */ - 200: CountrySummariesResponse; + 200: TimeoffBalanceResponse; }; -export type GetV1BenefitOffersCountrySummariesResponse = - GetV1BenefitOffersCountrySummariesResponses[keyof GetV1BenefitOffersCountrySummariesResponses]; +export type GetV1TimeoffBalancesEmploymentIdResponse = + GetV1TimeoffBalancesEmploymentIdResponses[keyof GetV1TimeoffBalancesEmploymentIdResponses]; -export type GetV1LeavePoliciesDetailsEmploymentIdData = { - body?: never; +export type PutV1EmploymentsEmploymentIdBasicInformationData = { + /** + * Employment basic information params + */ + body?: EmploymentBasicInformationParams; path: { /** * Employment ID @@ -18004,80 +17677,78 @@ export type GetV1LeavePoliciesDetailsEmploymentIdData = { employment_id: string; }; query?: never; - url: '/v1/leave-policies/details/{employment_id}'; + url: '/v1/employments/{employment_id}/basic_information'; }; -export type GetV1LeavePoliciesDetailsEmploymentIdErrors = { +export type PutV1EmploymentsEmploymentIdBasicInformationErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1LeavePoliciesDetailsEmploymentIdError = - GetV1LeavePoliciesDetailsEmploymentIdErrors[keyof GetV1LeavePoliciesDetailsEmploymentIdErrors]; +export type PutV1EmploymentsEmploymentIdBasicInformationError = + PutV1EmploymentsEmploymentIdBasicInformationErrors[keyof PutV1EmploymentsEmploymentIdBasicInformationErrors]; -export type GetV1LeavePoliciesDetailsEmploymentIdResponses = { +export type PutV1EmploymentsEmploymentIdBasicInformationResponses = { /** * Success */ - 200: ListLeavePoliciesDetailsResponse; + 200: EmploymentResponse; }; -export type GetV1LeavePoliciesDetailsEmploymentIdResponse = - GetV1LeavePoliciesDetailsEmploymentIdResponses[keyof GetV1LeavePoliciesDetailsEmploymentIdResponses]; +export type PutV1EmploymentsEmploymentIdBasicInformationResponse = + PutV1EmploymentsEmploymentIdBasicInformationResponses[keyof PutV1EmploymentsEmploymentIdBasicInformationResponses]; -export type GetV1WorkAuthorizationRequestsData = { +export type GetV1ExpensesCategoriesData = { body?: never; path?: never; query?: { /** - * Filter results on the given status - */ - status?: - | 'pending' - | 'cancelled' - | 'declined_by_manager' - | 'declined_by_remote' - | 'approved_by_manager' - | 'approved_by_remote'; - /** - * Filter results on the given employment slug + * The employment ID for which to list categories. Required if neither expense_id nor country_code is provided. */ employment_id?: string; /** - * Filter results on the given employee name - */ - employee_name?: string; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Field to sort by + * The expense ID for which to list categories (includes the expense's category, even if it is not selectable by default). If provided without employment_id, will use the expense's employment context. */ - sort_by?: 'submitted_at'; + expense_id?: string; /** - * Starts fetching records after the given page + * Include un-selectable intermediate categories in the response */ - page?: number; + include_parents?: boolean; /** - * Number of items per page + * Filter categories by country (ISO 3166-1 alpha-3 code, e.g. "GBR"). Only used when neither employment_id nor expense_id is provided. */ - page_size?: number; + country_code?: string; }; - url: '/v1/work-authorization-requests'; + url: '/v1/expenses/categories'; }; -export type GetV1WorkAuthorizationRequestsErrors = { +export type GetV1ExpensesCategoriesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -18086,127 +17757,77 @@ export type GetV1WorkAuthorizationRequestsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1WorkAuthorizationRequestsError = - GetV1WorkAuthorizationRequestsErrors[keyof GetV1WorkAuthorizationRequestsErrors]; +export type GetV1ExpensesCategoriesError = + GetV1ExpensesCategoriesErrors[keyof GetV1ExpensesCategoriesErrors]; -export type GetV1WorkAuthorizationRequestsResponses = { +export type GetV1ExpensesCategoriesResponses = { /** * Success */ - 200: ListWorkAuthorizationRequestsResponse; + 200: ListExpenseCategoriesResponse; }; -export type GetV1WorkAuthorizationRequestsResponse = - GetV1WorkAuthorizationRequestsResponses[keyof GetV1WorkAuthorizationRequestsResponses]; +export type GetV1ExpensesCategoriesResponse = + GetV1ExpensesCategoriesResponses[keyof GetV1ExpensesCategoriesResponses]; -export type GetV1EmploymentsEmploymentIdBenefitOffersData = { - body?: never; +export type PostV1EmployeeTimeoffIdCancelData = { + /** + * CancelTimeoff + */ + body: CancelTimeoffParams; path: { /** - * Unique identifier of the employment - */ - employment_id: UuidSlug; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Timeoff ID */ - page_size?: number; + id: string; }; - url: '/v1/employments/{employment_id}/benefit-offers'; + query?: never; + url: '/v1/employee/timeoff/{id}/cancel'; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersErrors = { +export type PostV1EmployeeTimeoffIdCancelErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found + * Not Found */ 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; -}; - -export type GetV1EmploymentsEmploymentIdBenefitOffersError = - GetV1EmploymentsEmploymentIdBenefitOffersErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersErrors]; - -export type GetV1EmploymentsEmploymentIdBenefitOffersResponses = { - /** - * Success - */ - 200: EmploymentsBenefitOffersListBenefitOffers; -}; - -export type GetV1EmploymentsEmploymentIdBenefitOffersResponse = - GetV1EmploymentsEmploymentIdBenefitOffersResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersResponses]; - -export type PutV1EmploymentsEmploymentIdBenefitOffersData = { - /** - * Upsert employment benefit offers request - */ - body: UnifiedEmploymentUpsertBenefitOffersRequest; - path: { - /** - * Unique identifier of the employment - */ - employment_id: UuidSlug; - }; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/employments/{employment_id}/benefit-offers'; -}; - -export type PutV1EmploymentsEmploymentIdBenefitOffersErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PutV1EmploymentsEmploymentIdBenefitOffersError = - PutV1EmploymentsEmploymentIdBenefitOffersErrors[keyof PutV1EmploymentsEmploymentIdBenefitOffersErrors]; +export type PostV1EmployeeTimeoffIdCancelError = + PostV1EmployeeTimeoffIdCancelErrors[keyof PostV1EmployeeTimeoffIdCancelErrors]; -export type PutV1EmploymentsEmploymentIdBenefitOffersResponses = { +export type PostV1EmployeeTimeoffIdCancelResponses = { /** * Success */ - 200: SuccessResponse; + 200: TimeoffResponse; }; -export type PutV1EmploymentsEmploymentIdBenefitOffersResponse = - PutV1EmploymentsEmploymentIdBenefitOffersResponses[keyof PutV1EmploymentsEmploymentIdBenefitOffersResponses]; +export type PostV1EmployeeTimeoffIdCancelResponse = + PostV1EmployeeTimeoffIdCancelResponses[keyof PostV1EmployeeTimeoffIdCancelResponses]; -export type GetV1EmploymentsData = { +export type GetV1CountriesCountryCodeFormData = { body?: never; headers: { /** @@ -18217,62 +17838,54 @@ export type GetV1EmploymentsData = { */ Authorization: string; }; - path?: never; - query?: { - /** - * Company ID - */ - company_id?: string; + path: { /** - * Filters the results by employments whose login email matches the value + * Country code according to ISO 3-digit alphabetic codes */ - email?: string; + country_code: string; /** - * Filters the results by employments whose status matches the value. - * Supports multiple values separated by commas. - * Also supports the value `incomplete` to get all employments that are not onboarded yet. - * + * Name of the desired form */ - status?: string; + form: string; + }; + query?: { /** - * Filters the results by employments whose employment product type matches the value + * Required for `contract_amendment` and `global_payroll_state_taxes` forms */ - employment_type?: string; + employment_id?: string; /** - * Filters the results by employments whose employment model matches the value. - * Possible values: `global_payroll`, `peo`, `eor` - * + * Two-letter US state code. Required for `global_payroll_state_taxes` (e.g. `NY`). */ - employment_model?: 'global_payroll' | 'peo' | 'eor'; + jurisdiction?: string; /** - * Filters the results by the employment's short ID. Returns at most one result. + * FOR TESTING PURPOSES ONLY: Include scheduled benefit groups. */ - short_id?: string; + only_for_testing_include_scheduled_benefit_groups?: boolean; /** - * Starts fetching records after the given page + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ - page?: number; + skip_benefits?: boolean; /** - * Number of items per page + * Version of the form schema */ - page_size?: number; + json_schema_version?: number | 'latest'; }; - url: '/v1/employments'; + url: '/v1/countries/{country_code}/{form}'; }; -export type GetV1EmploymentsErrors = { +export type GetV1CountriesCountryCodeFormErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -18283,80 +17896,59 @@ export type GetV1EmploymentsErrors = { 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsError = - GetV1EmploymentsErrors[keyof GetV1EmploymentsErrors]; +export type GetV1CountriesCountryCodeFormError = + GetV1CountriesCountryCodeFormErrors[keyof GetV1CountriesCountryCodeFormErrors]; -export type GetV1EmploymentsResponses = { +export type GetV1CountriesCountryCodeFormResponses = { /** * Success */ - 200: ListEmploymentsResponse; + 200: CountryFormResponse; }; -export type GetV1EmploymentsResponse = - GetV1EmploymentsResponses[keyof GetV1EmploymentsResponses]; +export type GetV1CountriesCountryCodeFormResponse = + GetV1CountriesCountryCodeFormResponses[keyof GetV1CountriesCountryCodeFormResponses]; -export type PostV1EmploymentsData = { - /** - * Employment params - */ - body?: EmploymentCreateParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: { +export type GetV1FilesIdData = { + body?: never; + path: { /** - * Version of the form schema + * File ID */ - json_schema_version?: number | 'latest'; + id: string; }; - url: '/v1/employments'; + query?: never; + url: '/v1/files/{id}'; }; -export type PostV1EmploymentsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1FilesIdErrors = { /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsError = - PostV1EmploymentsErrors[keyof PostV1EmploymentsErrors]; +export type GetV1FilesIdError = GetV1FilesIdErrors[keyof GetV1FilesIdErrors]; -export type PostV1EmploymentsResponses = { +export type GetV1FilesIdResponses = { /** * Success */ - 200: EmploymentCreationResponse; + 200: DownloadFileResponse; }; -export type PostV1EmploymentsResponse = - PostV1EmploymentsResponses[keyof PostV1EmploymentsResponses]; +export type GetV1FilesIdResponse = + GetV1FilesIdResponses[keyof GetV1FilesIdResponses]; -export type GetV1TimeoffIdData = { +export type GetV1ContractAmendmentsIdData = { body?: never; headers: { /** @@ -18369,19 +17961,15 @@ export type GetV1TimeoffIdData = { }; path: { /** - * Timeoff ID + * Contract amendment request ID */ id: string; }; query?: never; - url: '/v1/timeoff/{id}'; + url: '/v1/contract-amendments/{id}'; }; -export type GetV1TimeoffIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1ContractAmendmentsIdErrors = { /** * Unauthorized */ @@ -18394,50 +17982,42 @@ export type GetV1TimeoffIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1TimeoffIdError = - GetV1TimeoffIdErrors[keyof GetV1TimeoffIdErrors]; +export type GetV1ContractAmendmentsIdError = + GetV1ContractAmendmentsIdErrors[keyof GetV1ContractAmendmentsIdErrors]; -export type GetV1TimeoffIdResponses = { +export type GetV1ContractAmendmentsIdResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ContractAmendmentResponse; }; -export type GetV1TimeoffIdResponse = - GetV1TimeoffIdResponses[keyof GetV1TimeoffIdResponses]; +export type GetV1ContractAmendmentsIdResponse = + GetV1ContractAmendmentsIdResponses[keyof GetV1ContractAmendmentsIdResponses]; -export type PatchV1TimeoffId2Data = { +export type PutV2EmploymentsEmploymentIdBankAccountDetailsData = { /** - * UpdateTimeoff + * Employment bank account details params */ - body: UpdateApprovedTimeoffParams; - headers: { + body?: EmploymentBankAccountDetailsParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path: { + query?: { /** - * Timeoff ID + * Version of the bank_account_details form schema */ - id: string; + bank_account_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/timeoff/{id}'; + url: '/v2/employments/{employment_id}/bank_account_details'; }; -export type PatchV1TimeoffId2Errors = { +export type PutV2EmploymentsEmploymentIdBankAccountDetailsErrors = { /** * Bad Request */ @@ -18446,10 +18026,18 @@ export type PatchV1TimeoffId2Errors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -18460,24 +18048,21 @@ export type PatchV1TimeoffId2Errors = { 429: TooManyRequestsResponse; }; -export type PatchV1TimeoffId2Error = - PatchV1TimeoffId2Errors[keyof PatchV1TimeoffId2Errors]; +export type PutV2EmploymentsEmploymentIdBankAccountDetailsError = + PutV2EmploymentsEmploymentIdBankAccountDetailsErrors[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsErrors]; -export type PatchV1TimeoffId2Responses = { +export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponses = { /** * Success */ - 200: TimeoffResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PatchV1TimeoffId2Response = - PatchV1TimeoffId2Responses[keyof PatchV1TimeoffId2Responses]; +export type PutV2EmploymentsEmploymentIdBankAccountDetailsResponse = + PutV2EmploymentsEmploymentIdBankAccountDetailsResponses[keyof PutV2EmploymentsEmploymentIdBankAccountDetailsResponses]; -export type PatchV1TimeoffIdData = { - /** - * UpdateTimeoff - */ - body: UpdateApprovedTimeoffParams; +export type GetV1CompanyManagersData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -18487,17 +18072,25 @@ export type PatchV1TimeoffIdData = { */ Authorization: string; }; - path: { + path?: never; + query?: { /** - * Timeoff ID + * A Company ID to filter the results (only applicable for Integration Partners). */ - id: string; + company_id?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v1/timeoff/{id}'; + url: '/v1/company-managers'; }; -export type PatchV1TimeoffIdErrors = { +export type GetV1CompanyManagersErrors = { /** * Bad Request */ @@ -18515,40 +18108,52 @@ export type PatchV1TimeoffIdErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PatchV1TimeoffIdError = - PatchV1TimeoffIdErrors[keyof PatchV1TimeoffIdErrors]; +export type GetV1CompanyManagersError = + GetV1CompanyManagersErrors[keyof GetV1CompanyManagersErrors]; -export type PatchV1TimeoffIdResponses = { +export type GetV1CompanyManagersResponses = { /** * Success */ - 200: TimeoffResponse; + 200: CompanyManagersResponse; }; -export type PatchV1TimeoffIdResponse = - PatchV1TimeoffIdResponses[keyof PatchV1TimeoffIdResponses]; +export type GetV1CompanyManagersResponse = + GetV1CompanyManagersResponses[keyof GetV1CompanyManagersResponses]; -export type GetV1IdentityCurrentData = { - body?: never; +export type PostV1CompanyManagersData = { + /** + * Company Manager params + */ + body?: CompanyManagerParams; headers: { /** - * This endpoint works with any of the access tokens provided. You can use an access - * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. * */ Authorization: string; }; path?: never; - query?: never; - url: '/v1/identity/current'; + query?: { + /** + * Complementary action(s) to perform when creating a company manager: + * + * - `no_invite` skips the email invitation step + * + */ + actions?: string; + }; + url: '/v1/company-managers'; }; -export type GetV1IdentityCurrentErrors = { +export type PostV1CompanyManagersErrors = { /** * Bad Request */ @@ -18571,99 +18176,54 @@ export type GetV1IdentityCurrentErrors = { 429: TooManyRequestsResponse; }; -export type GetV1IdentityCurrentError = - GetV1IdentityCurrentErrors[keyof GetV1IdentityCurrentErrors]; +export type PostV1CompanyManagersError = + PostV1CompanyManagersErrors[keyof PostV1CompanyManagersErrors]; -export type GetV1IdentityCurrentResponses = { +export type PostV1CompanyManagersResponses = { /** * Success */ - 201: IdentityCurrentResponse; + 201: CompanyManagerData; }; -export type GetV1IdentityCurrentResponse = - GetV1IdentityCurrentResponses[keyof GetV1IdentityCurrentResponses]; +export type PostV1CompanyManagersResponse = + PostV1CompanyManagersResponses[keyof PostV1CompanyManagersResponses]; -export type GetV1WdGphPayVarianceData = { +export type GetV1CostCalculatorCountriesData = { body?: never; - headers?: { - /** - * The preferred language of the inquiring user in Workday - */ - accept_language?: string; - }; path?: never; - query: { - /** - * The pay group ID for identifying the pay group at the vendor system - */ - payGroupExternalId: string; - /** - * The run type id provided in the paySummary API - */ - runTypeId: string; - /** - * The cycle type id, defaults to the main run if not provided - */ - cycleTypeId?: string; + query?: { /** - * The period end date in question, defaults to current period if not provided + * If the premium benefits should be included in the response */ - periodEndDate?: Date; + include_premium_benefits?: boolean; }; - url: '/v1/wd/gph/payVariance'; -}; - -export type GetV1WdGphPayVarianceErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; + url: '/v1/cost-calculator/countries'; }; -export type GetV1WdGphPayVarianceError = - GetV1WdGphPayVarianceErrors[keyof GetV1WdGphPayVarianceErrors]; - -export type GetV1WdGphPayVarianceResponses = { +export type GetV1CostCalculatorCountriesResponses = { /** * Success */ - 200: PayVarianceResponse; + 200: CostCalculatorListCountryResponse; }; -export type GetV1WdGphPayVarianceResponse = - GetV1WdGphPayVarianceResponses[keyof GetV1WdGphPayVarianceResponses]; +export type GetV1CostCalculatorCountriesResponse = + GetV1CostCalculatorCountriesResponses[keyof GetV1CostCalculatorCountriesResponses]; -export type GetV1PayrollCalendarsCycleData = { +export type PostV1IdentityVerificationEmploymentIdDeclineData = { body?: never; path: { /** - * The cycle for which to list the payroll calendars. Format: YYYY-MM - */ - cycle: string; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v1/payroll-calendars/{cycle}'; + query?: never; + url: '/v1/identity-verification/{employment_id}/decline'; }; -export type GetV1PayrollCalendarsCycleErrors = { +export type PostV1IdentityVerificationEmploymentIdDeclineErrors = { /** * Unauthorized */ @@ -18678,20 +18238,20 @@ export type GetV1PayrollCalendarsCycleErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1PayrollCalendarsCycleError = - GetV1PayrollCalendarsCycleErrors[keyof GetV1PayrollCalendarsCycleErrors]; +export type PostV1IdentityVerificationEmploymentIdDeclineError = + PostV1IdentityVerificationEmploymentIdDeclineErrors[keyof PostV1IdentityVerificationEmploymentIdDeclineErrors]; -export type GetV1PayrollCalendarsCycleResponses = { +export type PostV1IdentityVerificationEmploymentIdDeclineResponses = { /** * Success */ - 200: PayrollCalendarsResponse; + 200: SuccessResponse; }; -export type GetV1PayrollCalendarsCycleResponse = - GetV1PayrollCalendarsCycleResponses[keyof GetV1PayrollCalendarsCycleResponses]; +export type PostV1IdentityVerificationEmploymentIdDeclineResponse = + PostV1IdentityVerificationEmploymentIdDeclineResponses[keyof PostV1IdentityVerificationEmploymentIdDeclineResponses]; -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData = +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData = { body?: never; path: { @@ -18699,17 +18259,21 @@ export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData = * Employment ID */ employment_id: string; + /** + * Pre-onboarding document ID + */ + id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment'; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}'; }; -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors = +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ @@ -18718,42 +18282,39 @@ export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentError = - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors]; +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdError = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses = +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: ShowPreOnboardingDocumentResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponse = - PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses]; +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponse = + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses]; -export type PostV1TimesheetsTimesheetIdSendBackData = { - /** - * SendBackTimesheetParams - */ - body?: SendBackTimesheetParams; +export type GetV1CountriesCountryCodeEngagementAgreementDetailsData = { + body?: never; path: { /** - * Timesheet ID + * Country code according to ISO 3-digit alphabetic codes */ - timesheet_id: string; + country_code: string; }; query?: never; - url: '/v1/timesheets/{timesheet_id}/send-back'; + url: '/v1/countries/{country_code}/engagement-agreement-details'; }; -export type PostV1TimesheetsTimesheetIdSendBackErrors = { +export type GetV1CountriesCountryCodeEngagementAgreementDetailsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -18766,109 +18327,55 @@ export type PostV1TimesheetsTimesheetIdSendBackErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1TimesheetsTimesheetIdSendBackError = - PostV1TimesheetsTimesheetIdSendBackErrors[keyof PostV1TimesheetsTimesheetIdSendBackErrors]; +export type GetV1CountriesCountryCodeEngagementAgreementDetailsError = + GetV1CountriesCountryCodeEngagementAgreementDetailsErrors[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsErrors]; -export type PostV1TimesheetsTimesheetIdSendBackResponses = { +export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponses = { /** * Success */ - 200: SentBackTimesheetResponse; + 200: EngagementAgreementDetailsResponse; }; -export type PostV1TimesheetsTimesheetIdSendBackResponse = - PostV1TimesheetsTimesheetIdSendBackResponses[keyof PostV1TimesheetsTimesheetIdSendBackResponses]; +export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponse = + GetV1CountriesCountryCodeEngagementAgreementDetailsResponses[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsResponses]; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData = - { +export type GetV1BillingDocumentsData = { + body?: never; + headers: { /** - * SignContractDocument + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - body: SignContractDocument; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Pre-onboarding document ID - */ - id: string; - }; - query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign'; + Authorization: string; }; - -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors = - { + path?: never; + query?: { /** - * Bad Request + * The month for the billing documents (in ISO-8601 format) */ - 400: BadRequestResponse; + period?: string; /** - * Unauthorized + * Starts fetching records after the given page */ - 401: UnauthorizedResponse; + page?: number; /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignError = - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors]; - -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses = - { - /** - * Success - */ - 200: SuccessResponse; - }; - -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponse = - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses]; - -export type GetV1BenefitRenewalRequestsData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Number of items per page */ page_size?: number; }; - url: '/v1/benefit-renewal-requests'; + url: '/v1/billing-documents'; }; -export type GetV1BenefitRenewalRequestsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1BillingDocumentsErrors = { /** * Unauthorized */ @@ -18881,90 +18388,22 @@ export type GetV1BenefitRenewalRequestsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1BenefitRenewalRequestsError = - GetV1BenefitRenewalRequestsErrors[keyof GetV1BenefitRenewalRequestsErrors]; +export type GetV1BillingDocumentsError = + GetV1BillingDocumentsErrors[keyof GetV1BillingDocumentsErrors]; -export type GetV1BenefitRenewalRequestsResponses = { +export type GetV1BillingDocumentsResponses = { /** * Success */ - 200: BenefitRenewalRequestsListBenefitRenewalRequestResponse; + 200: BillingDocumentsResponse; }; -export type GetV1BenefitRenewalRequestsResponse = - GetV1BenefitRenewalRequestsResponses[keyof GetV1BenefitRenewalRequestsResponses]; - -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData = - { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Company ID - */ - company_id: string; - /** - * Legal Entity ID to set as the new default - */ - legal_entity_id: string; - }; - query?: never; - url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}'; - }; - -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; - }; - -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdError = - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors]; - -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses = - { - /** - * Success - */ - 200: SuccessResponse; - }; - -export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponse = - PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses]; +export type GetV1BillingDocumentsResponse = + GetV1BillingDocumentsResponses[keyof GetV1BillingDocumentsResponses]; -export type GetV1EmploymentContractsData = { +export type DeleteV1WebhookCallbacksIdData = { body?: never; headers: { /** @@ -18975,29 +18414,21 @@ export type GetV1EmploymentContractsData = { */ Authorization: string; }; - path?: never; - query: { - /** - * Employment ID - */ - employment_id: string; + path: { /** - * Only Active + * Webhook Callback ID */ - only_active?: boolean; + id: string; }; - url: '/v1/employment-contracts'; + query?: never; + url: '/v1/webhook-callbacks/{id}'; }; -export type GetV1EmploymentContractsErrors = { +export type DeleteV1WebhookCallbacksIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -19008,96 +18439,35 @@ export type GetV1EmploymentContractsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentContractsError = - GetV1EmploymentContractsErrors[keyof GetV1EmploymentContractsErrors]; +export type DeleteV1WebhookCallbacksIdError = + DeleteV1WebhookCallbacksIdErrors[keyof DeleteV1WebhookCallbacksIdErrors]; -export type GetV1EmploymentContractsResponses = { +export type DeleteV1WebhookCallbacksIdResponses = { /** * Success */ - 200: ListEmploymentContractResponse; + 200: SuccessResponse; }; -export type GetV1EmploymentContractsResponse = - GetV1EmploymentContractsResponses[keyof GetV1EmploymentContractsResponses]; - -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData = - { - body?: never; - path: { - /** - * Contract amendment request ID - */ - contract_amendment_request_id: string; - }; - query?: never; - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel'; - }; - -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; - }; - -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelError = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors]; - -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses = - { - /** - * Success - */ - 200: SuccessResponse; - }; - -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponse = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses]; +export type DeleteV1WebhookCallbacksIdResponse = + DeleteV1WebhookCallbacksIdResponses[keyof DeleteV1WebhookCallbacksIdResponses]; -export type GetV1PayslipsPayslipIdPdfData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type PatchV1WebhookCallbacksIdData = { + /** + * WebhookCallback + */ + body?: UpdateWebhookCallbackParams; path: { /** - * Payslip ID + * Webhook Callback ID */ - payslip_id: string; + id: string; }; query?: never; - url: '/v1/payslips/{payslip_id}/pdf'; + url: '/v1/webhook-callbacks/{id}'; }; -export type GetV1PayslipsPayslipIdPdfErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1WebhookCallbacksIdErrors = { /** * Unauthorized */ @@ -19110,41 +18480,32 @@ export type GetV1PayslipsPayslipIdPdfErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1PayslipsPayslipIdPdfError = - GetV1PayslipsPayslipIdPdfErrors[keyof GetV1PayslipsPayslipIdPdfErrors]; +export type PatchV1WebhookCallbacksIdError = + PatchV1WebhookCallbacksIdErrors[keyof PatchV1WebhookCallbacksIdErrors]; -export type GetV1PayslipsPayslipIdPdfResponses = { +export type PatchV1WebhookCallbacksIdResponses = { /** * Success */ - 200: PayslipDownloadResponse; + 200: WebhookCallbackResponse; }; -export type GetV1PayslipsPayslipIdPdfResponse = - GetV1PayslipsPayslipIdPdfResponses[keyof GetV1PayslipsPayslipIdPdfResponses]; +export type PatchV1WebhookCallbacksIdResponse = + PatchV1WebhookCallbacksIdResponses[keyof PatchV1WebhookCallbacksIdResponses]; -export type PostV1TimeoffTimeoffIdApproveData = { +export type PutV1EmployeeFederalTaxesData = { /** - * ApproveTimeoff + * Employee federal taxes params */ - body: ApproveTimeoffParams; - path: { - /** - * Time Off ID - */ - timeoff_id: string; - }; + body?: EmploymentFederalTaxesParams; + path?: never; query?: never; - url: '/v1/timeoff/{timeoff_id}/approve'; + url: '/v1/employee/federal-taxes'; }; -export type PostV1TimeoffTimeoffIdApproveErrors = { +export type PutV1EmployeeFederalTaxesErrors = { /** * Bad Request */ @@ -19153,6 +18514,10 @@ export type PostV1TimeoffTimeoffIdApproveErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -19167,117 +18532,79 @@ export type PostV1TimeoffTimeoffIdApproveErrors = { 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdApproveError = - PostV1TimeoffTimeoffIdApproveErrors[keyof PostV1TimeoffTimeoffIdApproveErrors]; +export type PutV1EmployeeFederalTaxesError = + PutV1EmployeeFederalTaxesErrors[keyof PutV1EmployeeFederalTaxesErrors]; -export type PostV1TimeoffTimeoffIdApproveResponses = { +export type PutV1EmployeeFederalTaxesResponses = { /** * Success */ - 200: TimeoffResponse; + 200: SuccessResponse; }; -export type PostV1TimeoffTimeoffIdApproveResponse = - PostV1TimeoffTimeoffIdApproveResponses[keyof PostV1TimeoffTimeoffIdApproveResponses]; +export type PutV1EmployeeFederalTaxesResponse = + PutV1EmployeeFederalTaxesResponses[keyof PutV1EmployeeFederalTaxesResponses]; -export type GetV1CompaniesData = { +export type GetV1EmployeeTimesheetsData = { body?: never; - headers: { - /** - * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Client Credentials flow. - * - */ - Authorization: string; - }; path?: never; query?: { /** - * External ID + * Starts fetching records after the given page */ - external_id?: string; + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/companies'; + url: '/v1/employee/timesheets'; }; -export type GetV1CompaniesErrors = { +export type GetV1EmployeeTimesheetsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type GetV1CompaniesError = - GetV1CompaniesErrors[keyof GetV1CompaniesErrors]; +export type GetV1EmployeeTimesheetsError = + GetV1EmployeeTimesheetsErrors[keyof GetV1EmployeeTimesheetsErrors]; -export type GetV1CompaniesResponses = { +export type GetV1EmployeeTimesheetsResponses = { /** * Success */ - 200: CompaniesResponse; + 200: SuccessResponse; }; -export type GetV1CompaniesResponse = - GetV1CompaniesResponses[keyof GetV1CompaniesResponses]; +export type GetV1EmployeeTimesheetsResponse = + GetV1EmployeeTimesheetsResponses[keyof GetV1EmployeeTimesheetsResponses]; -export type PostV1CompaniesData = { +export type PutV1EmploymentsEmploymentIdPersonalDetailsData = { /** - * Create Company params + * Employment personal details params */ - body?: CreateCompanyParams; - headers: { - /** - * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Client Credentials flow. - * - */ - Authorization: string; - }; - path?: never; - query?: { - /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema - */ - bank_account_details_json_schema_version?: number | 'latest'; - /** - * Complementary action(s) to perform when creating a company: - * - * - `get_oauth_access_tokens` returns the user's access and refresh tokens - * - `send_create_password_email ` sends a reset password token to the company owner's email so they can log in using Remote UI (not needed if integration plans to use SSO only) - * - * If `action` contains `send_create_password_email` you can redirect the user to [https://employ.remote.com/api-integration-new-password-send](https://employ.remote.com/api-integration-new-password-send) - * - */ - action?: string; - /** - * Whether the request should be performed async - * - */ - async?: boolean; + body?: EmploymentPersonalDetailsParams; + path: { /** - * Scope of the access token - * + * Employment ID */ - scope?: string; + employment_id: string; }; - url: '/v1/companies'; + query?: never; + url: '/v1/employments/{employment_id}/personal_details'; }; -export type PostV1CompaniesErrors = { +export type PutV1EmploymentsEmploymentIdPersonalDetailsErrors = { /** * Bad Request */ @@ -19289,7 +18616,7 @@ export type PostV1CompaniesErrors = { /** * Conflict */ - 409: CompanyCreationConflictErrorResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -19300,36 +18627,62 @@ export type PostV1CompaniesErrors = { 429: TooManyRequestsResponse; }; -export type PostV1CompaniesError = - PostV1CompaniesErrors[keyof PostV1CompaniesErrors]; +export type PutV1EmploymentsEmploymentIdPersonalDetailsError = + PutV1EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV1EmploymentsEmploymentIdPersonalDetailsErrors]; -export type PostV1CompaniesResponses = { +export type PutV1EmploymentsEmploymentIdPersonalDetailsResponses = { /** - * Created + * Success */ - 201: CompanyCreationResponse; + 200: EmploymentResponse; }; -export type PostV1CompaniesResponse = - PostV1CompaniesResponses[keyof PostV1CompaniesResponses]; +export type PutV1EmploymentsEmploymentIdPersonalDetailsResponse = + PutV1EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV1EmploymentsEmploymentIdPersonalDetailsResponses]; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesData = { +export type GetV1TravelLetterRequestsData = { body?: never; - path: { + path?: never; + query?: { /** - * Employment ID + * Filter results on the given status */ - employment_id: string; + status?: + | 'pending' + | 'cancelled' + | 'declined_by_manager' + | 'declined_by_remote' + | 'approved_by_manager' + | 'approved_by_remote'; + /** + * Filter results on the given employment slug + */ + employment_id?: string; + /** + * Filter results on the given employee name + */ + employee_name?: string; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'submitted_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/employments/{employment_id}/company-structure-nodes'; + url: '/v1/travel-letter-requests'; }; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1TravelLetterRequestsErrors = { /** * Not Found */ @@ -19340,47 +18693,57 @@ export type GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesError = - GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors]; +export type GetV1TravelLetterRequestsError = + GetV1TravelLetterRequestsErrors[keyof GetV1TravelLetterRequestsErrors]; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses = { +export type GetV1TravelLetterRequestsResponses = { /** * Success */ - 200: CompanyStructureNodesResponse; + 200: ListTravelLettersResponse; }; -export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponse = - GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses]; +export type GetV1TravelLetterRequestsResponse = + GetV1TravelLetterRequestsResponses[keyof GetV1TravelLetterRequestsResponses]; -export type PatchV2EmploymentsEmploymentId2Data = { - /** - * Employment params - */ - body?: EmploymentV2UpdateParams; - path: { +export type GetV1BenefitRenewalRequestsData = { + body?: never; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: never; - url: '/v2/employments/{employment_id}'; + path?: never; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/benefit-renewal-requests'; }; -export type PatchV2EmploymentsEmploymentId2Errors = { +export type GetV1BenefitRenewalRequestsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -19391,81 +18754,39 @@ export type PatchV2EmploymentsEmploymentId2Errors = { 429: TooManyRequestsResponse; }; -export type PatchV2EmploymentsEmploymentId2Error = - PatchV2EmploymentsEmploymentId2Errors[keyof PatchV2EmploymentsEmploymentId2Errors]; +export type GetV1BenefitRenewalRequestsError = + GetV1BenefitRenewalRequestsErrors[keyof GetV1BenefitRenewalRequestsErrors]; -export type PatchV2EmploymentsEmploymentId2Responses = { +export type GetV1BenefitRenewalRequestsResponses = { /** * Success */ - 200: EmploymentResponse; + 200: BenefitRenewalRequestsListBenefitRenewalRequestResponse; }; -export type PatchV2EmploymentsEmploymentId2Response = - PatchV2EmploymentsEmploymentId2Responses[keyof PatchV2EmploymentsEmploymentId2Responses]; +export type GetV1BenefitRenewalRequestsResponse = + GetV1BenefitRenewalRequestsResponses[keyof GetV1BenefitRenewalRequestsResponses]; -export type PatchV2EmploymentsEmploymentIdData = { +export type PostV1WebhookCallbacksData = { /** - * Employment params + * WebhookCallback */ - body?: EmploymentV2UpdateParams; - path: { + body?: CreateWebhookCallbackParams; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: never; - url: '/v2/employments/{employment_id}'; -}; - -export type PatchV2EmploymentsEmploymentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; -}; - -export type PatchV2EmploymentsEmploymentIdError = - PatchV2EmploymentsEmploymentIdErrors[keyof PatchV2EmploymentsEmploymentIdErrors]; - -export type PatchV2EmploymentsEmploymentIdResponses = { - /** - * Success - */ - 200: EmploymentResponse; -}; - -export type PatchV2EmploymentsEmploymentIdResponse = - PatchV2EmploymentsEmploymentIdResponses[keyof PatchV2EmploymentsEmploymentIdResponses]; - -export type PostV1ProbationCompletionLetterData = { - /** - * Work Authorization Request - */ - body: CreateProbationCompletionLetterParams; path?: never; query?: never; - url: '/v1/probation-completion-letter'; + url: '/v1/webhook-callbacks'; }; -export type PostV1ProbationCompletionLetterErrors = { +export type PostV1WebhookCallbacksErrors = { /** * Unauthorized */ @@ -19480,30 +18801,36 @@ export type PostV1ProbationCompletionLetterErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1ProbationCompletionLetterError = - PostV1ProbationCompletionLetterErrors[keyof PostV1ProbationCompletionLetterErrors]; +export type PostV1WebhookCallbacksError = + PostV1WebhookCallbacksErrors[keyof PostV1WebhookCallbacksErrors]; -export type PostV1ProbationCompletionLetterResponses = { +export type PostV1WebhookCallbacksResponses = { /** * Success */ - 200: ProbationCompletionLetterResponse; + 200: WebhookCallbackResponse; }; -export type PostV1ProbationCompletionLetterResponse = - PostV1ProbationCompletionLetterResponses[keyof PostV1ProbationCompletionLetterResponses]; +export type PostV1WebhookCallbacksResponse = + PostV1WebhookCallbacksResponses[keyof PostV1WebhookCallbacksResponses]; -export type PostV1CostCalculatorEstimationPdfData = { - /** - * Estimate params - */ - body?: CostCalculatorEstimateParams; - path?: never; +export type PostV1TimesheetsTimesheetIdApproveData = { + body?: never; + path: { + /** + * Timesheet ID + */ + timesheet_id: string; + }; query?: never; - url: '/v1/cost-calculator/estimation-pdf'; + url: '/v1/timesheets/{timesheet_id}/approve'; }; -export type PostV1CostCalculatorEstimationPdfErrors = { +export type PostV1TimesheetsTimesheetIdApproveErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -19514,30 +18841,41 @@ export type PostV1CostCalculatorEstimationPdfErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CostCalculatorEstimationPdfError = - PostV1CostCalculatorEstimationPdfErrors[keyof PostV1CostCalculatorEstimationPdfErrors]; +export type PostV1TimesheetsTimesheetIdApproveError = + PostV1TimesheetsTimesheetIdApproveErrors[keyof PostV1TimesheetsTimesheetIdApproveErrors]; -export type PostV1CostCalculatorEstimationPdfResponses = { +export type PostV1TimesheetsTimesheetIdApproveResponses = { /** * Success */ - 200: CostCalculatorEstimatePdfResponse; + 200: MinimalTimesheetResponse; }; -export type PostV1CostCalculatorEstimationPdfResponse = - PostV1CostCalculatorEstimationPdfResponses[keyof PostV1CostCalculatorEstimationPdfResponses]; +export type PostV1TimesheetsTimesheetIdApproveResponse = + PostV1TimesheetsTimesheetIdApproveResponses[keyof PostV1TimesheetsTimesheetIdApproveResponses]; -export type PostAuthOauth2Token2Data = { - /** - * OAuth2Token - */ - body?: OAuth2TokenParams; - path?: never; +export type GetV1PayslipsIdData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Payslip ID + */ + id: string; + }; query?: never; - url: '/auth/oauth2/token'; + url: '/v1/payslips/{id}'; }; -export type PostAuthOauth2Token2Errors = { +export type GetV1PayslipsIdErrors = { /** * Bad Request */ @@ -19560,32 +18898,32 @@ export type PostAuthOauth2Token2Errors = { 429: TooManyRequestsResponse; }; -export type PostAuthOauth2Token2Error = - PostAuthOauth2Token2Errors[keyof PostAuthOauth2Token2Errors]; +export type GetV1PayslipsIdError = + GetV1PayslipsIdErrors[keyof GetV1PayslipsIdErrors]; -export type PostAuthOauth2Token2Responses = { +export type GetV1PayslipsIdResponses = { /** * Success */ - 200: OAuth2Tokens; + 200: PayslipResponse; }; -export type PostAuthOauth2Token2Response = - PostAuthOauth2Token2Responses[keyof PostAuthOauth2Token2Responses]; +export type GetV1PayslipsIdResponse = + GetV1PayslipsIdResponses[keyof GetV1PayslipsIdResponses]; -export type GetV1EmployeeDocumentsIdData = { +export type GetV1LeavePoliciesSummaryEmploymentIdData = { body?: never; path: { /** - * Document ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/employee/documents/{id}'; + url: '/v1/leave-policies/summary/{employment_id}'; }; -export type GetV1EmployeeDocumentsIdErrors = { +export type GetV1LeavePoliciesSummaryEmploymentIdErrors = { /** * Unauthorized */ @@ -19600,72 +18938,88 @@ export type GetV1EmployeeDocumentsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeDocumentsIdError = - GetV1EmployeeDocumentsIdErrors[keyof GetV1EmployeeDocumentsIdErrors]; +export type GetV1LeavePoliciesSummaryEmploymentIdError = + GetV1LeavePoliciesSummaryEmploymentIdErrors[keyof GetV1LeavePoliciesSummaryEmploymentIdErrors]; -export type GetV1EmployeeDocumentsIdResponses = { +export type GetV1LeavePoliciesSummaryEmploymentIdResponses = { /** * Success */ - 200: DownloadDocumentResponse; + 200: ListLeavePoliciesSummaryResponse; }; -export type GetV1EmployeeDocumentsIdResponse = - GetV1EmployeeDocumentsIdResponses[keyof GetV1EmployeeDocumentsIdResponses]; +export type GetV1LeavePoliciesSummaryEmploymentIdResponse = + GetV1LeavePoliciesSummaryEmploymentIdResponses[keyof GetV1LeavePoliciesSummaryEmploymentIdResponses]; -export type PostV1WebhookEventsReplayData = { - /** - * WebhookEvent - */ - body: ReplayWebhookEventsParams; +export type GetV1EmployeeExpenseCategoriesData = { + body?: never; path?: never; - query?: never; - url: '/v1/webhook-events/replay'; + query?: { + /** + * Include parent (non-selectable) categories in addition to selectable leaves + */ + include_parents?: boolean; + /** + * Expense ID (slug) whose category should be included in the result, even if it is not selectable by default + */ + expense_id?: string; + }; + url: '/v1/employee/expense-categories'; }; -export type PostV1WebhookEventsReplayErrors = { +export type GetV1EmployeeExpenseCategoriesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type PostV1WebhookEventsReplayError = - PostV1WebhookEventsReplayErrors[keyof PostV1WebhookEventsReplayErrors]; +export type GetV1EmployeeExpenseCategoriesError = + GetV1EmployeeExpenseCategoriesErrors[keyof GetV1EmployeeExpenseCategoriesErrors]; -export type PostV1WebhookEventsReplayResponses = { +export type GetV1EmployeeExpenseCategoriesResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListExpenseCategoriesResponse; }; -export type PostV1WebhookEventsReplayResponse = - PostV1WebhookEventsReplayResponses[keyof PostV1WebhookEventsReplayResponses]; +export type GetV1EmployeeExpenseCategoriesResponse = + GetV1EmployeeExpenseCategoriesResponses[keyof GetV1EmployeeExpenseCategoriesResponses]; -export type PostV1SandboxWebhookCallbacksTriggerData = { - /** - * Webhook Trigger Params - */ - body?: WebhookTriggerParams; +export type GetV1CompanyDepartmentsData = { + body?: never; path?: never; - query?: never; - url: '/v1/sandbox/webhook-callbacks/trigger'; + query: { + /** + * Company ID + */ + company_id: string; + /** + * Paginate option. Default: true. When true, paginates response; otherwise, does not. + */ + paginate?: boolean; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/company-departments'; }; -export type PostV1SandboxWebhookCallbacksTriggerErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetV1CompanyDepartmentsErrors = { /** * Not Found */ @@ -19676,40 +19030,30 @@ export type PostV1SandboxWebhookCallbacksTriggerErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1SandboxWebhookCallbacksTriggerError = - PostV1SandboxWebhookCallbacksTriggerErrors[keyof PostV1SandboxWebhookCallbacksTriggerErrors]; +export type GetV1CompanyDepartmentsError = + GetV1CompanyDepartmentsErrors[keyof GetV1CompanyDepartmentsErrors]; -export type PostV1SandboxWebhookCallbacksTriggerResponses = { +export type GetV1CompanyDepartmentsResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListCompanyDepartmentsPaginatedResponse; }; -export type PostV1SandboxWebhookCallbacksTriggerResponse = - PostV1SandboxWebhookCallbacksTriggerResponses[keyof PostV1SandboxWebhookCallbacksTriggerResponses]; +export type GetV1CompanyDepartmentsResponse = + GetV1CompanyDepartmentsResponses[keyof GetV1CompanyDepartmentsResponses]; -export type GetV1BulkEmploymentJobsJobIdData = { - body?: never; - path: { - /** - * Bulk employment job id - */ - job_id: string; - }; +export type PostV1CompanyDepartmentsData = { + /** + * Create Company Department request params + */ + body: CreateCompanyDepartmentParams; + path?: never; query?: never; - url: '/v1/bulk-employment-jobs/{job_id}'; + url: '/v1/company-departments'; }; -export type GetV1BulkEmploymentJobsJobIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; +export type PostV1CompanyDepartmentsErrors = { /** * Not Found */ @@ -19717,29 +19061,29 @@ export type GetV1BulkEmploymentJobsJobIdErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1BulkEmploymentJobsJobIdError = - GetV1BulkEmploymentJobsJobIdErrors[keyof GetV1BulkEmploymentJobsJobIdErrors]; +export type PostV1CompanyDepartmentsError = + PostV1CompanyDepartmentsErrors[keyof PostV1CompanyDepartmentsErrors]; -export type GetV1BulkEmploymentJobsJobIdResponses = { +export type PostV1CompanyDepartmentsResponses = { /** - * Success + * Created */ - 200: BulkEmploymentImportJobResponse; + 201: CompanyDepartmentCreatedResponse; }; -export type GetV1BulkEmploymentJobsJobIdResponse = - GetV1BulkEmploymentJobsJobIdResponses[keyof GetV1BulkEmploymentJobsJobIdResponses]; +export type PostV1CompanyDepartmentsResponse = + PostV1CompanyDepartmentsResponses[keyof PostV1CompanyDepartmentsResponses]; -export type GetV1BulkEmploymentJobsJobIdRowsData = { +export type GetV1OffboardingsEmploymentsEmploymentIdData = { body?: never; path: { /** - * Bulk employment job id + * Employment ID */ - job_id: string; + employment_id: string; }; query?: { /** @@ -19747,22 +19091,22 @@ export type GetV1BulkEmploymentJobsJobIdRowsData = { */ page?: number; /** - * Number of items per page + * Change the amount of records returned per page, defaults to 20, limited to 100 */ page_size?: number; }; - url: '/v1/bulk-employment-jobs/{job_id}/rows'; + url: '/v1/offboardings/employments/{employment_id}'; }; -export type GetV1BulkEmploymentJobsJobIdRowsErrors = { +export type GetV1OffboardingsEmploymentsEmploymentIdErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -19770,83 +19114,89 @@ export type GetV1BulkEmploymentJobsJobIdRowsErrors = { /** * Unprocessable Entity */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ 429: TooManyRequestsResponse; }; -export type GetV1BulkEmploymentJobsJobIdRowsError = - GetV1BulkEmploymentJobsJobIdRowsErrors[keyof GetV1BulkEmploymentJobsJobIdRowsErrors]; +export type GetV1OffboardingsEmploymentsEmploymentIdError = + GetV1OffboardingsEmploymentsEmploymentIdErrors[keyof GetV1OffboardingsEmploymentsEmploymentIdErrors]; -export type GetV1BulkEmploymentJobsJobIdRowsResponses = { +export type GetV1OffboardingsEmploymentsEmploymentIdResponses = { /** * Success */ - 200: ImportJobRowsResponse; + 200: ListOffboardingResponse; }; -export type GetV1BulkEmploymentJobsJobIdRowsResponse = - GetV1BulkEmploymentJobsJobIdRowsResponses[keyof GetV1BulkEmploymentJobsJobIdRowsResponses]; +export type GetV1OffboardingsEmploymentsEmploymentIdResponse = + GetV1OffboardingsEmploymentsEmploymentIdResponses[keyof GetV1OffboardingsEmploymentsEmploymentIdResponses]; -export type PostV1MagicLinkData = { +export type PostV1TimeoffTimeoffIdCancelRequestDeclineData = { /** - * Magic links generator body + * Timeoff */ - body: MagicLinkParams; - headers: { + body: DeclineTimeoffParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Time Off ID */ - Authorization: string; + timeoff_id: string; }; - path?: never; query?: never; - url: '/v1/magic-link'; + url: '/v1/timeoff/{timeoff_id}/cancel-request/decline'; }; -export type PostV1MagicLinkErrors = { +export type PostV1TimeoffTimeoffIdCancelRequestDeclineErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1MagicLinkError = - PostV1MagicLinkErrors[keyof PostV1MagicLinkErrors]; +export type PostV1TimeoffTimeoffIdCancelRequestDeclineError = + PostV1TimeoffTimeoffIdCancelRequestDeclineErrors[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineErrors]; -export type PostV1MagicLinkResponses = { +export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponses = { /** * Success */ - 200: MagicLinkResponse; + 200: SuccessResponse; }; -export type PostV1MagicLinkResponse = - PostV1MagicLinkResponses[keyof PostV1MagicLinkResponses]; +export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponse = + PostV1TimeoffTimeoffIdCancelRequestDeclineResponses[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineResponses]; -export type GetV1CompaniesCompanyIdData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsData = { + /** + * Employment administrative details params + */ + body?: EmploymentAdministrativeDetailsParams; path: { /** - * Company ID + * Employment ID */ - company_id: string; + employment_id: string; }; query?: never; - url: '/v1/companies/{company_id}'; + url: '/v2/employments/{employment_id}/administrative_details'; }; -export type GetV1CompaniesCompanyIdErrors = { +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors = { /** * Bad Request */ @@ -19855,76 +19205,63 @@ export type GetV1CompaniesCompanyIdErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1CompaniesCompanyIdError = - GetV1CompaniesCompanyIdErrors[keyof GetV1CompaniesCompanyIdErrors]; +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsError = + PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsErrors]; -export type GetV1CompaniesCompanyIdResponses = { +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses = { /** * Success */ - 200: CompanyResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1CompaniesCompanyIdResponse = - GetV1CompaniesCompanyIdResponses[keyof GetV1CompaniesCompanyIdResponses]; +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsResponse = + PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses[keyof PutV2EmploymentsEmploymentIdAdministrativeDetailsResponses]; -export type PatchV1CompaniesCompanyId2Data = { - /** - * Update Company params - */ - body?: UpdateCompanyParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaData = { + body?: never; path: { /** - * Company ID - * + * Unique identifier of the employment */ - company_id: string; + employment_id: UuidSlug; }; query?: { /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema + * Version of the form schema */ - bank_account_details_json_schema_version?: number | 'latest'; + json_schema_version?: number | 'latest'; }; - url: '/v1/companies/{company_id}'; + url: '/v1/employments/{employment_id}/benefit-offers/schema'; }; -export type PatchV1CompaniesCompanyId2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors = { /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ @@ -19933,151 +19270,76 @@ export type PatchV1CompaniesCompanyId2Errors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchV1CompaniesCompanyId2Error = - PatchV1CompaniesCompanyId2Errors[keyof PatchV1CompaniesCompanyId2Errors]; +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaError = + GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors]; -export type PatchV1CompaniesCompanyId2Responses = { +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses = { /** * Success */ - 200: CompanyResponse; + 200: UnifiedEmploymentsBenefitOffersJsonSchemaResponse; }; -export type PatchV1CompaniesCompanyId2Response = - PatchV1CompaniesCompanyId2Responses[keyof PatchV1CompaniesCompanyId2Responses]; +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponse = + GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses]; -export type PatchV1CompaniesCompanyIdData = { +export type PostV1ContractorsEligibilityQuestionnaireData = { /** - * Update Company params + * Eligibility questionnaire submission */ - body?: UpdateCompanyParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Company ID - * - */ - company_id: string; - }; + body: SubmitEligibilityQuestionnaireRequest; + path?: never; query?: { /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema + * Version of the form schema */ - bank_account_details_json_schema_version?: number | 'latest'; + json_schema_version?: number | 'latest'; }; - url: '/v1/companies/{company_id}'; + url: '/v1/contractors/eligibility-questionnaire'; }; -export type PatchV1CompaniesCompanyIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1ContractorsEligibilityQuestionnaireErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Conflict */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; -}; - -export type PatchV1CompaniesCompanyIdError = - PatchV1CompaniesCompanyIdErrors[keyof PatchV1CompaniesCompanyIdErrors]; - -export type PatchV1CompaniesCompanyIdResponses = { - /** - * Success - */ - 200: CompanyResponse; -}; - -export type PatchV1CompaniesCompanyIdResponse = - PatchV1CompaniesCompanyIdResponses[keyof PatchV1CompaniesCompanyIdResponses]; - -export type GetV1CompaniesSchemaData = { - body?: never; - path?: never; - query: { - /** - * Country code according to ISO 3-digit alphabetic codes. - */ - country_code: string; - /** - * Name of the desired form - */ - form: 'address_details'; - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/companies/schema'; -}; - -export type GetV1CompaniesSchemaErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; + 409: ConflictErrorResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type GetV1CompaniesSchemaError = - GetV1CompaniesSchemaErrors[keyof GetV1CompaniesSchemaErrors]; +export type PostV1ContractorsEligibilityQuestionnaireError = + PostV1ContractorsEligibilityQuestionnaireErrors[keyof PostV1ContractorsEligibilityQuestionnaireErrors]; -export type GetV1CompaniesSchemaResponses = { +export type PostV1ContractorsEligibilityQuestionnaireResponses = { /** - * Success + * Questionnaire submitted successfully */ - 200: CompanyFormResponse; + 201: EligibilityQuestionnaireResponse; }; -export type GetV1CompaniesSchemaResponse = - GetV1CompaniesSchemaResponses[keyof GetV1CompaniesSchemaResponses]; +export type PostV1ContractorsEligibilityQuestionnaireResponse = + PostV1ContractorsEligibilityQuestionnaireResponses[keyof PostV1ContractorsEligibilityQuestionnaireResponses]; -export type GetV1EmployeeCurrentData = { +export type GetV1EmployeePersonalInformationData = { body?: never; path?: never; query?: never; - url: '/v1/employee/current'; + url: '/v1/employee/personal-information'; }; -export type GetV1EmployeeCurrentErrors = { +export type GetV1EmployeePersonalInformationErrors = { /** * Unauthorized */ @@ -20086,29 +19348,54 @@ export type GetV1EmployeeCurrentErrors = { * Forbidden */ 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; }; -export type GetV1EmployeeCurrentError = - GetV1EmployeeCurrentErrors[keyof GetV1EmployeeCurrentErrors]; +export type GetV1EmployeePersonalInformationError = + GetV1EmployeePersonalInformationErrors[keyof GetV1EmployeePersonalInformationErrors]; -export type GetV1EmployeeCurrentResponses = { +export type GetV1EmployeePersonalInformationResponses = { /** * Success */ 200: SuccessResponse; }; -export type GetV1EmployeeCurrentResponse = - GetV1EmployeeCurrentResponses[keyof GetV1EmployeeCurrentResponses]; +export type GetV1EmployeePersonalInformationResponse = + GetV1EmployeePersonalInformationResponses[keyof GetV1EmployeePersonalInformationResponses]; -export type GetV1PricingPlanPartnerTemplatesData = { +export type GetV1TimesheetsData = { body?: never; path?: never; - query?: never; - url: '/v1/pricing-plan-partner-templates'; + query?: { + /** + * Filter timesheets by their status + */ + status?: TimesheetStatus; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'submitted_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/timesheets'; }; -export type GetV1PricingPlanPartnerTemplatesErrors = { +export type GetV1TimesheetsErrors = { /** * Unauthorized */ @@ -20123,32 +19410,49 @@ export type GetV1PricingPlanPartnerTemplatesErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1PricingPlanPartnerTemplatesError = - GetV1PricingPlanPartnerTemplatesErrors[keyof GetV1PricingPlanPartnerTemplatesErrors]; +export type GetV1TimesheetsError = + GetV1TimesheetsErrors[keyof GetV1TimesheetsErrors]; -export type GetV1PricingPlanPartnerTemplatesResponses = { +export type GetV1TimesheetsResponses = { /** * Success */ - 200: ListPricingPlanPartnerTemplatesResponse; + 200: ListTimesheetsResponse; }; -export type GetV1PricingPlanPartnerTemplatesResponse = - GetV1PricingPlanPartnerTemplatesResponses[keyof GetV1PricingPlanPartnerTemplatesResponses]; +export type GetV1TimesheetsResponse = + GetV1TimesheetsResponses[keyof GetV1TimesheetsResponses]; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsData = { - body?: never; - path: { +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesData = { + /** + * Create legal entity params + */ + body?: { /** - * Country code according to ISO 3-digit alphabetic codes + * ISO 3166-1 alpha-3 country code */ country_code: string; }; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Company ID + */ + company_id: string; + }; query?: never; - url: '/v1/countries/{country_code}/engagement-agreement-details'; + url: '/v1/sandbox/companies/{company_id}/legal-entities'; }; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsErrors = { +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors = { /** * Bad Request */ @@ -20166,104 +19470,183 @@ export type GetV1CountriesCountryCodeEngagementAgreementDetailsErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsError = - GetV1CountriesCountryCodeEngagementAgreementDetailsErrors[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsErrors]; +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesError = + PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesErrors]; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponses = { +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses = { /** - * Success + * Legal entity created */ - 200: EngagementAgreementDetailsResponse; + 201: { + data?: { + /** + * Legal entity slug + */ + legal_entity_id?: string; + /** + * Legal entity name + */ + name?: string; + /** + * Legal entity status + */ + status?: string; + }; + }; }; -export type GetV1CountriesCountryCodeEngagementAgreementDetailsResponse = - GetV1CountriesCountryCodeEngagementAgreementDetailsResponses[keyof GetV1CountriesCountryCodeEngagementAgreementDetailsResponses]; +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse = + PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesResponses]; -export type GetV1EmployeeBankAccountData = { +export type GetV1EmploymentsEmploymentIdData = { body?: never; - path?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: { /** - * Version of the bank_account_details form schema + * Wether files should be excluded */ - bank_account_details_json_schema_version?: number | 'latest'; + exclude_files?: boolean; }; - url: '/v1/employee/bank-account'; + url: '/v1/employments/{employment_id}'; }; -export type GetV1EmployeeBankAccountErrors = { +export type GetV1EmploymentsEmploymentIdErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1EmployeeBankAccountError = - GetV1EmployeeBankAccountErrors[keyof GetV1EmployeeBankAccountErrors]; +export type GetV1EmploymentsEmploymentIdError = + GetV1EmploymentsEmploymentIdErrors[keyof GetV1EmploymentsEmploymentIdErrors]; -export type GetV1EmployeeBankAccountResponses = { +export type GetV1EmploymentsEmploymentIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: EmploymentShowResponse; }; -export type GetV1EmployeeBankAccountResponse = - GetV1EmployeeBankAccountResponses[keyof GetV1EmployeeBankAccountResponses]; +export type GetV1EmploymentsEmploymentIdResponse = + GetV1EmploymentsEmploymentIdResponses[keyof GetV1EmploymentsEmploymentIdResponses]; -export type PutV1EmployeeBankAccountData = { +export type PatchV1EmploymentsEmploymentId2Data = { /** - * Employee bank account details params + * Employment params */ - body?: EmploymentBankAccountDetailsParams; - path?: never; - query?: { + body?: EmploymentFullParams; + headers: { /** - * Version of the bank_account_details form schema + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - bank_account_details_json_schema_version?: number | 'latest'; + Authorization: string; }; - url: '/v1/employee/bank-account'; -}; - -export type PutV1EmployeeBankAccountErrors = { - /** + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Version of the address_details form schema + */ + address_details_json_schema_version?: number | 'latest'; + /** + * Version of the administrative_details form schema + */ + administrative_details_json_schema_version?: number | 'latest'; + /** + * Version of the bank_account_details form schema + */ + bank_account_details_json_schema_version?: number | 'latest'; + /** + * Version of the employment_basic_information form schema + */ + employment_basic_information_json_schema_version?: number | 'latest'; + /** + * Version of the billing_address_details form schema + */ + billing_address_details_json_schema_version?: number | 'latest'; + /** + * Version of the contract_details form schema + */ + contract_details_json_schema_version?: number | 'latest'; + /** + * Version of the emergency_contact_details form schema + */ + emergency_contact_details_json_schema_version?: number | 'latest'; + /** + * Version of the personal_details form schema + */ + personal_details_json_schema_version?: number | 'latest'; + /** + * Version of the pricing_plan_details form schema + */ + pricing_plan_details_json_schema_version?: number | 'latest'; + /** + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + */ + skip_benefits?: boolean; + /** + * Complementary action(s) to perform when creating an employment. + */ + actions?: string; + }; + url: '/v1/employments/{employment_id}'; +}; + +export type PatchV1EmploymentsEmploymentId2Errors = { + /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -20274,24 +19657,33 @@ export type PutV1EmployeeBankAccountErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmployeeBankAccountError = - PutV1EmployeeBankAccountErrors[keyof PutV1EmployeeBankAccountErrors]; +export type PatchV1EmploymentsEmploymentId2Error = + PatchV1EmploymentsEmploymentId2Errors[keyof PatchV1EmploymentsEmploymentId2Errors]; -export type PutV1EmployeeBankAccountResponses = { +export type PatchV1EmploymentsEmploymentId2Responses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: EmploymentResponse; }; -export type PutV1EmployeeBankAccountResponse = - PutV1EmployeeBankAccountResponses[keyof PutV1EmployeeBankAccountResponses]; +export type PatchV1EmploymentsEmploymentId2Response = + PatchV1EmploymentsEmploymentId2Responses[keyof PatchV1EmploymentsEmploymentId2Responses]; -export type PutV2EmploymentsEmploymentIdContractDetailsData = { +export type PatchV1EmploymentsEmploymentIdData = { /** - * Employment contract details params + * Employment params */ - body?: EmploymentContractDetailsParams; + body?: EmploymentFullParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** * Employment ID @@ -20299,35 +19691,63 @@ export type PutV2EmploymentsEmploymentIdContractDetailsData = { employment_id: string; }; query?: { + /** + * Version of the address_details form schema + */ + address_details_json_schema_version?: number | 'latest'; + /** + * Version of the administrative_details form schema + */ + administrative_details_json_schema_version?: number | 'latest'; + /** + * Version of the bank_account_details form schema + */ + bank_account_details_json_schema_version?: number | 'latest'; + /** + * Version of the employment_basic_information form schema + */ + employment_basic_information_json_schema_version?: number | 'latest'; + /** + * Version of the billing_address_details form schema + */ + billing_address_details_json_schema_version?: number | 'latest'; /** * Version of the contract_details form schema */ contract_details_json_schema_version?: number | 'latest'; + /** + * Version of the emergency_contact_details form schema + */ + emergency_contact_details_json_schema_version?: number | 'latest'; + /** + * Version of the personal_details form schema + */ + personal_details_json_schema_version?: number | 'latest'; + /** + * Version of the pricing_plan_details form schema + */ + pricing_plan_details_json_schema_version?: number | 'latest'; /** * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ skip_benefits?: boolean; + /** + * Complementary action(s) to perform when creating an employment. + */ + actions?: string; }; - url: '/v2/employments/{employment_id}/contract_details'; + url: '/v1/employments/{employment_id}'; }; -export type PutV2EmploymentsEmploymentIdContractDetailsErrors = { +export type PatchV1EmploymentsEmploymentIdErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Conflict */ @@ -20342,77 +19762,93 @@ export type PutV2EmploymentsEmploymentIdContractDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdContractDetailsError = - PutV2EmploymentsEmploymentIdContractDetailsErrors[keyof PutV2EmploymentsEmploymentIdContractDetailsErrors]; +export type PatchV1EmploymentsEmploymentIdError = + PatchV1EmploymentsEmploymentIdErrors[keyof PatchV1EmploymentsEmploymentIdErrors]; -export type PutV2EmploymentsEmploymentIdContractDetailsResponses = { +export type PatchV1EmploymentsEmploymentIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: EmploymentResponse; }; -export type PutV2EmploymentsEmploymentIdContractDetailsResponse = - PutV2EmploymentsEmploymentIdContractDetailsResponses[keyof PutV2EmploymentsEmploymentIdContractDetailsResponses]; +export type PatchV1EmploymentsEmploymentIdResponse = + PatchV1EmploymentsEmploymentIdResponses[keyof PatchV1EmploymentsEmploymentIdResponses]; -export type GetV1CompaniesCompanyIdProductPricesData = { +export type GetV1ScimV2UsersData = { body?: never; - path: { + path?: never; + query?: { /** - * Company ID + * 1-based index of the first result */ - company_id: UuidSlug; + startIndex?: number; + /** + * Maximum number of results per page + */ + count?: number; + /** + * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + */ + filter?: string; }; - query?: never; - url: '/v1/companies/{company_id}/product-prices'; + url: '/v1/scim/v2/Users'; }; -export type GetV1CompaniesCompanyIdProductPricesErrors = { +export type GetV1ScimV2UsersErrors = { + /** + * Bad Request + */ + 400: IntegrationsScimErrorResponse; /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: IntegrationsScimErrorResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: IntegrationsScimErrorResponse; }; -export type GetV1CompaniesCompanyIdProductPricesError = - GetV1CompaniesCompanyIdProductPricesErrors[keyof GetV1CompaniesCompanyIdProductPricesErrors]; +export type GetV1ScimV2UsersError = + GetV1ScimV2UsersErrors[keyof GetV1ScimV2UsersErrors]; -export type GetV1CompaniesCompanyIdProductPricesResponses = { +export type GetV1ScimV2UsersResponses = { /** * Success */ - 200: ListProductPricesResponse; + 200: IntegrationsScimUserListResponse; }; -export type GetV1CompaniesCompanyIdProductPricesResponse = - GetV1CompaniesCompanyIdProductPricesResponses[keyof GetV1CompaniesCompanyIdProductPricesResponses]; +export type GetV1ScimV2UsersResponse = + GetV1ScimV2UsersResponses[keyof GetV1ScimV2UsersResponses]; -export type PostV1CompaniesCompanyIdCreateTokenData = { +export type GetV1PayrollCalendarsCycleData = { body?: never; path: { /** - * The ID of the company + * The cycle for which to list the payroll calendars. Format: YYYY-MM */ - company_id: string; + cycle: string; }; query?: { /** - * The scope of the token + * Starts fetching records after the given page */ - scope?: string; + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/companies/{company_id}/create-token'; + url: '/v1/payroll-calendars/{cycle}'; }; -export type PostV1CompaniesCompanyIdCreateTokenErrors = { +export type GetV1PayrollCalendarsCycleErrors = { /** * Unauthorized */ @@ -20427,76 +19863,157 @@ export type PostV1CompaniesCompanyIdCreateTokenErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CompaniesCompanyIdCreateTokenError = - PostV1CompaniesCompanyIdCreateTokenErrors[keyof PostV1CompaniesCompanyIdCreateTokenErrors]; +export type GetV1PayrollCalendarsCycleError = + GetV1PayrollCalendarsCycleErrors[keyof GetV1PayrollCalendarsCycleErrors]; -export type PostV1CompaniesCompanyIdCreateTokenResponses = { +export type GetV1PayrollCalendarsCycleResponses = { /** * Success */ - 200: CompanyTokenResponse; + 200: PayrollCalendarsResponse; }; -export type PostV1CompaniesCompanyIdCreateTokenResponse = - PostV1CompaniesCompanyIdCreateTokenResponses[keyof PostV1CompaniesCompanyIdCreateTokenResponses]; +export type GetV1PayrollCalendarsCycleResponse = + GetV1PayrollCalendarsCycleResponses[keyof GetV1PayrollCalendarsCycleResponses]; -export type GetV1IdentityVerificationEmploymentIdData = { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = + { + body?: never; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; }; - query?: never; - url: '/v1/identity-verification/{employment_id}'; -}; -export type GetV1IdentityVerificationEmploymentIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; -export type GetV1IdentityVerificationEmploymentIdError = - GetV1IdentityVerificationEmploymentIdErrors[keyof GetV1IdentityVerificationEmploymentIdErrors]; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; -export type GetV1IdentityVerificationEmploymentIdResponses = { - /** - * Success - */ - 200: IdentityVerificationResponse; -}; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = + { + /** + * ShowLegalEntityAdministrativeDetailsResponse + * + * Country specific json schema driven administrative details for legal entities + */ + 200: { + data: { + [key: string]: unknown; + }; + }; + }; -export type GetV1IdentityVerificationEmploymentIdResponse = - GetV1IdentityVerificationEmploymentIdResponses[keyof GetV1IdentityVerificationEmploymentIdResponses]; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdData = { - body?: never; +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsData = + { + /** + * Legal entity administrative details params + */ + body?: AdministrativeDetailsParams; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; + }; + query?: never; + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; + }; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors = + { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; + }; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsErrors]; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses = + { + /** + * ShowLegalEntityAdministrativeDetailsResponse + * + * Country specific json schema driven administrative details for legal entities + */ + 200: { + data: { + [key: string]: unknown; + }; + }; + }; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses[keyof PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponses]; + +export type PutV2EmploymentsEmploymentIdContractDetailsData = { + /** + * Employment contract details params + */ + body?: EmploymentContractDetailsParams; path: { /** - * The expense ID + * Employment ID */ - expense_id: string; + employment_id: string; + }; + query?: { /** - * The receipt ID + * Version of the contract_details form schema */ - receipt_id: string; + contract_details_json_schema_version?: number | 'latest'; + /** + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + */ + skip_benefits?: boolean; }; - query?: never; - url: '/v1/expenses/{expense_id}/receipts/{receipt_id}'; + url: '/v2/employments/{employment_id}/contract_details'; }; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { +export type PutV2EmploymentsEmploymentIdContractDetailsErrors = { /** * Bad Request */ @@ -20513,6 +20030,10 @@ export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -20523,137 +20044,130 @@ export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdError = - GetV1ExpensesExpenseIdReceiptsReceiptIdErrors[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdErrors]; +export type PutV2EmploymentsEmploymentIdContractDetailsError = + PutV2EmploymentsEmploymentIdContractDetailsErrors[keyof PutV2EmploymentsEmploymentIdContractDetailsErrors]; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponses = { +export type PutV2EmploymentsEmploymentIdContractDetailsResponses = { /** * Success */ - 200: GenericFile; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponse = - GetV1ExpensesExpenseIdReceiptsReceiptIdResponses[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdResponses]; +export type PutV2EmploymentsEmploymentIdContractDetailsResponse = + PutV2EmploymentsEmploymentIdContractDetailsResponses[keyof PutV2EmploymentsEmploymentIdContractDetailsResponses]; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData = { +export type GetV1CostCalculatorRegionsSlugFieldsData = { body?: never; path: { /** - * Employment ID + * Slug */ - employment_id: string; + slug: string; }; - query?: never; - url: '/v1/employments/{employment_id}/employment-agreement/preview'; + query?: { + /** + * If the premium benefits should be included in the response + */ + include_premium_benefits?: boolean; + }; + url: '/v1/cost-calculator/regions/{slug}/fields'; }; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors = { +export type GetV1CostCalculatorRegionsSlugFieldsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity + * Internal Server Error */ - 422: UnprocessableEntityResponse; + 500: InternalServerErrorResponse; }; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewError = - GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors]; +export type GetV1CostCalculatorRegionsSlugFieldsError = + GetV1CostCalculatorRegionsSlugFieldsErrors[keyof GetV1CostCalculatorRegionsSlugFieldsErrors]; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses = { +export type GetV1CostCalculatorRegionsSlugFieldsResponses = { /** * Success */ - 200: EmploymentAgreementPreviewResponse; + 200: JsonSchemaResponse; }; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponse = - GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses]; +export type GetV1CostCalculatorRegionsSlugFieldsResponse = + GetV1CostCalculatorRegionsSlugFieldsResponses[keyof GetV1CostCalculatorRegionsSlugFieldsResponses]; -export type GetV1ScimV2GroupsData = { +export type GetV1OffboardingsIdData = { body?: never; - path?: never; - query?: { - /** - * 1-based index of the first result - */ - startIndex?: number; - /** - * Maximum number of results per page - */ - count?: number; + path: { /** - * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + * Offboarding request ID */ - filter?: string; + id: string; }; - url: '/v1/scim/v2/Groups'; + query?: never; + url: '/v1/offboardings/{id}'; }; -export type GetV1ScimV2GroupsErrors = { +export type GetV1OffboardingsIdErrors = { /** * Bad Request */ - 400: IntegrationsScimErrorResponse; + 400: BadRequestResponse; /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1ScimV2GroupsError = - GetV1ScimV2GroupsErrors[keyof GetV1ScimV2GroupsErrors]; +export type GetV1OffboardingsIdError = + GetV1OffboardingsIdErrors[keyof GetV1OffboardingsIdErrors]; -export type GetV1ScimV2GroupsResponses = { +export type GetV1OffboardingsIdResponses = { /** * Success */ - 200: IntegrationsScimGroupListResponse; + 200: OffboardingResponse; }; -export type GetV1ScimV2GroupsResponse = - GetV1ScimV2GroupsResponses[keyof GetV1ScimV2GroupsResponses]; +export type GetV1OffboardingsIdResponse = + GetV1OffboardingsIdResponses[keyof GetV1OffboardingsIdResponses]; -export type GetV1ExpensesIdData = { +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsData = { body?: never; - headers: { + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Payroll run ID */ - Authorization: string; + payroll_run_id: string; }; - path: { + query?: { /** - * Expense ID + * Starts fetching records after the given page */ - id: string; + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/expenses/{id}'; + url: '/v1/payroll-runs/{payroll_run_id}/employee-details'; }; -export type GetV1ExpensesIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors = { /** * Unauthorized */ @@ -20666,96 +20180,87 @@ export type GetV1ExpensesIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1ExpensesIdError = - GetV1ExpensesIdErrors[keyof GetV1ExpensesIdErrors]; +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsError = + GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors]; -export type GetV1ExpensesIdResponses = { +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses = { /** * Success */ - 200: ExpenseResponse; + 200: EmployeeDetailsResponse; }; -export type GetV1ExpensesIdResponse = - GetV1ExpensesIdResponses[keyof GetV1ExpensesIdResponses]; +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponse = + GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses]; -export type PatchV1ExpensesId2Data = { - /** - * Expenses - */ - body?: UpdateExpenseParams; +export type GetV1BulkEmploymentJobsJobIdRowsData = { + body?: never; path: { /** - * Expense ID + * Bulk employment job id */ - id: string; + job_id: string; }; - query?: never; - url: '/v1/expenses/{id}'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/bulk-employment-jobs/{job_id}/rows'; }; -export type PatchV1ExpensesId2Errors = { +export type GetV1BulkEmploymentJobsJobIdRowsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ 429: TooManyRequestsResponse; }; -export type PatchV1ExpensesId2Error = - PatchV1ExpensesId2Errors[keyof PatchV1ExpensesId2Errors]; +export type GetV1BulkEmploymentJobsJobIdRowsError = + GetV1BulkEmploymentJobsJobIdRowsErrors[keyof GetV1BulkEmploymentJobsJobIdRowsErrors]; -export type PatchV1ExpensesId2Responses = { +export type GetV1BulkEmploymentJobsJobIdRowsResponses = { /** * Success */ - 200: ExpenseResponse; + 200: ImportJobRowsResponse; }; -export type PatchV1ExpensesId2Response = - PatchV1ExpensesId2Responses[keyof PatchV1ExpensesId2Responses]; +export type GetV1BulkEmploymentJobsJobIdRowsResponse = + GetV1BulkEmploymentJobsJobIdRowsResponses[keyof GetV1BulkEmploymentJobsJobIdRowsResponses]; -export type PatchV1ExpensesIdData = { - /** - * Expenses - */ - body?: UpdateExpenseParams; - path: { +export type GetV1EmployeeEmergencyContactData = { + body?: never; + path?: never; + query?: { /** - * Expense ID + * Version of the emergency_contact_details form schema */ - id: string; + emergency_contact_details_json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/expenses/{id}'; + url: '/v1/employee/emergency-contact'; }; -export type PatchV1ExpensesIdErrors = { +export type GetV1EmployeeEmergencyContactErrors = { /** * Bad Request */ @@ -20765,57 +20270,48 @@ export type PatchV1ExpensesIdErrors = { */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ 429: TooManyRequestsResponse; }; -export type PatchV1ExpensesIdError = - PatchV1ExpensesIdErrors[keyof PatchV1ExpensesIdErrors]; +export type GetV1EmployeeEmergencyContactError = + GetV1EmployeeEmergencyContactErrors[keyof GetV1EmployeeEmergencyContactErrors]; -export type PatchV1ExpensesIdResponses = { +export type GetV1EmployeeEmergencyContactResponses = { /** * Success */ - 200: ExpenseResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PatchV1ExpensesIdResponse = - PatchV1ExpensesIdResponses[keyof PatchV1ExpensesIdResponses]; +export type GetV1EmployeeEmergencyContactResponse = + GetV1EmployeeEmergencyContactResponses[keyof GetV1EmployeeEmergencyContactResponses]; -export type PutV2EmploymentsEmploymentIdEmergencyContactData = { +export type PutV1EmployeeEmergencyContactData = { /** - * Employment emergency contact params + * Employee emergency contact params */ body?: EmploymentEmergencyContactParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; + path?: never; query?: { /** * Version of the emergency_contact_details form schema */ emergency_contact_details_json_schema_version?: number | 'latest'; }; - url: '/v2/employments/{employment_id}/emergency_contact'; + url: '/v1/employee/emergency-contact'; }; -export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { +export type PutV1EmployeeEmergencyContactErrors = { /** * Bad Request */ @@ -20832,10 +20328,6 @@ export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -20846,24 +20338,24 @@ export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdEmergencyContactError = - PutV2EmploymentsEmploymentIdEmergencyContactErrors[keyof PutV2EmploymentsEmploymentIdEmergencyContactErrors]; +export type PutV1EmployeeEmergencyContactError = + PutV1EmployeeEmergencyContactErrors[keyof PutV1EmployeeEmergencyContactErrors]; -export type PutV2EmploymentsEmploymentIdEmergencyContactResponses = { +export type PutV1EmployeeEmergencyContactResponses = { /** * Success */ 200: EmploymentDetailsOnlyResponse; }; -export type PutV2EmploymentsEmploymentIdEmergencyContactResponse = - PutV2EmploymentsEmploymentIdEmergencyContactResponses[keyof PutV2EmploymentsEmploymentIdEmergencyContactResponses]; +export type PutV1EmployeeEmergencyContactResponse = + PutV1EmployeeEmergencyContactResponses[keyof PutV1EmployeeEmergencyContactResponses]; -export type PostV1SandboxBenefitRenewalRequestsData = { +export type PostV1SandboxEmploymentsData = { /** - * Benefit Renewal Request + * Employment params */ - body: BenefitRenewalRequestsCreateBenefitRenewalRequest; + body?: EmploymentCreateParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -20875,10 +20367,10 @@ export type PostV1SandboxBenefitRenewalRequestsData = { }; path?: never; query?: never; - url: '/v1/sandbox/benefit-renewal-requests'; + url: '/v1/sandbox/employments'; }; -export type PostV1SandboxBenefitRenewalRequestsErrors = { +export type PostV1SandboxEmploymentsErrors = { /** * Bad Request */ @@ -20887,59 +20379,53 @@ export type PostV1SandboxBenefitRenewalRequestsErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1SandboxBenefitRenewalRequestsError = - PostV1SandboxBenefitRenewalRequestsErrors[keyof PostV1SandboxBenefitRenewalRequestsErrors]; +export type PostV1SandboxEmploymentsError = + PostV1SandboxEmploymentsErrors[keyof PostV1SandboxEmploymentsErrors]; -export type PostV1SandboxBenefitRenewalRequestsResponses = { +export type PostV1SandboxEmploymentsResponses = { /** * Success */ - 200: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse; + 201: EmploymentCreationResponse; }; -export type PostV1SandboxBenefitRenewalRequestsResponse = - PostV1SandboxBenefitRenewalRequestsResponses[keyof PostV1SandboxBenefitRenewalRequestsResponses]; +export type PostV1SandboxEmploymentsResponse = + PostV1SandboxEmploymentsResponses[keyof PostV1SandboxEmploymentsResponses]; -export type GetV2EmploymentsEmploymentIdBasicInformationData = { - body?: never; +export type PostV1EmploymentsEmploymentIdContractEligibilityData = { + /** + * Contract Eligibility Create Parameters + */ + body: CreateContractEligibilityParams; path: { /** * Employment ID */ employment_id: string; }; - query?: { - /** - * Version of the employment_basic_information form schema - */ - employment_basic_information_json_schema_version?: number | 'latest'; - }; - url: '/v2/employments/{employment_id}/basic_information'; + query?: never; + url: '/v1/employments/{employment_id}/contract-eligibility'; }; -export type GetV2EmploymentsEmploymentIdBasicInformationErrors = { +export type PostV1EmploymentsEmploymentIdContractEligibilityErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -20950,135 +20436,132 @@ export type GetV2EmploymentsEmploymentIdBasicInformationErrors = { 429: TooManyRequestsResponse; }; -export type GetV2EmploymentsEmploymentIdBasicInformationError = - GetV2EmploymentsEmploymentIdBasicInformationErrors[keyof GetV2EmploymentsEmploymentIdBasicInformationErrors]; +export type PostV1EmploymentsEmploymentIdContractEligibilityError = + PostV1EmploymentsEmploymentIdContractEligibilityErrors[keyof PostV1EmploymentsEmploymentIdContractEligibilityErrors]; -export type GetV2EmploymentsEmploymentIdBasicInformationResponses = { +export type PostV1EmploymentsEmploymentIdContractEligibilityResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: SuccessResponse; }; -export type GetV2EmploymentsEmploymentIdBasicInformationResponse = - GetV2EmploymentsEmploymentIdBasicInformationResponses[keyof GetV2EmploymentsEmploymentIdBasicInformationResponses]; +export type PostV1EmploymentsEmploymentIdContractEligibilityResponse = + PostV1EmploymentsEmploymentIdContractEligibilityResponses[keyof PostV1EmploymentsEmploymentIdContractEligibilityResponses]; -export type PutV2EmploymentsEmploymentIdBasicInformationData = { - /** - * Employment basic information params - */ - body?: EmploymentBasicInformationParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: { +export type GetV1CountriesData = { + body?: never; + headers: { /** - * Version of the employment_basic_information form schema + * This endpoint works with any of the access tokens provided. You can use an access + * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. + * */ - employment_basic_information_json_schema_version?: number | 'latest'; + Authorization: string; }; - url: '/v2/employments/{employment_id}/basic_information'; + path?: never; + query?: never; + url: '/v1/countries'; }; -export type PutV2EmploymentsEmploymentIdBasicInformationErrors = { +export type GetV1CountriesErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdBasicInformationError = - PutV2EmploymentsEmploymentIdBasicInformationErrors[keyof PutV2EmploymentsEmploymentIdBasicInformationErrors]; +export type GetV1CountriesError = + GetV1CountriesErrors[keyof GetV1CountriesErrors]; -export type PutV2EmploymentsEmploymentIdBasicInformationResponses = { +export type GetV1CountriesResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: CountriesResponse; }; -export type PutV2EmploymentsEmploymentIdBasicInformationResponse = - PutV2EmploymentsEmploymentIdBasicInformationResponses[keyof PutV2EmploymentsEmploymentIdBasicInformationResponses]; +export type GetV1CountriesResponse = + GetV1CountriesResponses[keyof GetV1CountriesResponses]; -export type GetV1LeavePoliciesSummaryEmploymentIdData = { +export type GetV1EmployeePayslipFilesData = { body?: never; - path: { + path?: never; + query?: { /** - * Employment ID + * Starts fetching records after the given page */ - employment_id: string; + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/leave-policies/summary/{employment_id}'; + url: '/v1/employee/payslip-files'; }; -export type GetV1LeavePoliciesSummaryEmploymentIdErrors = { +export type GetV1EmployeePayslipFilesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type GetV1LeavePoliciesSummaryEmploymentIdError = - GetV1LeavePoliciesSummaryEmploymentIdErrors[keyof GetV1LeavePoliciesSummaryEmploymentIdErrors]; +export type GetV1EmployeePayslipFilesError = + GetV1EmployeePayslipFilesErrors[keyof GetV1EmployeePayslipFilesErrors]; -export type GetV1LeavePoliciesSummaryEmploymentIdResponses = { +export type GetV1EmployeePayslipFilesResponses = { /** * Success */ - 200: ListLeavePoliciesSummaryResponse; + 200: ListPayslipFilesResponse; }; -export type GetV1LeavePoliciesSummaryEmploymentIdResponse = - GetV1LeavePoliciesSummaryEmploymentIdResponses[keyof GetV1LeavePoliciesSummaryEmploymentIdResponses]; +export type GetV1EmployeePayslipFilesResponse = + GetV1EmployeePayslipFilesResponses[keyof GetV1EmployeePayslipFilesResponses]; -export type PostV1TimeoffTimeoffIdCancelData = { - /** - * CancelTimeoff - */ - body: CancelTimeoffParams; +export type PostV1CompaniesCompanyIdCreateTokenData = { + body?: never; path: { /** - * Time Off ID + * The ID of the company */ - timeoff_id: string; + company_id: string; }; - query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel'; + query?: { + /** + * The scope of the token + */ + scope?: string; + }; + url: '/v1/companies/{company_id}/create-token'; }; -export type PostV1TimeoffTimeoffIdCancelErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1CompaniesCompanyIdCreateTokenErrors = { /** * Unauthorized */ @@ -21091,160 +20574,197 @@ export type PostV1TimeoffTimeoffIdCancelErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdCancelError = - PostV1TimeoffTimeoffIdCancelErrors[keyof PostV1TimeoffTimeoffIdCancelErrors]; +export type PostV1CompaniesCompanyIdCreateTokenError = + PostV1CompaniesCompanyIdCreateTokenErrors[keyof PostV1CompaniesCompanyIdCreateTokenErrors]; -export type PostV1TimeoffTimeoffIdCancelResponses = { +export type PostV1CompaniesCompanyIdCreateTokenResponses = { /** * Success */ - 200: TimeoffResponse; + 200: CompanyTokenResponse; }; -export type PostV1TimeoffTimeoffIdCancelResponse = - PostV1TimeoffTimeoffIdCancelResponses[keyof PostV1TimeoffTimeoffIdCancelResponses]; +export type PostV1CompaniesCompanyIdCreateTokenResponse = + PostV1CompaniesCompanyIdCreateTokenResponses[keyof PostV1CompaniesCompanyIdCreateTokenResponses]; -export type GetV1HelpCenterArticlesIdData = { +export type GetV1CompaniesCompanyIdLegalEntitiesData = { body?: never; path: { /** - * Help Center Article Zendesk ID + * Company ID */ - id: number; + company_id: UuidSlug; }; - query?: never; - url: '/v1/help-center-articles/{id}'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/companies/{company_id}/legal-entities'; }; -export type GetV1HelpCenterArticlesIdErrors = { +export type GetV1CompaniesCompanyIdLegalEntitiesErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; }; -export type GetV1HelpCenterArticlesIdError = - GetV1HelpCenterArticlesIdErrors[keyof GetV1HelpCenterArticlesIdErrors]; +export type GetV1CompaniesCompanyIdLegalEntitiesError = + GetV1CompaniesCompanyIdLegalEntitiesErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesErrors]; -export type GetV1HelpCenterArticlesIdResponses = { +export type GetV1CompaniesCompanyIdLegalEntitiesResponses = { /** * Success */ - 200: HelpCenterArticleResponse; + 200: ListCompanyLegalEntitiesResponse; }; -export type GetV1HelpCenterArticlesIdResponse = - GetV1HelpCenterArticlesIdResponses[keyof GetV1HelpCenterArticlesIdResponses]; +export type GetV1CompaniesCompanyIdLegalEntitiesResponse = + GetV1CompaniesCompanyIdLegalEntitiesResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesResponses]; -export type PostV1DocumentsData = { +export type PutV2EmploymentsEmploymentIdPersonalDetailsData = { /** - * File + * Employment personal details params */ - body: FileParams; - headers: { + body?: EmploymentPersonalDetailsParams; + path: { /** - * This endpoint works with any of the access tokens provided. You can use an access - * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; - query?: never; - url: '/v1/documents'; + query?: { + /** + * Version of the personal_details form schema + */ + personal_details_json_schema_version?: number | 'latest'; + }; + url: '/v2/employments/{employment_id}/personal_details'; }; -export type PostV1DocumentsErrors = { +export type PutV2EmploymentsEmploymentIdPersonalDetailsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1DocumentsError = - PostV1DocumentsErrors[keyof PostV1DocumentsErrors]; +export type PutV2EmploymentsEmploymentIdPersonalDetailsError = + PutV2EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV2EmploymentsEmploymentIdPersonalDetailsErrors]; -export type PostV1DocumentsResponses = { +export type PutV2EmploymentsEmploymentIdPersonalDetailsResponses = { /** * Success */ - 200: UploadFileResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1DocumentsResponse = - PostV1DocumentsResponses[keyof PostV1DocumentsResponses]; +export type PutV2EmploymentsEmploymentIdPersonalDetailsResponse = + PutV2EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV2EmploymentsEmploymentIdPersonalDetailsResponses]; -export type PostV1IdentityVerificationEmploymentIdVerifyData = { - body?: never; - path: { +export type PostV1ReadyData = { + /** + * Employment slug + */ + body?: CompleteOnboarding; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/identity-verification/{employment_id}/verify'; + url: '/v1/ready'; }; -export type PostV1IdentityVerificationEmploymentIdVerifyErrors = { +export type PostV1ReadyErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1IdentityVerificationEmploymentIdVerifyError = - PostV1IdentityVerificationEmploymentIdVerifyErrors[keyof PostV1IdentityVerificationEmploymentIdVerifyErrors]; +export type PostV1ReadyError = PostV1ReadyErrors[keyof PostV1ReadyErrors]; -export type PostV1IdentityVerificationEmploymentIdVerifyResponses = { +export type PostV1ReadyResponses = { /** * Success */ - 200: SuccessResponse; + 200: EmploymentResponse; }; -export type PostV1IdentityVerificationEmploymentIdVerifyResponse = - PostV1IdentityVerificationEmploymentIdVerifyResponses[keyof PostV1IdentityVerificationEmploymentIdVerifyResponses]; +export type PostV1ReadyResponse = + PostV1ReadyResponses[keyof PostV1ReadyResponses]; -export type GetV1CustomFieldsData = { +export type GetV1LeavePoliciesDetailsEmploymentIdData = { body?: never; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Number of items per page + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v1/custom-fields'; + query?: never; + url: '/v1/leave-policies/details/{employment_id}'; }; -export type GetV1CustomFieldsErrors = { +export type GetV1LeavePoliciesDetailsEmploymentIdErrors = { /** * Unauthorized */ @@ -21259,30 +20779,45 @@ export type GetV1CustomFieldsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1CustomFieldsError = - GetV1CustomFieldsErrors[keyof GetV1CustomFieldsErrors]; +export type GetV1LeavePoliciesDetailsEmploymentIdError = + GetV1LeavePoliciesDetailsEmploymentIdErrors[keyof GetV1LeavePoliciesDetailsEmploymentIdErrors]; -export type GetV1CustomFieldsResponses = { +export type GetV1LeavePoliciesDetailsEmploymentIdResponses = { /** * Success */ - 200: ListEmploymentCustomFieldsResponse; + 200: ListLeavePoliciesDetailsResponse; }; -export type GetV1CustomFieldsResponse = - GetV1CustomFieldsResponses[keyof GetV1CustomFieldsResponses]; +export type GetV1LeavePoliciesDetailsEmploymentIdResponse = + GetV1LeavePoliciesDetailsEmploymentIdResponses[keyof GetV1LeavePoliciesDetailsEmploymentIdResponses]; -export type PostV1CustomFieldsData = { - /** - * Custom Field Definition Create Parameters - */ - body: CreateCustomFieldDefinitionParams; +export type GetV1TimeoffTypesData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path?: never; - query?: never; - url: '/v1/custom-fields'; + query?: { + /** + * Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types). + */ + type?: TimeoffTypesEmploymentType; + }; + url: '/v1/timeoff/types'; }; -export type PostV1CustomFieldsErrors = { +export type GetV1TimeoffTypesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -21295,35 +20830,77 @@ export type PostV1CustomFieldsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1CustomFieldsError = - PostV1CustomFieldsErrors[keyof PostV1CustomFieldsErrors]; +export type GetV1TimeoffTypesError = + GetV1TimeoffTypesErrors[keyof GetV1TimeoffTypesErrors]; -export type PostV1CustomFieldsResponses = { +export type GetV1TimeoffTypesResponses = { /** * Success */ - 200: CreateEmploymentCustomFieldResponse; + 200: ListTimeoffTypesResponse; }; -export type PostV1CustomFieldsResponse = - PostV1CustomFieldsResponses[keyof PostV1CustomFieldsResponses]; +export type GetV1TimeoffTypesResponse = + GetV1TimeoffTypesResponses[keyof GetV1TimeoffTypesResponses]; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveData = +export type PostV1CostCalculatorEstimationCsvData = { + /** + * Estimate params + */ + body?: CostCalculatorEstimateParams; + path?: never; + query?: never; + url: '/v1/cost-calculator/estimation-csv'; +}; + +export type PostV1CostCalculatorEstimationCsvErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostV1CostCalculatorEstimationCsvError = + PostV1CostCalculatorEstimationCsvErrors[keyof PostV1CostCalculatorEstimationCsvErrors]; + +export type PostV1CostCalculatorEstimationCsvResponses = { + /** + * Success + */ + 200: CostCalculatorEstimateCsvResponse; +}; + +export type PostV1CostCalculatorEstimationCsvResponse = + PostV1CostCalculatorEstimationCsvResponses[keyof PostV1CostCalculatorEstimationCsvResponses]; + +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollData = { body?: never; path: { /** - * Employment ID + * Company ID */ - employment_id: string; + company_id: string; + /** + * Legal Entity ID to activate Global Payroll on + */ + legal_entity_id: string; }; query?: never; - url: '/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve'; + url: '/v1/sandbox/companies/{company_id}/legal-entities/{legal_entity_id}/activate-global-payroll'; }; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors = +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollErrors = { /** * Bad Request @@ -21347,44 +20924,45 @@ export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprov 429: TooManyRequestsResponse; }; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveError = - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveErrors]; +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollError = + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollErrors[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollErrors]; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses = +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponses = { /** * Success */ - 200: RiskReserveProofOfPaymentResponse; + 200: SuccessResponse; }; -export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponse = - PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses[keyof PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveResponses]; +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponse = + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponses[keyof PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollResponses]; -export type PostV1WebhookCallbacksData = { - /** - * WebhookCallback - */ - body?: CreateWebhookCallbackParams; - headers: { +export type GetV1EmployeePersonalDetailsData = { + body?: never; + path?: never; + query?: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Version of the personal_details form schema */ - Authorization: string; + personal_details_json_schema_version?: number | 'latest'; }; - path?: never; - query?: never; - url: '/v1/webhook-callbacks'; + url: '/v1/employee/personal-details'; }; -export type PostV1WebhookCallbacksErrors = { +export type GetV1EmployeePersonalDetailsErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -21392,73 +20970,38 @@ export type PostV1WebhookCallbacksErrors = { /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PostV1WebhookCallbacksError = - PostV1WebhookCallbacksErrors[keyof PostV1WebhookCallbacksErrors]; +export type GetV1EmployeePersonalDetailsError = + GetV1EmployeePersonalDetailsErrors[keyof GetV1EmployeePersonalDetailsErrors]; -export type PostV1WebhookCallbacksResponses = { +export type GetV1EmployeePersonalDetailsResponses = { /** * Success */ - 200: WebhookCallbackResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1WebhookCallbacksResponse = - PostV1WebhookCallbacksResponses[keyof PostV1WebhookCallbacksResponses]; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-document-requirements'; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsError = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsErrors]; +export type GetV1EmployeePersonalDetailsResponse = + GetV1EmployeePersonalDetailsResponses[keyof GetV1EmployeePersonalDetailsResponses]; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses = - { +export type PutV1EmployeePersonalDetailsData = { + /** + * Employee personal details params + */ + body?: EmploymentPersonalDetailsParams; + path?: never; + query?: { /** - * Success + * Version of the personal_details form schema */ - 200: IndexPreOnboardingDocumentRequirementsResponse; + personal_details_json_schema_version?: number | 'latest'; }; - -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponse = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentRequirementsResponses]; - -export type GetV1SsoConfigurationDetailsData = { - body?: never; - path?: never; - query?: never; - url: '/v1/sso-configuration/details'; + url: '/v1/employee/personal-details'; }; -export type GetV1SsoConfigurationDetailsErrors = { +export type PutV1EmployeePersonalDetailsErrors = { /** * Bad Request */ @@ -21467,203 +21010,144 @@ export type GetV1SsoConfigurationDetailsErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetV1SsoConfigurationDetailsError = - GetV1SsoConfigurationDetailsErrors[keyof GetV1SsoConfigurationDetailsErrors]; +export type PutV1EmployeePersonalDetailsError = + PutV1EmployeePersonalDetailsErrors[keyof PutV1EmployeePersonalDetailsErrors]; -export type GetV1SsoConfigurationDetailsResponses = { +export type PutV1EmployeePersonalDetailsResponses = { /** * Success */ - 200: SsoConfigurationDetailsResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type GetV1SsoConfigurationDetailsResponse = - GetV1SsoConfigurationDetailsResponses[keyof GetV1SsoConfigurationDetailsResponses]; +export type PutV1EmployeePersonalDetailsResponse = + PutV1EmployeePersonalDetailsResponses[keyof PutV1EmployeePersonalDetailsResponses]; -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData = - { +export type GetV1ScimV2GroupsData = { + body?: never; + path?: never; + query?: { /** - * SignContractDocument + * 1-based index of the first result */ - body: SignContractDocument; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Document ID - */ - contract_document_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors = - { + startIndex?: number; /** - * Bad Request + * Maximum number of results per page */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignError = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors]; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses = - { - /** - * Success - */ - 200: SuccessResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponse = - PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses]; - -export type GetV1PayItemsData = { - body?: never; - path?: never; - query?: { - /** - * Filter by employment slug - */ - employment_slug?: UuidSlug; - /** - * Filter pay items with effective_date >= given date (YYYY-MM-DD) - */ - effective_from?: Date; - /** - * Filter pay items with effective_date <= given date (YYYY-MM-DD) - */ - effective_to?: Date; - /** - * Starts fetching records after the given page - */ - page?: number; + count?: number; /** - * Number of items per page + * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) */ - page_size?: number; + filter?: string; }; - url: '/v1/pay-items'; + url: '/v1/scim/v2/Groups'; }; -export type GetV1PayItemsErrors = { +export type GetV1ScimV2GroupsErrors = { + /** + * Bad Request + */ + 400: IntegrationsScimErrorResponse; /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; /** * Forbidden */ - 403: ForbiddenResponse; + 403: IntegrationsScimErrorResponse; /** * Not Found */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; + 404: IntegrationsScimErrorResponse; }; -export type GetV1PayItemsError = GetV1PayItemsErrors[keyof GetV1PayItemsErrors]; +export type GetV1ScimV2GroupsError = + GetV1ScimV2GroupsErrors[keyof GetV1ScimV2GroupsErrors]; -export type GetV1PayItemsResponses = { +export type GetV1ScimV2GroupsResponses = { /** * Success */ - 200: ListPayItemsResponse; + 200: IntegrationsScimGroupListResponse; }; -export type GetV1PayItemsResponse = - GetV1PayItemsResponses[keyof GetV1PayItemsResponses]; +export type GetV1ScimV2GroupsResponse = + GetV1ScimV2GroupsResponses[keyof GetV1ScimV2GroupsResponses]; -export type GetV1ScimV2UsersData = { - body?: never; - path?: never; - query?: { - /** - * 1-based index of the first result - */ - startIndex?: number; - /** - * Maximum number of results per page - */ - count?: number; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsData = { + /** + * CreateContractDocumentParams + */ + body: CreateContractDocument; + path: { /** - * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + * Employment ID */ - filter?: string; + employment_id: string; }; - url: '/v1/scim/v2/Users'; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contract-documents'; }; -export type GetV1ScimV2UsersErrors = { - /** - * Bad Request - */ - 400: IntegrationsScimErrorResponse; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors = { /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; - /** - * Forbidden - */ - 403: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** * Not Found */ - 404: IntegrationsScimErrorResponse; -}; - -export type GetV1ScimV2UsersError = - GetV1ScimV2UsersErrors[keyof GetV1ScimV2UsersErrors]; - -export type GetV1ScimV2UsersResponses = { + 404: NotFoundResponse; /** - * Success + * Unprocessable Entity */ - 200: IntegrationsScimUserListResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1ScimV2UsersResponse = - GetV1ScimV2UsersResponses[keyof GetV1ScimV2UsersResponses]; +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsError = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsErrors]; -export type GetV1ResignationsOffboardingRequestIdData = { - body?: never; - path: { +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses = + { /** - * Offboarding request ID + * Success */ - offboarding_request_id: string; + 200: CreateContractDocumentResponse; }; - query?: never; - url: '/v1/resignations/{offboarding_request_id}'; -}; -export type GetV1ResignationsOffboardingRequestIdErrors = { +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponse = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsResponses]; + +export type PostV1SandboxWebhookCallbacksTriggerData = { /** - * Bad Request + * Webhook Trigger Params */ - 400: BadRequestResponse; + body?: WebhookTriggerParams; + path?: never; + query?: never; + url: '/v1/sandbox/webhook-callbacks/trigger'; +}; + +export type PostV1SandboxWebhookCallbacksTriggerErrors = { /** * Unauthorized */ @@ -21676,43 +21160,43 @@ export type GetV1ResignationsOffboardingRequestIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1ResignationsOffboardingRequestIdError = - GetV1ResignationsOffboardingRequestIdErrors[keyof GetV1ResignationsOffboardingRequestIdErrors]; +export type PostV1SandboxWebhookCallbacksTriggerError = + PostV1SandboxWebhookCallbacksTriggerErrors[keyof PostV1SandboxWebhookCallbacksTriggerErrors]; -export type GetV1ResignationsOffboardingRequestIdResponses = { +export type PostV1SandboxWebhookCallbacksTriggerResponses = { /** * Success */ - 200: ResignationResponse; + 200: SuccessResponse; }; -export type GetV1ResignationsOffboardingRequestIdResponse = - GetV1ResignationsOffboardingRequestIdResponses[keyof GetV1ResignationsOffboardingRequestIdResponses]; +export type PostV1SandboxWebhookCallbacksTriggerResponse = + PostV1SandboxWebhookCallbacksTriggerResponses[keyof PostV1SandboxWebhookCallbacksTriggerResponses]; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownData = { +export type GetV1PayslipsPayslipIdPdfData = { body?: never; - path: { + headers: { /** - * The billing document's ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - billing_document_id: string; + Authorization: string; }; - query?: { + path: { /** - * Filters the results by the type of the billing breakdown item. + * Payslip ID */ - type?: string; + payslip_id: string; }; - url: '/v1/billing-documents/{billing_document_id}/breakdown'; + query?: never; + url: '/v1/payslips/{payslip_id}/pdf'; }; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownErrors = { +export type GetV1PayslipsPayslipIdPdfErrors = { /** * Bad Request */ @@ -21730,96 +21214,88 @@ export type GetV1BillingDocumentsBillingDocumentIdBreakdownErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownError = - GetV1BillingDocumentsBillingDocumentIdBreakdownErrors[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownErrors]; +export type GetV1PayslipsPayslipIdPdfError = + GetV1PayslipsPayslipIdPdfErrors[keyof GetV1PayslipsPayslipIdPdfErrors]; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponses = { +export type GetV1PayslipsPayslipIdPdfResponses = { /** * Success */ - 200: BillingDocumentBreakdownResponse; + 200: PayslipDownloadResponse; }; -export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponse = - GetV1BillingDocumentsBillingDocumentIdBreakdownResponses[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownResponses]; +export type GetV1PayslipsPayslipIdPdfResponse = + GetV1PayslipsPayslipIdPdfResponses[keyof GetV1PayslipsPayslipIdPdfResponses]; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineData = { +export type PostV1CurrencyConverterEffectiveData = { /** - * Timeoff + * Convert currency parameters */ - body: DeclineTimeoffParams; - path: { - /** - * Time Off ID - */ - timeoff_id: string; - }; + body: ConvertCurrencyParams; + path?: never; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel-request/decline'; + url: '/v1/currency-converter/effective'; }; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineErrors = { +export type PostV1CurrencyConverterEffectiveErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineError = - PostV1TimeoffTimeoffIdCancelRequestDeclineErrors[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineErrors]; +export type PostV1CurrencyConverterEffectiveError = + PostV1CurrencyConverterEffectiveErrors[keyof PostV1CurrencyConverterEffectiveErrors]; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponses = { +export type PostV1CurrencyConverterEffectiveResponses = { /** * Success */ - 200: SuccessResponse; + 200: ConvertCurrencyResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestDeclineResponse = - PostV1TimeoffTimeoffIdCancelRequestDeclineResponses[keyof PostV1TimeoffTimeoffIdCancelRequestDeclineResponses]; +export type PostV1CurrencyConverterEffectiveResponse = + PostV1CurrencyConverterEffectiveResponses[keyof PostV1CurrencyConverterEffectiveResponses]; -export type GetV1PayrollCalendarsData = { +export type GetV1TimeoffIdData = { body?: never; - path?: never; - query?: { + headers: { /** - * Filter payroll calendars by country code + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - country_code?: string; - /** - * Filter payroll calendars by year - */ - year?: string; - /** - * Starts fetching records after the given page - */ - page?: number; + Authorization: string; + }; + path: { /** - * Number of items per page + * Timeoff ID */ - page_size?: number; + id: string; }; - url: '/v1/payroll-calendars'; + query?: never; + url: '/v1/timeoff/{id}'; }; -export type GetV1PayrollCalendarsErrors = { +export type GetV1TimeoffIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -21832,52 +21308,50 @@ export type GetV1PayrollCalendarsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1PayrollCalendarsError = - GetV1PayrollCalendarsErrors[keyof GetV1PayrollCalendarsErrors]; +export type GetV1TimeoffIdError = + GetV1TimeoffIdErrors[keyof GetV1TimeoffIdErrors]; -export type GetV1PayrollCalendarsResponses = { +export type GetV1TimeoffIdResponses = { /** * Success */ - 200: PayrollCalendarsEorResponse; + 200: TimeoffResponse; }; -export type GetV1PayrollCalendarsResponse = - GetV1PayrollCalendarsResponses[keyof GetV1PayrollCalendarsResponses]; +export type GetV1TimeoffIdResponse = + GetV1TimeoffIdResponses[keyof GetV1TimeoffIdResponses]; -export type GetV1WdGphPayDetailData = { - body?: never; - headers?: { +export type PatchV1TimeoffId2Data = { + /** + * UpdateTimeoff + */ + body: UpdateApprovedTimeoffParams; + headers: { /** - * The preferred language of the inquiring user in Workday + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - accept_language?: string; + Authorization: string; }; - path?: never; - query: { - /** - * The pay group ID for identifying the pay group at the vendor system - */ - payGroupExternalId: string; - /** - * The run type id provided in the paySummary API - */ - runTypeId: string; - /** - * The cycle type id, defaults to the main run if not provided - */ - cycleTypeId?: string; + path: { /** - * The period end date in question, defaults to current period if not provided + * Timeoff ID */ - periodEndDate?: Date; + id: string; }; - url: '/v1/wd/gph/payDetail'; + query?: never; + url: '/v1/timeoff/{id}'; }; -export type GetV1WdGphPayDetailErrors = { +export type PatchV1TimeoffId2Errors = { /** * Bad Request */ @@ -21890,23 +21364,34 @@ export type GetV1WdGphPayDetailErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1WdGphPayDetailError = - GetV1WdGphPayDetailErrors[keyof GetV1WdGphPayDetailErrors]; +export type PatchV1TimeoffId2Error = + PatchV1TimeoffId2Errors[keyof PatchV1TimeoffId2Errors]; -export type GetV1WdGphPayDetailResponses = { +export type PatchV1TimeoffId2Responses = { /** * Success */ - 200: PayDetailResponse; + 200: TimeoffResponse; }; -export type GetV1WdGphPayDetailResponse = - GetV1WdGphPayDetailResponses[keyof GetV1WdGphPayDetailResponses]; +export type PatchV1TimeoffId2Response = + PatchV1TimeoffId2Responses[keyof PatchV1TimeoffId2Responses]; -export type GetV1ContractAmendmentsSchemaData = { - body?: never; +export type PatchV1TimeoffIdData = { + /** + * UpdateTimeoff + */ + body: UpdateApprovedTimeoffParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -21916,29 +21401,21 @@ export type GetV1ContractAmendmentsSchemaData = { */ Authorization: string; }; - path?: never; - query: { - /** - * The ID of the employment concerned by the contract amendment request. - */ - employment_id: string; - /** - * Country code according to ISO 3-digit alphabetic codes. - */ - country_code: string; - /** - * Name of the desired form - */ - form?: 'contract_amendment'; + path: { /** - * Version of the form schema + * Timeoff ID */ - json_schema_version?: number | 'latest'; + id: string; }; - url: '/v1/contract-amendments/schema'; + query?: never; + url: '/v1/timeoff/{id}'; }; -export type GetV1ContractAmendmentsSchemaErrors = { +export type PatchV1TimeoffIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -21951,56 +21428,45 @@ export type GetV1ContractAmendmentsSchemaErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; -}; - -export type GetV1ContractAmendmentsSchemaError = - GetV1ContractAmendmentsSchemaErrors[keyof GetV1ContractAmendmentsSchemaErrors]; - -export type GetV1ContractAmendmentsSchemaResponses = { /** - * Success + * Unprocessable Entity */ - 200: ContractAmendmentFormResponse; + 429: TooManyRequestsResponse; }; -export type GetV1ContractAmendmentsSchemaResponse = - GetV1ContractAmendmentsSchemaResponses[keyof GetV1ContractAmendmentsSchemaResponses]; - -export type GetV1TestSchemaData = { - body?: never; - path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/test-schema'; -}; +export type PatchV1TimeoffIdError = + PatchV1TimeoffIdErrors[keyof PatchV1TimeoffIdErrors]; -export type GetV1TestSchemaResponses = { +export type PatchV1TimeoffIdResponses = { /** * Success */ - 200: CompanyFormResponse; + 200: TimeoffResponse; }; -export type GetV1TestSchemaResponse = - GetV1TestSchemaResponses[keyof GetV1TestSchemaResponses]; +export type PatchV1TimeoffIdResponse = + PatchV1TimeoffIdResponses[keyof PatchV1TimeoffIdResponses]; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadData = { - body?: never; +export type PostV1TimeoffTimeoffIdDeclineData = { + /** + * DeclineTimeoff + */ + body: DeclineTimeoffParams; path: { /** - * Employment ID + * Time Off ID */ - employment_id: string; + timeoff_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/employment-agreement/download'; + url: '/v1/timeoff/{timeoff_id}/decline'; }; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors = { +export type PostV1TimeoffTimeoffIdDeclineErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -22013,41 +21479,50 @@ export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadError = - GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadErrors]; +export type PostV1TimeoffTimeoffIdDeclineError = + PostV1TimeoffTimeoffIdDeclineErrors[keyof PostV1TimeoffTimeoffIdDeclineErrors]; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses = { +export type PostV1TimeoffTimeoffIdDeclineResponses = { /** * Success */ - 200: GenericFile; + 200: TimeoffResponse; }; -export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse = - GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponses]; +export type PostV1TimeoffTimeoffIdDeclineResponse = + PostV1TimeoffTimeoffIdDeclineResponses[keyof PostV1TimeoffTimeoffIdDeclineResponses]; -export type PatchV1EmployeeTimeoffId2Data = { +export type PostV1ContractAmendmentsAutomatableData = { /** - * UpdateTimeoff + * Contract Amendment */ - body: UpdateEmployeeTimeoffParams; - path: { + body?: CreateContractAmendmentParams; + headers: { /** - * Timeoff ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - id: string; + Authorization: string; }; - query?: never; - url: '/v1/employee/timeoff/{id}'; + path?: never; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/contract-amendments/automatable'; }; -export type PatchV1EmployeeTimeoffId2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1ContractAmendmentsAutomatableErrors = { /** * Unauthorized */ @@ -22060,41 +21535,37 @@ export type PatchV1EmployeeTimeoffId2Errors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchV1EmployeeTimeoffId2Error = - PatchV1EmployeeTimeoffId2Errors[keyof PatchV1EmployeeTimeoffId2Errors]; +export type PostV1ContractAmendmentsAutomatableError = + PostV1ContractAmendmentsAutomatableErrors[keyof PostV1ContractAmendmentsAutomatableErrors]; -export type PatchV1EmployeeTimeoffId2Responses = { +export type PostV1ContractAmendmentsAutomatableResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ContractAmendmentAutomatableResponse; }; -export type PatchV1EmployeeTimeoffId2Response = - PatchV1EmployeeTimeoffId2Responses[keyof PatchV1EmployeeTimeoffId2Responses]; +export type PostV1ContractAmendmentsAutomatableResponse = + PostV1ContractAmendmentsAutomatableResponses[keyof PostV1ContractAmendmentsAutomatableResponses]; -export type PatchV1EmployeeTimeoffIdData = { +export type PostV1TimeoffTimeoffIdApproveData = { /** - * UpdateTimeoff + * ApproveTimeoff */ - body: UpdateEmployeeTimeoffParams; + body: ApproveTimeoffParams; path: { /** - * Timeoff ID + * Time Off ID */ - id: string; + timeoff_id: string; }; query?: never; - url: '/v1/employee/timeoff/{id}'; + url: '/v1/timeoff/{timeoff_id}/approve'; }; -export type PatchV1EmployeeTimeoffIdErrors = { +export type PostV1TimeoffTimeoffIdApproveErrors = { /** * Bad Request */ @@ -22117,93 +21588,49 @@ export type PatchV1EmployeeTimeoffIdErrors = { 429: TooManyRequestsResponse; }; -export type PatchV1EmployeeTimeoffIdError = - PatchV1EmployeeTimeoffIdErrors[keyof PatchV1EmployeeTimeoffIdErrors]; +export type PostV1TimeoffTimeoffIdApproveError = + PostV1TimeoffTimeoffIdApproveErrors[keyof PostV1TimeoffTimeoffIdApproveErrors]; -export type PatchV1EmployeeTimeoffIdResponses = { +export type PostV1TimeoffTimeoffIdApproveResponses = { /** * Success */ 200: TimeoffResponse; }; -export type PatchV1EmployeeTimeoffIdResponse = - PatchV1EmployeeTimeoffIdResponses[keyof PatchV1EmployeeTimeoffIdResponses]; +export type PostV1TimeoffTimeoffIdApproveResponse = + PostV1TimeoffTimeoffIdApproveResponses[keyof PostV1TimeoffTimeoffIdApproveResponses]; -export type GetV1ScimV2GroupsIdData = { +export type GetV1EmploymentsEmploymentIdFilesData = { body?: never; path: { /** - * Group ID (slug) + * Employment ID */ - id: string; + employment_id: string; }; - query?: never; - url: '/v1/scim/v2/Groups/{id}'; -}; - -export type GetV1ScimV2GroupsIdErrors = { - /** - * Unauthorized - */ - 401: IntegrationsScimErrorResponse; - /** - * Forbidden - */ - 403: IntegrationsScimErrorResponse; - /** - * Not Found - */ - 404: IntegrationsScimErrorResponse; -}; - -export type GetV1ScimV2GroupsIdError = - GetV1ScimV2GroupsIdErrors[keyof GetV1ScimV2GroupsIdErrors]; - -export type GetV1ScimV2GroupsIdResponses = { - /** - * Success - */ - 200: IntegrationsScimGroup; -}; - -export type GetV1ScimV2GroupsIdResponse = - GetV1ScimV2GroupsIdResponses[keyof GetV1ScimV2GroupsIdResponses]; - -export type GetV1CountriesCountryCodeLegalEntityFormsFormData = { - body?: never; - path: { - /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; + query?: { /** - * Name of the desired form + * Filter by file type (optional) */ - form: string; - }; - query?: { + type?: string; /** - * Product type. Default value is global_payroll. + * Filter by file sub_type (optional) */ - product_type?: 'peo' | 'global_payroll' | 'e2e_payroll'; + sub_type?: string; /** - * Legal entity id for admistrative_details of e2e payroll products in GBR + * Starts fetching records after the given page */ - legal_entity_id?: UuidSlug; + page?: number; /** - * Version of the form schema + * Number of items per page */ - json_schema_version?: number | 'latest'; + page_size?: number; }; - url: '/v1/countries/{country_code}/legal_entity_forms/{form}'; + url: '/v1/employments/{employment_id}/files'; }; -export type GetV1CountriesCountryCodeLegalEntityFormsFormErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdFilesErrors = { /** * Unauthorized */ @@ -22216,55 +21643,42 @@ export type GetV1CountriesCountryCodeLegalEntityFormsFormErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1CountriesCountryCodeLegalEntityFormsFormError = - GetV1CountriesCountryCodeLegalEntityFormsFormErrors[keyof GetV1CountriesCountryCodeLegalEntityFormsFormErrors]; +export type GetV1EmploymentsEmploymentIdFilesError = + GetV1EmploymentsEmploymentIdFilesErrors[keyof GetV1EmploymentsEmploymentIdFilesErrors]; -export type GetV1CountriesCountryCodeLegalEntityFormsFormResponses = { +export type GetV1EmploymentsEmploymentIdFilesResponses = { /** * Success */ - 200: CountryFormResponse; + 200: ListFilesResponse; }; -export type GetV1CountriesCountryCodeLegalEntityFormsFormResponse = - GetV1CountriesCountryCodeLegalEntityFormsFormResponses[keyof GetV1CountriesCountryCodeLegalEntityFormsFormResponses]; +export type GetV1EmploymentsEmploymentIdFilesResponse = + GetV1EmploymentsEmploymentIdFilesResponses[keyof GetV1EmploymentsEmploymentIdFilesResponses]; -export type GetV1EmploymentContractsEmploymentIdPendingChangesData = { +export type GetV1CustomFieldsData = { body?: never; - headers: { + path?: never; + query?: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Starts fetching records after the given page */ - Authorization: string; - }; - path: { + page?: number; /** - * Employment ID + * Number of items per page */ - employment_id: string; + page_size?: number; }; - query?: never; - url: '/v1/employment-contracts/{employment_id}/pending-changes'; + url: '/v1/custom-fields'; }; -export type GetV1EmploymentContractsEmploymentIdPendingChangesErrors = { +export type GetV1CustomFieldsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -22275,36 +21689,30 @@ export type GetV1EmploymentContractsEmploymentIdPendingChangesErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1EmploymentContractsEmploymentIdPendingChangesError = - GetV1EmploymentContractsEmploymentIdPendingChangesErrors[keyof GetV1EmploymentContractsEmploymentIdPendingChangesErrors]; +export type GetV1CustomFieldsError = + GetV1CustomFieldsErrors[keyof GetV1CustomFieldsErrors]; -export type GetV1EmploymentContractsEmploymentIdPendingChangesResponses = { +export type GetV1CustomFieldsResponses = { /** * Success */ - 200: EmploymentContractPendingChangesResponse; + 200: ListEmploymentCustomFieldsResponse; }; -export type GetV1EmploymentContractsEmploymentIdPendingChangesResponse = - GetV1EmploymentContractsEmploymentIdPendingChangesResponses[keyof GetV1EmploymentContractsEmploymentIdPendingChangesResponses]; +export type GetV1CustomFieldsResponse = + GetV1CustomFieldsResponses[keyof GetV1CustomFieldsResponses]; -export type GetV2OffboardingsIdData = { - body?: never; - path: { - /** - * Offboarding ID - */ - id: string; - }; +export type PostV1CustomFieldsData = { + /** + * Custom Field Definition Create Parameters + */ + body: CreateCustomFieldDefinitionParams; + path?: never; query?: never; - url: '/v2/offboardings/{id}'; + url: '/v1/custom-fields'; }; -export type GetV2OffboardingsIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1CustomFieldsErrors = { /** * Unauthorized */ @@ -22317,98 +21725,53 @@ export type GetV2OffboardingsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV2OffboardingsIdError = - GetV2OffboardingsIdErrors[keyof GetV2OffboardingsIdErrors]; +export type PostV1CustomFieldsError = + PostV1CustomFieldsErrors[keyof PostV1CustomFieldsErrors]; -export type GetV2OffboardingsIdResponses = { +export type PostV1CustomFieldsResponses = { /** * Success */ - 200: V2OffboardingResponse; -}; - -export type GetV2OffboardingsIdResponse = - GetV2OffboardingsIdResponses[keyof GetV2OffboardingsIdResponses]; - -export type PostV1SdkTelemetryErrorsData = { - /** - * SDK Error Report - */ - body: SdkErrorPayload; - path?: never; - query?: never; - url: '/v1/sdk/telemetry-errors'; -}; - -export type PostV1SdkTelemetryErrorsErrors = { - /** - * Bad Request - */ - 400: ErrorResponse; - /** - * Too Many Requests - */ - 429: RateLimitResponse; + 200: CreateEmploymentCustomFieldResponse; }; -export type PostV1SdkTelemetryErrorsError = - PostV1SdkTelemetryErrorsErrors[keyof PostV1SdkTelemetryErrorsErrors]; - -export type PostV1SdkTelemetryErrorsResponses = { - /** - * No Content - */ - 204: unknown; -}; +export type PostV1CustomFieldsResponse = + PostV1CustomFieldsResponses[keyof PostV1CustomFieldsResponses]; -export type GetV1CompaniesCompanyIdComplianceProfileData = { +export type GetV1CompanyCurrenciesData = { body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - }; + path?: never; query?: never; - url: '/v1/companies/{company_id}/compliance-profile'; + url: '/v1/company-currencies'; }; -export type GetV1CompaniesCompanyIdComplianceProfileErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; +export type GetV1CompanyCurrenciesErrors = { /** * Not Found */ 404: NotFoundResponse; }; -export type GetV1CompaniesCompanyIdComplianceProfileError = - GetV1CompaniesCompanyIdComplianceProfileErrors[keyof GetV1CompaniesCompanyIdComplianceProfileErrors]; +export type GetV1CompanyCurrenciesError = + GetV1CompanyCurrenciesErrors[keyof GetV1CompanyCurrenciesErrors]; -export type GetV1CompaniesCompanyIdComplianceProfileResponses = { +export type GetV1CompanyCurrenciesResponses = { /** * Success */ - 200: CompanyComplianceProfileResponse; + 200: CompanyCurrenciesResponse; }; -export type GetV1CompaniesCompanyIdComplianceProfileResponse = - GetV1CompaniesCompanyIdComplianceProfileResponses[keyof GetV1CompaniesCompanyIdComplianceProfileResponses]; +export type GetV1CompanyCurrenciesResponse = + GetV1CompanyCurrenciesResponses[keyof GetV1CompanyCurrenciesResponses]; -export type GetV1PayslipsIdData = { - body?: never; +export type PatchV1SandboxEmploymentsEmploymentId2Data = { + /** + * Employment params + */ + body?: EmploymentUpdateParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -22420,15 +21783,15 @@ export type GetV1PayslipsIdData = { }; path: { /** - * Payslip ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/payslips/{id}'; + url: '/v1/sandbox/employments/{employment_id}'; }; -export type GetV1PayslipsIdErrors = { +export type PatchV1SandboxEmploymentsEmploymentId2Errors = { /** * Bad Request */ @@ -22441,6 +21804,10 @@ export type GetV1PayslipsIdErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -22451,108 +21818,113 @@ export type GetV1PayslipsIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1PayslipsIdError = - GetV1PayslipsIdErrors[keyof GetV1PayslipsIdErrors]; +export type PatchV1SandboxEmploymentsEmploymentId2Error = + PatchV1SandboxEmploymentsEmploymentId2Errors[keyof PatchV1SandboxEmploymentsEmploymentId2Errors]; -export type GetV1PayslipsIdResponses = { +export type PatchV1SandboxEmploymentsEmploymentId2Responses = { /** * Success */ - 200: PayslipResponse; + 200: EmploymentResponse; }; -export type GetV1PayslipsIdResponse = - GetV1PayslipsIdResponses[keyof GetV1PayslipsIdResponses]; +export type PatchV1SandboxEmploymentsEmploymentId2Response = + PatchV1SandboxEmploymentsEmploymentId2Responses[keyof PatchV1SandboxEmploymentsEmploymentId2Responses]; -export type PostV1TimeoffTimeoffIdCancelRequestApproveData = { - body?: never; +export type PatchV1SandboxEmploymentsEmploymentIdData = { + /** + * Employment params + */ + body?: EmploymentUpdateParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Time Off ID + * Employment ID */ - timeoff_id: string; + employment_id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel-request/approve'; + url: '/v1/sandbox/employments/{employment_id}'; }; -export type PostV1TimeoffTimeoffIdCancelRequestApproveErrors = { +export type PatchV1SandboxEmploymentsEmploymentIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestApproveError = - PostV1TimeoffTimeoffIdCancelRequestApproveErrors[keyof PostV1TimeoffTimeoffIdCancelRequestApproveErrors]; +export type PatchV1SandboxEmploymentsEmploymentIdError = + PatchV1SandboxEmploymentsEmploymentIdErrors[keyof PatchV1SandboxEmploymentsEmploymentIdErrors]; -export type PostV1TimeoffTimeoffIdCancelRequestApproveResponses = { +export type PatchV1SandboxEmploymentsEmploymentIdResponses = { /** * Success */ - 200: SuccessResponse; + 200: EmploymentResponse; }; -export type PostV1TimeoffTimeoffIdCancelRequestApproveResponse = - PostV1TimeoffTimeoffIdCancelRequestApproveResponses[keyof PostV1TimeoffTimeoffIdCancelRequestApproveResponses]; +export type PatchV1SandboxEmploymentsEmploymentIdResponse = + PatchV1SandboxEmploymentsEmploymentIdResponses[keyof PatchV1SandboxEmploymentsEmploymentIdResponses]; -export type GetV1WebhookEventsData = { +export type GetV1EmploymentContractsEmploymentIdPendingChangesData = { body?: never; - path?: never; - query?: { - /** - * Filter by webhook event type - */ - event_type?: string; - /** - * Filter by delivery status (true = 200, false = 4xx/5xx) - */ - successfully_delivered?: boolean; - /** - * Filter by company ID - */ - company_id?: string; - /** - * Filter by date before (ISO 8601 format) - */ - before?: string; - /** - * Filter by date after (ISO 8601 format) - */ - after?: string; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - /** - * Field to sort by - */ - sort_by?: 'first_triggered_at'; + headers: { /** - * Starts fetching records after the given page + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - page?: number; + Authorization: string; + }; + path: { /** - * Number of items per page + * Employment ID */ - page_size?: number; + employment_id: string; }; - url: '/v1/webhook-events'; + query?: never; + url: '/v1/employment-contracts/{employment_id}/pending-changes'; }; -export type GetV1WebhookEventsErrors = { +export type GetV1EmploymentContractsEmploymentIdPendingChangesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -22563,41 +21935,32 @@ export type GetV1WebhookEventsErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1WebhookEventsError = - GetV1WebhookEventsErrors[keyof GetV1WebhookEventsErrors]; +export type GetV1EmploymentContractsEmploymentIdPendingChangesError = + GetV1EmploymentContractsEmploymentIdPendingChangesErrors[keyof GetV1EmploymentContractsEmploymentIdPendingChangesErrors]; -export type GetV1WebhookEventsResponses = { +export type GetV1EmploymentContractsEmploymentIdPendingChangesResponses = { /** * Success */ - 200: ListWebhookEventsResponse; + 200: EmploymentContractPendingChangesResponse; }; -export type GetV1WebhookEventsResponse = - GetV1WebhookEventsResponses[keyof GetV1WebhookEventsResponses]; +export type GetV1EmploymentContractsEmploymentIdPendingChangesResponse = + GetV1EmploymentContractsEmploymentIdPendingChangesResponses[keyof GetV1EmploymentContractsEmploymentIdPendingChangesResponses]; -export type GetV1TimeoffTypesData = { +export type GetV1ResignationsOffboardingRequestIdData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: { + path: { /** - * Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types). + * Offboarding request ID */ - type?: TimeoffTypesEmploymentType; + offboarding_request_id: string; }; - url: '/v1/timeoff/types'; + query?: never; + url: '/v1/resignations/{offboarding_request_id}'; }; -export type GetV1TimeoffTypesErrors = { +export type GetV1ResignationsOffboardingRequestIdErrors = { /** * Bad Request */ @@ -22620,41 +21983,38 @@ export type GetV1TimeoffTypesErrors = { 429: TooManyRequestsResponse; }; -export type GetV1TimeoffTypesError = - GetV1TimeoffTypesErrors[keyof GetV1TimeoffTypesErrors]; +export type GetV1ResignationsOffboardingRequestIdError = + GetV1ResignationsOffboardingRequestIdErrors[keyof GetV1ResignationsOffboardingRequestIdErrors]; -export type GetV1TimeoffTypesResponses = { +export type GetV1ResignationsOffboardingRequestIdResponses = { /** * Success */ - 200: ListTimeoffTypesResponse; + 200: ResignationResponse; }; -export type GetV1TimeoffTypesResponse = - GetV1TimeoffTypesResponses[keyof GetV1TimeoffTypesResponses]; +export type GetV1ResignationsOffboardingRequestIdResponse = + GetV1ResignationsOffboardingRequestIdResponses[keyof GetV1ResignationsOffboardingRequestIdResponses]; -export type GetV1CompaniesCompanyIdLegalEntitiesData = { - body?: never; - path: { - /** - * Company ID - */ - company_id: UuidSlug; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; +export type PostV1DocumentsData = { + /** + * File + */ + body: FileParams; + headers: { /** - * Number of items per page + * This endpoint works with any of the access tokens provided. You can use an access + * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. + * */ - page_size?: number; + Authorization: string; }; - url: '/v1/companies/{company_id}/legal-entities'; + path?: never; + query?: never; + url: '/v1/documents'; }; -export type GetV1CompaniesCompanyIdLegalEntitiesErrors = { +export type PostV1DocumentsErrors = { /** * Unauthorized */ @@ -22663,26 +22023,36 @@ export type GetV1CompaniesCompanyIdLegalEntitiesErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1CompaniesCompanyIdLegalEntitiesError = - GetV1CompaniesCompanyIdLegalEntitiesErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesErrors]; +export type PostV1DocumentsError = + PostV1DocumentsErrors[keyof PostV1DocumentsErrors]; -export type GetV1CompaniesCompanyIdLegalEntitiesResponses = { +export type PostV1DocumentsResponses = { /** * Success */ - 200: ListCompanyLegalEntitiesResponse; + 200: UploadFileResponse; }; -export type GetV1CompaniesCompanyIdLegalEntitiesResponse = - GetV1CompaniesCompanyIdLegalEntitiesResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesResponses]; +export type PostV1DocumentsResponse = + PostV1DocumentsResponses[keyof PostV1DocumentsResponses]; -export type PostV1EmploymentsEmploymentIdContractEligibilityData = { - /** - * Contract Eligibility Create Parameters - */ - body: CreateContractEligibilityParams; +export type PostV1EmploymentsEmploymentIdInviteData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** * Employment ID @@ -22690,14 +22060,18 @@ export type PostV1EmploymentsEmploymentIdContractEligibilityData = { employment_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/contract-eligibility'; + url: '/v1/employments/{employment_id}/invite'; }; -export type PostV1EmploymentsEmploymentIdContractEligibilityErrors = { +export type PostV1EmploymentsEmploymentIdInviteErrors = { /** * Bad Request */ 400: BadRequestResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -22708,107 +22082,41 @@ export type PostV1EmploymentsEmploymentIdContractEligibilityErrors = { 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdContractEligibilityError = - PostV1EmploymentsEmploymentIdContractEligibilityErrors[keyof PostV1EmploymentsEmploymentIdContractEligibilityErrors]; +export type PostV1EmploymentsEmploymentIdInviteError = + PostV1EmploymentsEmploymentIdInviteErrors[keyof PostV1EmploymentsEmploymentIdInviteErrors]; -export type PostV1EmploymentsEmploymentIdContractEligibilityResponses = { +export type PostV1EmploymentsEmploymentIdInviteResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostV1EmploymentsEmploymentIdContractEligibilityResponse = - PostV1EmploymentsEmploymentIdContractEligibilityResponses[keyof PostV1EmploymentsEmploymentIdContractEligibilityResponses]; +export type PostV1EmploymentsEmploymentIdInviteResponse = + PostV1EmploymentsEmploymentIdInviteResponses[keyof PostV1EmploymentsEmploymentIdInviteResponses]; -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesData = { +export type GetV1ExpensesIdData = { body?: never; - path: { + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; - query?: { + path: { /** - * Restrict to currencies which payout is guaranteed (default: true) + * Expense ID */ - restrict_to_guaranteed_pay_out_currencies?: boolean; + id: string; }; - url: '/v1/contractors/employments/{employment_id}/contractor-currencies'; + query?: never; + url: '/v1/expenses/{id}'; }; -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Internal Server Error - */ - 500: InternalServerErrorResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesError = - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses = - { - /** - * Success - */ - 200: ContractorCurrencyResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponse = - GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesResponses]; - -export type GetV1PayslipsData = { - body?: never; - path?: never; - query?: { - /** - * Employment ID - */ - employment_id?: string; - /** - * Filters by payslips `issued_at` field, after or on the same day than the given date - */ - start_date?: string; - /** - * Filters by payslips `issued_at` field, before or or the same day than the given date - */ - end_date?: string; - /** - * Filters by payslips `expected_payout_date` field, after or on the same day than the given date - */ - expected_payout_start_date?: string; - /** - * Filters by payslips `expected_payout_date` field, before or or the same day than the given date - */ - expected_payout_end_date?: string; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 - */ - page_size?: number; - }; - url: '/v1/payslips'; -}; - -export type GetV1PayslipsErrors = { +export type GetV1ExpensesIdErrors = { /** * Bad Request */ @@ -22831,38 +22139,35 @@ export type GetV1PayslipsErrors = { 429: TooManyRequestsResponse; }; -export type GetV1PayslipsError = GetV1PayslipsErrors[keyof GetV1PayslipsErrors]; +export type GetV1ExpensesIdError = + GetV1ExpensesIdErrors[keyof GetV1ExpensesIdErrors]; -export type GetV1PayslipsResponses = { +export type GetV1ExpensesIdResponses = { /** * Success */ - 200: ListPayslipsResponse; + 200: ExpenseResponse; }; -export type GetV1PayslipsResponse = - GetV1PayslipsResponses[keyof GetV1PayslipsResponses]; +export type GetV1ExpensesIdResponse = + GetV1ExpensesIdResponses[keyof GetV1ExpensesIdResponses]; -export type PostV1SandboxEmploymentsData = { +export type PatchV1ExpensesId2Data = { /** - * Employment params + * Expenses */ - body?: EmploymentCreateParams; - headers: { + body?: UpdateExpenseParams; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Expense ID */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/sandbox/employments'; + url: '/v1/expenses/{id}'; }; -export type PostV1SandboxEmploymentsErrors = { +export type PatchV1ExpensesId2Errors = { /** * Bad Request */ @@ -22875,6 +22180,10 @@ export type PostV1SandboxEmploymentsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -22885,32 +22194,35 @@ export type PostV1SandboxEmploymentsErrors = { 429: TooManyRequestsResponse; }; -export type PostV1SandboxEmploymentsError = - PostV1SandboxEmploymentsErrors[keyof PostV1SandboxEmploymentsErrors]; +export type PatchV1ExpensesId2Error = + PatchV1ExpensesId2Errors[keyof PatchV1ExpensesId2Errors]; -export type PostV1SandboxEmploymentsResponses = { +export type PatchV1ExpensesId2Responses = { /** * Success */ - 201: EmploymentCreationResponse; + 200: ExpenseResponse; }; -export type PostV1SandboxEmploymentsResponse = - PostV1SandboxEmploymentsResponses[keyof PostV1SandboxEmploymentsResponses]; +export type PatchV1ExpensesId2Response = + PatchV1ExpensesId2Responses[keyof PatchV1ExpensesId2Responses]; -export type GetV1EmployeeEmergencyContactData = { - body?: never; - path?: never; - query?: { +export type PatchV1ExpensesIdData = { + /** + * Expenses + */ + body?: UpdateExpenseParams; + path: { /** - * Version of the emergency_contact_details form schema + * Expense ID */ - emergency_contact_details_json_schema_version?: number | 'latest'; + id: string; }; - url: '/v1/employee/emergency-contact'; + query?: never; + url: '/v1/expenses/{id}'; }; -export type GetV1EmployeeEmergencyContactErrors = { +export type PatchV1ExpensesIdErrors = { /** * Bad Request */ @@ -22919,61 +22231,63 @@ export type GetV1EmployeeEmergencyContactErrors = { * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ 429: TooManyRequestsResponse; }; -export type GetV1EmployeeEmergencyContactError = - GetV1EmployeeEmergencyContactErrors[keyof GetV1EmployeeEmergencyContactErrors]; +export type PatchV1ExpensesIdError = + PatchV1ExpensesIdErrors[keyof PatchV1ExpensesIdErrors]; -export type GetV1EmployeeEmergencyContactResponses = { +export type PatchV1ExpensesIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: ExpenseResponse; }; -export type GetV1EmployeeEmergencyContactResponse = - GetV1EmployeeEmergencyContactResponses[keyof GetV1EmployeeEmergencyContactResponses]; +export type PatchV1ExpensesIdResponse = + PatchV1ExpensesIdResponses[keyof PatchV1ExpensesIdResponses]; -export type PutV1EmployeeEmergencyContactData = { - /** - * Employee emergency contact params - */ - body?: EmploymentEmergencyContactParams; - path?: never; - query?: { +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { + body?: never; + headers: { /** - * Version of the emergency_contact_details form schema + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - emergency_contact_details_json_schema_version?: number | 'latest'; + Authorization: string; }; - url: '/v1/employee/emergency-contact'; + path: { + /** + * Benefit Renewal Request Id + */ + benefit_renewal_request_id: UuidSlug; + }; + query?: never; + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; }; -export type PutV1EmployeeEmergencyContactErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -22982,82 +22296,91 @@ export type PutV1EmployeeEmergencyContactErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV1EmployeeEmergencyContactError = - PutV1EmployeeEmergencyContactErrors[keyof PutV1EmployeeEmergencyContactErrors]; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdError = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; -export type PutV1EmployeeEmergencyContactResponses = { +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: BenefitRenewalRequestsBenefitRenewalRequestResponse; }; -export type PutV1EmployeeEmergencyContactResponse = - PutV1EmployeeEmergencyContactResponses[keyof PutV1EmployeeEmergencyContactResponses]; +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof GetV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; -export type GetV1PayrollRunsPayrollRunIdData = { - body?: never; +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdData = { + /** + * Benefit Renewal Request Response + */ + body?: BenefitRenewalRequestsUpdateBenefitRenewalRequest; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Payroll run ID + * Benefit Renewal Request Id */ - payroll_run_id: string; + benefit_renewal_request_id: UuidSlug; }; - query?: never; - url: '/v1/payroll-runs/{payroll_run_id}'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; }; -export type GetV1PayrollRunsPayrollRunIdErrors = { +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetV1PayrollRunsPayrollRunIdError = - GetV1PayrollRunsPayrollRunIdErrors[keyof GetV1PayrollRunsPayrollRunIdErrors]; +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdError = + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdErrors]; -export type GetV1PayrollRunsPayrollRunIdResponses = { +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses = { /** * Success */ - 200: PayrollRunResponse; + 200: SuccessResponse; }; -export type GetV1PayrollRunsPayrollRunIdResponse = - GetV1PayrollRunsPayrollRunIdResponses[keyof GetV1PayrollRunsPayrollRunIdResponses]; +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponse = + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses[keyof PostV1BenefitRenewalRequestsBenefitRenewalRequestIdResponses]; -export type GetV1OffboardingsIdData = { +export type GetV1EmploymentsEmploymentIdOnboardingStepsData = { body?: never; path: { /** - * Offboarding request ID + * Employment ID */ - id: string; + employment_id: UuidSlug; }; query?: never; - url: '/v1/offboardings/{id}'; + url: '/v1/employments/{employment_id}/onboarding-steps'; }; -export type GetV1OffboardingsIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdOnboardingStepsErrors = { /** * Unauthorized */ @@ -23066,113 +22389,65 @@ export type GetV1OffboardingsIdErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetV1OffboardingsIdError = - GetV1OffboardingsIdErrors[keyof GetV1OffboardingsIdErrors]; +export type GetV1EmploymentsEmploymentIdOnboardingStepsError = + GetV1EmploymentsEmploymentIdOnboardingStepsErrors[keyof GetV1EmploymentsEmploymentIdOnboardingStepsErrors]; -export type GetV1OffboardingsIdResponses = { +export type GetV1EmploymentsEmploymentIdOnboardingStepsResponses = { /** * Success */ - 200: OffboardingResponse; + 200: EmploymentOnboardingStepsResponse; }; -export type GetV1OffboardingsIdResponse = - GetV1OffboardingsIdResponses[keyof GetV1OffboardingsIdResponses]; +export type GetV1EmploymentsEmploymentIdOnboardingStepsResponse = + GetV1EmploymentsEmploymentIdOnboardingStepsResponses[keyof GetV1EmploymentsEmploymentIdOnboardingStepsResponses]; -export type GetV1ExpensesData = { +export type GetV1EmployeeCurrentData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 - */ - page_size?: number; - }; - url: '/v1/expenses'; + query?: never; + url: '/v1/employee/current'; }; -export type GetV1ExpensesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmployeeCurrentErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests + * Forbidden */ - 429: TooManyRequestsResponse; + 403: ForbiddenResponse; }; -export type GetV1ExpensesError = GetV1ExpensesErrors[keyof GetV1ExpensesErrors]; +export type GetV1EmployeeCurrentError = + GetV1EmployeeCurrentErrors[keyof GetV1EmployeeCurrentErrors]; -export type GetV1ExpensesResponses = { +export type GetV1EmployeeCurrentResponses = { /** * Success */ - 201: ListExpenseResponse; + 200: SuccessResponse; }; -export type GetV1ExpensesResponse = - GetV1ExpensesResponses[keyof GetV1ExpensesResponses]; +export type GetV1EmployeeCurrentResponse = + GetV1EmployeeCurrentResponses[keyof GetV1EmployeeCurrentResponses]; -export type PostV1ExpensesData = { - /** - * Expenses - */ - body?: ParamsToCreateExpense; - headers: { +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesData = { + body?: never; + path: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * Employment ID */ - Authorization: string; + employment_id: string; }; - path?: never; query?: never; - url: '/v1/expenses'; + url: '/v1/employments/{employment_id}/company-structure-nodes'; }; -export type PostV1ExpensesErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors = { /** * Unauthorized */ @@ -23185,28 +22460,29 @@ export type PostV1ExpensesErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostV1ExpensesError = - PostV1ExpensesErrors[keyof PostV1ExpensesErrors]; +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesError = + GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesErrors]; -export type PostV1ExpensesResponses = { +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses = { /** * Success */ - 201: ExpenseResponse; + 200: CompanyStructureNodesResponse; }; -export type PostV1ExpensesResponse = - PostV1ExpensesResponses[keyof PostV1ExpensesResponses]; +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesResponse = + GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses[keyof GetV1EmploymentsEmploymentIdCompanyStructureNodesResponses]; -export type GetV1EmployeePayslipFilesData = { +export type GetV1EmploymentsEmploymentIdCustomFieldsData = { body?: never; - path?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: { /** * Starts fetching records after the given page @@ -23217,101 +22493,53 @@ export type GetV1EmployeePayslipFilesData = { */ page_size?: number; }; - url: '/v1/employee/payslip-files'; + url: '/v1/employments/{employment_id}/custom-fields'; }; -export type GetV1EmployeePayslipFilesErrors = { +export type GetV1EmploymentsEmploymentIdCustomFieldsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; -}; - -export type GetV1EmployeePayslipFilesError = - GetV1EmployeePayslipFilesErrors[keyof GetV1EmployeePayslipFilesErrors]; - -export type GetV1EmployeePayslipFilesResponses = { - /** - * Success - */ - 200: ListPayslipFilesResponse; -}; - -export type GetV1EmployeePayslipFilesResponse = - GetV1EmployeePayslipFilesResponses[keyof GetV1EmployeePayslipFilesResponses]; - -export type PostV1EmploymentsEmploymentIdInviteData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/employments/{employment_id}/invite'; -}; - -export type PostV1EmploymentsEmploymentIdInviteErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostV1EmploymentsEmploymentIdInviteError = - PostV1EmploymentsEmploymentIdInviteErrors[keyof PostV1EmploymentsEmploymentIdInviteErrors]; +export type GetV1EmploymentsEmploymentIdCustomFieldsError = + GetV1EmploymentsEmploymentIdCustomFieldsErrors[keyof GetV1EmploymentsEmploymentIdCustomFieldsErrors]; -export type PostV1EmploymentsEmploymentIdInviteResponses = { +export type GetV1EmploymentsEmploymentIdCustomFieldsResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListEmploymentCustomFieldValuePaginatedResponse; }; -export type PostV1EmploymentsEmploymentIdInviteResponse = - PostV1EmploymentsEmploymentIdInviteResponses[keyof PostV1EmploymentsEmploymentIdInviteResponses]; +export type GetV1EmploymentsEmploymentIdCustomFieldsResponse = + GetV1EmploymentsEmploymentIdCustomFieldsResponses[keyof GetV1EmploymentsEmploymentIdCustomFieldsResponses]; -export type PostV1ProbationExtensionsData = { +export type PutV1ResignationsOffboardingRequestIdValidateData = { /** - * ProbationExtension + * ValidateResignation */ - body: CreateProbationExtensionParams; - path?: never; + body: ValidateResignationRequestParams; + path: { + /** + * Offboarding request ID + */ + offboarding_request_id: string; + }; query?: never; - url: '/v1/probation-extensions'; + url: '/v1/resignations/{offboarding_request_id}/validate'; }; -export type PostV1ProbationExtensionsErrors = { +export type PutV1ResignationsOffboardingRequestIdValidateErrors = { /** * Bad Request */ @@ -23328,83 +22556,52 @@ export type PostV1ProbationExtensionsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ProbationExtensionsError = - PostV1ProbationExtensionsErrors[keyof PostV1ProbationExtensionsErrors]; +export type PutV1ResignationsOffboardingRequestIdValidateError = + PutV1ResignationsOffboardingRequestIdValidateErrors[keyof PutV1ResignationsOffboardingRequestIdValidateErrors]; -export type PostV1ProbationExtensionsResponses = { +export type PutV1ResignationsOffboardingRequestIdValidateResponses = { /** * Success */ - 200: ProbationExtensionResponse; + 200: SuccessResponse; }; -export type PostV1ProbationExtensionsResponse = - PostV1ProbationExtensionsResponses[keyof PostV1ProbationExtensionsResponses]; +export type PutV1ResignationsOffboardingRequestIdValidateResponse = + PutV1ResignationsOffboardingRequestIdValidateResponses[keyof PutV1ResignationsOffboardingRequestIdValidateResponses]; -export type GetV1ContractorsCorTerminationRequestsData = { - body?: never; - path?: never; - query?: { - /** - * Filter termination requests by employment ID. - */ - employment_id?: UuidSlug; - /** - * Filter termination requests by status. - */ - status?: 'initiated' | 'executed' | 'cancelled'; - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/contractors/cor-termination-requests'; -}; - -export type GetV1ContractorsCorTerminationRequestsErrors = { - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1ContractorsCorTerminationRequestsError = - GetV1ContractorsCorTerminationRequestsErrors[keyof GetV1ContractorsCorTerminationRequestsErrors]; - -export type GetV1ContractorsCorTerminationRequestsResponses = { - /** - * Success - */ - 200: IndexCorTerminationRequestsResponse; -}; - -export type GetV1ContractorsCorTerminationRequestsResponse = - GetV1ContractorsCorTerminationRequestsResponses[keyof GetV1ContractorsCorTerminationRequestsResponses]; - -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveData = +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdData = { body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * Contract amendment request ID + * Company ID */ - contract_amendment_request_id: string; + company_id: string; + /** + * Legal Entity ID to set as the new default + */ + legal_entity_id: string; }; query?: never; - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve'; + url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}'; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors = +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors = { /** * Bad Request @@ -23428,21 +22625,57 @@ export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError 429: TooManyRequestsResponse; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveErrors]; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdError = + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdErrors]; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses = +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: SuccessResponse; }; -export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponse = - PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveResponses]; +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponse = + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses[keyof PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdResponses]; -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusData = +export type GetV1CompaniesCompanyIdWebhookCallbacksData = { + body?: never; + path: { + /** + * Company ID + */ + company_id: string; + }; + query?: never; + url: '/v1/companies/{company_id}/webhook-callbacks'; +}; + +export type GetV1CompaniesCompanyIdWebhookCallbacksErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1CompaniesCompanyIdWebhookCallbacksError = + GetV1CompaniesCompanyIdWebhookCallbacksErrors[keyof GetV1CompaniesCompanyIdWebhookCallbacksErrors]; + +export type GetV1CompaniesCompanyIdWebhookCallbacksResponses = { + /** + * Success + */ + 200: ListWebhookCallbacksResponse; +}; + +export type GetV1CompaniesCompanyIdWebhookCallbacksResponse = + GetV1CompaniesCompanyIdWebhookCallbacksResponses[keyof GetV1CompaniesCompanyIdWebhookCallbacksResponses]; + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityData = { body?: never; path: { @@ -23451,65 +22684,61 @@ export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStat */ company_id: UuidSlug; /** - * Employment ID + * Legal entity ID */ - employment_id: UuidSlug; + legal_entity_id: UuidSlug; }; query?: never; - url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status'; + url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility'; }; -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors = +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; }; -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusError = - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusErrors]; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityError = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityErrors]; -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses = +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses = { /** * Success */ - 200: OnboardingReservesStatusResponse; + 200: ContractorEligibilityResponse; }; -export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponse = - GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses[keyof GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusResponses]; +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponse = + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses[keyof GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityResponses]; -export type GetV1ContractorInvoicesIdData = { +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { body?: never; path: { /** - * Resource unique identifier + * Custom field ID */ - id: UuidSlug; + custom_field_id: string; + /** + * Employment ID + */ + employment_id: string; }; query?: never; - url: '/v1/contractor-invoices/{id}'; + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; }; -export type GetV1ContractorInvoicesIdErrors = { +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -23520,157 +22749,681 @@ export type GetV1ContractorInvoicesIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ContractorInvoicesIdError = - GetV1ContractorInvoicesIdErrors[keyof GetV1ContractorInvoicesIdErrors]; +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdError = + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; -export type GetV1ContractorInvoicesIdResponses = { +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { /** * Success */ - 200: ContractorInvoiceResponse; + 200: EmploymentCustomFieldValueResponse; }; -export type GetV1ContractorInvoicesIdResponse = - GetV1ContractorInvoicesIdResponses[keyof GetV1ContractorInvoicesIdResponses]; +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; -export type GetV1WdGphPayProcessingFeatureData = { - body?: never; - path?: never; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data = { + /** + * Custom Field Value Update Parameters + */ + body: UpdateEmploymentCustomFieldValueParams; + path: { + /** + * Custom field ID + */ + custom_field_id: string; + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/wd/gph/payProcessingFeature'; + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; }; -export type GetV1WdGphPayProcessingFeatureErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1WdGphPayProcessingFeatureError = - GetV1WdGphPayProcessingFeatureErrors[keyof GetV1WdGphPayProcessingFeatureErrors]; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Error = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors]; -export type GetV1WdGphPayProcessingFeatureResponses = { +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses = { /** * Success */ - 200: PayProcessingFeatureResponse; + 200: EmploymentCustomFieldValueResponse; }; -export type GetV1WdGphPayProcessingFeatureResponse = - GetV1WdGphPayProcessingFeatureResponses[keyof GetV1WdGphPayProcessingFeatureResponses]; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Response = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses]; -export type GetV1WdGphPayProgressData = { - body?: never; - headers?: { - /** - * The preferred language of the inquiring user in Workday - */ - accept_language?: string; - }; - path?: never; - query: { - /** - * The pay group ID for identifying the pay group at the vendor system - */ - payGroupExternalId: string; - /** - * The run type id provided in the paySummary API - */ - runTypeId: string; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { + /** + * Custom Field Value Update Parameters + */ + body: UpdateEmploymentCustomFieldValueParams; + path: { /** - * The cycle type id, defaults to the main run if not provided + * Custom field ID */ - cycleTypeId?: string; + custom_field_id: string; /** - * The period end date in question, defaults to current period if not provided + * Employment ID */ - periodEndDate?: Date; + employment_id: string; }; - url: '/v1/wd/gph/payProgress'; + query?: never; + url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; }; -export type GetV1WdGphPayProgressErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; -}; - -export type GetV1WdGphPayProgressError = - GetV1WdGphPayProgressErrors[keyof GetV1WdGphPayProgressErrors]; - -export type GetV1WdGphPayProgressResponses = { /** - * Success + * Unprocessable Entity */ - 200: PayProgressResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1WdGphPayProgressResponse = - GetV1WdGphPayProgressResponses[keyof GetV1WdGphPayProgressResponses]; - -export type GetV1CompanyCurrenciesData = { - body?: never; - path?: never; - query?: never; - url: '/v1/company-currencies'; -}; +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdError = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; -export type GetV1CompanyCurrenciesErrors = { +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { /** - * Not Found + * Success */ - 404: NotFoundResponse; + 200: EmploymentCustomFieldValueResponse; }; -export type GetV1CompanyCurrenciesError = - GetV1CompanyCurrenciesErrors[keyof GetV1CompanyCurrenciesErrors]; - -export type GetV1CompanyCurrenciesResponses = { +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Termination Request ID + */ + termination_request_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}'; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors = + { + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdError = + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdErrors]; + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses = + { + /** + * Success + */ + 200: CorTerminationRequestResponse; + }; + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponse = + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdResponses]; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentError = + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentErrors]; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses = + { + /** + * Success + */ + 200: SuccessResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponse = + PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTerminateCorEmploymentResponses]; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignData = + { + /** + * SignContractDocument + */ + body: SignContractDocument; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Document ID + */ + contract_document_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors = + { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignError = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignErrors]; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses = + { + /** + * Success + */ + 200: SuccessResponse; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponse = + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignResponses]; + +export type GetV1IdentityCurrentData = { + body?: never; + headers: { + /** + * This endpoint works with any of the access tokens provided. You can use an access + * token obtained through the Client Credentials flow, the Authorization Code flow, or the Refresh Token flow. + * + */ + Authorization: string; + }; + path?: never; + query?: never; + url: '/v1/identity/current'; +}; + +export type GetV1IdentityCurrentErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type GetV1IdentityCurrentError = + GetV1IdentityCurrentErrors[keyof GetV1IdentityCurrentErrors]; + +export type GetV1IdentityCurrentResponses = { + /** + * Success + */ + 201: IdentityCurrentResponse; +}; + +export type GetV1IdentityCurrentResponse = + GetV1IdentityCurrentResponses[keyof GetV1IdentityCurrentResponses]; + +export type DeleteV1IncentivesIdData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Incentive ID + */ + id: string; + }; + query?: never; + url: '/v1/incentives/{id}'; +}; + +export type DeleteV1IncentivesIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type DeleteV1IncentivesIdError = + DeleteV1IncentivesIdErrors[keyof DeleteV1IncentivesIdErrors]; + +export type DeleteV1IncentivesIdResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type DeleteV1IncentivesIdResponse = + DeleteV1IncentivesIdResponses[keyof DeleteV1IncentivesIdResponses]; + +export type GetV1IncentivesIdData = { + body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Incentive ID + */ + id: string; + }; + query?: never; + url: '/v1/incentives/{id}'; +}; + +export type GetV1IncentivesIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type GetV1IncentivesIdError = + GetV1IncentivesIdErrors[keyof GetV1IncentivesIdErrors]; + +export type GetV1IncentivesIdResponses = { + /** + * Success + */ + 200: IncentiveResponse; +}; + +export type GetV1IncentivesIdResponse = + GetV1IncentivesIdResponses[keyof GetV1IncentivesIdResponses]; + +export type PatchV1IncentivesId2Data = { + /** + * Incentive + */ + body?: UpdateIncentiveParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Incentive ID + */ + id: string; + }; + query?: never; + url: '/v1/incentives/{id}'; +}; + +export type PatchV1IncentivesId2Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type PatchV1IncentivesId2Error = + PatchV1IncentivesId2Errors[keyof PatchV1IncentivesId2Errors]; + +export type PatchV1IncentivesId2Responses = { + /** + * Success + */ + 200: IncentiveResponse; +}; + +export type PatchV1IncentivesId2Response = + PatchV1IncentivesId2Responses[keyof PatchV1IncentivesId2Responses]; + +export type PatchV1IncentivesIdData = { + /** + * Incentive + */ + body?: UpdateIncentiveParams; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; + path: { + /** + * Incentive ID + */ + id: string; + }; + query?: never; + url: '/v1/incentives/{id}'; +}; + +export type PatchV1IncentivesIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type PatchV1IncentivesIdError = + PatchV1IncentivesIdErrors[keyof PatchV1IncentivesIdErrors]; + +export type PatchV1IncentivesIdResponses = { + /** + * Success + */ + 200: IncentiveResponse; +}; + +export type PatchV1IncentivesIdResponse = + PatchV1IncentivesIdResponses[keyof PatchV1IncentivesIdResponses]; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireData = { + body?: never; + path?: never; + query: { + /** + * Type of eligibility questionnaire + */ + type: 'contractor_of_record'; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/contractors/schemas/eligibility-questionnaire'; +}; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireError = + GetV1ContractorsSchemasEligibilityQuestionnaireErrors[keyof GetV1ContractorsSchemasEligibilityQuestionnaireErrors]; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireResponses = { + /** + * Success + */ + 200: EligibilityQuestionnaireJsonSchemaResponse; +}; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireResponse = + GetV1ContractorsSchemasEligibilityQuestionnaireResponses[keyof GetV1ContractorsSchemasEligibilityQuestionnaireResponses]; + +export type GetV1WorkAuthorizationRequestsData = { + body?: never; + path?: never; + query?: { + /** + * Filter results on the given status + */ + status?: + | 'pending' + | 'cancelled' + | 'declined_by_manager' + | 'declined_by_remote' + | 'approved_by_manager' + | 'approved_by_remote'; + /** + * Filter results on the given employment slug + */ + employment_id?: string; + /** + * Filter results on the given employee name + */ + employee_name?: string; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'submitted_at'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/v1/work-authorization-requests'; +}; + +export type GetV1WorkAuthorizationRequestsErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1WorkAuthorizationRequestsError = + GetV1WorkAuthorizationRequestsErrors[keyof GetV1WorkAuthorizationRequestsErrors]; + +export type GetV1WorkAuthorizationRequestsResponses = { /** * Success */ - 200: CompanyCurrenciesResponse; + 200: ListWorkAuthorizationRequestsResponse; }; -export type GetV1CompanyCurrenciesResponse = - GetV1CompanyCurrenciesResponses[keyof GetV1CompanyCurrenciesResponses]; +export type GetV1WorkAuthorizationRequestsResponse = + GetV1WorkAuthorizationRequestsResponses[keyof GetV1WorkAuthorizationRequestsResponses]; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaData = { +export type GetV1BulkEmploymentJobsJobIdData = { body?: never; path: { /** - * Unique identifier of the employment - */ - employment_id: UuidSlug; - }; - query?: { - /** - * Version of the form schema + * Bulk employment job id */ - json_schema_version?: number | 'latest'; + job_id: string; }; - url: '/v1/employments/{employment_id}/benefit-offers/schema'; + query?: never; + url: '/v1/bulk-employment-jobs/{job_id}'; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors = { +export type GetV1BulkEmploymentJobsJobIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Forbidden */ @@ -23682,71 +23435,212 @@ export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors = { /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaError = - GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaErrors]; +export type GetV1BulkEmploymentJobsJobIdError = + GetV1BulkEmploymentJobsJobIdErrors[keyof GetV1BulkEmploymentJobsJobIdErrors]; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses = { +export type GetV1BulkEmploymentJobsJobIdResponses = { /** * Success */ - 200: UnifiedEmploymentsBenefitOffersJsonSchemaResponse; + 200: BulkEmploymentImportJobResponse; }; -export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponse = - GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses[keyof GetV1EmploymentsEmploymentIdBenefitOffersSchemaResponses]; +export type GetV1BulkEmploymentJobsJobIdResponse = + GetV1BulkEmploymentJobsJobIdResponses[keyof GetV1BulkEmploymentJobsJobIdResponses]; -export type GetV1ContractorInvoiceSchedulesData = { +export type GetV1PayItemsData = { body?: never; path?: never; query?: { /** - * Filters contractor invoice schedules by start date greater than or equal to the value. + * Filter by employment slug */ - start_date_from?: Date; + employment_slug?: UuidSlug; /** - * Filters contractor invoice schedules by start date less than or equal to the value. + * Filter pay items with effective_date >= given date (YYYY-MM-DD) */ - start_date_to?: Date; + effective_from?: Date; /** - * Filters contractor invoice schedules by next invoice date greater than or equal to the value. + * Filter pay items with effective_date <= given date (YYYY-MM-DD) */ - next_invoice_date_from?: Date; + effective_to?: Date; /** - * Filters contractor invoice schedules by next invoice date less than or equal to the value. + * Starts fetching records after the given page */ - next_invoice_date_to?: Date; + page?: number; /** - * Filters contractor invoice schedules by status matching the value. + * Number of items per page */ - status?: ContractorInvoiceScheduleStatus; + page_size?: number; + }; + url: '/v1/pay-items'; +}; + +export type GetV1PayItemsErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1PayItemsError = GetV1PayItemsErrors[keyof GetV1PayItemsErrors]; + +export type GetV1PayItemsResponses = { + /** + * Success + */ + 200: ListPayItemsResponse; +}; + +export type GetV1PayItemsResponse = + GetV1PayItemsResponses[keyof GetV1PayItemsResponses]; + +export type GetV1BenefitOffersCountrySummariesData = { + body?: never; + headers: { /** - * Filters contractor invoice schedules by employment id matching the value. + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id?: UuidSlug; + Authorization: string; + }; + path?: never; + query?: never; + url: '/v1/benefit-offers/country-summaries'; +}; + +export type GetV1BenefitOffersCountrySummariesErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetV1BenefitOffersCountrySummariesError = + GetV1BenefitOffersCountrySummariesErrors[keyof GetV1BenefitOffersCountrySummariesErrors]; + +export type GetV1BenefitOffersCountrySummariesResponses = { + /** + * Success + */ + 200: CountrySummariesResponse; +}; + +export type GetV1BenefitOffersCountrySummariesResponse = + GetV1BenefitOffersCountrySummariesResponses[keyof GetV1BenefitOffersCountrySummariesResponses]; + +export type GetV1BenefitOffersData = { + body?: never; + headers: { /** - * Filters contractor invoice schedules by periodicity matching the value. + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - periodicity?: ContractorInvoiceSchedulePeriodicity; + Authorization: string; + }; + path?: never; + query?: never; + url: '/v1/benefit-offers'; +}; + +export type GetV1BenefitOffersErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetV1BenefitOffersError = + GetV1BenefitOffersErrors[keyof GetV1BenefitOffersErrors]; + +export type GetV1BenefitOffersResponses = { + /** + * Success + */ + 200: BenefitOfferByEmploymentResponse; +}; + +export type GetV1BenefitOffersResponse = + GetV1BenefitOffersResponses[keyof GetV1BenefitOffersResponses]; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelData = + { + body?: never; + path: { + /** + * Contract amendment request ID + */ + contract_amendment_request_id: string; + }; + query?: never; + url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel'; + }; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors = + { /** - * Filters contractor invoice schedules by currency matching the value. + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity */ - currency?: string; + 422: UnprocessableEntityResponse; /** - * Field to sort by + * Too many requests */ - sort_by?: - | 'number' - | 'total_amount' - | 'next_invoice_at' - | 'start_date' - | 'nr_occurrences'; + 429: TooManyRequestsResponse; + }; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelError = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelErrors]; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses = + { /** - * Sort order + * Success */ - order?: 'asc' | 'desc'; + 200: SuccessResponse; + }; + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponse = + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses[keyof PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelResponses]; + +export type GetV1EmployeeTimeoffData = { + body?: never; + path?: never; + query?: { /** * Starts fetching records after the given page */ @@ -23756,195 +23650,202 @@ export type GetV1ContractorInvoiceSchedulesData = { */ page_size?: number; }; - url: '/v1/contractor-invoice-schedules'; + url: '/v1/employee/timeoff'; }; -export type GetV1ContractorInvoiceSchedulesErrors = { +export type GetV1EmployeeTimeoffErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoiceSchedulesError = - GetV1ContractorInvoiceSchedulesErrors[keyof GetV1ContractorInvoiceSchedulesErrors]; +export type GetV1EmployeeTimeoffError = + GetV1EmployeeTimeoffErrors[keyof GetV1EmployeeTimeoffErrors]; -export type GetV1ContractorInvoiceSchedulesResponses = { +export type GetV1EmployeeTimeoffResponses = { /** * Success */ - 200: ListContractorInvoiceSchedulesResponse; + 200: ListTimeoffResponse; }; -export type GetV1ContractorInvoiceSchedulesResponse = - GetV1ContractorInvoiceSchedulesResponses[keyof GetV1ContractorInvoiceSchedulesResponses]; +export type GetV1EmployeeTimeoffResponse = + GetV1EmployeeTimeoffResponses[keyof GetV1EmployeeTimeoffResponses]; -export type PostV1ContractorInvoiceSchedulesData = { +export type PostV1EmployeeTimeoffData = { /** - * Bulk creation payload + * Timeoff */ - body: BulkContractorInvoiceScheduleCreateParams; + body: CreateEmployeeTimeoffParams; path?: never; query?: never; - url: '/v1/contractor-invoice-schedules'; + url: '/v1/employee/timeoff'; }; -export type PostV1ContractorInvoiceSchedulesErrors = { +export type PostV1EmployeeTimeoffErrors = { /** - * Forbidden + * Bad Request */ - 403: ForbiddenResponse; + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + * Unprocessable Entity */ - 422: { - data: { - failures: Array; - successes: Array; - }; - }; + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1ContractorInvoiceSchedulesError = - PostV1ContractorInvoiceSchedulesErrors[keyof PostV1ContractorInvoiceSchedulesErrors]; +export type PostV1EmployeeTimeoffError = + PostV1EmployeeTimeoffErrors[keyof PostV1EmployeeTimeoffErrors]; -export type PostV1ContractorInvoiceSchedulesResponses = { - /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. - */ - 201: { - data: { - failures: Array; - successes: Array; - }; - }; +export type PostV1EmployeeTimeoffResponses = { /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + * Created */ - 207: { - data: { - failures: Array; - successes: Array; - }; - }; + 201: TimeoffResponse; }; -export type PostV1ContractorInvoiceSchedulesResponse = - PostV1ContractorInvoiceSchedulesResponses[keyof PostV1ContractorInvoiceSchedulesResponses]; +export type PostV1EmployeeTimeoffResponse = + PostV1EmployeeTimeoffResponses[keyof PostV1EmployeeTimeoffResponses]; -export type GetV1WorkAuthorizationRequestsIdData = { - body?: never; +export type PatchV2EmploymentsEmploymentId2Data = { + /** + * Employment params + */ + body?: EmploymentV2UpdateParams; path: { /** - * work authorization request ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/v2/employments/{employment_id}'; }; -export type GetV1WorkAuthorizationRequestsIdErrors = { +export type PatchV2EmploymentsEmploymentId2Errors = { /** - * Not Found + * Bad Request */ - 404: NotFoundResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1WorkAuthorizationRequestsIdError = - GetV1WorkAuthorizationRequestsIdErrors[keyof GetV1WorkAuthorizationRequestsIdErrors]; +export type PatchV2EmploymentsEmploymentId2Error = + PatchV2EmploymentsEmploymentId2Errors[keyof PatchV2EmploymentsEmploymentId2Errors]; -export type GetV1WorkAuthorizationRequestsIdResponses = { +export type PatchV2EmploymentsEmploymentId2Responses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: EmploymentResponse; }; -export type GetV1WorkAuthorizationRequestsIdResponse = - GetV1WorkAuthorizationRequestsIdResponses[keyof GetV1WorkAuthorizationRequestsIdResponses]; +export type PatchV2EmploymentsEmploymentId2Response = + PatchV2EmploymentsEmploymentId2Responses[keyof PatchV2EmploymentsEmploymentId2Responses]; -export type PatchV1WorkAuthorizationRequestsId2Data = { +export type PatchV2EmploymentsEmploymentIdData = { /** - * Work Authorization Request + * Employment params */ - body: UpdateWorkAuthorizationRequestParams; + body?: EmploymentV2UpdateParams; path: { /** - * work authorization request ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/v2/employments/{employment_id}'; }; -export type PatchV1WorkAuthorizationRequestsId2Errors = { +export type PatchV2EmploymentsEmploymentIdErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PatchV1WorkAuthorizationRequestsId2Error = - PatchV1WorkAuthorizationRequestsId2Errors[keyof PatchV1WorkAuthorizationRequestsId2Errors]; +export type PatchV2EmploymentsEmploymentIdError = + PatchV2EmploymentsEmploymentIdErrors[keyof PatchV2EmploymentsEmploymentIdErrors]; -export type PatchV1WorkAuthorizationRequestsId2Responses = { +export type PatchV2EmploymentsEmploymentIdResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: EmploymentResponse; }; -export type PatchV1WorkAuthorizationRequestsId2Response = - PatchV1WorkAuthorizationRequestsId2Responses[keyof PatchV1WorkAuthorizationRequestsId2Responses]; +export type PatchV2EmploymentsEmploymentIdResponse = + PatchV2EmploymentsEmploymentIdResponses[keyof PatchV2EmploymentsEmploymentIdResponses]; -export type PatchV1WorkAuthorizationRequestsIdData = { - /** - * Work Authorization Request - */ - body: UpdateWorkAuthorizationRequestParams; +export type GetV1ProbationExtensionsIdData = { + body?: never; path: { /** - * work authorization request ID + * Probation Extension Request ID */ id: string; }; query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/v1/probation-extensions/{id}'; }; -export type PatchV1WorkAuthorizationRequestsIdErrors = { +export type GetV1ProbationExtensionsIdErrors = { /** * Unauthorized */ @@ -23959,35 +23860,56 @@ export type PatchV1WorkAuthorizationRequestsIdErrors = { 422: UnprocessableEntityResponse; }; -export type PatchV1WorkAuthorizationRequestsIdError = - PatchV1WorkAuthorizationRequestsIdErrors[keyof PatchV1WorkAuthorizationRequestsIdErrors]; +export type GetV1ProbationExtensionsIdError = + GetV1ProbationExtensionsIdErrors[keyof GetV1ProbationExtensionsIdErrors]; -export type PatchV1WorkAuthorizationRequestsIdResponses = { +export type GetV1ProbationExtensionsIdResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: ProbationExtensionResponse; }; -export type PatchV1WorkAuthorizationRequestsIdResponse = - PatchV1WorkAuthorizationRequestsIdResponses[keyof PatchV1WorkAuthorizationRequestsIdResponses]; +export type GetV1ProbationExtensionsIdResponse = + GetV1ProbationExtensionsIdResponses[keyof GetV1ProbationExtensionsIdResponses]; -export type PostV1TimeoffTimeoffIdDeclineData = { - /** - * DeclineTimeoff - */ - body: DeclineTimeoffParams; - path: { +export type GetV1PayslipsData = { + body?: never; + path?: never; + query?: { + /** + * Employment ID + */ + employment_id?: string; + /** + * Filters by payslips `issued_at` field, after or on the same day than the given date + */ + start_date?: string; + /** + * Filters by payslips `issued_at` field, before or or the same day than the given date + */ + end_date?: string; /** - * Time Off ID + * Filters by payslips `expected_payout_date` field, after or on the same day than the given date */ - timeoff_id: string; + expected_payout_start_date?: string; + /** + * Filters by payslips `expected_payout_date` field, before or or the same day than the given date + */ + expected_payout_end_date?: string; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; }; - query?: never; - url: '/v1/timeoff/{timeoff_id}/decline'; + url: '/v1/payslips'; }; -export type PostV1TimeoffTimeoffIdDeclineErrors = { +export type GetV1PayslipsErrors = { /** * Bad Request */ @@ -24005,41 +23927,44 @@ export type PostV1TimeoffTimeoffIdDeclineErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostV1TimeoffTimeoffIdDeclineError = - PostV1TimeoffTimeoffIdDeclineErrors[keyof PostV1TimeoffTimeoffIdDeclineErrors]; +export type GetV1PayslipsError = GetV1PayslipsErrors[keyof GetV1PayslipsErrors]; -export type PostV1TimeoffTimeoffIdDeclineResponses = { +export type GetV1PayslipsResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ListPayslipsResponse; }; -export type PostV1TimeoffTimeoffIdDeclineResponse = - PostV1TimeoffTimeoffIdDeclineResponses[keyof PostV1TimeoffTimeoffIdDeclineResponses]; +export type GetV1PayslipsResponse = + GetV1PayslipsResponses[keyof GetV1PayslipsResponses]; -export type GetV1ContractorsSchemasEligibilityQuestionnaireData = { +export type GetV1ExpensesExpenseIdReceiptsReceiptIdData = { body?: never; - path?: never; - query: { + path: { /** - * Type of eligibility questionnaire + * The expense ID */ - type: 'contractor_of_record'; + expense_id: string; /** - * Version of the form schema + * The receipt ID */ - json_schema_version?: number | 'latest'; + receipt_id: string; }; - url: '/v1/contractors/schemas/eligibility-questionnaire'; + query?: never; + url: '/v1/expenses/{expense_id}/receipts/{receipt_id}'; }; -export type GetV1ContractorsSchemasEligibilityQuestionnaireErrors = { +export type GetV1ExpensesExpenseIdReceiptsReceiptIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -24048,24 +23973,32 @@ export type GetV1ContractorsSchemasEligibilityQuestionnaireErrors = { * Forbidden */ 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1ContractorsSchemasEligibilityQuestionnaireError = - GetV1ContractorsSchemasEligibilityQuestionnaireErrors[keyof GetV1ContractorsSchemasEligibilityQuestionnaireErrors]; +export type GetV1ExpensesExpenseIdReceiptsReceiptIdError = + GetV1ExpensesExpenseIdReceiptsReceiptIdErrors[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdErrors]; -export type GetV1ContractorsSchemasEligibilityQuestionnaireResponses = { +export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponses = { /** * Success */ - 200: EligibilityQuestionnaireJsonSchemaResponse; + 200: GenericFile; }; -export type GetV1ContractorsSchemasEligibilityQuestionnaireResponse = - GetV1ContractorsSchemasEligibilityQuestionnaireResponses[keyof GetV1ContractorsSchemasEligibilityQuestionnaireResponses]; +export type GetV1ExpensesExpenseIdReceiptsReceiptIdResponse = + GetV1ExpensesExpenseIdReceiptsReceiptIdResponses[keyof GetV1ExpensesExpenseIdReceiptsReceiptIdResponses]; export type PostAuthOauth2TokenData = { /** @@ -24074,7 +24007,7 @@ export type PostAuthOauth2TokenData = { body?: OAuth2TokenParams; path?: never; query?: never; - url: '/oauth2/token'; + url: '/auth/oauth2/token'; }; export type PostAuthOauth2TokenErrors = { @@ -24113,102 +24046,11 @@ export type PostAuthOauth2TokenResponses = { export type PostAuthOauth2TokenResponse = PostAuthOauth2TokenResponses[keyof PostAuthOauth2TokenResponses]; -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; - }; - -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = - { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = - DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; - -export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = - { - /** - * No Content - */ - 204: unknown; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = - { - /** - * Created - */ - 201: SuccessResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse = - PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses]; - -export type PutV2EmploymentsEmploymentIdPersonalDetailsData = { +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsData = { /** - * Employment personal details params + * Employment pricing plan details params */ - body?: EmploymentPersonalDetailsParams; + body?: EmploymentPricingPlanDetailsParams; path: { /** * Employment ID @@ -24217,14 +24059,14 @@ export type PutV2EmploymentsEmploymentIdPersonalDetailsData = { }; query?: { /** - * Version of the personal_details form schema + * Version of the pricing_plan_details form schema */ - personal_details_json_schema_version?: number | 'latest'; + pricing_plan_details_json_schema_version?: number | 'latest'; }; - url: '/v2/employments/{employment_id}/personal_details'; + url: '/v2/employments/{employment_id}/pricing_plan_details'; }; -export type PutV2EmploymentsEmploymentIdPersonalDetailsErrors = { +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors = { /** * Bad Request */ @@ -24255,25 +24097,90 @@ export type PutV2EmploymentsEmploymentIdPersonalDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdPersonalDetailsError = - PutV2EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV2EmploymentsEmploymentIdPersonalDetailsErrors]; +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsError = + PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors]; -export type PutV2EmploymentsEmploymentIdPersonalDetailsResponses = { +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses = { /** * Success */ 200: EmploymentDetailsOnlyResponse; }; -export type PutV2EmploymentsEmploymentIdPersonalDetailsResponse = - PutV2EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV2EmploymentsEmploymentIdPersonalDetailsResponses]; +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponse = + PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses]; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormData = { + body?: never; + path: { + /** + * Country code according to ISO 3-digit alphabetic codes + */ + country_code: string; + /** + * Name of the desired form + */ + form: string; + }; + query?: { + /** + * Product type. Default value is global_payroll. + */ + product_type?: 'peo' | 'global_payroll' | 'e2e_payroll'; + /** + * Legal entity id for admistrative_details of e2e payroll products in GBR + */ + legal_entity_id?: UuidSlug; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/v1/countries/{country_code}/legal_entity_forms/{form}'; +}; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormError = + GetV1CountriesCountryCodeLegalEntityFormsFormErrors[keyof GetV1CountriesCountryCodeLegalEntityFormsFormErrors]; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormResponses = { + /** + * Success + */ + 200: CountryFormResponse; +}; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormResponse = + GetV1CountriesCountryCodeLegalEntityFormsFormResponses[keyof GetV1CountriesCountryCodeLegalEntityFormsFormResponses]; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData = +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionData = { /** - * FindOrCreatePreOnboardingDocumentParams + * Manage Contractor Plus subscription params */ - body: FindOrCreatePreOnboardingDocumentParams; + body: ManageContractorPlusSubscriptionOperationsParams; path: { /** * Employment ID @@ -24281,44 +24188,36 @@ export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData = employment_id: string; }; query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents'; + url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription'; }; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors = +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsError = - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionError = + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionErrors]; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses = +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses = { /** * Success */ - 200: CreatePreOnboardingDocumentResponse; + 200: SuccessResponse; }; -export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponse = - PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponse = + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionResponses]; -export type GetV1ContractAmendmentsIdData = { +export type GetV1TimeoffData = { body?: never; headers: { /** @@ -24329,17 +24228,45 @@ export type GetV1ContractAmendmentsIdData = { */ Authorization: string; }; - path: { + path?: never; + query?: { /** - * Contract amendment request ID + * Only show time off for a specific employment */ - id: string; + employment_id?: string; + /** + * Filter time off by its type + */ + timeoff_type?: TimeoffType; + /** + * Filter time off by its status + */ + status?: TimeoffStatus; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + /** + * Field to sort by + */ + sort_by?: 'timeoff_type' | 'status'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/contract-amendments/{id}'; + url: '/v1/timeoff'; }; -export type GetV1ContractAmendmentsIdErrors = { +export type GetV1TimeoffErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -24352,34 +24279,48 @@ export type GetV1ContractAmendmentsIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetV1ContractAmendmentsIdError = - GetV1ContractAmendmentsIdErrors[keyof GetV1ContractAmendmentsIdErrors]; +export type GetV1TimeoffError = GetV1TimeoffErrors[keyof GetV1TimeoffErrors]; -export type GetV1ContractAmendmentsIdResponses = { +export type GetV1TimeoffResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: ListTimeoffResponse; }; -export type GetV1ContractAmendmentsIdResponse = - GetV1ContractAmendmentsIdResponses[keyof GetV1ContractAmendmentsIdResponses]; +export type GetV1TimeoffResponse = + GetV1TimeoffResponses[keyof GetV1TimeoffResponses]; -export type PostV1IdentityVerificationEmploymentIdDeclineData = { - body?: never; - path: { +export type PostV1TimeoffData = { + /** + * Timeoff + */ + body: CreateApprovedTimeoffParams; + headers: { /** - * Employment ID + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - employment_id: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/identity-verification/{employment_id}/decline'; + url: '/v1/timeoff'; }; -export type PostV1IdentityVerificationEmploymentIdDeclineErrors = { +export type PostV1TimeoffErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -24392,76 +24333,49 @@ export type PostV1IdentityVerificationEmploymentIdDeclineErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1IdentityVerificationEmploymentIdDeclineError = - PostV1IdentityVerificationEmploymentIdDeclineErrors[keyof PostV1IdentityVerificationEmploymentIdDeclineErrors]; +export type PostV1TimeoffError = PostV1TimeoffErrors[keyof PostV1TimeoffErrors]; -export type PostV1IdentityVerificationEmploymentIdDeclineResponses = { +export type PostV1TimeoffResponses = { /** - * Success + * Created */ - 200: SuccessResponse; + 201: TimeoffResponse; }; -export type PostV1IdentityVerificationEmploymentIdDeclineResponse = - PostV1IdentityVerificationEmploymentIdDeclineResponses[keyof PostV1IdentityVerificationEmploymentIdDeclineResponses]; +export type PostV1TimeoffResponse = + PostV1TimeoffResponses[keyof PostV1TimeoffResponses]; -export type GetV1EmployeeExpenseCategoriesData = { +export type GetV1PayrollRunsData = { body?: never; path?: never; query?: { /** - * Include parent (non-selectable) categories in addition to selectable leaves + * Filters payroll runs where period_start or period_end match the given date */ - include_parents?: boolean; + payroll_period?: Date; /** - * Expense ID (slug) whose category should be included in the result, even if it is not selectable by default + * Starts fetching records after the given page */ - expense_id?: string; + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/employee/expense-categories'; + url: '/v1/payroll-runs'; }; -export type GetV1EmployeeExpenseCategoriesErrors = { +export type GetV1PayrollRunsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1EmployeeExpenseCategoriesError = - GetV1EmployeeExpenseCategoriesErrors[keyof GetV1EmployeeExpenseCategoriesErrors]; - -export type GetV1EmployeeExpenseCategoriesResponses = { - /** - * Success - */ - 200: ListExpenseCategoriesResponse; -}; - -export type GetV1EmployeeExpenseCategoriesResponse = - GetV1EmployeeExpenseCategoriesResponses[keyof GetV1EmployeeExpenseCategoriesResponses]; - -export type PostV1CostCalculatorEstimationCsvData = { - /** - * Estimate params - */ - body?: CostCalculatorEstimateParams; - path?: never; - query?: never; - url: '/v1/cost-calculator/estimation-csv'; -}; - -export type PostV1CostCalculatorEstimationCsvErrors = { /** * Not Found */ @@ -24472,37 +24386,36 @@ export type PostV1CostCalculatorEstimationCsvErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1CostCalculatorEstimationCsvError = - PostV1CostCalculatorEstimationCsvErrors[keyof PostV1CostCalculatorEstimationCsvErrors]; +export type GetV1PayrollRunsError = + GetV1PayrollRunsErrors[keyof GetV1PayrollRunsErrors]; -export type PostV1CostCalculatorEstimationCsvResponses = { +export type GetV1PayrollRunsResponses = { /** * Success */ - 200: CostCalculatorEstimateCsvResponse; + 200: ListPayrollRunResponse; }; -export type PostV1CostCalculatorEstimationCsvResponse = - PostV1CostCalculatorEstimationCsvResponses[keyof PostV1CostCalculatorEstimationCsvResponses]; +export type GetV1PayrollRunsResponse = + GetV1PayrollRunsResponses[keyof GetV1PayrollRunsResponses]; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdData = +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsData = { - body?: never; + /** + * FindOrCreatePreOnboardingDocumentParams + */ + body: FindOrCreatePreOnboardingDocumentParams; path: { /** * Employment ID */ employment_id: string; - /** - * Pre-onboarding document ID - */ - id: string; }; query?: never; - url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}'; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents'; }; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors = +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors = { /** * Unauthorized @@ -24516,80 +24429,67 @@ export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdError = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdErrors]; +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsError = + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsErrors]; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses = +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses = { /** * Success */ - 200: ShowPreOnboardingDocumentResponse; + 200: CreatePreOnboardingDocumentResponse; }; -export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponse = - GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses[keyof GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdResponses]; +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponse = + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsResponses]; -export type GetV1BillingDocumentsData = { +export type GetV1ScimV2GroupsIdData = { body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path?: never; - query?: { - /** - * The month for the billing documents (in ISO-8601 format) - */ - period?: string; - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Number of items per page + * Group ID (slug) */ - page_size?: number; + id: string; }; - url: '/v1/billing-documents'; + query?: never; + url: '/v1/scim/v2/Groups/{id}'; }; -export type GetV1BillingDocumentsErrors = { +export type GetV1ScimV2GroupsIdErrors = { /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: IntegrationsScimErrorResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: IntegrationsScimErrorResponse; }; -export type GetV1BillingDocumentsError = - GetV1BillingDocumentsErrors[keyof GetV1BillingDocumentsErrors]; +export type GetV1ScimV2GroupsIdError = + GetV1ScimV2GroupsIdErrors[keyof GetV1ScimV2GroupsIdErrors]; -export type GetV1BillingDocumentsResponses = { +export type GetV1ScimV2GroupsIdResponses = { /** * Success */ - 200: BillingDocumentsResponse; + 200: IntegrationsScimGroup; }; -export type GetV1BillingDocumentsResponse = - GetV1BillingDocumentsResponses[keyof GetV1BillingDocumentsResponses]; +export type GetV1ScimV2GroupsIdResponse = + GetV1ScimV2GroupsIdResponses[keyof GetV1ScimV2GroupsIdResponses]; -export type GetV1BillingDocumentsBillingDocumentIdData = { +export type GetV1EmploymentContractsData = { body?: never; headers: { /** @@ -24600,103 +24500,25 @@ export type GetV1BillingDocumentsBillingDocumentIdData = { */ Authorization: string; }; - path: { + path?: never; + query: { /** - * The billing document's ID + * Employment ID */ - billing_document_id: string; - }; - query?: { + employment_id: string; /** - * When true, includes billing document items whose type is not part of the standard set for the invoice type. + * Only Active */ - include_unrecognized_types?: boolean; + only_active?: boolean; }; - url: '/v1/billing-documents/{billing_document_id}'; + url: '/v1/employment-contracts'; }; -export type GetV1BillingDocumentsBillingDocumentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentContractsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; -}; - -export type GetV1BillingDocumentsBillingDocumentIdError = - GetV1BillingDocumentsBillingDocumentIdErrors[keyof GetV1BillingDocumentsBillingDocumentIdErrors]; - -export type GetV1BillingDocumentsBillingDocumentIdResponses = { - /** - * Success - */ - 200: BillingDocumentResponse; -}; - -export type GetV1BillingDocumentsBillingDocumentIdResponse = - GetV1BillingDocumentsBillingDocumentIdResponses[keyof GetV1BillingDocumentsBillingDocumentIdResponses]; - -export type GetV1EmployeeDocumentsData = { - body?: never; - path?: never; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - /** - * Filter documents by their description or file name, accepts full and partial case insensitive matches - */ - name?: string; - /** - * Filters the results that were uploaded on or after a given date - */ - inserted_after?: Date; - /** - * Filters the results that were uploaded before a given date - */ - inserted_before?: Date; - /** - * Field to sort by - */ - sort_by?: - | 'description' - | 'document_source' - | 'inserted_at' - | 'name' - | 'type' - | 'uploaded_by_role' - | 'related_to' - | 'sub_type' - | 'uploaded_by'; - /** - * Sort order - */ - order?: 'asc' | 'desc'; - }; - url: '/v1/employee/documents'; -}; - -export type GetV1EmployeeDocumentsErrors = { /** * Forbidden */ @@ -24705,44 +24527,40 @@ export type GetV1EmployeeDocumentsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeDocumentsError = - GetV1EmployeeDocumentsErrors[keyof GetV1EmployeeDocumentsErrors]; +export type GetV1EmploymentContractsError = + GetV1EmploymentContractsErrors[keyof GetV1EmploymentContractsErrors]; -export type GetV1EmployeeDocumentsResponses = { +export type GetV1EmploymentContractsResponses = { /** * Success */ - 200: ListDocumentsResponse; + 200: ListEmploymentContractResponse; }; -export type GetV1EmployeeDocumentsResponse = - GetV1EmployeeDocumentsResponses[keyof GetV1EmployeeDocumentsResponses]; +export type GetV1EmploymentContractsResponse = + GetV1EmploymentContractsResponses[keyof GetV1EmploymentContractsResponses]; -export type PostV1EmployeeDocumentsData = { +export type PostV1CurrencyConverterEffective2Data = { /** - * File + * Convert currency parameters */ - body: EmployeeFileParams; + body: ConvertCurrencyParams; path?: never; query?: never; - url: '/v1/employee/documents'; + url: '/v1/currency-converter'; }; -export type PostV1EmployeeDocumentsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1CurrencyConverterEffective2Errors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -24753,40 +24571,41 @@ export type PostV1EmployeeDocumentsErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1EmployeeDocumentsError = - PostV1EmployeeDocumentsErrors[keyof PostV1EmployeeDocumentsErrors]; +export type PostV1CurrencyConverterEffective2Error = + PostV1CurrencyConverterEffective2Errors[keyof PostV1CurrencyConverterEffective2Errors]; -export type PostV1EmployeeDocumentsResponses = { +export type PostV1CurrencyConverterEffective2Responses = { /** - * Created + * Success */ - 201: UploadFileResponse; + 200: ConvertCurrencyResponse; }; -export type PostV1EmployeeDocumentsResponse = - PostV1EmployeeDocumentsResponses[keyof PostV1EmployeeDocumentsResponses]; +export type PostV1CurrencyConverterEffective2Response = + PostV1CurrencyConverterEffective2Responses[keyof PostV1CurrencyConverterEffective2Responses]; -export type GetV1EmployeeTimeoffData = { +export type GetV1CompaniesData = { body?: never; - path?: never; - query?: { + headers: { /** - * Starts fetching records after the given page + * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Client Credentials flow. + * */ - page?: number; + Authorization: string; + }; + path?: never; + query?: { /** - * Number of items per page + * External ID */ - page_size?: number; + external_id?: string; }; - url: '/v1/employee/timeoff'; + url: '/v1/companies'; }; -export type GetV1EmployeeTimeoffErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1CompaniesErrors = { /** * Unauthorized */ @@ -24798,45 +24617,83 @@ export type GetV1EmployeeTimeoffErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeeTimeoffError = - GetV1EmployeeTimeoffErrors[keyof GetV1EmployeeTimeoffErrors]; +export type GetV1CompaniesError = + GetV1CompaniesErrors[keyof GetV1CompaniesErrors]; -export type GetV1EmployeeTimeoffResponses = { +export type GetV1CompaniesResponses = { /** * Success */ - 200: ListTimeoffResponse; + 200: CompaniesResponse; }; -export type GetV1EmployeeTimeoffResponse = - GetV1EmployeeTimeoffResponses[keyof GetV1EmployeeTimeoffResponses]; +export type GetV1CompaniesResponse = + GetV1CompaniesResponses[keyof GetV1CompaniesResponses]; -export type PostV1EmployeeTimeoffData = { +export type PostV1CompaniesData = { /** - * Timeoff + * Create Company params */ - body: CreateEmployeeTimeoffParams; + body?: CreateCompanyParams; + headers: { + /** + * Requires a client credentials access token obtained through the Client Credentials flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Client Credentials flow. + * + */ + Authorization: string; + }; path?: never; - query?: never; - url: '/v1/employee/timeoff'; + query?: { + /** + * Version of the address_details form schema + */ + address_details_json_schema_version?: number | 'latest'; + /** + * Version of the bank_account_details form schema + */ + bank_account_details_json_schema_version?: number | 'latest'; + /** + * Complementary action(s) to perform when creating a company: + * + * - `get_oauth_access_tokens` returns the user's access and refresh tokens + * - `send_create_password_email ` sends a reset password token to the company owner's email so they can log in using Remote UI (not needed if integration plans to use SSO only) + * + * If `action` contains `send_create_password_email` you can redirect the user to [https://employ.remote.com/api-integration-new-password-send](https://employ.remote.com/api-integration-new-password-send) + * + */ + action?: string; + /** + * Whether the request should be performed async + * + */ + async?: boolean; + /** + * Scope of the access token + * + */ + scope?: string; + }; + url: '/v1/companies'; }; -export type PostV1EmployeeTimeoffErrors = { +export type PostV1CompaniesErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: CompanyCreationConflictErrorResponse; /** * Unprocessable Entity */ @@ -24847,35 +24704,30 @@ export type PostV1EmployeeTimeoffErrors = { 429: TooManyRequestsResponse; }; -export type PostV1EmployeeTimeoffError = - PostV1EmployeeTimeoffErrors[keyof PostV1EmployeeTimeoffErrors]; +export type PostV1CompaniesError = + PostV1CompaniesErrors[keyof PostV1CompaniesErrors]; -export type PostV1EmployeeTimeoffResponses = { +export type PostV1CompaniesResponses = { /** * Created */ - 201: TimeoffResponse; + 201: CompanyCreationResponse; }; -export type PostV1EmployeeTimeoffResponse = - PostV1EmployeeTimeoffResponses[keyof PostV1EmployeeTimeoffResponses]; +export type PostV1CompaniesResponse = + PostV1CompaniesResponses[keyof PostV1CompaniesResponses]; -export type PutV1EmploymentsEmploymentIdPersonalDetailsData = { +export type PostV1BulkEmploymentJobsData = { /** - * Employment personal details params + * Bulk employment params */ - body?: EmploymentPersonalDetailsParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; + body?: BulkEmploymentCreateParams; + path?: never; query?: never; - url: '/v1/employments/{employment_id}/personal_details'; + url: '/v1/bulk-employment-jobs'; }; -export type PutV1EmploymentsEmploymentIdPersonalDetailsErrors = { +export type PostV1BulkEmploymentJobsErrors = { /** * Bad Request */ @@ -24884,10 +24736,6 @@ export type PutV1EmploymentsEmploymentIdPersonalDetailsErrors = { * Forbidden */ 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -24898,32 +24746,35 @@ export type PutV1EmploymentsEmploymentIdPersonalDetailsErrors = { 429: TooManyRequestsResponse; }; -export type PutV1EmploymentsEmploymentIdPersonalDetailsError = - PutV1EmploymentsEmploymentIdPersonalDetailsErrors[keyof PutV1EmploymentsEmploymentIdPersonalDetailsErrors]; +export type PostV1BulkEmploymentJobsError = + PostV1BulkEmploymentJobsErrors[keyof PostV1BulkEmploymentJobsErrors]; -export type PutV1EmploymentsEmploymentIdPersonalDetailsResponses = { +export type PostV1BulkEmploymentJobsResponses = { /** - * Success + * Accepted */ - 200: EmploymentResponse; + 202: BulkEmploymentImportJobResponse; }; -export type PutV1EmploymentsEmploymentIdPersonalDetailsResponse = - PutV1EmploymentsEmploymentIdPersonalDetailsResponses[keyof PutV1EmploymentsEmploymentIdPersonalDetailsResponses]; +export type PostV1BulkEmploymentJobsResponse = + PostV1BulkEmploymentJobsResponses[keyof PostV1BulkEmploymentJobsResponses]; -export type GetV1ProbationExtensionsIdData = { - body?: never; +export type PostV1TimesheetsTimesheetIdSendBackData = { + /** + * SendBackTimesheetParams + */ + body?: SendBackTimesheetParams; path: { /** - * Probation Extension Request ID + * Timesheet ID */ - id: string; + timesheet_id: string; }; query?: never; - url: '/v1/probation-extensions/{id}'; + url: '/v1/timesheets/{timesheet_id}/send-back'; }; -export type GetV1ProbationExtensionsIdErrors = { +export type PostV1TimesheetsTimesheetIdSendBackErrors = { /** * Unauthorized */ @@ -24938,32 +24789,45 @@ export type GetV1ProbationExtensionsIdErrors = { 422: UnprocessableEntityResponse; }; -export type GetV1ProbationExtensionsIdError = - GetV1ProbationExtensionsIdErrors[keyof GetV1ProbationExtensionsIdErrors]; +export type PostV1TimesheetsTimesheetIdSendBackError = + PostV1TimesheetsTimesheetIdSendBackErrors[keyof PostV1TimesheetsTimesheetIdSendBackErrors]; -export type GetV1ProbationExtensionsIdResponses = { +export type PostV1TimesheetsTimesheetIdSendBackResponses = { /** * Success */ - 200: ProbationExtensionResponse; + 200: SentBackTimesheetResponse; }; -export type GetV1ProbationExtensionsIdResponse = - GetV1ProbationExtensionsIdResponses[keyof GetV1ProbationExtensionsIdResponses]; +export type PostV1TimesheetsTimesheetIdSendBackResponse = + PostV1TimesheetsTimesheetIdSendBackResponses[keyof PostV1TimesheetsTimesheetIdSendBackResponses]; -export type GetV1FilesIdData = { +export type DeleteV1CompanyManagersUserIdData = { body?: never; + headers: { + /** + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * + */ + Authorization: string; + }; path: { /** - * File ID + * User ID */ - id: string; + user_id: string; }; query?: never; - url: '/v1/files/{id}'; + url: '/v1/company-managers/{user_id}'; }; -export type GetV1FilesIdErrors = { +export type DeleteV1CompanyManagersUserIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -24976,45 +24840,46 @@ export type GetV1FilesIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1FilesIdError = GetV1FilesIdErrors[keyof GetV1FilesIdErrors]; +export type DeleteV1CompanyManagersUserIdError = + DeleteV1CompanyManagersUserIdErrors[keyof DeleteV1CompanyManagersUserIdErrors]; -export type GetV1FilesIdResponses = { +export type DeleteV1CompanyManagersUserIdResponses = { /** * Success */ - 200: DownloadFileResponse; + 200: SuccessResponse; }; -export type GetV1FilesIdResponse = - GetV1FilesIdResponses[keyof GetV1FilesIdResponses]; +export type DeleteV1CompanyManagersUserIdResponse = + DeleteV1CompanyManagersUserIdResponses[keyof DeleteV1CompanyManagersUserIdResponses]; -export type GetV1CompanyDepartmentsData = { +export type GetV1CompanyManagersUserIdData = { body?: never; - path?: never; - query: { - /** - * Company ID - */ - company_id: string; - /** - * Paginate option. Default: true. When true, paginates response; otherwise, does not. - */ - paginate?: boolean; - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Number of items per page + * User ID */ - page_size?: number; + user_id: string; }; - url: '/v1/company-departments'; + query?: never; + url: '/v1/company-managers/{user_id}'; }; -export type GetV1CompanyDepartmentsErrors = { +export type GetV1CompanyManagersUserIdErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -25023,484 +24888,377 @@ export type GetV1CompanyDepartmentsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetV1CompanyDepartmentsError = - GetV1CompanyDepartmentsErrors[keyof GetV1CompanyDepartmentsErrors]; +export type GetV1CompanyManagersUserIdError = + GetV1CompanyManagersUserIdErrors[keyof GetV1CompanyManagersUserIdErrors]; -export type GetV1CompanyDepartmentsResponses = { +export type GetV1CompanyManagersUserIdResponses = { /** * Success */ - 200: ListCompanyDepartmentsPaginatedResponse; + 200: CompanyManagerResponse; }; -export type GetV1CompanyDepartmentsResponse = - GetV1CompanyDepartmentsResponses[keyof GetV1CompanyDepartmentsResponses]; +export type GetV1CompanyManagersUserIdResponse = + GetV1CompanyManagersUserIdResponses[keyof GetV1CompanyManagersUserIdResponses]; -export type PostV1CompanyDepartmentsData = { +export type PutV2EmploymentsEmploymentIdEmergencyContactData = { /** - * Create Company Department request params + * Employment emergency contact params */ - body: CreateCompanyDepartmentParams; - path?: never; - query?: never; - url: '/v1/company-departments'; + body?: EmploymentEmergencyContactParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Version of the emergency_contact_details form schema + */ + emergency_contact_details_json_schema_version?: number | 'latest'; + }; + url: '/v2/employments/{employment_id}/emergency_contact'; }; -export type PostV1CompanyDepartmentsErrors = { +export type PutV2EmploymentsEmploymentIdEmergencyContactErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostV1CompanyDepartmentsError = - PostV1CompanyDepartmentsErrors[keyof PostV1CompanyDepartmentsErrors]; +export type PutV2EmploymentsEmploymentIdEmergencyContactError = + PutV2EmploymentsEmploymentIdEmergencyContactErrors[keyof PutV2EmploymentsEmploymentIdEmergencyContactErrors]; -export type PostV1CompanyDepartmentsResponses = { +export type PutV2EmploymentsEmploymentIdEmergencyContactResponses = { /** - * Created + * Success */ - 201: CompanyDepartmentCreatedResponse; + 200: EmploymentDetailsOnlyResponse; }; -export type PostV1CompanyDepartmentsResponse = - PostV1CompanyDepartmentsResponses[keyof PostV1CompanyDepartmentsResponses]; +export type PutV2EmploymentsEmploymentIdEmergencyContactResponse = + PutV2EmploymentsEmploymentIdEmergencyContactResponses[keyof PutV2EmploymentsEmploymentIdEmergencyContactResponses]; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsData = { +export type GetV1EmployeeExpensesData = { body?: never; - path: { - /** - * Payroll run ID - */ - payroll_run_id: string; - }; - query?: { - /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/payroll-runs/{payroll_run_id}/employee-details'; + path?: never; + query?: never; + url: '/v1/employee/expenses'; }; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors = { +export type GetV1EmployeeExpensesErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: NotFoundResponse; }; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsError = - GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsErrors]; +export type GetV1EmployeeExpensesError = + GetV1EmployeeExpensesErrors[keyof GetV1EmployeeExpensesErrors]; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses = { +export type GetV1EmployeeExpensesResponses = { /** * Success */ - 200: EmployeeDetailsResponse; + 200: SuccessResponse; }; -export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponse = - GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses[keyof GetV1PayrollRunsPayrollRunIdEmployeeDetailsResponses]; +export type GetV1EmployeeExpensesResponse = + GetV1EmployeeExpensesResponses[keyof GetV1EmployeeExpensesResponses]; -export type GetV1EmploymentsEmploymentIdData = { - body?: never; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Wether files should be excluded - */ - exclude_files?: boolean; - }; - url: '/v1/employments/{employment_id}'; +export type PostV1EmployeeExpensesData = { + /** + * Expense params + */ + body?: ParamsToCreateEmployeeExpense; + path?: never; + query?: never; + url: '/v1/employee/expenses'; }; -export type GetV1EmploymentsEmploymentIdErrors = { +export type PostV1EmployeeExpensesErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Forbidden */ - 409: ConflictResponse; + 403: ForbiddenResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetV1EmploymentsEmploymentIdError = - GetV1EmploymentsEmploymentIdErrors[keyof GetV1EmploymentsEmploymentIdErrors]; +export type PostV1EmployeeExpensesError = + PostV1EmployeeExpensesErrors[keyof PostV1EmployeeExpensesErrors]; -export type GetV1EmploymentsEmploymentIdResponses = { +export type PostV1EmployeeExpensesResponses = { /** - * Success + * Created */ - 200: EmploymentShowResponse; + 201: SuccessResponse; }; -export type GetV1EmploymentsEmploymentIdResponse = - GetV1EmploymentsEmploymentIdResponses[keyof GetV1EmploymentsEmploymentIdResponses]; +export type PostV1EmployeeExpensesResponse = + PostV1EmployeeExpensesResponses[keyof PostV1EmployeeExpensesResponses]; -export type PatchV1EmploymentsEmploymentId2Data = { - /** - * Employment params - */ - body?: EmploymentFullParams; - headers: { - /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * - */ - Authorization: string; - }; - path: { - /** - * Employment ID - */ - employment_id: string; +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; }; - query?: { - /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the administrative_details form schema - */ - administrative_details_json_schema_version?: number | 'latest'; + +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = + { /** - * Version of the bank_account_details form schema + * Unauthorized */ - bank_account_details_json_schema_version?: number | 'latest'; + 401: UnauthorizedResponse; /** - * Version of the employment_basic_information form schema + * Forbidden */ - employment_basic_information_json_schema_version?: number | 'latest'; + 403: ForbiddenResponse; /** - * Version of the billing_address_details form schema + * Not Found */ - billing_address_details_json_schema_version?: number | 'latest'; + 404: NotFoundResponse; /** - * Version of the contract_details form schema + * Unprocessable Entity */ - contract_details_json_schema_version?: number | 'latest'; + 422: UnprocessableEntityResponse; + }; + +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; + +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = + { /** - * Version of the emergency_contact_details form schema + * No Content */ - emergency_contact_details_json_schema_version?: number | 'latest'; + 204: unknown; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionData = + { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; + }; + +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors = + { /** - * Version of the personal_details form schema + * Bad Request */ - personal_details_json_schema_version?: number | 'latest'; + 400: BadRequestResponse; /** - * Version of the pricing_plan_details form schema + * Forbidden */ - pricing_plan_details_json_schema_version?: number | 'latest'; + 403: ForbiddenResponse; /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + * Not Found */ - skip_benefits?: boolean; + 404: NotFoundResponse; /** - * Complementary action(s) to perform when creating an employment. + * Unprocessable Entity */ - actions?: string; + 422: UnprocessableEntityResponse; }; - url: '/v1/employments/{employment_id}'; -}; - -export type PatchV1EmploymentsEmploymentId2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; -}; -export type PatchV1EmploymentsEmploymentId2Error = - PatchV1EmploymentsEmploymentId2Errors[keyof PatchV1EmploymentsEmploymentId2Errors]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionErrors]; -export type PatchV1EmploymentsEmploymentId2Responses = { - /** - * Success - */ - 200: EmploymentResponse; -}; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses = + { + /** + * Created + */ + 201: SuccessResponse; + }; -export type PatchV1EmploymentsEmploymentId2Response = - PatchV1EmploymentsEmploymentId2Responses[keyof PatchV1EmploymentsEmploymentId2Responses]; +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse = + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses[keyof PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponses]; -export type PatchV1EmploymentsEmploymentIdData = { - /** - * Employment params - */ - body?: EmploymentFullParams; - headers: { +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignData = + { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. - * - * The refresh token needs to have been obtained through the Authorization Code flow. - * + * SignContractDocument */ - Authorization: string; + body: SignContractDocument; + path: { + /** + * Employment ID + */ + employment_id: string; + /** + * Pre-onboarding document ID + */ + id: string; + }; + query?: never; + url: '/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign'; }; - path: { + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors = + { /** - * Employment ID + * Bad Request */ - employment_id: string; - }; - query?: { + 400: BadRequestResponse; /** - * Version of the address_details form schema + * Unauthorized */ - address_details_json_schema_version?: number | 'latest'; + 401: UnauthorizedResponse; /** - * Version of the administrative_details form schema + * Forbidden */ - administrative_details_json_schema_version?: number | 'latest'; + 403: ForbiddenResponse; /** - * Version of the bank_account_details form schema + * Not Found */ - bank_account_details_json_schema_version?: number | 'latest'; + 404: NotFoundResponse; /** - * Version of the employment_basic_information form schema + * Unprocessable Entity */ - employment_basic_information_json_schema_version?: number | 'latest'; + 422: UnprocessableEntityResponse; + }; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignError = + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignErrors]; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses = + { /** - * Version of the billing_address_details form schema + * Success */ - billing_address_details_json_schema_version?: number | 'latest'; + 200: SuccessResponse; + }; + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponse = + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses[keyof PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignResponses]; + +export type GetV1ContractorInvoiceSchedulesData = { + body?: never; + path?: never; + query?: { /** - * Version of the contract_details form schema + * Filters contractor invoice schedules by start date greater than or equal to the value. */ - contract_details_json_schema_version?: number | 'latest'; + start_date_from?: Date; /** - * Version of the emergency_contact_details form schema + * Filters contractor invoice schedules by start date less than or equal to the value. */ - emergency_contact_details_json_schema_version?: number | 'latest'; + start_date_to?: Date; /** - * Version of the personal_details form schema + * Filters contractor invoice schedules by next invoice date greater than or equal to the value. */ - personal_details_json_schema_version?: number | 'latest'; + next_invoice_date_from?: Date; /** - * Version of the pricing_plan_details form schema + * Filters contractor invoice schedules by next invoice date less than or equal to the value. */ - pricing_plan_details_json_schema_version?: number | 'latest'; + next_invoice_date_to?: Date; /** - * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. + * Filters contractor invoice schedules by status matching the value. */ - skip_benefits?: boolean; + status?: ContractorInvoiceScheduleStatus; /** - * Complementary action(s) to perform when creating an employment. + * Filters contractor invoice schedules by employment id matching the value. */ - actions?: string; - }; - url: '/v1/employments/{employment_id}'; -}; - -export type PatchV1EmploymentsEmploymentIdErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; -}; - -export type PatchV1EmploymentsEmploymentIdError = - PatchV1EmploymentsEmploymentIdErrors[keyof PatchV1EmploymentsEmploymentIdErrors]; - -export type PatchV1EmploymentsEmploymentIdResponses = { - /** - * Success - */ - 200: EmploymentResponse; -}; - -export type PatchV1EmploymentsEmploymentIdResponse = - PatchV1EmploymentsEmploymentIdResponses[keyof PatchV1EmploymentsEmploymentIdResponses]; - -export type GetV1EmployeeTimesheetsData = { - body?: never; - path?: never; - query?: { + employment_id?: UuidSlug; /** - * Starts fetching records after the given page + * Filters contractor invoice schedules by periodicity matching the value. */ - page?: number; + periodicity?: ContractorInvoiceSchedulePeriodicity; /** - * Number of items per page + * Filters contractor invoice schedules by currency matching the value. */ - page_size?: number; - }; - url: '/v1/employee/timesheets'; -}; - -export type GetV1EmployeeTimesheetsErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetV1EmployeeTimesheetsError = - GetV1EmployeeTimesheetsErrors[keyof GetV1EmployeeTimesheetsErrors]; - -export type GetV1EmployeeTimesheetsResponses = { - /** - * Success - */ - 200: SuccessResponse; -}; - -export type GetV1EmployeeTimesheetsResponse = - GetV1EmployeeTimesheetsResponses[keyof GetV1EmployeeTimesheetsResponses]; - -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { - body?: never; - path: { + currency?: string; /** - * Custom field ID + * Field to sort by */ - custom_field_id: string; + sort_by?: + | 'number' + | 'total_amount' + | 'next_invoice_at' + | 'start_date' + | 'nr_occurrences'; /** - * Employment ID + * Sort order */ - employment_id: string; - }; - query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; -}; - -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdError = - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; - -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { - /** - * Success - */ - 200: EmploymentCustomFieldValueResponse; -}; - -export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = - GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof GetV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; - -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Data = { - /** - * Custom Field Value Update Parameters - */ - body: UpdateEmploymentCustomFieldValueParams; - path: { + order?: 'asc' | 'desc'; /** - * Custom field ID + * Starts fetching records after the given page */ - custom_field_id: string; + page?: number; /** - * Employment ID + * Number of items per page */ - employment_id: string; + page_size?: number; }; - query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; + url: '/v1/contractor-invoice-schedules'; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors = { +export type GetV1ContractorInvoiceSchedulesErrors = { /** * Unauthorized */ @@ -25513,49 +25271,32 @@ export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Error = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Errors]; +export type GetV1ContractorInvoiceSchedulesError = + GetV1ContractorInvoiceSchedulesErrors[keyof GetV1ContractorInvoiceSchedulesErrors]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses = { +export type GetV1ContractorInvoiceSchedulesResponses = { /** * Success */ - 200: EmploymentCustomFieldValueResponse; + 200: ListContractorInvoiceSchedulesResponse; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Response = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Responses]; - -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdData = { - /** - * Custom Field Value Update Parameters - */ - body: UpdateEmploymentCustomFieldValueParams; - path: { - /** - * Custom field ID - */ - custom_field_id: string; - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; -}; +export type GetV1ContractorInvoiceSchedulesResponse = + GetV1ContractorInvoiceSchedulesResponses[keyof GetV1ContractorInvoiceSchedulesResponses]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { +export type PostV1ContractorInvoiceSchedulesData = { /** - * Unauthorized + * Bulk creation payload */ - 401: UnauthorizedResponse; + body: BulkContractorInvoiceScheduleCreateParams; + path?: never; + query?: never; + url: '/v1/contractor-invoice-schedules'; +}; + +export type PostV1ContractorInvoiceSchedulesErrors = { /** * Forbidden */ @@ -25565,40 +25306,65 @@ export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors = { */ 404: NotFoundResponse; /** - * Unprocessable Entity + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. */ - 422: UnprocessableEntityResponse; + 422: { + data: { + failures: Array; + successes: Array; + }; + }; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdError = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdErrors]; +export type PostV1ContractorInvoiceSchedulesError = + PostV1ContractorInvoiceSchedulesErrors[keyof PostV1ContractorInvoiceSchedulesErrors]; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses = { +export type PostV1ContractorInvoiceSchedulesResponses = { /** - * Success + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. */ - 200: EmploymentCustomFieldValueResponse; + 201: { + data: { + failures: Array; + successes: Array; + }; + }; + /** + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. + */ + 207: { + data: { + failures: Array; + successes: Array; + }; + }; }; -export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponse = - PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses[keyof PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdResponses]; +export type PostV1ContractorInvoiceSchedulesResponse = + PostV1ContractorInvoiceSchedulesResponses[keyof PostV1ContractorInvoiceSchedulesResponses]; -export type PutV1ResignationsOffboardingRequestIdValidateData = { +export type PutV1EmployeeStateTaxesJurisdictionData = { /** - * ValidateResignation + * Employee state taxes params */ - body: ValidateResignationRequestParams; + body?: EmploymentStateTaxesParams; path: { /** - * Offboarding request ID + * Two-letter US state/jurisdiction code */ - offboarding_request_id: string; + jurisdiction: string; }; query?: never; - url: '/v1/resignations/{offboarding_request_id}/validate'; + url: '/v1/employee/state-taxes/{jurisdiction}'; }; -export type PutV1ResignationsOffboardingRequestIdValidateErrors = { +export type PutV1EmployeeStateTaxesJurisdictionErrors = { /** * Bad Request */ @@ -25607,6 +25373,10 @@ export type PutV1ResignationsOffboardingRequestIdValidateErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -25621,40 +25391,36 @@ export type PutV1ResignationsOffboardingRequestIdValidateErrors = { 429: TooManyRequestsResponse; }; -export type PutV1ResignationsOffboardingRequestIdValidateError = - PutV1ResignationsOffboardingRequestIdValidateErrors[keyof PutV1ResignationsOffboardingRequestIdValidateErrors]; +export type PutV1EmployeeStateTaxesJurisdictionError = + PutV1EmployeeStateTaxesJurisdictionErrors[keyof PutV1EmployeeStateTaxesJurisdictionErrors]; -export type PutV1ResignationsOffboardingRequestIdValidateResponses = { +export type PutV1EmployeeStateTaxesJurisdictionResponses = { /** * Success */ 200: SuccessResponse; }; -export type PutV1ResignationsOffboardingRequestIdValidateResponse = - PutV1ResignationsOffboardingRequestIdValidateResponses[keyof PutV1ResignationsOffboardingRequestIdValidateResponses]; +export type PutV1EmployeeStateTaxesJurisdictionResponse = + PutV1EmployeeStateTaxesJurisdictionResponses[keyof PutV1EmployeeStateTaxesJurisdictionResponses]; -export type GetV1ContractorInvoiceSchedulesIdData = { +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { body?: never; path: { /** - * Resource unique identifier + * Employment ID */ - id: UuidSlug; + employment_id: string; }; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/v1/employments/{employment_id}/engagement-agreement-details'; }; -export type GetV1ContractorInvoiceSchedulesIdErrors = { +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ @@ -25673,39 +25439,39 @@ export type GetV1ContractorInvoiceSchedulesIdErrors = { 429: TooManyRequestsResponse; }; -export type GetV1ContractorInvoiceSchedulesIdError = - GetV1ContractorInvoiceSchedulesIdErrors[keyof GetV1ContractorInvoiceSchedulesIdErrors]; +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError = + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type GetV1ContractorInvoiceSchedulesIdResponses = { +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ - 200: ContractorInvoiceScheduleResponse; + 200: EmploymentEngagementAgreementDetailsResponse; }; -export type GetV1ContractorInvoiceSchedulesIdResponse = - GetV1ContractorInvoiceSchedulesIdResponses[keyof GetV1ContractorInvoiceSchedulesIdResponses]; +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof GetV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type PatchV1ContractorInvoiceSchedulesId2Data = { +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsData = { /** - * Update parameters + * Employment engagement agreement details params */ - body: UpdateScheduleContractorInvoiceParams; + body?: EmploymentEngagementAgreementDetailsParams; path: { /** - * Resource unique identifier + * Employment ID */ - id: UuidSlug; + employment_id: string; }; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/v1/employments/{employment_id}/engagement-agreement-details'; }; -export type PatchV1ContractorInvoiceSchedulesId2Errors = { +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ @@ -25714,49 +25480,59 @@ export type PatchV1ContractorInvoiceSchedulesId2Errors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PatchV1ContractorInvoiceSchedulesId2Error = - PatchV1ContractorInvoiceSchedulesId2Errors[keyof PatchV1ContractorInvoiceSchedulesId2Errors]; +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsError = + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsErrors]; -export type PatchV1ContractorInvoiceSchedulesId2Responses = { +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses = { /** * Success */ - 200: ContractorInvoiceScheduleResponse; + 200: SuccessResponse; }; -export type PatchV1ContractorInvoiceSchedulesId2Response = - PatchV1ContractorInvoiceSchedulesId2Responses[keyof PatchV1ContractorInvoiceSchedulesId2Responses]; +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponse = + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses[keyof PostV1EmploymentsEmploymentIdEngagementAgreementDetailsResponses]; -export type PatchV1ContractorInvoiceSchedulesIdData = { - /** - * Update parameters - */ - body: UpdateScheduleContractorInvoiceParams; +export type GetV1BillingDocumentsBillingDocumentIdBreakdownData = { + body?: never; path: { /** - * Resource unique identifier + * The billing document's ID */ - id: UuidSlug; + billing_document_id: string; }; - query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + query?: { + /** + * Filters the results by the type of the billing breakdown item. + */ + type?: string; + }; + url: '/v1/billing-documents/{billing_document_id}/breakdown'; }; -export type PatchV1ContractorInvoiceSchedulesIdErrors = { +export type GetV1BillingDocumentsBillingDocumentIdBreakdownErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -25765,144 +25541,145 @@ export type PatchV1ContractorInvoiceSchedulesIdErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PatchV1ContractorInvoiceSchedulesIdError = - PatchV1ContractorInvoiceSchedulesIdErrors[keyof PatchV1ContractorInvoiceSchedulesIdErrors]; +export type GetV1BillingDocumentsBillingDocumentIdBreakdownError = + GetV1BillingDocumentsBillingDocumentIdBreakdownErrors[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownErrors]; -export type PatchV1ContractorInvoiceSchedulesIdResponses = { +export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponses = { /** * Success */ - 200: ContractorInvoiceScheduleResponse; + 200: BillingDocumentBreakdownResponse; }; -export type PatchV1ContractorInvoiceSchedulesIdResponse = - PatchV1ContractorInvoiceSchedulesIdResponses[keyof PatchV1ContractorInvoiceSchedulesIdResponses]; +export type GetV1BillingDocumentsBillingDocumentIdBreakdownResponse = + GetV1BillingDocumentsBillingDocumentIdBreakdownResponses[keyof GetV1BillingDocumentsBillingDocumentIdBreakdownResponses]; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsData = { - /** - * Employment pricing plan details params - */ - body?: EmploymentPricingPlanDetailsParams; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewData = { + body?: never; path: { /** * Employment ID */ employment_id: string; }; - query?: { - /** - * Version of the pricing_plan_details form schema - */ - pricing_plan_details_json_schema_version?: number | 'latest'; - }; - url: '/v2/employments/{employment_id}/pricing_plan_details'; + query?: never; + url: '/v1/employments/{employment_id}/employment-agreement/preview'; }; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsError = - PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsErrors]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewError = + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewErrors]; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses = { +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses = { /** * Success */ - 200: EmploymentDetailsOnlyResponse; + 200: EmploymentAgreementPreviewResponse; }; -export type PutV2EmploymentsEmploymentIdPricingPlanDetailsResponse = - PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses[keyof PutV2EmploymentsEmploymentIdPricingPlanDetailsResponses]; +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponse = + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses[keyof GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewResponses]; -export type PostV1RiskReserveData = { - /** - * Risk Reserve - */ - body: CreateRiskReserveParams; +export type GetV1EmployeeDocumentsData = { + body?: never; path?: never; - query?: never; - url: '/v1/risk-reserve'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + /** + * Filter documents by their description or file name, accepts full and partial case insensitive matches + */ + name?: string; + /** + * Filters the results that were uploaded on or after a given date + */ + inserted_after?: Date; + /** + * Filters the results that were uploaded before a given date + */ + inserted_before?: Date; + /** + * Field to sort by + */ + sort_by?: + | 'description' + | 'document_source' + | 'inserted_at' + | 'name' + | 'type' + | 'uploaded_by_role' + | 'related_to' + | 'sub_type' + | 'uploaded_by'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; + }; + url: '/v1/employee/documents'; }; -export type PostV1RiskReserveErrors = { +export type GetV1EmployeeDocumentsErrors = { /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type PostV1RiskReserveError = - PostV1RiskReserveErrors[keyof PostV1RiskReserveErrors]; +export type GetV1EmployeeDocumentsError = + GetV1EmployeeDocumentsErrors[keyof GetV1EmployeeDocumentsErrors]; -export type PostV1RiskReserveResponses = { +export type GetV1EmployeeDocumentsResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListDocumentsResponse; }; -export type PostV1RiskReserveResponse = - PostV1RiskReserveResponses[keyof PostV1RiskReserveResponses]; +export type GetV1EmployeeDocumentsResponse = + GetV1EmployeeDocumentsResponses[keyof GetV1EmployeeDocumentsResponses]; -export type PutV2EmploymentsEmploymentIdAddressDetailsData = { +export type PostV1EmployeeDocumentsData = { /** - * Employment address details params + * File */ - body?: EmploymentAddressDetailsParams; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - }; - url: '/v2/employments/{employment_id}/address_details'; + body: EmployeeFileParams; + path?: never; + query?: never; + url: '/v1/employee/documents'; }; -export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { +export type PostV1EmployeeDocumentsErrors = { /** * Bad Request */ @@ -25919,106 +25696,82 @@ export type PutV2EmploymentsEmploymentIdAddressDetailsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutV2EmploymentsEmploymentIdAddressDetailsError = - PutV2EmploymentsEmploymentIdAddressDetailsErrors[keyof PutV2EmploymentsEmploymentIdAddressDetailsErrors]; +export type PostV1EmployeeDocumentsError = + PostV1EmployeeDocumentsErrors[keyof PostV1EmployeeDocumentsErrors]; -export type PutV2EmploymentsEmploymentIdAddressDetailsResponses = { +export type PostV1EmployeeDocumentsResponses = { /** - * Success + * Created */ - 200: EmploymentDetailsOnlyResponse; + 201: UploadFileResponse; }; -export type PutV2EmploymentsEmploymentIdAddressDetailsResponse = - PutV2EmploymentsEmploymentIdAddressDetailsResponses[keyof PutV2EmploymentsEmploymentIdAddressDetailsResponses]; +export type PostV1EmployeeDocumentsResponse = + PostV1EmployeeDocumentsResponses[keyof PostV1EmployeeDocumentsResponses]; -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdData = { +export type PostV1TimeoffTimeoffIdCancelRequestApproveData = { body?: never; path: { /** - * Employment ID - */ - employment_id: string; - /** - * Document ID + * Time Off ID */ - id: string; + timeoff_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}'; + url: '/v1/timeoff/{timeoff_id}/cancel-request/approve'; }; -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors = { +export type PostV1TimeoffTimeoffIdCancelRequestApproveErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError = - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdErrors]; - -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses = - { - /** - * Success - */ - 200: ContractDocumentResponse; - }; - -export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponse = - GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses[keyof GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdResponses]; +export type PostV1TimeoffTimeoffIdCancelRequestApproveError = + PostV1TimeoffTimeoffIdCancelRequestApproveErrors[keyof PostV1TimeoffTimeoffIdCancelRequestApproveErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsData = { +export type PostV1TimeoffTimeoffIdCancelRequestApproveResponses = { /** - * ContractorCreateTimesheetParams + * Success */ - body: ContractorCreateTimesheetParams; + 200: SuccessResponse; +}; + +export type PostV1TimeoffTimeoffIdCancelRequestApproveResponse = + PostV1TimeoffTimeoffIdCancelRequestApproveResponses[keyof PostV1TimeoffTimeoffIdCancelRequestApproveResponses]; + +export type PostV1IdentityVerificationEmploymentIdVerifyData = { + body?: never; path: { /** - * Contractor employment ID + * Employment ID */ employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/timesheets'; + url: '/v1/identity-verification/{employment_id}/verify'; }; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostV1IdentityVerificationEmploymentIdVerifyErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -26029,106 +25782,64 @@ export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors = { 422: UnprocessableEntityResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsError = - PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsErrors]; +export type PostV1IdentityVerificationEmploymentIdVerifyError = + PostV1IdentityVerificationEmploymentIdVerifyErrors[keyof PostV1IdentityVerificationEmploymentIdVerifyErrors]; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses = { +export type PostV1IdentityVerificationEmploymentIdVerifyResponses = { /** * Success */ - 200: ContractorTimesheetResponse; + 200: SuccessResponse; }; -export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponse = - PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdTimesheetsResponses]; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsData = - { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests'; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors = - { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsError = - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsErrors]; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses = - { - /** - * Created - */ - 201: CorTerminationRequestCreatedResponse; - }; - -export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponse = - PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses[keyof PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsResponses]; +export type PostV1IdentityVerificationEmploymentIdVerifyResponse = + PostV1IdentityVerificationEmploymentIdVerifyResponses[keyof PostV1IdentityVerificationEmploymentIdVerifyResponses]; -export type GetV1EmployeePayslipsData = { +export type GetV1BillingDocumentsBillingDocumentIdPdfData = { body?: never; - path?: never; - query?: { + headers: { /** - * Starts fetching records after the given page + * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * + * The refresh token needs to have been obtained through the Authorization Code flow. + * */ - page?: number; + Authorization: string; + }; + path: { /** - * Number of items per page + * The billing document's ID */ - page_size?: number; + billing_document_id: string; }; - url: '/v1/employee/payslips'; + query?: never; + url: '/v1/billing-documents/{billing_document_id}/pdf'; }; -export type GetV1EmployeePayslipsErrors = { +export type GetV1BillingDocumentsBillingDocumentIdPdfErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetV1EmployeePayslipsError = - GetV1EmployeePayslipsErrors[keyof GetV1EmployeePayslipsErrors]; +export type GetV1BillingDocumentsBillingDocumentIdPdfError = + GetV1BillingDocumentsBillingDocumentIdPdfErrors[keyof GetV1BillingDocumentsBillingDocumentIdPdfErrors]; -export type GetV1EmployeePayslipsResponses = { +export type GetV1BillingDocumentsBillingDocumentIdPdfResponses = { /** * Success */ - 200: ListEmployeePayslipsResponse; + 200: GenericFile; }; -export type GetV1EmployeePayslipsResponse = - GetV1EmployeePayslipsResponses[keyof GetV1EmployeePayslipsResponses]; +export type GetV1BillingDocumentsBillingDocumentIdPdfResponse = + GetV1BillingDocumentsBillingDocumentIdPdfResponses[keyof GetV1BillingDocumentsBillingDocumentIdPdfResponses]; diff --git a/src/flows/PayrollEmployeeOnboarding/api.ts b/src/flows/PayrollEmployeeOnboarding/api.ts index bacf8d5bd..b956b4263 100644 --- a/src/flows/PayrollEmployeeOnboarding/api.ts +++ b/src/flows/PayrollEmployeeOnboarding/api.ts @@ -6,7 +6,7 @@ import { putV1EmployeeBankAccount, putV1EmployeeFederalTaxes, putV1EmployeePersonalDetails, - putV1EmployeeStateTaxes, + putV1EmployeeStateTaxesJurisdiction, } from '@/src/client'; import { Client } from '@/src/client/client'; import { useClient } from '@/src/context'; @@ -119,7 +119,7 @@ export const useGPUpdateStateTaxes = (jurisdiction: string | undefined) => { 'A `jurisdiction` (US state code) is required to submit state taxes.', ); } - return putV1EmployeeStateTaxes({ + return putV1EmployeeStateTaxesJurisdiction({ client: client as Client, headers: { Authorization: `` }, path: { jurisdiction }, From aa456a393e2c451eb03eacc8e3326fff7b13602a Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 12:47:49 +0200 Subject: [PATCH 09/14] review(gp): address reviewer comments on PR #1077 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Drop PBYR codes from demo descriptions - Convert if-chain to switch in PayrollAdminOnboarding demo, factor a shared onStepError helper - Reuse useStepState's fieldValues/setFieldValues instead of declaring a duplicate state in admin + employee hooks - Convert step→schema lookups to object maps (admin + employee) - Flatten nested ternaries in taxStepsAvailability to early-return helpers - Rename goToNextStep/goToPreviousStep to next/back to match other flows' hook surface - Inline the invite mutation directly in InvitationStep, drop the sendInvite wrapper from the admin hook - Generic-ize GPStepCallbacks so each step can narrow its onSuccess payload - Skip federal_taxes / state_taxes / bank_account steps at the navigation layer when the prereqs aren't met (visible: false on the step), instead of relying solely on the component returning null after the user has already landed there Co-Authored-By: Claude Opus 4.7 (1M context) --- example/src/App.tsx | 4 +- example/src/PayrollAdminOnboarding.tsx | 143 ++++++++---------- example/src/PayrollEmployeeOnboarding.tsx | 2 +- .../components/BackButton.tsx | 2 +- .../components/InvitationStep.tsx | 16 +- .../components/SelectCountryStep.tsx | 2 +- .../components/useStepSubmitHandler.ts | 2 +- src/flows/PayrollAdminOnboarding/hooks.tsx | 62 +++----- .../components/BackButton.tsx | 2 +- .../useEmployeeStepSubmitHandler.ts | 2 +- src/flows/PayrollEmployeeOnboarding/hooks.tsx | 122 +++++++++------ .../tests/components.test.tsx | 32 ++-- src/flows/types.ts | 6 +- 13 files changed, 200 insertions(+), 197 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index fa36f224a..c875f12b9 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -180,14 +180,14 @@ const additionalDemos = [ { id: 'payroll-admin-onboarding', title: 'GP Admin Onboarding', - description: 'Global Payroll admin onboarding flow (PBYR-4044)', + description: 'Global Payroll admin onboarding flow', component: PayrollAdminOnboardingForm, sourceCode: '', }, { id: 'payroll-employee-onboarding', title: 'GP Employee Onboarding', - description: 'Global Payroll employee self-onboarding flow (PBYR-4045)', + description: 'Global Payroll employee self-onboarding flow', component: PayrollEmployeeOnboardingForm, sourceCode: '', }, diff --git a/example/src/PayrollAdminOnboarding.tsx b/example/src/PayrollAdminOnboarding.tsx index 6fae0c355..9f123abae 100644 --- a/example/src/PayrollAdminOnboarding.tsx +++ b/example/src/PayrollAdminOnboarding.tsx @@ -92,76 +92,48 @@ function AdminFlowForm({ legalEntityId }: { legalEntityId: string }) { return

Loading...

; } - return ( - <> - {/* Step navigation bar — same pattern as Onboarding */} -
-
    - {allSteps.map(([key, label], index) => ( -
  • - {index + 1} - {label} -
  • - ))} -
-
- -
-

{STEP_LABELS[currentStep]}

-

- {STEP_DESCRIPTIONS[currentStep]} -

+ const onStepError = (e: { + error: Error; + fieldErrors: { field: string; messages: string[] }[]; + }) => + handleError( + e.error, + e.fieldErrors.map((fe) => ({ + ...fe, + userFriendlyLabel: fe.field, + })), + ); - {currentStep === 'select_country' && ( + const renderStep = () => { + switch (currentStep) { + case 'select_country': { + const isFormReady = + !!adminBag.countryCode && adminBag.fields.length > 0; + return ( <> - handleError( - e.error, - e.fieldErrors.map((fe) => ({ - ...fe, - userFriendlyLabel: fe.field, - })), - ) - } + onError={onStepError} onSuccess={clearErrors} /> - {adminBag.countryCode && adminBag.fields.length > 0 && ( + {isFormReady && (
- Create Employment & Continue + Create Employment & Continue
)} - {adminBag.isLoading && adminBag.countryCode && ( -

- Loading form… -

- )} - )} - - {currentStep === 'contract_details' && ( + ); + } + case 'contract_details': + return ( <> - handleError( - e.error, - e.fieldErrors.map((fe) => ({ - ...fe, - userFriendlyLabel: fe.field, - })), - ) - } + onError={onStepError} onSuccess={clearErrors} /> @@ -173,24 +145,16 @@ function AdminFlowForm({ legalEntityId }: { legalEntityId: string }) { className='submit-button' onClick={clearErrors} > - Save & Continue + Save & Continue
- )} - - {currentStep === 'administrative_details' && ( + ); + case 'administrative_details': + return ( <> - handleError( - e.error, - e.fieldErrors.map((fe) => ({ - ...fe, - userFriendlyLabel: fe.field, - })), - ) - } + onError={onStepError} onSuccess={clearErrors} /> @@ -202,13 +166,13 @@ function AdminFlowForm({ legalEntityId }: { legalEntityId: string }) { className='submit-button' onClick={clearErrors} > - Save & Continue + Save & Continue
- )} - - {currentStep === 'invite' && ( + ); + case 'invite': + return ( <>
@@ -220,21 +184,40 @@ function AdminFlowForm({ legalEntityId }: { legalEntityId: string }) { clearErrors(); setDone(true); }} - onError={(e) => - handleError( - e.error, - e.fieldErrors.map((fe) => ({ - ...fe, - userFriendlyLabel: fe.field, - })), - ) - } + onError={onStepError} > Send Invitation
- )} + ); + default: + return null; + } + }; + + return ( + <> +
+
    + {allSteps.map(([key, label], index) => ( +
  • + {index + 1} + {label} +
  • + ))} +
+
+ +
+

{STEP_LABELS[currentStep]}

+

+ {STEP_DESCRIPTIONS[currentStep]} +

+ {renderStep()}
); diff --git a/example/src/PayrollEmployeeOnboarding.tsx b/example/src/PayrollEmployeeOnboarding.tsx index ab783bc3a..8a86460cf 100644 --- a/example/src/PayrollEmployeeOnboarding.tsx +++ b/example/src/PayrollEmployeeOnboarding.tsx @@ -369,7 +369,7 @@ function EmployeeFlowInner({ ) : ( diff --git a/src/flows/PayrollAdminOnboarding/components/BackButton.tsx b/src/flows/PayrollAdminOnboarding/components/BackButton.tsx index c4eca82de..e0fcc3713 100644 --- a/src/flows/PayrollAdminOnboarding/components/BackButton.tsx +++ b/src/flows/PayrollAdminOnboarding/components/BackButton.tsx @@ -16,7 +16,7 @@ export function BackButton({ } const handleBack = (evt: React.MouseEvent) => { - adminBag.goToPreviousStep(); + adminBag.back(); onClick?.(evt); }; diff --git a/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx b/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx index 8b80977c9..41808dbbf 100644 --- a/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx +++ b/src/flows/PayrollAdminOnboarding/components/InvitationStep.tsx @@ -2,7 +2,8 @@ import { PropsWithChildren } from 'react'; import { usePayrollAdminOnboardingContext } from '@/src/flows/PayrollAdminOnboarding/context'; import { useFormFields } from '@/src/context'; import type { GPStepCallbacks } from '@/src/flows/types'; -import { isMutationError } from '@/src/lib/mutations'; +import { isMutationError, mutationToPromise } from '@/src/lib/mutations'; +import { useGPInviteEmployee } from '@/src/flows/PayrollAdminOnboarding/api'; type InvitationStepProps = Pick & { children?: React.ReactNode; @@ -15,6 +16,8 @@ export function InvitationStep({ }: PropsWithChildren) { const { adminBag } = usePayrollAdminOnboardingContext(); const { components } = useFormFields(); + const inviteMutation = useGPInviteEmployee(); + const { mutateAsyncOrThrow: inviteAsync } = mutationToPromise(inviteMutation); const CustomButton = components?.button; if (!CustomButton) { @@ -22,10 +25,12 @@ export function InvitationStep({ } const handleInvite = async () => { + if (!adminBag.employmentId) return; try { - const data = await adminBag.sendInvite(); + const data = await inviteAsync({ employmentId: adminBag.employmentId }); + await adminBag.refetchSteps(); await onSuccess?.(data); - adminBag.goToNextStep(); + adminBag.next(); } catch (error: unknown) { if (isMutationError(error)) { onError?.({ @@ -44,7 +49,10 @@ export function InvitationStep({ }; return ( - + {children ?? 'Send invitation'} ); diff --git a/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx b/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx index 93fac8526..43274688a 100644 --- a/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx +++ b/src/flows/PayrollAdminOnboarding/components/SelectCountryStep.tsx @@ -30,7 +30,7 @@ export function SelectCountryStep({ await onSubmit?.(values); const data = await adminBag.onSubmit(values); await onSuccess?.(data); - adminBag.goToNextStep(); + adminBag.next(); } catch (error: unknown) { if (isMutationError(error)) { onError?.({ diff --git a/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts b/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts index 69990a412..98c2530fa 100644 --- a/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts +++ b/src/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.ts @@ -18,7 +18,7 @@ export function useStepSubmitHandler({ await onSubmit?.(values); const data = await adminBag.onSubmit(values); await onSuccess?.(data); - adminBag.goToNextStep(); + adminBag.next(); } catch (error: unknown) { if (isMutationError(error)) { onError?.({ diff --git a/src/flows/PayrollAdminOnboarding/hooks.tsx b/src/flows/PayrollAdminOnboarding/hooks.tsx index d70507df9..6a8bfe48d 100644 --- a/src/flows/PayrollAdminOnboarding/hooks.tsx +++ b/src/flows/PayrollAdminOnboarding/hooks.tsx @@ -1,5 +1,5 @@ import { useState, useMemo, useCallback } from 'react'; -import { FieldValues } from 'react-hook-form'; +import type { FieldValues } from 'react-hook-form'; import { useGPOnboardingSteps } from '@/src/common/api/gpOnboarding'; import { useStepState } from '@/src/flows/useStepState'; import type { Step } from '@/src/flows/useStepState'; @@ -12,7 +12,6 @@ import { useGPCreateEmployment, useGPUpdateContractDetails, useGPUpdateAdministrativeDetails, - useGPInviteEmployee, } from '@/src/flows/PayrollAdminOnboarding/api'; import type { JSONSchemaFormResultWithFieldsets } from '@/src/flows/types'; @@ -57,9 +56,7 @@ export const usePayrollAdminOnboarding = ({ string | undefined >(initialCountryCode); - const [fieldValues, setFieldValues] = useState({}); - - // Fix: derive from state so setInternalCountryCode is reflected in step visibility + // Derive from state so setInternalCountryCode is reflected in step visibility const skipCountry = !!internalCountryCode && !!initialCountryCode; const steps = useMemo(() => buildAdminSteps(skipCountry), [skipCountry]); @@ -75,8 +72,15 @@ export const usePayrollAdminOnboarding = ({ [updateErrorContext], ); - const { stepState, nextStep, previousStep, goToStep, setStepValues } = - useStepState(steps, onStepChange); + const { + stepState, + nextStep, + previousStep, + goToStep, + setStepValues, + fieldValues, + setFieldValues, + } = useStepState(steps, onStepChange); const currentStep = stepState.currentStep.name; @@ -105,13 +109,15 @@ export const usePayrollAdminOnboarding = ({ }, ); - // Current step's schema form const currentSchema = useMemo(() => { - if (currentStep === 'select_country') return basicInfoSchema.data; - if (currentStep === 'contract_details') return contractDetailsSchema.data; - if (currentStep === 'administrative_details') - return adminDetailsSchema.data; - return undefined; + const schemaByStep: Partial< + Record + > = { + select_country: basicInfoSchema.data, + contract_details: contractDetailsSchema.data, + administrative_details: adminDetailsSchema.data, + }; + return schemaByStep[currentStep]; }, [ currentStep, basicInfoSchema.data, @@ -124,11 +130,9 @@ export const usePayrollAdminOnboarding = ({ contractDetailsSchema.isLoading || adminDetailsSchema.isLoading; - // Mutations const createEmploymentMutation = useGPCreateEmployment(); const updateContractDetailsMutation = useGPUpdateContractDetails(); const updateAdminDetailsMutation = useGPUpdateAdministrativeDetails(); - const inviteEmployeeMutation = useGPInviteEmployee(); const { mutateAsyncOrThrow: createEmploymentAsync } = mutationToPromise( createEmploymentMutation, @@ -139,15 +143,11 @@ export const usePayrollAdminOnboarding = ({ const { mutateAsyncOrThrow: updateAdminDetailsAsync } = mutationToPromise( updateAdminDetailsMutation, ); - const { mutateAsyncOrThrow: inviteEmployeeAsync } = mutationToPromise( - inviteEmployeeMutation, - ); const isSubmitting = createEmploymentMutation.isPending || updateContractDetailsMutation.isPending || - updateAdminDetailsMutation.isPending || - inviteEmployeeMutation.isPending; + updateAdminDetailsMutation.isPending; const { data: apiSteps, @@ -240,49 +240,31 @@ export const usePayrollAdminOnboarding = ({ ], ); - // sendInvite does NOT call nextStep() — navigation is the caller's responsibility, - // consistent with onSubmit. InvitationStep calls goToNextStep() after onSuccess. - const sendInvite = useCallback(async () => { - if (!internalEmploymentId) return; - const data = await inviteEmployeeAsync({ - employmentId: internalEmploymentId, - }); - await refetchSteps(); - return data; - }, [internalEmploymentId, inviteEmployeeAsync, refetchSteps]); - return { - // Step state stepState, isLoading: isLoadingSteps || isLoadingSchema, isSubmitting, isComplete: isComplete ?? false, - // Identity companyId, legalEntityId, countryCode: internalCountryCode, employmentId: internalEmploymentId, initialValues, options, - // API steps apiSteps, refetchSteps, - // Current step schema fields: currentSchema?.fields ?? [], meta: (currentSchema?.meta ?? {}) as JSONSchemaFormResultWithFieldsets['meta'], fieldValues, setFieldValues, - // Form helpers handleValidation, parseFormValues, onSubmit, - sendInvite, - // Navigation setInternalCountryCode, setInternalEmploymentId, - goToNextStep: nextStep, - goToPreviousStep: previousStep, + next: nextStep, + back: previousStep, goToStep, setStepValues, }; diff --git a/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx b/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx index a6d25486d..bd4a501b4 100644 --- a/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx +++ b/src/flows/PayrollEmployeeOnboarding/components/BackButton.tsx @@ -16,7 +16,7 @@ export function BackButton({ } const handleBack = (evt: React.MouseEvent) => { - employeeBag.goToPreviousStep(); + employeeBag.back(); onClick?.(evt); }; diff --git a/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts b/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts index 6149c1386..27151e857 100644 --- a/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts +++ b/src/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.ts @@ -14,7 +14,7 @@ export function useEmployeeStepSubmitHandler({ await onSubmit?.(values); const data = await employeeBag.onSubmit(values); await onSuccess?.(data); - employeeBag.goToNextStep(); + employeeBag.next(); } catch (error: unknown) { if (isMutationError(error)) { onError?.({ diff --git a/src/flows/PayrollEmployeeOnboarding/hooks.tsx b/src/flows/PayrollEmployeeOnboarding/hooks.tsx index b27cfee1e..766f90be4 100644 --- a/src/flows/PayrollEmployeeOnboarding/hooks.tsx +++ b/src/flows/PayrollEmployeeOnboarding/hooks.tsx @@ -1,5 +1,5 @@ import { useMemo, useCallback, useState } from 'react'; -import { FieldValues } from 'react-hook-form'; +import type { FieldValues } from 'react-hook-form'; import { useGPOnboardingSteps } from '@/src/common/api/gpOnboarding'; import { useStepState } from '@/src/flows/useStepState'; import type { Step } from '@/src/flows/useStepState'; @@ -45,16 +45,25 @@ const PERSONAL_DETAILS_JSF_MODIFY: JSFModify = { }, }; -// Steps are stable. bank_account / federal_taxes / state_taxes are conditionally -// rendered by their components (BankAccountStep checks substeps; the tax steps check -// taxStepsAvailability) — consumers should decide which to render in their flow UI. -const EMPLOYEE_STEPS: Record> = { +const buildEmployeeSteps = ({ + hasBankSubstep, + federalTaxesVisible, + stateTaxesVisible, +}: { + hasBankSubstep: boolean; + federalTaxesVisible: boolean; + stateTaxesVisible: boolean; +}): Record> => ({ personal_details: { index: 0, name: 'personal_details' }, home_address: { index: 1, name: 'home_address' }, - bank_account: { index: 2, name: 'bank_account' }, - federal_taxes: { index: 3, name: 'federal_taxes' }, - state_taxes: { index: 4, name: 'state_taxes' }, -}; + bank_account: { index: 2, name: 'bank_account', visible: hasBankSubstep }, + federal_taxes: { + index: 3, + name: 'federal_taxes', + visible: federalTaxesVisible, + }, + state_taxes: { index: 4, name: 'state_taxes', visible: stateTaxesVisible }, +}); const TAX_STEPS = ['federal_taxes', 'state_taxes'] as const; type TaxStepKey = (typeof TAX_STEPS)[number]; @@ -66,8 +75,6 @@ export const usePayrollEmployeeOnboarding = ({ initialValues, options, }: Omit) => { - const [fieldValues, setFieldValues] = useState({}); - // Per-step failures detected at submit time. Used to retroactively flip a // tax step to `pending_enrollment` after the backend returns 404 with // `Tax task not found...`. @@ -86,11 +93,6 @@ export const usePayrollEmployeeOnboarding = ({ [updateErrorContext], ); - const { stepState, nextStep, previousStep, goToStep, setStepValues } = - useStepState(EMPLOYEE_STEPS, onStepChange); - - const currentStep = stepState.currentStep.name; - // ── API steps ─────────────────────────────────────────────────────────────── const { @@ -108,6 +110,35 @@ export const usePayrollEmployeeOnboarding = ({ apiSteps?.find((s) => s.type === 'completion')?.sub_steps?.[0]?.status === 'completed'; + // ── Step visibility — drop steps the backend says are unneeded ────────────── + const isUSA = countryCode === 'USA'; + const isPostEnrollment = isComplete ?? false; + const hasBankSubstep = selfOnboardingSubsteps.some( + (s) => s.type === 'employee_provides_bank_details', + ); + + const steps = useMemo( + () => + buildEmployeeSteps({ + hasBankSubstep, + federalTaxesVisible: isUSA && isPostEnrollment, + stateTaxesVisible: isUSA && !!jurisdiction && isPostEnrollment, + }), + [hasBankSubstep, isUSA, isPostEnrollment, jurisdiction], + ); + + const { + stepState, + nextStep, + previousStep, + goToStep, + setStepValues, + fieldValues, + setFieldValues, + } = useStepState(steps, onStepChange); + + const currentStep = stepState.currentStep.name; + // ── Tax-step availability ─────────────────────────────────────────────────── // // The federal_taxes and state_taxes endpoints only respond once Tiger creates @@ -118,8 +149,6 @@ export const usePayrollEmployeeOnboarding = ({ // that is insufficient (e.g. step status is completed but employment lifecycle // is `onboarded`), we fall back to retroactively flipping the step to // `pending_enrollment` after the PUT returns 404. See `taxSubmitFailures`. - const isUSA = countryCode === 'USA'; - const isPostEnrollment = isComplete ?? false; // ── Schema queries ────────────────────────────────────────────────────────── @@ -174,12 +203,16 @@ export const usePayrollEmployeeOnboarding = ({ ); const currentSchema = useMemo(() => { - if (currentStep === 'personal_details') return personalDetailsSchema.data; - if (currentStep === 'home_address') return homeAddressSchema.data; - if (currentStep === 'bank_account') return bankAccountSchema.data; - if (currentStep === 'federal_taxes') return federalTaxesSchema.data; - if (currentStep === 'state_taxes') return stateTaxesSchema.data; - return undefined; + const schemaByStep: Partial< + Record + > = { + personal_details: personalDetailsSchema.data, + home_address: homeAddressSchema.data, + bank_account: bankAccountSchema.data, + federal_taxes: federalTaxesSchema.data, + state_taxes: stateTaxesSchema.data, + }; + return schemaByStep[currentStep]; }, [ currentStep, personalDetailsSchema.data, @@ -194,27 +227,22 @@ export const usePayrollEmployeeOnboarding = ({ // `schema_unavailable` reason instead of letting the consumer render an // empty form. const taxStepsAvailability = useMemo(() => { - const federalReason: TaxStepUnavailableReason | null = !isUSA - ? 'unsupported_country' - : taxSubmitFailures.federal_taxes - ? taxSubmitFailures.federal_taxes - : !isPostEnrollment - ? 'pending_enrollment' - : federalTaxesSchema.isError - ? 'schema_unavailable' - : null; - - const stateReason: TaxStepUnavailableReason | null = !isUSA - ? 'unsupported_country' - : !jurisdiction - ? 'no_jurisdiction' - : taxSubmitFailures.state_taxes - ? taxSubmitFailures.state_taxes - : !isPostEnrollment - ? 'pending_enrollment' - : stateTaxesSchema.isError - ? 'schema_unavailable' - : null; + const federalReason = ((): TaxStepUnavailableReason | null => { + if (!isUSA) return 'unsupported_country'; + if (taxSubmitFailures.federal_taxes) return taxSubmitFailures.federal_taxes; + if (!isPostEnrollment) return 'pending_enrollment'; + if (federalTaxesSchema.isError) return 'schema_unavailable'; + return null; + })(); + + const stateReason = ((): TaxStepUnavailableReason | null => { + if (!isUSA) return 'unsupported_country'; + if (!jurisdiction) return 'no_jurisdiction'; + if (taxSubmitFailures.state_taxes) return taxSubmitFailures.state_taxes; + if (!isPostEnrollment) return 'pending_enrollment'; + if (stateTaxesSchema.isError) return 'schema_unavailable'; + return null; + })(); return { federal_taxes: { @@ -403,8 +431,8 @@ export const usePayrollEmployeeOnboarding = ({ handleValidation, parseFormValues, onSubmit, - goToNextStep: nextStep, - goToPreviousStep: previousStep, + next: nextStep, + back: previousStep, goToStep, setStepValues, }; diff --git a/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx b/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx index 275c728e8..dd08e71eb 100644 --- a/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx +++ b/src/flows/PayrollEmployeeOnboarding/tests/components.test.tsx @@ -41,8 +41,8 @@ function buildBag(overrides: Partial = {}): Bag { isSubmitting: false, selfOnboardingSubsteps: [], initialValues: undefined, - goToPreviousStep: vi.fn(), - goToNextStep: vi.fn(), + back: vi.fn(), + next: vi.fn(), onSubmit: vi.fn().mockResolvedValue({ data: 'ok' }), taxStepsAvailability: { federal_taxes: { isAvailable: true, unavailableReason: null }, @@ -91,22 +91,22 @@ describe('SubmitButton', () => { }); describe('BackButton', () => { - it('calls goToPreviousStep then the consumer onClick on click', () => { - const goToPreviousStep = vi.fn(); + it('calls back then the consumer onClick on click', () => { + const back = vi.fn(); const onClick = vi.fn(); - mockContext(buildBag({ goToPreviousStep })); + mockContext(buildBag({ back })); render(Back); fireEvent.click(screen.getByRole('button', { name: 'Back' })); - expect(goToPreviousStep).toHaveBeenCalledTimes(1); + expect(back).toHaveBeenCalledTimes(1); expect(onClick).toHaveBeenCalledTimes(1); }); - it('still calls goToPreviousStep when no onClick is supplied', () => { - const goToPreviousStep = vi.fn(); - mockContext(buildBag({ goToPreviousStep })); + it('still calls back when no onClick is supplied', () => { + const back = vi.fn(); + mockContext(buildBag({ back })); render(Back); fireEvent.click(screen.getByRole('button')); - expect(goToPreviousStep).toHaveBeenCalledTimes(1); + expect(back).toHaveBeenCalledTimes(1); }); it('throws when no button component is configured', () => { @@ -238,9 +238,9 @@ describe('FederalTaxesStep / StateTaxesStep', () => { describe('useEmployeeStepSubmitHandler', () => { it('calls onSubmit, bag.onSubmit, onSuccess, then advances', async () => { - const goToNextStep = vi.fn(); + const next = vi.fn(); const bagOnSubmit = vi.fn().mockResolvedValue({ id: '1' }); - mockContext(buildBag({ onSubmit: bagOnSubmit, goToNextStep })); + mockContext(buildBag({ onSubmit: bagOnSubmit, next })); const onSubmit = vi.fn(); const onSuccess = vi.fn(); @@ -252,12 +252,12 @@ describe('useEmployeeStepSubmitHandler', () => { expect(onSubmit).toHaveBeenCalledWith({ a: 1 }); expect(bagOnSubmit).toHaveBeenCalledWith({ a: 1 }); expect(onSuccess).toHaveBeenCalledWith({ id: '1' }); - expect(goToNextStep).toHaveBeenCalledTimes(1); + expect(next).toHaveBeenCalledTimes(1); expect(onError).not.toHaveBeenCalled(); }); it('routes mutation-shaped errors through onError without advancing', async () => { - const goToNextStep = vi.fn(); + const next = vi.fn(); const mutationErr = { error: new Error('boom'), rawError: { message: 'boom' }, @@ -265,7 +265,7 @@ describe('useEmployeeStepSubmitHandler', () => { fieldErrors: [{ field: 'x', messages: ['bad'] }], }; const bagOnSubmit = vi.fn().mockRejectedValue(mutationErr); - mockContext(buildBag({ onSubmit: bagOnSubmit, goToNextStep })); + mockContext(buildBag({ onSubmit: bagOnSubmit, next })); const onError = vi.fn(); const { result } = renderHook(() => @@ -277,7 +277,7 @@ describe('useEmployeeStepSubmitHandler', () => { rawError: mutationErr.rawError, fieldErrors: mutationErr.fieldErrors, }); - expect(goToNextStep).not.toHaveBeenCalled(); + expect(next).not.toHaveBeenCalled(); }); it('falls back to plain-error shape when error is not a MutationError', async () => { diff --git a/src/flows/types.ts b/src/flows/types.ts index 7bc985c2f..8c556ac1e 100644 --- a/src/flows/types.ts +++ b/src/flows/types.ts @@ -116,10 +116,12 @@ export type JSONSchemaFormResultWithFieldsets = FormResult & { /** * Shared callback prop type for GP step components (admin and employee flows). + * `TSuccess` lets a step narrow the success payload to its own response type; + * defaults to `unknown` for compatibility. */ -export type GPStepCallbacks = { +export type GPStepCallbacks = { onSubmit?: (payload: Record) => void | Promise; - onSuccess?: (data: unknown) => void | Promise; + onSuccess?: (data: TSuccess) => void | Promise; onError?: (args: { error: Error; rawError: Record; From 43f6e4a683190f24580550e8e22b03bfdad43712 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 15:48:39 +0200 Subject: [PATCH 10/14] sec(example): keep all access tokens server-side in the GP demos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related changes so the FE no longer holds a Bearer token for the Global Payroll demos: 1. Gate the JWT auth endpoints to non-production. /api/fetch-company-manager and /api/fetch-employee-token/:id now 403 when NODE_ENV=production, matching the existing gate on /api/fetch-refresh-token. 2. Mint employee assertion tokens in the proxy. The proxy now picks `employee-assertion` for /v1/employee/* and signs the JWT-bearer token using the x-rf-employment-id header the FE forwards via the SDK's `proxy.headers`. The FE never sees the token. The GP Admin and GP Employee demos now both pass `authType='none'` to skip the FE-side auth callback entirely — the proxy is the only thing that ever holds a Bearer. Co-Authored-By: Claude Opus 4.7 (1M context) --- example/api/jwt_auth.js | 11 +++++++ example/api/proxy.js | 35 ++++++++++++++--------- example/src/PayrollAdminOnboarding.tsx | 5 +++- example/src/PayrollEmployeeOnboarding.tsx | 34 +++++++++------------- example/src/RemoteFlows.tsx | 9 +++++- 5 files changed, 58 insertions(+), 36 deletions(-) diff --git a/example/api/jwt_auth.js b/example/api/jwt_auth.js index 0f867bfe3..aeff91859 100644 --- a/example/api/jwt_auth.js +++ b/example/api/jwt_auth.js @@ -86,6 +86,11 @@ async function fetchCompanyManagerToken() { // Express route handler async function getCompanyManagerToken(req, res) { + if (process.env.NODE_ENV === 'production') { + return res + .status(403) + .json({ error: 'This endpoint is not available in production mode' }); + } try { const { accessToken, expiresIn } = await fetchCompanyManagerToken(); @@ -162,6 +167,11 @@ async function fetchEmployeeToken(employmentId) { } async function getEmployeeToken(req, res) { + if (process.env.NODE_ENV === 'production') { + return res + .status(403) + .json({ error: 'This endpoint is not available in production mode' }); + } const { employmentId } = req.params; try { const { accessToken, expiresIn } = await fetchEmployeeToken(employmentId); @@ -178,5 +188,6 @@ module.exports = { getCompanyManagerToken, generateJWTToken, fetchCompanyManagerToken, + fetchEmployeeToken, getEmployeeToken, }; diff --git a/example/api/proxy.js b/example/api/proxy.js index 820252e6d..4429ec362 100644 --- a/example/api/proxy.js +++ b/example/api/proxy.js @@ -3,13 +3,14 @@ const { fetchClientCredentialsAccessToken, fetchAccessToken, } = require('./get_token.js'); +const { fetchEmployeeToken } = require('./jwt_auth.js'); const { buildGatewayURL } = require('./utils.js'); /** * Determines which token type to use based on HTTP method and path * @param {string} method - HTTP method (GET, POST, PUT, PATCH, etc.) * @param {string} path - The API path (e.g., '/v1/countries' or '/v2/countries?foo=bar') - * @returns {'client-credentials' | 'user-token'} The token type to use + * @returns {'client-credentials' | 'user-token' | 'employee-assertion'} The token type to use */ function getTokenType(method, path) { const normalizedMethod = method.toUpperCase(); @@ -54,10 +55,11 @@ function getTokenType(method, path) { return 'client-credentials'; } - // /v1/employee/* endpoints require an employee-scoped assertion token. - // The SDK already sends the correct Bearer token — pass it through unchanged. + // /v1/employee/* endpoints need an employment-scoped assertion. The FE + // identifies which employment via the x-rf-employment-id header; the proxy + // mints the JWT-bearer token server-side so the FE never sees it. if (/^\/v1\/employee\//.test(pathname)) { - return 'pass-through'; + return 'employee-assertion'; } // All other requests use user token @@ -104,18 +106,23 @@ async function createProxyRequest(path, method = 'GET', options = {}) { // Add authentication if required if (requiresAuth) { const tokenType = getTokenType(method, path); - if (tokenType === 'pass-through') { - // Employee endpoints: the SDK already set the correct Bearer token in the - // incoming request — forward it unchanged instead of overwriting with a - // company manager token. - // headers already contains the incoming Authorization from ...headers above. + let accessToken; + if (tokenType === 'client-credentials') { + ({ accessToken } = await fetchClientCredentialsAccessToken()); + } else if (tokenType === 'employee-assertion') { + const employmentId = headers['x-rf-employment-id']; + if (!employmentId) { + throw Object.assign( + new Error('Missing x-rf-employment-id header for employee request'), + { response: { status: 400, data: { error: 'employmentId required' } } }, + ); + } + ({ accessToken } = await fetchEmployeeToken(employmentId)); } else { - const { accessToken } = - tokenType === 'client-credentials' - ? await fetchClientCredentialsAccessToken() - : await fetchAccessToken(); - requestConfig.headers.Authorization = `Bearer ${accessToken}`; + ({ accessToken } = await fetchAccessToken()); } + requestConfig.headers.Authorization = `Bearer ${accessToken}`; + delete requestConfig.headers['x-rf-employment-id']; } return axios(requestConfig); diff --git a/example/src/PayrollAdminOnboarding.tsx b/example/src/PayrollAdminOnboarding.tsx index 9f123abae..cc0863189 100644 --- a/example/src/PayrollAdminOnboarding.tsx +++ b/example/src/PayrollAdminOnboarding.tsx @@ -250,7 +250,10 @@ function GPAdminOnboardingInner() { export function PayrollAdminOnboardingForm() { return ( - + ); diff --git a/example/src/PayrollEmployeeOnboarding.tsx b/example/src/PayrollEmployeeOnboarding.tsx index 8a86460cf..02d9becfe 100644 --- a/example/src/PayrollEmployeeOnboarding.tsx +++ b/example/src/PayrollEmployeeOnboarding.tsx @@ -1,4 +1,4 @@ -import { useState, useMemo } from 'react'; +import { useState } from 'react'; import { PayrollEmployeeOnboardingFlow, PayrollEmployeeOnboardingRenderProps, @@ -42,17 +42,6 @@ type Errors = { const emptyErrors: Errors = { apiError: '', fieldErrors: [] }; -// Fetches an employee-scoped token via the JWT assertion grant. -function buildEmployeeAuth(employmentId: string) { - return () => - fetch(`/api/fetch-employee-token/${employmentId}`) - .then((res) => res.json()) - .then((data) => ({ - accessToken: data.access_token as string, - expiresIn: (data.expires_in as number) ?? 300, - })); -} - // ── Outer-context loader (company manager token) ──────────────────────────── // // The employee assertion token can't fetch /v1/employments/:id (returns @@ -438,10 +427,6 @@ function EmployeeFlowInner({ function EmployeeFlowForm({ employmentId }: { employmentId: string }) { const { hasBankAccount, countryCode, jurisdiction, isLoading } = useEmployeeFlowContext(employmentId); - const employeeAuth = useMemo( - () => buildEmployeeAuth(employmentId), - [employmentId], - ); if (isLoading) return

Loading...

; if (!countryCode) { @@ -460,8 +445,16 @@ function EmployeeFlowForm({ employmentId }: { employmentId: string }) { } return ( - // Inner RemoteFlows uses the employee-scoped token for all mutations - + // Inner context: the proxy mints the employee-scoped JWT-bearer token + // server-side when it sees the x-rf-employment-id header on /v1/employee/* + // routes. The FE never holds the employee token. + + // Outer context: the proxy mints the company-manager token server-side + // for /v1/employments/* and /v1/companies/*, so the FE never sees one. + ); diff --git a/example/src/RemoteFlows.tsx b/example/src/RemoteFlows.tsx index 801b5a9cd..83820f7ff 100644 --- a/example/src/RemoteFlows.tsx +++ b/example/src/RemoteFlows.tsx @@ -46,7 +46,11 @@ type RemoteFlowsProps = Omit & { children: ReactNode; auth?: RemoteFlowsSDKProps['auth']; isClientToken?: boolean; - authType?: 'refresh-token' | 'company-manager' | 'client'; + /** + * `'none'` skips the FE-side auth callback entirely — use it when the proxy + * mints tokens server-side and the FE never needs to hold one. + */ + authType?: 'refresh-token' | 'company-manager' | 'client' | 'none'; }; export const RemoteFlows = ({ @@ -56,6 +60,9 @@ export const RemoteFlows = ({ ...props }: RemoteFlowsProps) => { const auth = useMemo(() => { + if (authType === 'none') { + return undefined; + } if (authType === 'company-manager') { return fetchCompanyManagerToken; } From b94d2cae8da65cb2d6b9fe20247045d0793a33f7 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 16:57:16 +0200 Subject: [PATCH 11/14] fix(gp): render mobile_number as tel widget for non-USA personal_details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The personal_details schema's mobile_number is shaped differently per country: - USA: a flat 10-digit string with `inputType: 'text'`. - Everywhere else: an `anyOf` of per-country dial-code patterns. PR #1078 hardcoded a USA-flavoured override on every render ("Enter 10 digits, no country code…") which silently nudges non-USA users toward a value that fails the schema's anyOf validation, so submits 422 server-side with no client-side hint. Split the jsfModify into two variants and pick by countryCode: - USA keeps the helpful description. - Everything else forces `inputType: 'tel'` so TelField renders a country picker + national-number input. Verified against the AUS schema in the local gateway — the picker hydrates with 244 countries and the form submits a properly-prefixed `+61…` value. Also surface the actual `warnings` array returned by jsf-kit's `modify()` and pass `muteLogging: true` so we don't spam the console with the generic "we recommend handling warnings" notice on every form mount. Net result: no warnings on a clean render. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/common/createHeadlessForm.tsx | 11 ++++- src/flows/PayrollEmployeeOnboarding/hooks.tsx | 41 +++++++++++++++---- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/common/createHeadlessForm.tsx b/src/common/createHeadlessForm.tsx index 34f91c4ca..a6f6bd83c 100644 --- a/src/common/createHeadlessForm.tsx +++ b/src/common/createHeadlessForm.tsx @@ -25,7 +25,16 @@ export const createHeadlessForm = ( ): JSONSchemaFormResultWithFieldsets => { if (options && options.jsfModify) { const { required, allOf, ...modifyConfig } = options.jsfModify; - const { schema } = modify(jsfSchema, modifyConfig); + // muteLogging: true suppresses the generic library log; we surface the + // actual warnings ourselves when present so they're actionable. + const { schema, warnings } = modify(jsfSchema, { + ...modifyConfig, + muteLogging: true, + } as Parameters[1]); + if (warnings && warnings.length > 0) { + // eslint-disable-next-line no-console + console.warn('jsfModify warnings:', warnings); + } jsfSchema = schema; if (required) { diff --git a/src/flows/PayrollEmployeeOnboarding/hooks.tsx b/src/flows/PayrollEmployeeOnboarding/hooks.tsx index 766f90be4..0e838426f 100644 --- a/src/flows/PayrollEmployeeOnboarding/hooks.tsx +++ b/src/flows/PayrollEmployeeOnboarding/hooks.tsx @@ -30,21 +30,44 @@ export type EmployeeStepKey = | 'federal_taxes' | 'state_taxes'; -// Stable module-level jsfModify for personal_details — avoids recreating createHeadlessForm -// on every render (select closure captures fieldValues from outer scope per render, so the -// schema data itself is always fresh; the jsfModify just needs to be reference-stable). -const PERSONAL_DETAILS_JSF_MODIFY: JSFModify = { +// Stable module-level jsfModify configs for personal_details. Two variants: +// - USA: schema's mobile_number is a plain 10-digit string with `inputType: 'text'`. +// Add a description so users know what's expected. +// - non-USA: schema's mobile_number is an `anyOf` of per-country dial-code +// patterns. Force `inputType: 'tel'` so TelField renders a country picker + +// national-number input. Without this it falls back to a plain text input +// that silently fails the anyOf validation. +// +// Both variants hide `name` (a computed display-only field that the PUT +// endpoint rejects via `additionalProperties: false`). +const PERSONAL_DETAILS_HIDE_NAME = { + name: { 'x-jsf-presentation': { inputType: 'hidden' } }, +}; + +const PERSONAL_DETAILS_JSF_MODIFY_USA: JSFModify = { fields: { - // 'name' is a computed read-only display field; hide it so it is never submitted - // (additionalProperties: false on the PUT endpoint rejects it). - name: { 'x-jsf-presentation': { inputType: 'hidden' } }, - // Clarify that mobile_number expects digits only (no + or country code) for USA + ...PERSONAL_DETAILS_HIDE_NAME, mobile_number: { description: 'Enter 10 digits, no country code (e.g. 5389274785)', }, }, }; +const PERSONAL_DETAILS_JSF_MODIFY_INTL: JSFModify = { + fields: { + ...PERSONAL_DETAILS_HIDE_NAME, + mobile_number: { 'x-jsf-presentation': { inputType: 'tel' } }, + }, +}; + +function getPersonalDetailsJsfModify( + countryCode: string | undefined, +): JSFModify { + return countryCode === 'USA' + ? PERSONAL_DETAILS_JSF_MODIFY_USA + : PERSONAL_DETAILS_JSF_MODIFY_INTL; +} + const buildEmployeeSteps = ({ hasBankSubstep, federalTaxesVisible, @@ -157,7 +180,7 @@ export const usePayrollEmployeeOnboarding = ({ 'global_payroll_personal_details', fieldValues, { enabled: currentStep === 'personal_details' }, - PERSONAL_DETAILS_JSF_MODIFY, + getPersonalDetailsJsfModify(countryCode), ); const homeAddressSchema = useGPEmployeeFormSchema( From 8b1c44b0a491d8dbc1e1c390c04b88b77fd84102 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 17:08:04 +0200 Subject: [PATCH 12/14] fix(gp): pass employment_id when fetching contract/admin schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OpenAPI spec marks the `employment_id` query param on GET /v1/countries/{code}/{form} as required for contract_amendment and global_payroll_state_taxes, but the gateway uses it more broadly: the schema engine's `restrict_fields` component branches on user_role, and resolving that role depends on having an employment context. Without employment_id, restrict_fields can resolve to nil and the gateway returns 500 for some country/schema combos (locally confirmed for BRA and DEU contract_details). Thread internalEmploymentId from usePayrollAdminOnboarding into the contract_details and administrative_details schema fetches. Forward- compatible — gateway accepts and ignores the param for schemas that don't need it. (N.B. the immediate `restrict_fields` 500 on the local Tiger is a backend bug — even with employment_id the controller doesn't set user_role for company_manager tokens. AUS/USA schemas don't use restrict_fields so they work; DEU/BRA do. Reported upstream.) Co-Authored-By: Claude Opus 4.7 (1M context) --- src/flows/PayrollAdminOnboarding/api.ts | 12 ++++++++++-- src/flows/PayrollAdminOnboarding/hooks.tsx | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/flows/PayrollAdminOnboarding/api.ts b/src/flows/PayrollAdminOnboarding/api.ts index 3a1c260cf..1f50fe1df 100644 --- a/src/flows/PayrollAdminOnboarding/api.ts +++ b/src/flows/PayrollAdminOnboarding/api.ts @@ -21,11 +21,12 @@ export const useGPFormSchema = ( countryCode: string | undefined, schemaType: GPAdminSchemaType, fieldValues: FieldValues, - queryOptions?: { enabled?: boolean }, + queryOptions?: { enabled?: boolean; employmentId?: string }, ): ReturnType> => { const { client } = useClient(); + const employmentId = queryOptions?.employmentId; return useQuery({ - queryKey: ['gp-form-schema', countryCode, schemaType], + queryKey: ['gp-form-schema', countryCode, schemaType, employmentId], enabled: !!countryCode && (queryOptions?.enabled ?? true), retry: false, queryFn: async () => { @@ -36,6 +37,13 @@ export const useGPFormSchema = ( country_code: countryCode as string, form: schemaType, }, + // Passing employment_id lets the gateway resolve the company/employment + // context (and therefore the schema-engine user_role) for forms whose + // `restrict_fields` component branches on role — contract_details and + // administrative_details are the common cases. The OpenAPI spec marks + // this as required only for `contract_amendment` and + // `global_payroll_state_taxes`, but the gateway uses it more broadly. + ...(employmentId ? { query: { employment_id: employmentId } } : {}), }); if (response.error || !response.data) { throw new Error(`Failed to fetch ${schemaType} schema`); diff --git a/src/flows/PayrollAdminOnboarding/hooks.tsx b/src/flows/PayrollAdminOnboarding/hooks.tsx index 6a8bfe48d..ab359057c 100644 --- a/src/flows/PayrollAdminOnboarding/hooks.tsx +++ b/src/flows/PayrollAdminOnboarding/hooks.tsx @@ -96,7 +96,10 @@ export const usePayrollAdminOnboarding = ({ internalCountryCode, 'global_payroll_contract_details', fieldValues, - { enabled: currentStep === 'contract_details' && !!internalCountryCode }, + { + enabled: currentStep === 'contract_details' && !!internalCountryCode, + employmentId: internalEmploymentId, + }, ); const adminDetailsSchema = useGPFormSchema( @@ -106,6 +109,7 @@ export const usePayrollAdminOnboarding = ({ { enabled: currentStep === 'administrative_details' && !!internalCountryCode, + employmentId: internalEmploymentId, }, ); From edeab152c52eff8502032f7a49ba5ef83d2c1f97 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 17:26:45 +0200 Subject: [PATCH 13/14] chore(ci): fix format drift + raise build heap, sync with main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI started failing on three fronts after the SDK regen + GP changes landed: - Lint/Format: oxfmt was upset about three files where the back-to-back edits left long-line wraps that didn't match the formatter. Ran the formatter; no logic changes. - Example App Checks: `npm run build` (tsup) OOMs on the runner with the larger SDK. Bumped to `NODE_OPTIONS=--max-old-space-size=8192` in the package.json `build` script so CI and local match (`dev` already had this). - Deploy Cost Calculator / Remote Flows previews: Vercel uses the merge commit, which pulled in main's #1073 ("preview employment agreement step"). That commit references components added in main's SDK regen — the regen on this branch (from production gateway) had to be re-merged. Merged origin/main, re-resolved `src/client/types.gen.ts`, kept main's added Onboarding components and SDK exports. Local example build now succeeds. Co-Authored-By: Claude Opus 4.7 (1M context) --- example/api/proxy.js | 4 +- example/package-lock.json | 206 ++++++------ example/src/PayrollAdminOnboarding.tsx | 5 +- package-lock.json | 316 +++++++++++------- package.json | 2 +- src/flows/PayrollEmployeeOnboarding/hooks.tsx | 3 +- 6 files changed, 299 insertions(+), 237 deletions(-) diff --git a/example/api/proxy.js b/example/api/proxy.js index 4429ec362..7a283802e 100644 --- a/example/api/proxy.js +++ b/example/api/proxy.js @@ -114,7 +114,9 @@ async function createProxyRequest(path, method = 'GET', options = {}) { if (!employmentId) { throw Object.assign( new Error('Missing x-rf-employment-id header for employee request'), - { response: { status: 400, data: { error: 'employmentId required' } } }, + { + response: { status: 400, data: { error: 'employmentId required' } }, + }, ); } ({ accessToken } = await fetchEmployeeToken(employmentId)); diff --git a/example/package-lock.json b/example/package-lock.json index 8e874040e..a39607847 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@remoteoss/remote-flows": "file://..", "axios": "1.16.1", - "dompurify": "3.4.9", + "dompurify": "3.4.5", "dotenv": "17.4.2", "express": "5.2.1", "html-react-parser": "6.1.1", @@ -30,12 +30,12 @@ "@vitejs/plugin-react": "6.0.2", "nodemon": "3.1.14", "oxlint": "1.63.0", - "vite": "8.0.16" + "vite": "8.0.13" } }, "..": { "name": "@remoteoss/remote-flows", - "version": "1.38.0", + "version": "1.37.0", "dependencies": { "@hookform/resolvers": "5.2.2", "@radix-ui/react-checkbox": "1.3.3", @@ -54,7 +54,7 @@ "clsx": "2.1.1", "cmdk": "1.1.1", "date-fns": "3.6.0", - "dompurify": "3.4.9", + "dompurify": "3.4.5", "fast-deep-equal": "3.1.3", "lodash.capitalize": "4.2.1", "lodash.groupby": "4.6.0", @@ -153,14 +153,14 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", - "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@tybys/wasm-util": "^0.10.2" + "@tybys/wasm-util": "^0.10.1" }, "funding": { "type": "github", @@ -172,9 +172,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.133.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", - "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==", + "version": "0.130.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.130.0.tgz", + "integrity": "sha512-ibD2usx9JRu7f5pu2tMKMI4cpA4NgXJQoYRP4pQ7Pxmn1l6k/53qWtQWZayhYy3X4QZkt90Ot+mJEaeXouio6Q==", "dev": true, "license": "MIT", "funding": { @@ -525,9 +525,9 @@ "link": true }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz", - "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.1.tgz", + "integrity": "sha512-fJI3I0r3C3Oj/zdBCpaCmBRZYf07xpaq4yCfDDoSFm+beWNzbIl26puW8RraUdugoJw/95zerNOn6jasAhzSmg==", "cpu": [ "arm64" ], @@ -542,9 +542,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz", - "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.1.tgz", + "integrity": "sha512-cKnAhWEsV7TPcA/5EAteDp6KcJZBQ2G+BqE7zayMMi7kMvwRsbv7WT9aOnn0WNl4SKEIf43vjS31iUPu80nzXg==", "cpu": [ "arm64" ], @@ -559,9 +559,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz", - "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.1.tgz", + "integrity": "sha512-YKrVwQjIRBPo+5G/u03wGjbdy4q7pyzCe93DK9VJ7zkVmeg8LJ7GbgsiHWdR4xSoe4CAXRD7Bcjgbtr64bkXNg==", "cpu": [ "x64" ], @@ -576,9 +576,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz", - "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.1.tgz", + "integrity": "sha512-z/oBsREo46SsFqBwYtFe0kpJeBijAT48O/WXLI4suiCLBkr03RTtTJMCzSdDd2znlh8VJizL09XVkQgk8IZonw==", "cpu": [ "x64" ], @@ -593,9 +593,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz", - "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.1.tgz", + "integrity": "sha512-ik8q7GM11zxvYxFc2PeDcT6TBvhCQMaUxfph/M5l9sKuTs/Sjg3L+Byw0F7w0ZVLBZmx30P+gG0ECzzN+MFcmQ==", "cpu": [ "arm" ], @@ -610,16 +610,13 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz", - "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.1.tgz", + "integrity": "sha512-QoSx2EkyrrdZ6kcyE8stqZ62t0Yra8Fs5ia9lOxJrh6TMQJK7gQKmscdTHf7pOXKREKrVwOtJcQG3qVSfc866A==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -630,16 +627,13 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz", - "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.1.tgz", + "integrity": "sha512-uwNwFpwKeNiZawfAWBgg0VIztPTV3ihhh1vV334h9ivnNLorxnQMU6Fz8wG1Zb4Qh9LC1/MkcyT3YlDXG3Rsgg==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -650,16 +644,13 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz", - "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.1.tgz", + "integrity": "sha512-zY1bul7OWr7DFBiJ++wofXvnr8B45ce3QsQUhKrIhXsygAh7bTkwyeM1bi1a2g5C/yC/N8TZyGDEoMfm/l9mpg==", "cpu": [ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -670,16 +661,13 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz", - "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.1.tgz", + "integrity": "sha512-0frlsT/f4Ft6I7SMESTKnF3cZsdicQn1dCMkF/jT9wDLE+gGoiQfv1nmT9e+s7s/fekvvy6tZM2jHvI2tkbJDQ==", "cpu": [ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -690,16 +678,13 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz", - "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.1.tgz", + "integrity": "sha512-XABVmGp9Tg0WspTVvwduTc4fpqy6JnAUrSQe6OuyqD/03nI7r0O9OWUkMIwFrjKAIqolvqoA4ZrJppgwE0Gxmw==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -710,16 +695,13 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz", - "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.1.tgz", + "integrity": "sha512-bV4fzswuzVcKD90o/VM6QqKxnxlDq0g2BISDLNVmxrnhpv1DDbyPhCIjYfvzYLV+MvkKKnQt2Q6AO86SEBULUQ==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -730,9 +712,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz", - "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.1.tgz", + "integrity": "sha512-/Mh0Zhq3OP7fVs0kcQHZP6lZEthMGTaSf8UBQYSFEZDWGXXlEC+nJ6EqenaK2t4LBXMe3A+K/G2BVXXdtOr4PQ==", "cpu": [ "arm64" ], @@ -747,9 +729,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz", - "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.1.tgz", + "integrity": "sha512-+1xc9X45l8ufsBAm6Gjvx2qDRIY9lTVt0cgWNcJ+1gdhXvkbxePA60yRTwSTuXL09CMhyJmjpV7E3NoyxbqFQQ==", "cpu": [ "wasm32" ], @@ -766,9 +748,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz", - "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.1.tgz", + "integrity": "sha512-1D+UqZdfnuR+Jy1GgMJwi85bD40H21uNmOPRWQhw4oRSuolZ/B5rixZ45DK2KXOTCvmVCecauWgEhbw8bI7tOw==", "cpu": [ "arm64" ], @@ -783,9 +765,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz", - "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.1.tgz", + "integrity": "sha512-INAycaWuhlOK3wk4mRHGsdgwYWmd9cChdPdE9bwWmy6rn9VqVNYNFGhOdXrofXUxwHIncSiPNb8tNm8knDVIeQ==", "cpu": [ "x64" ], @@ -1345,9 +1327,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.9.tgz", - "integrity": "sha512-4dPSRMRDqHvs0V4YDFCsaIZo4if5u0xM+llyxiM2fwuZFdKArUBAF3VtI2+n8NKg9P870WMdYk0UhqQNoWXbfQ==", + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.5.tgz", + "integrity": "sha512-OrwIBKsdNSVEeubdJ1HBv/wNENRM9ytAVCv7YXt//A3vPdVMNuACRqK9mXCGCBW2ln7BT/A4X0jXHo2Gu89miA==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -2527,9 +2509,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nanoid": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -2800,9 +2782,9 @@ } }, "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", + "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", "dev": true, "funding": [ { @@ -2820,7 +2802,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.12", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -3016,13 +2998,13 @@ } }, "node_modules/rolldown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", - "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.1.tgz", + "integrity": "sha512-X0KQHljNnEkWNqqiz9zJrGunh1B0HgOxLXvnFpCOcadzcy5qohZ3tqMEUg00vncoRovXuK3ZqCT9KnnKzoInFQ==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.133.0", + "@oxc-project/types": "=0.130.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -3032,21 +3014,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.3", - "@rolldown/binding-darwin-arm64": "1.0.3", - "@rolldown/binding-darwin-x64": "1.0.3", - "@rolldown/binding-freebsd-x64": "1.0.3", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", - "@rolldown/binding-linux-arm64-gnu": "1.0.3", - "@rolldown/binding-linux-arm64-musl": "1.0.3", - "@rolldown/binding-linux-ppc64-gnu": "1.0.3", - "@rolldown/binding-linux-s390x-gnu": "1.0.3", - "@rolldown/binding-linux-x64-gnu": "1.0.3", - "@rolldown/binding-linux-x64-musl": "1.0.3", - "@rolldown/binding-openharmony-arm64": "1.0.3", - "@rolldown/binding-wasm32-wasi": "1.0.3", - "@rolldown/binding-win32-arm64-msvc": "1.0.3", - "@rolldown/binding-win32-x64-msvc": "1.0.3" + "@rolldown/binding-android-arm64": "1.0.1", + "@rolldown/binding-darwin-arm64": "1.0.1", + "@rolldown/binding-darwin-x64": "1.0.1", + "@rolldown/binding-freebsd-x64": "1.0.1", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.1", + "@rolldown/binding-linux-arm64-gnu": "1.0.1", + "@rolldown/binding-linux-arm64-musl": "1.0.1", + "@rolldown/binding-linux-ppc64-gnu": "1.0.1", + "@rolldown/binding-linux-s390x-gnu": "1.0.1", + "@rolldown/binding-linux-x64-gnu": "1.0.1", + "@rolldown/binding-linux-x64-musl": "1.0.1", + "@rolldown/binding-openharmony-arm64": "1.0.1", + "@rolldown/binding-wasm32-wasi": "1.0.1", + "@rolldown/binding-win32-arm64-msvc": "1.0.1", + "@rolldown/binding-win32-x64-msvc": "1.0.1" } }, "node_modules/router": { @@ -3316,9 +3298,9 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, "license": "MIT", "dependencies": { @@ -3491,17 +3473,17 @@ } }, "node_modules/vite": { - "version": "8.0.16", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", - "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", + "version": "8.0.13", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.13.tgz", + "integrity": "sha512-MFtjBYgzmSxmgA4RAfjIyXWpGe1oALnjgUTzzV7QLx/TKxCzjtMH6Fd9/eVK+5Fg1qNoz5VAwsmMs/NofrmJvw==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", - "postcss": "^8.5.15", - "rolldown": "1.0.3", - "tinyglobby": "^0.2.17" + "postcss": "^8.5.14", + "rolldown": "1.0.1", + "tinyglobby": "^0.2.16" }, "bin": { "vite": "bin/vite.js" diff --git a/example/src/PayrollAdminOnboarding.tsx b/example/src/PayrollAdminOnboarding.tsx index cc0863189..41a757ce0 100644 --- a/example/src/PayrollAdminOnboarding.tsx +++ b/example/src/PayrollAdminOnboarding.tsx @@ -250,10 +250,7 @@ function GPAdminOnboardingInner() { export function PayrollAdminOnboardingForm() { return ( - + ); diff --git a/package-lock.json b/package-lock.json index 1888a1d3b..ca4b166d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -460,12 +460,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", - "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -3756,9 +3754,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz", - "integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.61.0.tgz", + "integrity": "sha512-dnxczajOqt0gesZlN5pGQ1s1imQVrsmCw5G2Ci4oM+0WvNz3pyRnlWrT7McoZIb8VlFwCawdmbWRmxRn7HI+VQ==", "cpu": [ "arm" ], @@ -3770,9 +3768,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz", - "integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.61.0.tgz", + "integrity": "sha512-Bp3JpGP00Vu3f238ivRrjf7z3xSzVPXqCmaJYA9t2c+c8vKYvOzmXF7LkkeUalTEGd6cZcSWe+PFIP3Vy48fRg==", "cpu": [ "arm64" ], @@ -3784,9 +3782,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz", - "integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.61.0.tgz", + "integrity": "sha512-zaYIpr670mUmmZ1tVzUFplbQbG7h3Gugx3L5FoqhsC2m/YnLlR1a7zVLmXNPy+iY1tFPEbNG+HHBXZGyId0G5w==", "cpu": [ "arm64" ], @@ -3798,9 +3796,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz", - "integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.61.0.tgz", + "integrity": "sha512-+P49fvkv2dSoeevUW+lgZ/I2JHSsJCK1Lyjj7Cu6E4UHG4tS9XIefzIjo5qhgELjAclnen1rLzK2PMKJdo+Dyg==", "cpu": [ "x64" ], @@ -3812,9 +3810,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz", - "integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.61.0.tgz", + "integrity": "sha512-l3FAAOyKJXH2ea6KNFN+MMgC/rnE94YGLXs2ehYqDcCoHt1DpvgWX75BhUJxN38XojP7Ul+4H8PRn7EdyqSDrw==", "cpu": [ "arm64" ], @@ -3826,9 +3824,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz", - "integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.61.0.tgz", + "integrity": "sha512-VokPN3TSctKj65cyCNPaUh4vMFA8awxOot/0sp+4J7ZlNRKQEhXhawqPwajoi8H5ZFt61i0ugZJuTKXBjGJ17Q==", "cpu": [ "x64" ], @@ -3840,13 +3838,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz", - "integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.61.0.tgz", + "integrity": "sha512-DxH0P3wxm+Yzs/p3zrk9dw1rURu8p0Nv5+MRK/L7OtnLNg5rLZraSBFZ8iUXOd9f2BlhJyEpIZUH/emjq4UJ4g==", "cpu": [ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3854,13 +3855,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz", - "integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.61.0.tgz", + "integrity": "sha512-T6ZvMNe84kAz6TBWHC7hGAoEtzP1LWYw/AqayGWEF6uISt3Abk/st06LqRD9THd7Xz3NxzurUpzAuEAUbZf+nw==", "cpu": [ "arm" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3868,13 +3872,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz", - "integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.61.0.tgz", + "integrity": "sha512-q/4hzvQkDs8b4jIBab1pnLiiM0ayTZsN2amBFPDzuyZxjEd4wDwx0UJFYM3cOZzSf5Kw8fnWSprJzIBMkcR44Q==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3882,13 +3889,16 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz", - "integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.61.0.tgz", + "integrity": "sha512-vvYWX3akdEAY6km+9wAqFDnk6pQsbJKVnj7xawcvs/+fdlYBGp+U+Qq/lLfpIxYIZvZLHMAKD9HLdacSx/r3dw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3896,13 +3906,33 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz", - "integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.61.0.tgz", + "integrity": "sha512-DePa5cqOxDP/Zp0VOXpeWaGew5iIv5DXp9NYbzkX5PFQyWVX9184WCTh3hvr/7lhXo8ZVlbFLkz8+o/q1dU6gA==", "cpu": [ "loong64" ], "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.61.0.tgz", + "integrity": "sha512-LV8aWMB8UChglMCEzs7RkN0GsH29RJaLLqwm9fCIjlqwxQTiWAqNcc7wjBkH31hV0PU/yVxGYvrYsgfea2qw6g==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3910,13 +3940,33 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz", - "integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.61.0.tgz", + "integrity": "sha512-QoNSnwQtaeNu5grdBbsL0tt1uyl5EnS8DA8Mr3nluMXbhdQNyhN+G4tBax7VCdxLKj8YJ0/4OO9Ho84jMnJtKA==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.61.0.tgz", + "integrity": "sha512-/zZp5MKapIIApE8trN8qLGNSiRN9TUoaUZ1cmVu4XnVdd5LQLOXTtyi+vtfUbNnT3iyjzpPqYeKXmvJ+gJGYWw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3924,13 +3974,16 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz", - "integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.61.0.tgz", + "integrity": "sha512-RbrzcD3aJ1k3UbtMRRBNwojdVVyXjuVAFTfn/xPa6EEl6GE9Sm/akPgFTb9aAC9pMKGJ6CtWxaGrqWcabH+ySg==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3938,13 +3991,16 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz", - "integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.61.0.tgz", + "integrity": "sha512-ZF+onDsBso8PJf1XaG9lB+O9RnBpKGnY6OrzC4CSHrtC1jb6jWLTKK4bRqdoCXHd22gyr2hiYmEAm8Wns/BOCw==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3952,13 +4008,16 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz", - "integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.61.0.tgz", + "integrity": "sha512-Atk0aSIk5Zx2Wuh9dgRQgLP0Koc8hOeYpbWryMXyk8G8/HmPkwPPkMqIIDhrXHHYqfUzSJA/I7IWSBv8xSmRBA==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3966,13 +4025,16 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz", - "integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.0.tgz", + "integrity": "sha512-0uMOcf3eZ5K+K4cYHkdxShFMPlPXCOdfDFEFn9dNYAEEd2cVvmOfH7zFgRVoDgmtQ1m9k5q7qfrHzyMAubKYUA==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3980,23 +4042,40 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz", - "integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.61.0.tgz", + "integrity": "sha512-mvFtE4A/t/7hRJ7X8Ozmu8FsIkAUat2nzl12pgU337BRmq87AQUJztwHz2Zv5/tjo9/C95E66CK03SI/ToEDJw==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.61.0.tgz", + "integrity": "sha512-z9b9+aTxvt8n2rNltMPvyaUfB8NJ+CVyOrGK/MdIKHx7B+lXmZpm/XbRsU7Rpf3fRqJ2uS6mBJiJveCtq8LHDg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz", - "integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.61.0.tgz", + "integrity": "sha512-jXaXFqKMehsOc+g8R6oo33RRC6w07G9jDBxAE5eAKX7mOcCbZloYIPNhfG9Wl+P9O9IWHFO4OJgPi1Ml2qkt7w==", "cpu": [ "arm64" ], @@ -4008,9 +4087,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz", - "integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.61.0.tgz", + "integrity": "sha512-OXNWVFocS2IA4+QplhTZZ2a+8hPZR7T8KuozsNmJKK8y7cp83StHvGksfHzPG3wczWTczyWHVQuqeiTUbjiyBg==", "cpu": [ "arm64" ], @@ -4022,9 +4101,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz", - "integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.61.0.tgz", + "integrity": "sha512-AlAbNtBO637LxSldqV43z0FfXoGfl2TW1DgAg/bs7aQswFbDewz2SJm3BUhiGfbOVtW571xbc9p+REdxhyN/Eg==", "cpu": [ "ia32" ], @@ -4036,9 +4115,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz", - "integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.61.0.tgz", + "integrity": "sha512-QRSrQXyJ1M4tjNXdR0/G/IgV6lzfQQJYBjlWIEYkY2Xs86DRl/iEpQ4blMDjJxSl7n19eDKKXMg0AmuBVYy8pQ==", "cpu": [ "x64" ], @@ -4050,9 +4129,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz", - "integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.61.0.tgz", + "integrity": "sha512-tkuFxhvKO/HlGd0VsINF6vHSYH8AF8W0TcNxKDK6JZmrehngFj78pToc8iemtnvwilDjs2G/qSzYFhe9U8q+fw==", "cpu": [ "x64" ], @@ -4587,9 +4666,9 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, @@ -5018,9 +5097,9 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", "dev": true, "license": "MIT", "dependencies": { @@ -6713,14 +6792,16 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" }, "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", + "license": "MIT" }, "node_modules/lodash.capitalize": { "version": "4.2.1", @@ -6892,9 +6973,10 @@ } }, "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -7840,11 +7922,6 @@ "node": ">=8" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7934,13 +8011,13 @@ } }, "node_modules/rollup": { - "version": "4.53.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz", - "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.61.0.tgz", + "integrity": "sha512-T9mWdbWfQtp0B5lv/HX+wrhYsmXRlcWnXXmJbXqKJhlRaoS6KMhq0gpyzW4UJfclcxrEdLnTgjT2NjruLONu0g==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.8" + "@types/estree": "1.0.9" }, "bin": { "rollup": "dist/bin/rollup" @@ -7950,28 +8027,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.3", - "@rollup/rollup-android-arm64": "4.53.3", - "@rollup/rollup-darwin-arm64": "4.53.3", - "@rollup/rollup-darwin-x64": "4.53.3", - "@rollup/rollup-freebsd-arm64": "4.53.3", - "@rollup/rollup-freebsd-x64": "4.53.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.3", - "@rollup/rollup-linux-arm-musleabihf": "4.53.3", - "@rollup/rollup-linux-arm64-gnu": "4.53.3", - "@rollup/rollup-linux-arm64-musl": "4.53.3", - "@rollup/rollup-linux-loong64-gnu": "4.53.3", - "@rollup/rollup-linux-ppc64-gnu": "4.53.3", - "@rollup/rollup-linux-riscv64-gnu": "4.53.3", - "@rollup/rollup-linux-riscv64-musl": "4.53.3", - "@rollup/rollup-linux-s390x-gnu": "4.53.3", - "@rollup/rollup-linux-x64-gnu": "4.53.3", - "@rollup/rollup-linux-x64-musl": "4.53.3", - "@rollup/rollup-openharmony-arm64": "4.53.3", - "@rollup/rollup-win32-arm64-msvc": "4.53.3", - "@rollup/rollup-win32-ia32-msvc": "4.53.3", - "@rollup/rollup-win32-x64-gnu": "4.53.3", - "@rollup/rollup-win32-x64-msvc": "4.53.3", + "@rollup/rollup-android-arm-eabi": "4.61.0", + "@rollup/rollup-android-arm64": "4.61.0", + "@rollup/rollup-darwin-arm64": "4.61.0", + "@rollup/rollup-darwin-x64": "4.61.0", + "@rollup/rollup-freebsd-arm64": "4.61.0", + "@rollup/rollup-freebsd-x64": "4.61.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.61.0", + "@rollup/rollup-linux-arm-musleabihf": "4.61.0", + "@rollup/rollup-linux-arm64-gnu": "4.61.0", + "@rollup/rollup-linux-arm64-musl": "4.61.0", + "@rollup/rollup-linux-loong64-gnu": "4.61.0", + "@rollup/rollup-linux-loong64-musl": "4.61.0", + "@rollup/rollup-linux-ppc64-gnu": "4.61.0", + "@rollup/rollup-linux-ppc64-musl": "4.61.0", + "@rollup/rollup-linux-riscv64-gnu": "4.61.0", + "@rollup/rollup-linux-riscv64-musl": "4.61.0", + "@rollup/rollup-linux-s390x-gnu": "4.61.0", + "@rollup/rollup-linux-x64-gnu": "4.61.0", + "@rollup/rollup-linux-x64-musl": "4.61.0", + "@rollup/rollup-openbsd-x64": "4.61.0", + "@rollup/rollup-openharmony-arm64": "4.61.0", + "@rollup/rollup-win32-arm64-msvc": "4.61.0", + "@rollup/rollup-win32-ia32-msvc": "4.61.0", + "@rollup/rollup-win32-x64-gnu": "4.61.0", + "@rollup/rollup-win32-x64-msvc": "4.61.0", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index be320b489..ac065737f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "scripts": { "audit": "npm audit --audit-level=high", - "build": "NODE_ENV=production tsup", + "build": "NODE_OPTIONS='--max-old-space-size=8192' NODE_ENV=production tsup", "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run type-check && npm run test", "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm --exclude-entrypoints index.css styles.css --profile node16", "check-format": "oxfmt --check", diff --git a/src/flows/PayrollEmployeeOnboarding/hooks.tsx b/src/flows/PayrollEmployeeOnboarding/hooks.tsx index 0e838426f..19ca200ce 100644 --- a/src/flows/PayrollEmployeeOnboarding/hooks.tsx +++ b/src/flows/PayrollEmployeeOnboarding/hooks.tsx @@ -252,7 +252,8 @@ export const usePayrollEmployeeOnboarding = ({ const taxStepsAvailability = useMemo(() => { const federalReason = ((): TaxStepUnavailableReason | null => { if (!isUSA) return 'unsupported_country'; - if (taxSubmitFailures.federal_taxes) return taxSubmitFailures.federal_taxes; + if (taxSubmitFailures.federal_taxes) + return taxSubmitFailures.federal_taxes; if (!isPostEnrollment) return 'pending_enrollment'; if (federalTaxesSchema.isError) return 'schema_unavailable'; return null; From 852d3693621b1e5c8ca24f6ef4b37080f12fdd39 Mon Sep 17 00:00:00 2001 From: Hamza Belhaj Date: Tue, 16 Jun 2026 17:32:37 +0200 Subject: [PATCH 14/14] chore(example): resync example lockfile with package.json after merge When stashing+merging origin/main in the previous CI fix, I resolved the example/package-lock.json conflict with `--theirs`, which took the stashed (pre-merge) lockfile instead of the merge result. That left example/package.json on dompurify@3.4.9 / vite@8.0.16 (from main's security bumps) but the lockfile still pinned 3.4.5 / 8.0.13, so `npm ci` in the Example App Checks job failed with EUSAGE. Regenerated the lockfile so it matches the manifest. Co-Authored-By: Claude Opus 4.7 (1M context) --- example/package-lock.json | 206 +++++++++++++++++++++----------------- 1 file changed, 112 insertions(+), 94 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index a39607847..8e874040e 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@remoteoss/remote-flows": "file://..", "axios": "1.16.1", - "dompurify": "3.4.5", + "dompurify": "3.4.9", "dotenv": "17.4.2", "express": "5.2.1", "html-react-parser": "6.1.1", @@ -30,12 +30,12 @@ "@vitejs/plugin-react": "6.0.2", "nodemon": "3.1.14", "oxlint": "1.63.0", - "vite": "8.0.13" + "vite": "8.0.16" } }, "..": { "name": "@remoteoss/remote-flows", - "version": "1.37.0", + "version": "1.38.0", "dependencies": { "@hookform/resolvers": "5.2.2", "@radix-ui/react-checkbox": "1.3.3", @@ -54,7 +54,7 @@ "clsx": "2.1.1", "cmdk": "1.1.1", "date-fns": "3.6.0", - "dompurify": "3.4.5", + "dompurify": "3.4.9", "fast-deep-equal": "3.1.3", "lodash.capitalize": "4.2.1", "lodash.groupby": "4.6.0", @@ -153,14 +153,14 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", - "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", + "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@tybys/wasm-util": "^0.10.1" + "@tybys/wasm-util": "^0.10.2" }, "funding": { "type": "github", @@ -172,9 +172,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.130.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.130.0.tgz", - "integrity": "sha512-ibD2usx9JRu7f5pu2tMKMI4cpA4NgXJQoYRP4pQ7Pxmn1l6k/53qWtQWZayhYy3X4QZkt90Ot+mJEaeXouio6Q==", + "version": "0.133.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", + "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==", "dev": true, "license": "MIT", "funding": { @@ -525,9 +525,9 @@ "link": true }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.1.tgz", - "integrity": "sha512-fJI3I0r3C3Oj/zdBCpaCmBRZYf07xpaq4yCfDDoSFm+beWNzbIl26puW8RraUdugoJw/95zerNOn6jasAhzSmg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz", + "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==", "cpu": [ "arm64" ], @@ -542,9 +542,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.1.tgz", - "integrity": "sha512-cKnAhWEsV7TPcA/5EAteDp6KcJZBQ2G+BqE7zayMMi7kMvwRsbv7WT9aOnn0WNl4SKEIf43vjS31iUPu80nzXg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz", + "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==", "cpu": [ "arm64" ], @@ -559,9 +559,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.1.tgz", - "integrity": "sha512-YKrVwQjIRBPo+5G/u03wGjbdy4q7pyzCe93DK9VJ7zkVmeg8LJ7GbgsiHWdR4xSoe4CAXRD7Bcjgbtr64bkXNg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz", + "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==", "cpu": [ "x64" ], @@ -576,9 +576,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.1.tgz", - "integrity": "sha512-z/oBsREo46SsFqBwYtFe0kpJeBijAT48O/WXLI4suiCLBkr03RTtTJMCzSdDd2znlh8VJizL09XVkQgk8IZonw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz", + "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==", "cpu": [ "x64" ], @@ -593,9 +593,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.1.tgz", - "integrity": "sha512-ik8q7GM11zxvYxFc2PeDcT6TBvhCQMaUxfph/M5l9sKuTs/Sjg3L+Byw0F7w0ZVLBZmx30P+gG0ECzzN+MFcmQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz", + "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==", "cpu": [ "arm" ], @@ -610,13 +610,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.1.tgz", - "integrity": "sha512-QoSx2EkyrrdZ6kcyE8stqZ62t0Yra8Fs5ia9lOxJrh6TMQJK7gQKmscdTHf7pOXKREKrVwOtJcQG3qVSfc866A==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz", + "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -627,13 +630,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.1.tgz", - "integrity": "sha512-uwNwFpwKeNiZawfAWBgg0VIztPTV3ihhh1vV334h9ivnNLorxnQMU6Fz8wG1Zb4Qh9LC1/MkcyT3YlDXG3Rsgg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz", + "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -644,13 +650,16 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.1.tgz", - "integrity": "sha512-zY1bul7OWr7DFBiJ++wofXvnr8B45ce3QsQUhKrIhXsygAh7bTkwyeM1bi1a2g5C/yC/N8TZyGDEoMfm/l9mpg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz", + "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -661,13 +670,16 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.1.tgz", - "integrity": "sha512-0frlsT/f4Ft6I7SMESTKnF3cZsdicQn1dCMkF/jT9wDLE+gGoiQfv1nmT9e+s7s/fekvvy6tZM2jHvI2tkbJDQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz", + "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -678,13 +690,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.1.tgz", - "integrity": "sha512-XABVmGp9Tg0WspTVvwduTc4fpqy6JnAUrSQe6OuyqD/03nI7r0O9OWUkMIwFrjKAIqolvqoA4ZrJppgwE0Gxmw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz", + "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -695,13 +710,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.1.tgz", - "integrity": "sha512-bV4fzswuzVcKD90o/VM6QqKxnxlDq0g2BISDLNVmxrnhpv1DDbyPhCIjYfvzYLV+MvkKKnQt2Q6AO86SEBULUQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz", + "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -712,9 +730,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.1.tgz", - "integrity": "sha512-/Mh0Zhq3OP7fVs0kcQHZP6lZEthMGTaSf8UBQYSFEZDWGXXlEC+nJ6EqenaK2t4LBXMe3A+K/G2BVXXdtOr4PQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz", + "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==", "cpu": [ "arm64" ], @@ -729,9 +747,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.1.tgz", - "integrity": "sha512-+1xc9X45l8ufsBAm6Gjvx2qDRIY9lTVt0cgWNcJ+1gdhXvkbxePA60yRTwSTuXL09CMhyJmjpV7E3NoyxbqFQQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz", + "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==", "cpu": [ "wasm32" ], @@ -748,9 +766,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.1.tgz", - "integrity": "sha512-1D+UqZdfnuR+Jy1GgMJwi85bD40H21uNmOPRWQhw4oRSuolZ/B5rixZ45DK2KXOTCvmVCecauWgEhbw8bI7tOw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz", + "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==", "cpu": [ "arm64" ], @@ -765,9 +783,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.1.tgz", - "integrity": "sha512-INAycaWuhlOK3wk4mRHGsdgwYWmd9cChdPdE9bwWmy6rn9VqVNYNFGhOdXrofXUxwHIncSiPNb8tNm8knDVIeQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz", + "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==", "cpu": [ "x64" ], @@ -1327,9 +1345,9 @@ } }, "node_modules/dompurify": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.5.tgz", - "integrity": "sha512-OrwIBKsdNSVEeubdJ1HBv/wNENRM9ytAVCv7YXt//A3vPdVMNuACRqK9mXCGCBW2ln7BT/A4X0jXHo2Gu89miA==", + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.9.tgz", + "integrity": "sha512-4dPSRMRDqHvs0V4YDFCsaIZo4if5u0xM+llyxiM2fwuZFdKArUBAF3VtI2+n8NKg9P870WMdYk0UhqQNoWXbfQ==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -2509,9 +2527,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", "dev": true, "funding": [ { @@ -2782,9 +2800,9 @@ } }, "node_modules/postcss": { - "version": "8.5.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", - "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", "dev": true, "funding": [ { @@ -2802,7 +2820,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -2998,13 +3016,13 @@ } }, "node_modules/rolldown": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.1.tgz", - "integrity": "sha512-X0KQHljNnEkWNqqiz9zJrGunh1B0HgOxLXvnFpCOcadzcy5qohZ3tqMEUg00vncoRovXuK3ZqCT9KnnKzoInFQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", + "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.130.0", + "@oxc-project/types": "=0.133.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -3014,21 +3032,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.1", - "@rolldown/binding-darwin-arm64": "1.0.1", - "@rolldown/binding-darwin-x64": "1.0.1", - "@rolldown/binding-freebsd-x64": "1.0.1", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.1", - "@rolldown/binding-linux-arm64-gnu": "1.0.1", - "@rolldown/binding-linux-arm64-musl": "1.0.1", - "@rolldown/binding-linux-ppc64-gnu": "1.0.1", - "@rolldown/binding-linux-s390x-gnu": "1.0.1", - "@rolldown/binding-linux-x64-gnu": "1.0.1", - "@rolldown/binding-linux-x64-musl": "1.0.1", - "@rolldown/binding-openharmony-arm64": "1.0.1", - "@rolldown/binding-wasm32-wasi": "1.0.1", - "@rolldown/binding-win32-arm64-msvc": "1.0.1", - "@rolldown/binding-win32-x64-msvc": "1.0.1" + "@rolldown/binding-android-arm64": "1.0.3", + "@rolldown/binding-darwin-arm64": "1.0.3", + "@rolldown/binding-darwin-x64": "1.0.3", + "@rolldown/binding-freebsd-x64": "1.0.3", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", + "@rolldown/binding-linux-arm64-gnu": "1.0.3", + "@rolldown/binding-linux-arm64-musl": "1.0.3", + "@rolldown/binding-linux-ppc64-gnu": "1.0.3", + "@rolldown/binding-linux-s390x-gnu": "1.0.3", + "@rolldown/binding-linux-x64-gnu": "1.0.3", + "@rolldown/binding-linux-x64-musl": "1.0.3", + "@rolldown/binding-openharmony-arm64": "1.0.3", + "@rolldown/binding-wasm32-wasi": "1.0.3", + "@rolldown/binding-win32-arm64-msvc": "1.0.3", + "@rolldown/binding-win32-x64-msvc": "1.0.3" } }, "node_modules/router": { @@ -3298,9 +3316,9 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", - "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { @@ -3473,17 +3491,17 @@ } }, "node_modules/vite": { - "version": "8.0.13", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.13.tgz", - "integrity": "sha512-MFtjBYgzmSxmgA4RAfjIyXWpGe1oALnjgUTzzV7QLx/TKxCzjtMH6Fd9/eVK+5Fg1qNoz5VAwsmMs/NofrmJvw==", + "version": "8.0.16", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", + "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", - "postcss": "^8.5.14", - "rolldown": "1.0.1", - "tinyglobby": "^0.2.16" + "postcss": "^8.5.15", + "rolldown": "1.0.3", + "tinyglobby": "^0.2.17" }, "bin": { "vite": "bin/vite.js"