From c717466a96539754acd7e60e1959fc7d77398027 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Mon, 13 Apr 2026 10:49:56 +0200 Subject: [PATCH 01/10] engagement --- openapi-ts.config.ts | 2 +- package.json | 2 +- src/client/client.gen.ts | 2 +- src/client/index.ts | 61 + src/client/sdk.gen.ts | 6036 +++++++++-------- src/client/types.gen.ts | 12101 ++++++++++++++++++++-------------- src/flows/Onboarding/api.ts | 56 +- 7 files changed, 10484 insertions(+), 7776 deletions(-) diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts index 987798b39..f581fde27 100644 --- a/openapi-ts.config.ts +++ b/openapi-ts.config.ts @@ -1,7 +1,7 @@ import { defineConfig, defaultPlugins } from '@hey-api/openapi-ts'; export default defineConfig({ - input: 'https://gateway.remote.com/v1/docs/openapi.json', + input: 'http://localhost:4000/api/eor/v1/docs/openapi.json', output: 'src/client', plugins: defaultPlugins, }); diff --git a/package.json b/package.json index 849821a70..aca59e7dd 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build:reset": "postcss src/styles/reset.css -o ./example/src/css/reset.css", "lint": "oxlint .", "format": "oxfmt", - "openapi-ts": "openapi-ts", + "openapi-ts": "openapi-ts && npm run format", "test": "vitest", "test:coverage": "vitest --coverage", "coverage:extract": "tsx scripts/extract-coverage.ts", diff --git a/src/client/client.gen.ts b/src/client/client.gen.ts index 5f44e28fd..d5f43a008 100644 --- a/src/client/client.gen.ts +++ b/src/client/client.gen.ts @@ -21,5 +21,5 @@ export type CreateClientConfig = ( ) => Config & T>; export const client = createClient( - createConfig({ baseUrl: 'https://gateway.remote.com/' }), + createConfig({ baseUrl: 'http://localhost:4000' }), ); diff --git a/src/client/index.ts b/src/client/index.ts index a45031fbb..470591807 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -69,6 +69,12 @@ export { getIndexWorkAuthorizationRequest, getListGroupsScim, getListUsersScim, + getPayDetailDataGph, + getPayDetailGph, + getPayProcessingFeatureGph, + getPayProgressGph, + getPaySummaryGph, + getPayVarianceGph, getPendingChangesEmploymentContract, getSchemaBenefitRenewalRequest, getShowAdministrativeDetails, @@ -92,6 +98,7 @@ export { getShowEmployment, getShowEmploymentCustomFieldValue, getShowEmploymentOnboardingSteps, + getShowEngagementAgreementDetailsCountry, getShowExpense, getShowFile, getShowFormCountry, @@ -141,6 +148,7 @@ export { patchUpdateWorkAuthorizationRequest, patchUpdateWorkAuthorizationRequest2, postApproveCancellationRequest, + postApproveReservePaymentRiskReserve, postApproveTimesheet, postAutomatableContractAmendment, postBulkCreatePayItems, @@ -183,6 +191,7 @@ export { postCreateRiskReserve, postCreateSsoConfiguration, postCreateTimeoff, + postCreateTimesheet, postCreateTokenCompanyToken, postCreateWebhookCallback, postDeclineCancellationRequest, @@ -197,6 +206,7 @@ export { postSignContractDocument, postTerminateContractorOfRecordEmploymentSubscription, postTokenOAuth2Token, + postTokenOAuth2Token2, postTriggerWebhookCallback, postUpdateBenefitRenewalRequest, postUpdateCancelOnboarding, @@ -481,6 +491,7 @@ export type { EmploymentStatus, EmploymentTermType, EmploymentUpdateParams, + EngagementAgreementDetailsResponse, ErrorResponse, Expense, ExpenseCategoryNode, @@ -803,6 +814,36 @@ export type { GetListUsersScimErrors, GetListUsersScimResponse, GetListUsersScimResponses, + GetPayDetailDataGphData, + GetPayDetailDataGphError, + GetPayDetailDataGphErrors, + GetPayDetailDataGphResponse, + GetPayDetailDataGphResponses, + GetPayDetailGphData, + GetPayDetailGphError, + GetPayDetailGphErrors, + GetPayDetailGphResponse, + GetPayDetailGphResponses, + GetPayProcessingFeatureGphData, + GetPayProcessingFeatureGphError, + GetPayProcessingFeatureGphErrors, + GetPayProcessingFeatureGphResponse, + GetPayProcessingFeatureGphResponses, + GetPayProgressGphData, + GetPayProgressGphError, + GetPayProgressGphErrors, + GetPayProgressGphResponse, + GetPayProgressGphResponses, + GetPaySummaryGphData, + GetPaySummaryGphError, + GetPaySummaryGphErrors, + GetPaySummaryGphResponse, + GetPaySummaryGphResponses, + GetPayVarianceGphData, + GetPayVarianceGphError, + GetPayVarianceGphErrors, + GetPayVarianceGphResponse, + GetPayVarianceGphResponses, GetPendingChangesEmploymentContractData, GetPendingChangesEmploymentContractError, GetPendingChangesEmploymentContractErrors, @@ -918,6 +959,11 @@ export type { GetShowEmploymentOnboardingStepsResponses, GetShowEmploymentResponse, GetShowEmploymentResponses, + GetShowEngagementAgreementDetailsCountryData, + GetShowEngagementAgreementDetailsCountryError, + GetShowEngagementAgreementDetailsCountryErrors, + GetShowEngagementAgreementDetailsCountryResponse, + GetShowEngagementAgreementDetailsCountryResponses, GetShowExpenseData, GetShowExpenseError, GetShowExpenseErrors, @@ -1298,6 +1344,11 @@ export type { PostApproveCancellationRequestErrors, PostApproveCancellationRequestResponse, PostApproveCancellationRequestResponses, + PostApproveReservePaymentRiskReserveData, + PostApproveReservePaymentRiskReserveError, + PostApproveReservePaymentRiskReserveErrors, + PostApproveReservePaymentRiskReserveResponse, + PostApproveReservePaymentRiskReserveResponses, PostApproveTimesheetData, PostApproveTimesheetError, PostApproveTimesheetErrors, @@ -1507,6 +1558,11 @@ export type { PostCreateTimeoffErrors, PostCreateTimeoffResponse, PostCreateTimeoffResponses, + PostCreateTimesheetData, + PostCreateTimesheetError, + PostCreateTimesheetErrors, + PostCreateTimesheetResponse, + PostCreateTimesheetResponses, PostCreateTokenCompanyTokenData, PostCreateTokenCompanyTokenError, PostCreateTokenCompanyTokenErrors, @@ -1571,6 +1627,11 @@ export type { PostTerminateContractorOfRecordEmploymentSubscriptionErrors, PostTerminateContractorOfRecordEmploymentSubscriptionResponse, PostTerminateContractorOfRecordEmploymentSubscriptionResponses, + PostTokenOAuth2Token2Data, + PostTokenOAuth2Token2Error, + PostTokenOAuth2Token2Errors, + PostTokenOAuth2Token2Response, + PostTokenOAuth2Token2Responses, PostTokenOAuth2TokenData, PostTokenOAuth2TokenError, PostTokenOAuth2TokenErrors, diff --git a/src/client/sdk.gen.ts b/src/client/sdk.gen.ts index 2d5415c06..d63d87bc2 100644 --- a/src/client/sdk.gen.ts +++ b/src/client/sdk.gen.ts @@ -211,6 +211,24 @@ import type { GetListUsersScimData, GetListUsersScimErrors, GetListUsersScimResponses, + GetPayDetailDataGphData, + GetPayDetailDataGphErrors, + GetPayDetailDataGphResponses, + GetPayDetailGphData, + GetPayDetailGphErrors, + GetPayDetailGphResponses, + GetPayProcessingFeatureGphData, + GetPayProcessingFeatureGphErrors, + GetPayProcessingFeatureGphResponses, + GetPayProgressGphData, + GetPayProgressGphErrors, + GetPayProgressGphResponses, + GetPaySummaryGphData, + GetPaySummaryGphErrors, + GetPaySummaryGphResponses, + GetPayVarianceGphData, + GetPayVarianceGphErrors, + GetPayVarianceGphResponses, GetPendingChangesEmploymentContractData, GetPendingChangesEmploymentContractErrors, GetPendingChangesEmploymentContractResponses, @@ -280,6 +298,9 @@ import type { GetShowEmploymentOnboardingStepsErrors, GetShowEmploymentOnboardingStepsResponses, GetShowEmploymentResponses, + GetShowEngagementAgreementDetailsCountryData, + GetShowEngagementAgreementDetailsCountryErrors, + GetShowEngagementAgreementDetailsCountryResponses, GetShowExpenseData, GetShowExpenseErrors, GetShowExpenseResponses, @@ -423,6 +444,9 @@ import type { PostApproveCancellationRequestData, PostApproveCancellationRequestErrors, PostApproveCancellationRequestResponses, + PostApproveReservePaymentRiskReserveData, + PostApproveReservePaymentRiskReserveErrors, + PostApproveReservePaymentRiskReserveResponses, PostApproveTimesheetData, PostApproveTimesheetErrors, PostApproveTimesheetResponses, @@ -549,6 +573,9 @@ import type { PostCreateTimeoffData, PostCreateTimeoffErrors, PostCreateTimeoffResponses, + PostCreateTimesheetData, + PostCreateTimesheetErrors, + PostCreateTimesheetResponses, PostCreateTokenCompanyTokenData, PostCreateTokenCompanyTokenErrors, PostCreateTokenCompanyTokenResponses, @@ -588,6 +615,9 @@ import type { PostTerminateContractorOfRecordEmploymentSubscriptionData, PostTerminateContractorOfRecordEmploymentSubscriptionErrors, PostTerminateContractorOfRecordEmploymentSubscriptionResponses, + PostTokenOAuth2Token2Data, + PostTokenOAuth2Token2Errors, + PostTokenOAuth2Token2Responses, PostTokenOAuth2TokenData, PostTokenOAuth2TokenErrors, PostTokenOAuth2TokenResponses, @@ -654,240 +684,243 @@ export type Options< }; /** - * List Offboarding + * Convert currency using dynamic rates * - * Lists Offboarding requests. + * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## 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`) | Convert currencies (`convert_currency:read`) | - | * */ -export const getIndexOffboarding = ( - options?: Options, +export const postConvertWithSpreadCurrencyConverter2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetIndexOffboardingResponses, - GetIndexOffboardingErrors, + (options.client ?? client).post< + PostConvertWithSpreadCurrencyConverter2Responses, + PostConvertWithSpreadCurrencyConverter2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/offboardings', + url: '/api/eor/v1/currency-converter', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create Offboarding + * List contractor subscriptions * - * Creates an Offboarding request. + * Endpoint that can be used to list contractor subscriptions. * * * ## 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 postCreateOffboarding = ( - options?: Options, +export const getIndexSubscription = ( + options: Options, ) => - (options?.client ?? client).post< - PostCreateOffboardingResponses, - PostCreateOffboardingErrors, + (options.client ?? client).get< + GetIndexSubscriptionResponses, + GetIndexSubscriptionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/offboardings', + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-subscriptions', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Show timesheet + * Convert currency using flat rates * - * Shows a timesheet by its ID. + * 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 timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | + * | Manage company resources (`company_admin`) | Convert currencies (`convert_currency:read`) | - | * */ -export const getShowTimesheet = ( - options: Options, +export const postConvertRawCurrencyConverter = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetShowTimesheetResponses, - GetShowTimesheetErrors, + (options.client ?? client).post< + PostConvertRawCurrencyConverterResponses, + PostConvertRawCurrencyConverterErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timesheets/{id}', + url: '/api/eor/v1/currency-converter/raw', ...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 Incentives * + * Lists all Incentives of a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage onboarding (`onboarding:write`) | + * | Manage expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const postUpdateCancelOnboarding = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexIncentive = ( + options: Options, ) => - (options.client ?? client).post< - PostUpdateCancelOnboardingResponses, - PostUpdateCancelOnboardingErrors, + (options.client ?? client).get< + GetIndexIncentiveResponses, + GetIndexIncentiveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/cancel-onboarding/{employment_id}', + url: '/api/eor/v1/incentives', ...options, }); /** - * Show form schema + * Create Incentive * - * 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. + * 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 employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getShowContractAmendmentSchema = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postCreateIncentive = ( + options: Options, ) => - (options.client ?? client).get< - GetShowContractAmendmentSchemaResponses, - GetShowContractAmendmentSchemaErrors, + (options.client ?? client).post< + PostCreateIncentiveResponses, + PostCreateIncentiveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contract-amendments/schema', + url: '/api/eor/v1/incentives', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Bulk Create Pay Items + * List Benefit Offers By Employment * - * 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 `meta` object. + * List benefit offers by employment. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | - | - | Manage pay items (`pay_item:write`) | + * | Manage company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const postBulkCreatePayItems = ( - options: Options, +export const getIndexBenefitOffersByEmployment = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostBulkCreatePayItemsResponses, - PostBulkCreatePayItemsErrors, + (options.client ?? client).get< + GetIndexBenefitOffersByEmploymentResponses, + GetIndexBenefitOffersByEmploymentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/pay-items/bulk', + url: '/api/eor/v1/benefit-offers', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get latest data sync events - * - * Get the latest data sync events for each data type that have passed + * Complete onboarding * + * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status * * @deprecated */ -export const getIndexDataSync = ( - options?: Options, +export const postCompleteOnboardingEmployment = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetIndexDataSyncResponses, - GetIndexDataSyncErrors, + (options.client ?? client).post< + PostCompleteOnboardingEmploymentResponses, + PostCompleteOnboardingEmploymentErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/data-sync', + url: '/api/eor/v1/ready', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create test data sync job - * - * Create Test Data Synchronization job that will sync test data to the database from production - * The job will be handled asynchronously and the response will be a 202 status code. - * - * **Heads up:** This endpoint is only available for specific usecases and should not be used for general data sync needs, - * if you need to request access to this endpoint, please contact the api-support@remote.com. - * - * - * @deprecated + * Creates a cost estimation of employments */ -export const postCreateDataSync = ( - options: Options, +export const postCreateEstimation = ( + options: Options, ) => (options.client ?? client).post< - PostCreateDataSyncResponses, - PostCreateDataSyncErrors, + PostCreateEstimationResponses, + PostCreateEstimationErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/data-sync', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/cost-calculator/estimation', ...options, headers: { 'Content-Type': 'application/json', @@ -896,67 +929,66 @@ export const postCreateDataSync = ( }); /** - * List pricing plans + * List Recurring 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). + * List all Recurring Incentives of a company. * * * ## 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`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getIndexCompanyPricingPlan = < +export const getIndexRecurringIncentive = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetIndexCompanyPricingPlanResponses, - GetIndexCompanyPricingPlanErrors, + GetIndexRecurringIncentiveResponses, + GetIndexRecurringIncentiveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/companies/{company_id}/pricing-plans', + url: '/api/eor/v1/incentives/recurring', ...options, }); /** - * Create a pricing plan for a company - * - * Create a pricing plan for a company, in order to do that we have 2 ways: + * Create Recurring Incentive * - * 1. Create a pricing plan from a partner template - * 2. Create a pricing plan from a product price + * Create a Recurring Incentive, that is, a monthly paid incentive. * - * The pricing plan is always created in the company's desired currency. + * 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`) | - | Manage pricing plans (`pricing_plan:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postCreateCompanyPricingPlan = < +export const postCreateRecurringIncentive = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostCreateCompanyPricingPlanResponses, - PostCreateCompanyPricingPlanErrors, + PostCreateRecurringIncentiveResponses, + PostCreateRecurringIncentiveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}/pricing-plans', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/incentives/recurring', ...options, headers: { 'Content-Type': 'application/json', @@ -965,217 +997,136 @@ export const postCreateCompanyPricingPlan = < }); /** - * Show probation completion letter + * List timesheets * - * Show a single probation completion letter. + * Lists all timesheets. * * ## 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 timeoffs (`time_and_attendance`) | View timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const getShowProbationCompletionLetter = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexTimesheet = ( + options?: Options, ) => - (options.client ?? client).get< - GetShowProbationCompletionLetterResponses, - GetShowProbationCompletionLetterErrors, + (options?.client ?? client).get< + GetIndexTimesheetResponses, + GetIndexTimesheetErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/probation-completion-letter/{id}', + url: '/api/eor/v1/timesheets', ...options, }); /** - * Show Contractor Invoice + * Create timesheet * - * Shows a single Contractor Invoice record. + * Creates a new timesheet. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const getShowContractorInvoice = ( - options: Options, +export const postCreateTimesheet = ( + options?: Options, ) => - (options.client ?? client).get< - GetShowContractorInvoiceResponses, - GetShowContractorInvoiceErrors, + (options?.client ?? client).post< + PostCreateTimesheetResponses, + PostCreateTimesheetErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoices/{id}', - ...options, - }); - -/** - * 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`) | Convert currencies (`convert_currency:read`) | - | - * - */ -export const postConvertRawCurrencyConverter = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).post< - PostConvertRawCurrencyConverterResponses, - PostConvertRawCurrencyConverterErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/currency-converter/raw', + url: '/api/eor/v1/timesheets', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Show contractor contract details + * Approve timesheet * - * Returns the contract details JSON Schema for contractors given a country + * Approves the given timesheet. * * ## 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 getShowContractorContractDetailsCountry = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postApproveTimesheet = ( + options: Options, ) => - (options.client ?? client).get< - GetShowContractorContractDetailsCountryResponses, - GetShowContractorContractDetailsCountryErrors, + (options.client ?? client).post< + PostApproveTimesheetResponses, + PostApproveTimesheetErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/countries/{country_code}/contractor-contract-details', + url: '/api/eor/v1/timesheets/{timesheet_id}/approve', ...options, }); /** - * List employments - * - * Lists all employments, except for the deleted ones. - * - * 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. + * Get latest data sync events * - * 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 the latest data sync events for each data type that have passed * * + * @deprecated */ -export const getIndexEmployment = ( - options: Options, +export const getIndexDataSync = ( + options?: Options, ) => - (options.client ?? client).get< - GetIndexEmploymentResponses, - GetIndexEmploymentErrors, + (options?.client ?? client).get< + GetIndexDataSyncResponses, + GetIndexDataSyncErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments', + url: '/api/eor/v1/data-sync', ...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. - * - * 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. - * + * Create test data sync job * + * Create Test Data Synchronization job that will sync test data to the database from production + * The job will be handled asynchronously and the response will be a 202 status code. * - * ## Scopes + * **Heads up:** This endpoint is only available for specific usecases and should not be used for general data sync needs, + * if you need to request access to this endpoint, please contact the api-support@remote.com. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * + * @deprecated */ -export const postCreateEmployment2 = ( - options: Options, +export const postCreateDataSync = ( + options: Options, ) => (options.client ?? client).post< - PostCreateEmployment2Responses, - PostCreateEmployment2Errors, + PostCreateDataSyncResponses, + PostCreateDataSyncErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/employments', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/data-sync', ...options, headers: { 'Content-Type': 'application/json', @@ -1184,213 +1135,186 @@ export const postCreateEmployment2 = ( }); /** - * 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. + * Show probation completion letter * + * Show a single probation completion letter. * * ## 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 probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | * */ -export const getShowCompanyEmploymentOnboardingReservesStatus = < +export const getShowProbationCompletionLetter = < ThrowOnError extends boolean = false, >( - options: Options< - GetShowCompanyEmploymentOnboardingReservesStatusData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetShowCompanyEmploymentOnboardingReservesStatusResponses, - GetShowCompanyEmploymentOnboardingReservesStatusErrors, + GetShowProbationCompletionLetterResponses, + GetShowProbationCompletionLetterErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status', + url: '/api/eor/v1/probation-completion-letter/{id}', ...options, }); /** - * Get Help Center Article + * Show the current SSO Configuration * - * Get a help center article by its ID + * 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 help articles (`help_center_article:read`) | - | + * | Manage company resources (`company_admin`) | View SSO configuration (`sso_configuration:read`) | Manage SSO (`sso_configuration:write`) | * */ -export const getShowHelpCenterArticle = ( - options: Options, +export const getShowSsoConfiguration = ( + options?: Options, ) => - (options.client ?? client).get< - GetShowHelpCenterArticleResponses, - GetShowHelpCenterArticleErrors, + (options?.client ?? client).get< + GetShowSsoConfigurationResponses, + GetShowSsoConfigurationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/help-center-articles/{id}', + url: '/api/eor/v1/sso-configuration', ...options, }); /** - * Get user by ID via SCIM v2.0 + * Create the SSO Configuration * - * Retrieves a single user for the authenticated company by user ID - */ -export const getGetUserScim = ( - options: Options, -) => - (options.client ?? client).get< - GetGetUserScimResponses, - GetGetUserScimErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Users/{id}', - ...options, - }); - -/** - * Download a document for the employee + * Creates the SSO Configuration for the company. * * ## 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 SSO (`sso_configuration:write`) | * */ -export const getShowEmployeeDocument = ( - options: Options, +export const postCreateSsoConfiguration = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetShowEmployeeDocumentResponses, - GetShowEmployeeDocumentErrors, + (options.client ?? client).post< + PostCreateSsoConfigurationResponses, + PostCreateSsoConfigurationErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/documents/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/sso-configuration', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Contractor Invoices + * List Offboarding * - * Lists Contractor Invoice records. + * Lists Offboarding requests. * * ## 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`) | View offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const getIndexContractorInvoice = ( - options?: Options, +export const getIndexOffboarding = ( + options?: Options, ) => (options?.client ?? client).get< - GetIndexContractorInvoiceResponses, - GetIndexContractorInvoiceErrors, + GetIndexOffboardingResponses, + GetIndexOffboardingErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoices', + url: '/api/eor/v1/offboardings', ...options, }); /** - * Report SDK errors + * Create Offboarding * - * Receives error telemetry from the frontend SDK. - * Errors are logged to observability backend for monitoring and debugging. + * Creates an Offboarding request. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage offboarding (`offboarding:write`) | * */ -export const postReportErrorsTelemetry = ( - options: Options, +export const postCreateOffboarding = ( + options?: Options, ) => - (options.client ?? client).post< - PostReportErrorsTelemetryResponses, - PostReportErrorsTelemetryErrors, + (options?.client ?? client).post< + PostCreateOffboardingResponses, + PostCreateOffboardingErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sdk/telemetry-errors', + url: '/api/eor/v1/offboardings', ...options, headers: { 'Content-Type': 'application/json', - ...options.headers, + ...options?.headers, }, }); /** - * Show the SSO Configuration Details + * Create a contract document for a contractor + * + * Create a contract document for a contractor. * - * 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 employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getDetailsSsoConfiguration = < +export const postCreateContractDocument = < ThrowOnError extends boolean = false, >( - options?: Options, -) => - (options?.client ?? client).get< - GetDetailsSsoConfigurationResponses, - GetDetailsSsoConfigurationErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sso-configuration/details', - ...options, - }); - -/** - * Creates a cost estimation of employments - */ -export const postCreateEstimation = ( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostCreateEstimationResponses, - PostCreateEstimationErrors, + PostCreateContractDocumentResponses, + PostCreateContractDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/cost-calculator/estimation', + url: '/api/eor/v1/contractors/employments/{employment_id}/contract-documents', ...options, headers: { 'Content-Type': 'application/json', @@ -1399,71 +1323,55 @@ export const postCreateEstimation = ( }); /** - * Show form schema + * Update federal taxes * - * Returns the json schema of the requested company form. - * Currently only supports the `address_details` form. + * 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 * - * ## 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 company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * - */ -export const getShowCompanySchema = ( - options: Options, -) => - (options.client ?? client).get< - GetShowCompanySchemaResponses, - GetShowCompanySchemaErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/schema', - ...options, - }); - -/** - * Get employment benefit offers * * ## 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 getIndexBenefitOffer = ( - options: Options, +export const putUpdateEmploymentFederalTaxes = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetIndexBenefitOfferResponses, - GetIndexBenefitOfferErrors, + (options.client ?? client).put< + PutUpdateEmploymentFederalTaxesResponses, + PutUpdateEmploymentFederalTaxesErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/benefit-offers', - ...options, - }); - -/** - * Upserts employment benefit offers - */ -export const putUpdateBenefitOffer = ( - options: Options, -) => - (options.client ?? client).put< - PutUpdateBenefitOfferResponses, - PutUpdateBenefitOfferErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments/{employment_id}/benefit-offers', + url: '/api/eor/v1/employments/{employment_id}/federal-taxes', ...options, headers: { 'Content-Type': 'application/json', @@ -1472,306 +1380,256 @@ export const putUpdateBenefitOffer = ( }); /** - * Get Employment Profile + * List pricing plans * - * Gets necessary information to perform the identity verification of an employee. + * 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 identity verification (`identity_verification:read`) | Manage identity verification (`identity_verification:write`) | + * | Manage companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getGetIdentityVerificationDataIdentityVerification = < +export const getIndexCompanyPricingPlan = < ThrowOnError extends boolean = false, >( - options: Options< - GetGetIdentityVerificationDataIdentityVerificationData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).get< - GetGetIdentityVerificationDataIdentityVerificationResponses, - GetGetIdentityVerificationDataIdentityVerificationErrors, + GetIndexCompanyPricingPlanResponses, + GetIndexCompanyPricingPlanErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/identity-verification/{employment_id}', + url: '/api/eor/v1/companies/{company_id}/pricing-plans', ...options, }); /** - * List contractor subscriptions + * Create a pricing plan for a company * - * Endpoint that can be used to list contractor subscriptions. + * 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. * * * ## 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 pricing plans (`pricing_plan:write`) | * */ -export const getIndexSubscription = ( - options: Options, +export const postCreateCompanyPricingPlan = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetIndexSubscriptionResponses, - GetIndexSubscriptionErrors, + (options.client ?? client).post< + PostCreateCompanyPricingPlanResponses, + PostCreateCompanyPricingPlanErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies/{company_id}/pricing-plans', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Webhook Events + * List travel letter requests * - * List all webhook events + * List travel letter requests. * * ## 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 getIndexWebhookEvent = ( - options?: Options, -) => - (options?.client ?? client).get< - GetIndexWebhookEventResponses, - GetIndexWebhookEventErrors, - 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. + * | - | View travel letters (`travel_letter:read`) | - | * */ -export const postBypassEligibilityChecksCompany = < +export const getIndexTravelLetterRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).post< - PostBypassEligibilityChecksCompanyResponses, - PostBypassEligibilityChecksCompanyErrors, + (options?.client ?? client).get< + GetIndexTravelLetterRequestResponses, + GetIndexTravelLetterRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks', + url: '/api/eor/v1/travel-letter-requests', ...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 getShowTestSchema = ( - options?: Options, +export const getPaySummaryGph = ( + options?: Options, ) => (options?.client ?? client).get< - GetShowTestSchemaResponses, - unknown, + GetPaySummaryGphResponses, + GetPaySummaryGphErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/test-schema', + url: '/api/eor/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 getIndexHoliday = ( - options: Options, +export const getIndexEmploymentJob = ( + options: Options, ) => (options.client ?? client).get< - GetIndexHolidayResponses, - GetIndexHolidayErrors, + GetIndexEmploymentJobResponses, + GetIndexEmploymentJobErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/countries/{country_code}/holidays/{year}', + url: '/api/eor/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 postCreateCancellation = ( - options: Options, +export const postCreateBulkEmployment = ( + options?: Options, ) => - (options.client ?? client).post< - PostCreateCancellationResponses, - PostCreateCancellationErrors, + (options?.client ?? client).post< + PostCreateBulkEmploymentResponses, + PostCreateBulkEmploymentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{timeoff_id}/cancel', + url: '/api/eor/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 getIndexEmploymentJob = ( - options: Options, +export const getIndexContractAmendment = ( + options: Options, ) => (options.client ?? client).get< - GetIndexEmploymentJobResponses, - GetIndexEmploymentJobErrors, + GetIndexContractAmendmentResponses, + GetIndexContractAmendmentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/job', + url: '/api/eor/v1/contract-amendments', ...options, }); /** - * List pricing plan partner templates + * Create Contract Amendment * - * List all pricing plan partner templates. + * 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. * - * ## 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 companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan: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 getIndexPricingPlanPartnerTemplate = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetIndexPricingPlanPartnerTemplateResponses, - GetIndexPricingPlanPartnerTemplateErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/pricing-plan-partner-templates', - ...options, - }); - -/** - * List EOR Payroll Calendar - * - * List all active payroll calendars for EOR. - * - * ## 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 getIndexEorPayrollCalendar = < - ThrowOnError extends boolean = false, ->( - options?: Options, -) => - (options?.client ?? client).get< - GetIndexEorPayrollCalendarResponses, - GetIndexEorPayrollCalendarErrors, - 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 patchUpdateEmployeeTimeoff2 = < +export const postCreateContractAmendment = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateEmployeeTimeoff2Responses, - PatchUpdateEmployeeTimeoff2Errors, + (options.client ?? client).post< + PostCreateContractAmendmentResponses, + PostCreateContractAmendmentErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/contract-amendments', ...options, headers: { 'Content-Type': 'application/json', @@ -1780,97 +1638,100 @@ export const patchUpdateEmployeeTimeoff2 = < }); /** - * 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 patchUpdateEmployeeTimeoff = < +export const deleteDeleteRecurringIncentive = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchUpdateEmployeeTimeoffResponses, - PatchUpdateEmployeeTimeoffErrors, + (options.client ?? client).delete< + DeleteDeleteRecurringIncentiveResponses, + DeleteDeleteRecurringIncentiveErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/incentives/recurring/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * 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 getIndexRecurringIncentive = < +export const getShowBenefitRenewalRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetIndexRecurringIncentiveResponses, - GetIndexRecurringIncentiveErrors, + GetShowBenefitRenewalRequestResponses, + GetShowBenefitRenewalRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/recurring', + url: '/api/eor/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`) | + * | Manage company resources (`company_admin`) | - | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const postCreateRecurringIncentive = < +export const postUpdateBenefitRenewalRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostCreateRecurringIncentiveResponses, - PostCreateRecurringIncentiveErrors, + PostUpdateBenefitRenewalRequestResponses, + PostUpdateBenefitRenewalRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/recurring', + url: '/api/eor/v1/benefit-renewal-requests/{benefit_renewal_request_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -1879,143 +1740,147 @@ export const postCreateRecurringIncentive = < }); /** - * Creates a Benefit Renewal Request + * List all holidays of a country * - * Creates a Benefit Renewal Request for a specific Benefit Group. - * This endpoint is only available in Sandbox, otherwise it will respond with a 404. + * 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`) | - | * */ -export const postCreateBenefitRenewalRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexHoliday = ( + options: Options, ) => - (options.client ?? client).post< - PostCreateBenefitRenewalRequestResponses, - PostCreateBenefitRenewalRequestErrors, + (options.client ?? client).get< + GetIndexHolidayResponses, + GetIndexHolidayErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sandbox/benefit-renewal-requests', + url: '/api/eor/v1/countries/{country_code}/holidays/{year}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Return a base64 encoded version of the contract document + * List custom field value for an employment + * + * 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 getShowContractDocument = ( - options: Options, +export const getIndexEmploymentCustomFieldValue = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetShowContractDocumentResponses, - GetShowContractDocumentErrors, + GetIndexEmploymentCustomFieldValueResponses, + GetIndexEmploymentCustomFieldValueErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contract-documents/{id}', + url: '/api/eor/v1/employments/{employment_id}/custom-fields', ...options, }); /** - * List contract documents for an employment + * Show timesheet * - * 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). + * Shows a timesheet by its ID. * * ## 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 timesheets (`timesheet:read`) | Manage timesheets (`timesheet:write`) | * */ -export const getIndexEmploymentContractDocument = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowTimesheet = ( + options: Options, ) => (options.client ?? client).get< - GetIndexEmploymentContractDocumentResponses, - GetIndexEmploymentContractDocumentErrors, + GetShowTimesheetResponses, + GetShowTimesheetErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/contract-documents', + url: '/api/eor/v1/timesheets/{id}', ...options, }); /** - * List expenses + * 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. * - * Lists all expenses records * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | + * | Manage company resources (`company_admin`) | View managers (`company_manager:read`) | Manage managers (`company_manager:write`) | * */ -export const getIndexExpense = ( - options: Options, +export const getIndexCompanyManager = ( + options: Options, ) => (options.client ?? client).get< - GetIndexExpenseResponses, - GetIndexExpenseErrors, + GetIndexCompanyManagerResponses, + GetIndexCompanyManagerErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/expenses', + url: '/api/eor/v1/company-managers', ...options, }); /** - * Create expense + * Create and invite a Company Manager * - * Creates an **approved** expense + * 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 expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage company resources (`company_admin`) | - | Manage managers (`company_manager:write`) | * */ -export const postCreateExpense = ( - options: Options, +export const postCreateCompanyManager = ( + options: Options, ) => (options.client ?? client).post< - PostCreateExpenseResponses, - PostCreateExpenseErrors, + PostCreateCompanyManagerResponses, + PostCreateCompanyManagerErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/expenses', + url: '/api/eor/v1/company-managers', ...options, headers: { 'Content-Type': 'application/json', @@ -2024,152 +1889,130 @@ export const postCreateExpense = ( }); /** - * Show the current 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 `meta` object. * - * 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 pay items (`pay_item:write`) | * */ -export const getShowSsoConfiguration = ( - options?: Options, +export const postBulkCreatePayItems = ( + options: Options, ) => - (options?.client ?? client).get< - GetShowSsoConfigurationResponses, - GetShowSsoConfigurationErrors, + (options.client ?? client).post< + PostBulkCreatePayItemsResponses, + PostBulkCreatePayItemsErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sso-configuration', + url: '/api/eor/v1/pay-items/bulk', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create the SSO Configuration + * Show travel letter request * - * Creates the SSO Configuration for the company. + * Show a single travel letter request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | + * | - | View travel letters (`travel_letter:read`) | - | * */ -export const postCreateSsoConfiguration = < +export const getShowTravelLetterRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostCreateSsoConfigurationResponses, - PostCreateSsoConfigurationErrors, + (options.client ?? client).get< + GetShowTravelLetterRequestResponses, + GetShowTravelLetterRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sso-configuration', + url: '/api/eor/v1/travel-letter-requests/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Approve Contract Amendment + * Updates a travel letter request * - * 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. + * Updates a travel letter request * - * 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 travel letters (`travel_letter:write`) | * */ -export const putApproveContractAmendment = < +export const patchUpdateTravelLetterRequest2 = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PutApproveContractAmendmentResponses, - PutApproveContractAmendmentErrors, + (options.client ?? client).patch< + PatchUpdateTravelLetterRequest2Responses, + PatchUpdateTravelLetterRequest2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve', + url: '/api/eor/v1/travel-letter-requests/{id}', ...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. + * Updates a travel letter request * + * Updates a travel letter request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | - | - | Manage travel letters (`travel_letter:write`) | * */ -export const getIndexContractorCurrency = < +export const patchUpdateTravelLetterRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetIndexContractorCurrencyResponses, - GetIndexContractorCurrencyErrors, + (options.client ?? client).put< + PatchUpdateTravelLetterRequestResponses, + PatchUpdateTravelLetterRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contractor-currencies', - ...options, - }); - -/** - * Replay Webhook Events - * - * Replay webhook events - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | - * - */ -export const postReplayWebhookEvent = ( - options: Options, -) => - (options.client ?? client).post< - PostReplayWebhookEventResponses, - PostReplayWebhookEventErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/webhook-events/replay', + url: '/api/eor/v1/travel-letter-requests/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -2178,259 +2021,250 @@ export const postReplayWebhookEvent = ( }); /** - * 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. - * + * Pass KYB * - * ## Scopes + * Pass KYB and credit risk for a company without the intervention of a Remote admin. * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const postCreateCorTerminationRequestSubscription = < +export const postBypassEligibilityChecksCompany = < ThrowOnError extends boolean = false, >( - options: Options< - PostCreateCorTerminationRequestSubscriptionData, - ThrowOnError - >, + options: Options, ) => (options.client ?? client).post< - PostCreateCorTerminationRequestSubscriptionResponses, - PostCreateCorTerminationRequestSubscriptionErrors, + PostBypassEligibilityChecksCompanyResponses, + PostBypassEligibilityChecksCompanyErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests', + url: '/api/eor/v1/sandbox/companies/{company_id}/bypass-eligibility-checks', ...options, }); /** - * Show Background Check + * List Webhook Callbacks * - * Show Background Check details for a given employment and background check request. + * List callbacks for a given company * * ## 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`) | View webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | * */ -export const getShowBackgroundCheck = ( - options: Options, +export const getIndexWebhookCallback = ( + options: Options, ) => (options.client ?? client).get< - GetShowBackgroundCheckResponses, - GetShowBackgroundCheckErrors, + GetIndexWebhookCallbackResponses, + GetIndexWebhookCallbackErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employments/{employment_id}/background-checks/{background_check_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/companies/{company_id}/webhook-callbacks', ...options, }); /** - * 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. + * Download a billing document PDF * + * Downloads a billing document PDF * * ## 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 getSchemaBenefitRenewalRequest = < +export const getDownloadPdfBillingDocument = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetSchemaBenefitRenewalRequestResponses, - GetSchemaBenefitRenewalRequestErrors, + GetDownloadPdfBillingDocumentResponses, + GetDownloadPdfBillingDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema', + url: '/api/eor/v1/billing-documents/{billing_document_id}/pdf', ...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. + * Delete a Webhook Callback * + * Delete a callback previously registered for webhooks * * ## 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 webhooks (`webhook:write`) | * */ -export const postGenerateMagicLink = ( - options: Options, +export const deleteDeleteWebhookCallback = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostGenerateMagicLinkResponses, - PostGenerateMagicLinkErrors, + (options.client ?? client).delete< + DeleteDeleteWebhookCallbackResponses, + DeleteDeleteWebhookCallbackErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/magic-link', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/webhook-callbacks/{id}', ...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. - * - * Incentives payments that are already scheduled and cannot be deleted will be - * included in the response, in case you need to reference them. + * Update a Webhook Callback * + * Update a callback previously registered for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const deleteDeleteRecurringIncentive = < +export const patchUpdateWebhookCallback = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).delete< - DeleteDeleteRecurringIncentiveResponses, - DeleteDeleteRecurringIncentiveErrors, + (options.client ?? client).patch< + PatchUpdateWebhookCallbackResponses, + PatchUpdateWebhookCallbackErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/recurring/{id}', + url: '/api/eor/v1/webhook-callbacks/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Incentives + * 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. * - * Lists all Incentives of a company * * ## 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 countries (`country:read`) | - | * */ -export const getIndexIncentive = ( - options: Options, +export const getSupportedCountry = ( + options: Options, ) => (options.client ?? client).get< - GetIndexIncentiveResponses, - GetIndexIncentiveErrors, + GetSupportedCountryResponses, + GetSupportedCountryErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives', + url: '/api/eor/v1/countries', ...options, }); /** - * Create Incentive - * - * Creates an Incentive. + * Show contractor eligibility and COR-supported countries for legal entity * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * 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 expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const postCreateIncentive = ( - options: Options, +export const getContractorEligibilityCompanyLegalEntities = < + ThrowOnError extends boolean = false, +>( + options: Options< + GetContractorEligibilityCompanyLegalEntitiesData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostCreateIncentiveResponses, - PostCreateIncentiveErrors, + (options.client ?? client).get< + GetContractorEligibilityCompanyLegalEntitiesResponses, + GetContractorEligibilityCompanyLegalEntitiesErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives', + url: '/api/eor/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Create probation completion letter + * Convert currency using dynamic rates * - * Create a new probation completion letter request. + * Convert currency using the rates Remote applies during employment creation and invoicing. * * ## 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`) | Convert currencies (`convert_currency:read`) | - | * */ -export const postCreateProbationCompletionLetter = < +export const postConvertWithSpreadCurrencyConverter = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostCreateProbationCompletionLetterResponses, - PostCreateProbationCompletionLetterErrors, + PostConvertWithSpreadCurrencyConverterResponses, + PostConvertWithSpreadCurrencyConverterErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/probation-completion-letter', + url: '/api/eor/v1/currency-converter/effective', ...options, headers: { 'Content-Type': 'application/json', @@ -2439,96 +2273,118 @@ export const postCreateProbationCompletionLetter = < }); /** - * Show Contractor Invoice Schedule + * 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_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). + * * - * 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`) | View forms (`form:read`) | - | * */ -export const getShowScheduledContractorInvoice = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowFormCountry = ( + options: Options, ) => (options.client ?? client).get< - GetShowScheduledContractorInvoiceResponses, - GetShowScheduledContractorInvoiceErrors, + GetShowFormCountryResponses, + GetShowFormCountryErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoice-schedules/{id}', + url: '/api/eor/v1/countries/{country_code}/{form}', ...options, }); /** - * Updates Contractor Invoice Schedule + * List Time Off * - * Updates a contractor invoice schedule record + * Lists all Time Off records. * * ## 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`) | * */ -export const patchUpdateScheduledContractorInvoice2 = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexTimeoff = ( + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateScheduledContractorInvoice2Responses, - PatchUpdateScheduledContractorInvoice2Errors, + (options.client ?? client).get< + GetIndexTimeoffResponses, + GetIndexTimeoffErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoice-schedules/{id}', + url: '/api/eor/v1/timeoff', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Updates Contractor Invoice Schedule + * Create Time Off * - * Updates a contractor invoice schedule record + * Creates a Time Off record * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchUpdateScheduledContractorInvoice = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postCreateTimeoff = ( + options: Options, ) => - (options.client ?? client).put< - PatchUpdateScheduledContractorInvoiceResponses, - PatchUpdateScheduledContractorInvoiceErrors, + (options.client ?? client).post< + PostCreateTimeoffResponses, + PostCreateTimeoffErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoice-schedules/{id}', + url: '/api/eor/v1/timeoff', ...options, headers: { 'Content-Type': 'application/json', @@ -2537,359 +2393,311 @@ export const patchUpdateScheduledContractorInvoice = < }); /** - * Show Billing Document - * - * 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 invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * List countries for Cost Calculator * + * Lists active and processing countries */ -export const getShowBillingDocument = ( - options: Options, +export const getIndexCountry = ( + options?: Options, ) => - (options.client ?? client).get< - GetShowBillingDocumentResponses, - GetShowBillingDocumentErrors, + (options?.client ?? client).get< + GetIndexCountryResponses, + unknown, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/billing-documents/{billing_document_id}', + url: '/api/eor/v1/cost-calculator/countries', ...options, }); /** - * Creates PDF cost estimation of employments + * Show Background Check + * + * Show Background Check details for a given employment and background check request. + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View background checks (`background_check:read`) | - | * - * Creates a PDF cost estimation of employments based on the provided parameters. */ -export const postCreateEstimationPdf = ( - options?: Options, +export const getShowBackgroundCheck = ( + options: Options, ) => - (options?.client ?? client).post< - PostCreateEstimationPdfResponses, - PostCreateEstimationPdfErrors, + (options.client ?? client).get< + GetShowBackgroundCheckResponses, + GetShowBackgroundCheckErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/cost-calculator/estimation-pdf', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employments/{employment_id}/background-checks/{background_check_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Show work authorization request + * 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. * - * 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 timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * + * + * @deprecated */ -export const getShowWorkAuthorizationRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowTimeoffBalance = ( + options: Options, ) => (options.client ?? client).get< - GetShowWorkAuthorizationRequestResponses, - GetShowWorkAuthorizationRequestErrors, + GetShowTimeoffBalanceResponses, + GetShowTimeoffBalanceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/work-authorization-requests/{id}', + url: '/api/eor/v1/timeoff-balances/{employment_id}', ...options, }); /** - * Update work authorization request + * Download a resignation letter * - * Updates a 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`) | - | Manage work authorizations (`work_authorization:write`) | + * | Manage employment documents (`employment_documents`) | View resignation letters (`resignation_letter:read`) | - | * */ -export const patchUpdateWorkAuthorizationRequest2 = < +export const getDownloadResignationLetter = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateWorkAuthorizationRequest2Responses, - PatchUpdateWorkAuthorizationRequest2Errors, + (options.client ?? client).get< + GetDownloadResignationLetterResponses, + GetDownloadResignationLetterErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/work-authorization-requests/{id}', + url: '/api/eor/v1/resignations/{offboarding_request_id}/resignation-letter', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * 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 patchUpdateWorkAuthorizationRequest = < +export const deleteDeleteCompanyManager = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchUpdateWorkAuthorizationRequestResponses, - PatchUpdateWorkAuthorizationRequestErrors, + (options.client ?? client).delete< + DeleteDeleteCompanyManagerResponses, + DeleteDeleteCompanyManagerErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/work-authorization-requests/{id}', + url: '/api/eor/v1/company-managers/{user_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Create Probation Extension + * Show company manager user * - * Create a probation extension request. + * Shows a single company manager user * * ## 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 managers (`company_manager:read`) | Manage managers (`company_manager:write`) | * */ -export const postCreateProbationExtension = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowCompanyManager = ( + options: Options, ) => - (options.client ?? client).post< - PostCreateProbationExtensionResponses, - PostCreateProbationExtensionErrors, + (options.client ?? client).get< + GetShowCompanyManagerResponses, + GetShowCompanyManagerErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/probation-extensions', + url: '/api/eor/v1/company-managers/{user_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Create risk reserve + * Show onboarding steps for an employment * - * Create a new risk reserve + * Returns onboarding steps and substeps in a hierarchical, ordered structure. * * ## 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`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postCreateRiskReserve = ( - options: Options, +export const getShowEmploymentOnboardingSteps = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostCreateRiskReserveResponses, - PostCreateRiskReserveErrors, + (options.client ?? client).get< + GetShowEmploymentOnboardingStepsResponses, + GetShowEmploymentOnboardingStepsErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/risk-reserve', + url: '/api/eor/v1/employments/{employment_id}/onboarding-steps', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get Company Compliance Profile + * Automatable Contract Amendment * - * Returns the KYB and credit risk status for the company's default legal entity. + * 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. * - * ## 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 company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company: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 getShowCompanyComplianceProfile = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).get< - GetShowCompanyComplianceProfileResponses, - GetShowCompanyComplianceProfileErrors, - ThrowOnError - >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/compliance-profile', - ...options, - }); - -/** - * Show product prices in the company's desired currency + * 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 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 companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | + * | Manage employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | * */ -export const getIndexCompanyProductPrice = < +export const postAutomatableContractAmendment = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetIndexCompanyProductPriceResponses, - GetIndexCompanyProductPriceErrors, + (options.client ?? client).post< + PostAutomatableContractAmendmentResponses, + PostAutomatableContractAmendmentErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}/product-prices', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/contract-amendments/automatable', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * 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 Company Payroll Runs * + * Lists all payroll runs for a 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 payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const getShowCompany = ( - options: Options, +export const getIndexPayrollRun = ( + options?: Options, ) => - (options.client ?? client).get< - GetShowCompanyResponses, - GetShowCompanyErrors, + (options?.client ?? client).get< + GetIndexPayrollRunResponses, + GetIndexPayrollRunErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/companies/{company_id}', + url: '/api/eor/v1/payroll-runs', ...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". - * - * 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) + * 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 companies (`company_management`) | - | Manage companies (`company:write`) | + * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). * */ -export const patchUpdateCompany2 = ( - options: Options, +export const patchUpdateEmployment4 = ( + options: Options, ) => (options.client ?? client).patch< - PatchUpdateCompany2Responses, - PatchUpdateCompany2Errors, + PatchUpdateEmployment4Responses, + PatchUpdateEmployment4Errors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/sandbox/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -2898,44 +2706,30 @@ export const patchUpdateCompany2 = ( }); /** - * 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) + * 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 companies (`company_management`) | - | Manage companies (`company:write`) | + * For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). * */ -export const patchUpdateCompany = ( - options: Options, +export const patchUpdateEmployment3 = ( + options: Options, ) => (options.client ?? client).put< - PatchUpdateCompanyResponses, - PatchUpdateCompanyErrors, + PatchUpdateEmployment3Responses, + PatchUpdateEmployment3Errors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/sandbox/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -2944,165 +2738,129 @@ export const patchUpdateCompany = ( }); /** - * Download a resignation letter + * 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. * - * 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`) | - | + * | Manage company resources (`company_admin`) | View benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const getDownloadResignationLetter = < +export const getSchemaBenefitRenewalRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetDownloadResignationLetterResponses, - GetDownloadResignationLetterErrors, + GetSchemaBenefitRenewalRequestResponses, + GetSchemaBenefitRenewalRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/resignations/{offboarding_request_id}/resignation-letter', + url: '/api/eor/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema', ...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. - * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Delete an Incentive * - * 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. + * Delete an incentive. * + * `one_time` incentives that have the following status **CANNOT** be deleted: + * * `processing` + * * `paid` * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const putUpdateEmploymentFederalTaxes = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const deleteDeleteIncentive = ( + options: Options, ) => - (options.client ?? client).put< - PutUpdateEmploymentFederalTaxesResponses, - PutUpdateEmploymentFederalTaxesErrors, + (options.client ?? client).delete< + DeleteDeleteIncentiveResponses, + DeleteDeleteIncentiveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/federal-taxes', + url: '/api/eor/v1/incentives/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List Contract Amendment + * Show Incentive * - * List Contract Amendment requests. + * Show an Incentive's details * * ## 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 expenses (`employment_payments`) | View incentives (`incentive:read`) | Manage incentives (`incentive:write`) | * */ -export const getIndexContractAmendment = ( - options: Options, +export const getShowIncentive = ( + options: Options, ) => (options.client ?? client).get< - GetIndexContractAmendmentResponses, - GetIndexContractAmendmentErrors, + GetShowIncentiveResponses, + GetShowIncentiveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contract-amendments', + url: '/api/eor/v1/incentives/{id}', ...options, }); /** - * Create Contract Amendment + * Update Incentive * - * Creates a Contract Amendment request. + * Updates an Incentive. * - * 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. + * 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 employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const postCreateContractAmendment = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchUpdateIncentive2 = ( + options: Options, ) => - (options.client ?? client).post< - PostCreateContractAmendmentResponses, - PostCreateContractAmendmentErrors, + (options.client ?? client).patch< + PatchUpdateIncentive2Responses, + PatchUpdateIncentive2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contract-amendments', + url: '/api/eor/v1/incentives/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -3111,475 +2869,459 @@ export const postCreateContractAmendment = < }); /** - * Show Company Payroll Runs + * Update Incentive * - * 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. + * 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 payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | + * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | * */ -export const getShowPayrollRun = ( - options: Options, +export const patchUpdateIncentive = ( + options: Options, ) => - (options.client ?? client).get< - GetShowPayrollRunResponses, - GetShowPayrollRunErrors, + (options.client ?? client).put< + PatchUpdateIncentiveResponses, + PatchUpdateIncentiveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payroll-runs/{payroll_run_id}', + url: '/api/eor/v1/incentives/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Download a receipt - * - * Downloads an expense receipt. + * Show Legal Entity Administrative details * - * Deprecated since late February 2024 in favour of **[Download a receipt by id](#tag/Expenses/operation/get_download_by_id_expense_receipt)** endpoint. + * 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 expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | - * + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * - * @deprecated */ -export const getDownloadExpenseReceipt = ( - options: Options, +export const getShowAdministrativeDetails = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetDownloadExpenseReceiptResponses, - GetDownloadExpenseReceiptErrors, + GetShowAdministrativeDetailsResponses, + GetShowAdministrativeDetailsErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/expenses/{expense_id}/receipt', + url: '/api/eor/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', ...options, }); /** - * Show travel letter request + * Update Legal Entity Administrative details + * + * Update administrative details of legal entity for the authorized company specified in the request. * - * Show a single travel letter request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | - | View travel letters (`travel_letter:read`) | - | + * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const getShowTravelLetterRequest = < +export const putUpdateAdministrativeDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetShowTravelLetterRequestResponses, - GetShowTravelLetterRequestErrors, + (options.client ?? client).put< + PutUpdateAdministrativeDetailsResponses, + PutUpdateAdministrativeDetailsErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/travel-letter-requests/{id}', + url: '/api/eor/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Updates a travel letter request + * List Contractor Invoices * - * Updates a travel letter request + * Lists Contractor Invoice records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | - | - | Manage travel letters (`travel_letter:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const patchUpdateTravelLetterRequest2 = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexContractorInvoice = ( + options?: Options, ) => - (options.client ?? client).patch< - PatchUpdateTravelLetterRequest2Responses, - PatchUpdateTravelLetterRequest2Errors, + (options?.client ?? client).get< + GetIndexContractorInvoiceResponses, + GetIndexContractorInvoiceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/travel-letter-requests/{id}', + url: '/api/eor/v1/contractor-invoices', ...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 travel letters (`travel_letter:write`) | + * List expense categories * + * Lists the effective hierarchy of expense categories. Either employment_id or expense_id (or both) must be provided. */ -export const patchUpdateTravelLetterRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getCategoriesExpense = ( + options?: Options, ) => - (options.client ?? client).put< - PatchUpdateTravelLetterRequestResponses, - PatchUpdateTravelLetterRequestErrors, + (options?.client ?? client).get< + GetCategoriesExpenseResponses, + GetCategoriesExpenseErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/travel-letter-requests/{id}', + url: '/api/eor/v1/expenses/categories', ...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. + * 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 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`) | * - * @deprecated */ -export const getShowTimeoffBalance = ( - options: Options, +export const getIndexEmploymentContractDocument = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetShowTimeoffBalanceResponses, - GetShowTimeoffBalanceErrors, + GetIndexEmploymentContractDocumentResponses, + GetIndexEmploymentContractDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff-balances/{employment_id}', + url: '/api/eor/v1/employments/{employment_id}/contract-documents', ...options, }); /** - * 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. - * + * 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 employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const putUpdateEmploymentBasicInformation = < +export const getShowContractorContractDetailsCountry = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PutUpdateEmploymentBasicInformationResponses, - PutUpdateEmploymentBasicInformationErrors, + (options.client ?? client).get< + GetShowContractorContractDetailsCountryResponses, + GetShowContractorContractDetailsCountryErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/basic_information', + url: '/api/eor/v1/countries/{country_code}/contractor-contract-details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List expense categories + * Get user by ID via SCIM v2.0 * - * Lists the effective hierarchy of expense categories. Either employment_id or expense_id (or both) must be provided. + * Retrieves a single user for the authenticated company by user ID */ -export const getCategoriesExpense = ( - options?: Options, +export const getGetUserScim = ( + options: Options, ) => - (options?.client ?? client).get< - GetCategoriesExpenseResponses, - GetCategoriesExpenseErrors, + (options.client ?? client).get< + GetGetUserScimResponses, + GetGetUserScimErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/categories', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/scim/v2/Users/{id}', ...options, }); /** - * Cancel Time Off as Employee + * List employment files + * + * Lists files associated with a specific employment. + * + * Supports filtering by file type and sub_type. * - * 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 employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const postCancelEmployeeTimeoff = ( - options: Options, +export const getIndexEmploymentFile = ( + options: Options, ) => - (options.client ?? client).post< - PostCancelEmployeeTimeoffResponses, - PostCancelEmployeeTimeoffErrors, + (options.client ?? client).get< + GetIndexEmploymentFileResponses, + GetIndexEmploymentFileErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff/{id}/cancel', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/employments/{employment_id}/files', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * 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_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). + * 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 company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getShowFormCountry = ( - options: Options, +export const postManageContractorPlusSubscriptionSubscription = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostManageContractorPlusSubscriptionSubscriptionData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetShowFormCountryResponses, - GetShowFormCountryErrors, + (options.client ?? client).post< + PostManageContractorPlusSubscriptionSubscriptionResponses, + PostManageContractorPlusSubscriptionSubscriptionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/countries/{country_code}/{form}', + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-plus-subscription', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Download file + * Submit eligibility questionnaire * - * Downloads a file. + * 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. + * + * **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 employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getShowFile = ( - options: Options, +export const postCreateEligibilityQuestionnaire = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetShowFileResponses, - GetShowFileErrors, + (options.client ?? client).post< + PostCreateEligibilityQuestionnaireResponses, + PostCreateEligibilityQuestionnaireErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/files/{id}', + url: '/api/eor/v1/contractors/eligibility-questionnaire', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show Contract Amendment + * 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. + * * - * 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 employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getShowContractAmendment = ( - options: Options, +export const putUpdateEmploymentBasicInformation = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetShowContractAmendmentResponses, - GetShowContractAmendmentErrors, + (options.client ?? client).put< + PutUpdateEmploymentBasicInformationResponses, + PutUpdateEmploymentBasicInformationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contract-amendments/{id}', + url: '/api/eor/v1/employments/{employment_id}/basic_information', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Company Managers + * Show a contractor of record (COR) termination request * - * List all company managers of an integration. If filtered by the company_id param, - * it lists only company managers belonging to the specified company. + * Retrieves a Contractor of Record termination request by ID. * * * ## 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 employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getIndexCompanyManager = ( - options: Options, +export const getShowCorTerminationRequestSubscription = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetIndexCompanyManagerResponses, - GetIndexCompanyManagerErrors, + GetShowCorTerminationRequestSubscriptionResponses, + GetShowCorTerminationRequestSubscriptionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-managers', + url: '/api/eor/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}', ...options, }); /** - * Create and invite a Company Manager - * - * Create a Company Manager and sends the invitation email for signing in to the Remote Platform. + * 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 company resources (`company_admin`) | - | Manage managers (`company_manager: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 postCreateCompanyManager = ( - options: Options, +export const postCreateLegalEntityCompany = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostCreateCompanyManagerResponses, - PostCreateCompanyManagerErrors, + PostCreateLegalEntityCompanyResponses, + PostCreateLegalEntityCompanyErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-managers', + url: '/api/eor/v1/sandbox/companies/{company_id}/legal-entities', ...options, headers: { 'Content-Type': 'application/json', @@ -3588,16 +3330,36 @@ export const postCreateCompanyManager = ( }); /** - * List countries for Cost Calculator + * Payroll processing details data API resource * - * Lists active and processing countries + * API to retrieve the run details of a pay group */ -export const getIndexCountry = ( - options?: Options, +export const getPayDetailDataGph = ( + options: Options, ) => - (options?.client ?? client).get< - GetIndexCountryResponses, - unknown, + (options.client ?? client).get< + GetPayDetailDataGphResponses, + GetPayDetailDataGphErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/wd/gph/payDetailData', + ...options, + }); + +/** + * 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 getShowRegionField = ( + options: Options, +) => + (options.client ?? client).get< + GetShowRegionFieldResponses, + GetShowRegionFieldErrors, ThrowOnError >({ security: [ @@ -3606,270 +3368,238 @@ export const getIndexCountry = ( { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/cost-calculator/countries', + url: '/api/eor/v1/cost-calculator/regions/{slug}/fields', ...options, }); /** - * Decline Identity Verification + * Cancel onboarding * - * Declines the identity verification of an employee. + * 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 * * * ## 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 onboarding (`onboarding:write`) | * */ -export const postDeclineIdentityVerification = < +export const postUpdateCancelOnboarding = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostDeclineIdentityVerificationResponses, - PostDeclineIdentityVerificationErrors, + PostUpdateCancelOnboardingResponses, + PostUpdateCancelOnboardingErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/identity-verification/{employment_id}/decline', + url: '/api/eor/v1/cancel-onboarding/{employment_id}', ...options, }); /** - * List Billing Documents + * Cancel Time Off as Employee * - * List billing documents for a company + * Cancels a Time Off record as Employee * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getIndexBillingDocument = ( - options: Options, +export const postCancelEmployeeTimeoff = ( + options: Options, ) => - (options.client ?? client).get< - GetIndexBillingDocumentResponses, - GetIndexBillingDocumentErrors, + (options.client ?? client).post< + PostCancelEmployeeTimeoffResponses, + PostCancelEmployeeTimeoffErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/billing-documents', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employee/timeoff/{id}/cancel', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Delete a Webhook Callback + * 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. * - * Delete a callback previously registered for webhooks * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * + * + * @deprecated */ -export const deleteDeleteWebhookCallback = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getDownloadExpenseReceipt = ( + options: Options, ) => - (options.client ?? client).delete< - DeleteDeleteWebhookCallbackResponses, - DeleteDeleteWebhookCallbackErrors, + (options.client ?? client).get< + GetDownloadExpenseReceiptResponses, + GetDownloadExpenseReceiptErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/webhook-callbacks/{id}', + url: '/api/eor/v1/expenses/{expense_id}/receipt', ...options, }); /** - * Update a Webhook Callback + * List Benefit Offers + * + * List benefit offers for each country. * - * Update a callback previously registered for webhooks * * ## 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 offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const patchUpdateWebhookCallback = < +export const getIndexBenefitOffersCountrySummary = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateWebhookCallbackResponses, - PatchUpdateWebhookCallbackErrors, + (options.client ?? client).get< + GetIndexBenefitOffersCountrySummaryResponses, + GetIndexBenefitOffersCountrySummaryErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/webhook-callbacks/{id}', + url: '/api/eor/v1/benefit-offers/country-summaries', ...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-work) tool. - * + * 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 employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const putUpdateEmploymentPersonalDetails = < +export const getIndexLeavePoliciesDetails = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PutUpdateEmploymentPersonalDetailsResponses, - PutUpdateEmploymentPersonalDetailsErrors, + (options.client ?? client).get< + GetIndexLeavePoliciesDetailsResponses, + GetIndexLeavePoliciesDetailsErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/personal_details', + url: '/api/eor/v1/leave-policies/details/{employment_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List travel letter requests + * List work authorization requests * - * List travel letter requests. + * List work authorization requests. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | - | View travel letters (`travel_letter:read`) | - | + * | Manage employments (`employments`) | View work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | * */ -export const getIndexTravelLetterRequest = < +export const getIndexWorkAuthorizationRequest = < ThrowOnError extends boolean = false, >( - options?: Options, + options?: Options, ) => (options?.client ?? client).get< - GetIndexTravelLetterRequestResponses, - GetIndexTravelLetterRequestErrors, + GetIndexWorkAuthorizationRequestResponses, + GetIndexWorkAuthorizationRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/travel-letter-requests', + url: '/api/eor/v1/work-authorization-requests', ...options, }); /** - * List Benefit Renewal Requests - * - * List Benefit Renewal Requests for each country. + * Get employment benefit offers * * ## 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 benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const getIndexBenefitRenewalRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexBenefitOffer = ( + options: Options, ) => (options.client ?? client).get< - GetIndexBenefitRenewalRequestResponses, - GetIndexBenefitRenewalRequestErrors, + GetIndexBenefitOfferResponses, + GetIndexBenefitOfferErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/benefit-renewal-requests', + url: '/api/eor/v1/employments/{employment_id}/benefit-offers', ...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`) | - | Manage webhooks (`webhook:write`) | - * + * Upserts employment benefit offers */ -export const postCreateWebhookCallback = ( - options: Options, +export const putUpdateBenefitOffer = ( + options: Options, ) => - (options.client ?? client).post< - PostCreateWebhookCallbackResponses, - PostCreateWebhookCallbackErrors, + (options.client ?? client).put< + PutUpdateBenefitOfferResponses, + PutUpdateBenefitOfferErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/webhook-callbacks', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employments/{employment_id}/benefit-offers', ...options, headers: { 'Content-Type': 'application/json', @@ -3878,68 +3608,104 @@ export const postCreateWebhookCallback = ( }); /** - * Approve timesheet + * List employments * - * Approves the given timesheet. + * 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 timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | * */ -export const postApproveTimesheet = ( - options: Options, +export const getIndexEmployment = ( + options: Options, ) => - (options.client ?? client).post< - PostApproveTimesheetResponses, - PostApproveTimesheetErrors, + (options.client ?? client).get< + GetIndexEmploymentResponses, + GetIndexEmploymentErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timesheets/{timesheet_id}/approve', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employments', ...options, }); /** - * Show payslip + * Create employment * - * Given an ID, shows a payslip. + * 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. + * + * 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 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 payslips (`payslip:read`) | - | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getShowPayslip = ( - options: Options, +export const postCreateEmployment2 = ( + options: Options, ) => - (options.client ?? client).get< - GetShowPayslipResponses, - GetShowPayslipErrors, + (options.client ?? client).post< + PostCreateEmployment2Responses, + PostCreateEmployment2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payslips/{id}', + url: '/api/eor/v1/employments', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Leave Policies Summary + * Show Time Off * - * List all the data related to time off for a given employment + * Shows a single Time Off record * * ## Scopes * @@ -3948,80 +3714,85 @@ export const getShowPayslip = ( * | Manage timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getIndexLeavePoliciesSummary = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowTimeoff = ( + options: Options, ) => (options.client ?? client).get< - GetIndexLeavePoliciesSummaryResponses, - GetIndexLeavePoliciesSummaryErrors, + GetShowTimeoffResponses, + GetShowTimeoffErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/leave-policies/summary/{employment_id}', + url: '/api/eor/v1/timeoff/{id}', ...options, }); /** - * List Company Departments + * Update Time Off * - * Lists all departments for the authorized company specified in the request. + * 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 company resources (`company_admin`) | View departments (`company_department:read`) | Manage departments (`company_department:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getIndexCompanyDepartment = ( - options: Options, +export const patchUpdateTimeoff2 = ( + options: Options, ) => - (options.client ?? client).get< - GetIndexCompanyDepartmentResponses, - GetIndexCompanyDepartmentErrors, + (options.client ?? client).patch< + PatchUpdateTimeoff2Responses, + PatchUpdateTimeoff2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-departments', + url: '/api/eor/v1/timeoff/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Create New Department + * 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. * - * 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 timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postCreateCompanyDepartment = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchUpdateTimeoff = ( + options: Options, ) => - (options.client ?? client).post< - PostCreateCompanyDepartmentResponses, - PostCreateCompanyDepartmentErrors, + (options.client ?? client).put< + PatchUpdateTimeoffResponses, + PatchUpdateTimeoffErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-departments', + url: '/api/eor/v1/timeoff/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -4030,78 +3801,82 @@ export const postCreateCompanyDepartment = < }); /** - * Decline a time off cancellation request - * - * Decline a time off cancellation request. + * Get token identity * - * - * ## Scopes - * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * Shows information about the entities that can be controlled by the current auth token. * */ -export const postDeclineCancellationRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getCurrentIdentity = ( + options: Options, ) => - (options.client ?? client).post< - PostDeclineCancellationRequestResponses, - PostDeclineCancellationRequestErrors, + (options.client ?? client).get< + GetCurrentIdentityResponses, + GetCurrentIdentityErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{timeoff_id}/cancel-request/decline', + url: '/api/eor/v1/identity/current', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get a employment benefit offers JSON schema + * Payroll Variance Analysis API resource + * + * API to retrieve the variance analysis data of a pay group + */ +export const getPayVarianceGph = ( + options: Options, +) => + (options.client ?? client).get< + GetPayVarianceGphResponses, + GetPayVarianceGphErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/wd/gph/payVariance', + ...options, + }); + +/** + * 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 company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | * */ -export const getShowSchema = ( - options: Options, +export const getIndexPayrollCalendar = ( + options: Options, ) => (options.client ?? client).get< - GetShowSchemaResponses, - GetShowSchemaErrors, + GetIndexPayrollCalendarResponses, + GetIndexPayrollCalendarErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/benefit-offers/schema', + url: '/api/eor/v1/payroll-calendars/{cycle}', ...options, }); /** - * Submit eligibility questionnaire - * - * Submits an eligibility questionnaire for a contractor employment. + * Terminate contractor of record 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. + * **Deprecated.** Use `POST /contractors/employments/{employment_id}/cor-termination-requests` instead. * - * **Requirements:** - * - Employment must be of type `contractor` - * - Employment must be in `created` status - * - Responses must conform to the questionnaire JSON schema + * 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 @@ -4110,22 +3885,55 @@ export const getShowSchema = ( * |---|---|---| * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * + * + * @deprecated */ -export const postCreateEligibilityQuestionnaire = < +export const postTerminateContractorOfRecordEmploymentSubscription = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostTerminateContractorOfRecordEmploymentSubscriptionData, + ThrowOnError + >, ) => (options.client ?? client).post< - PostCreateEligibilityQuestionnaireResponses, - PostCreateEligibilityQuestionnaireErrors, + PostTerminateContractorOfRecordEmploymentSubscriptionResponses, + PostTerminateContractorOfRecordEmploymentSubscriptionErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/contractors/employments/{employment_id}/terminate-cor-employment', + ...options, + }); + +/** + * 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 timeoffs (`time_and_attendance`) | - | Manage timesheets (`timesheet:write`) | + * + */ +export const postSendBackTimesheet = ( + options: Options, +) => + (options.client ?? client).post< + PostSendBackTimesheetResponses, + PostSendBackTimesheetErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/eligibility-questionnaire', + url: '/api/eor/v1/timesheets/{timesheet_id}/send-back', ...options, headers: { 'Content-Type': 'application/json', @@ -4134,254 +3942,324 @@ export const postCreateEligibilityQuestionnaire = < }); /** - * List timesheets + * List Benefit Renewal Requests * - * Lists all timesheets. + * List Benefit Renewal Requests for each country. * * ## 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 benefit renewals (`benefit_renewal:read`) | Manage benefit renewals (`benefit_renewal:write`) | * */ -export const getIndexTimesheet = ( - options?: Options, +export const getIndexBenefitRenewalRequest = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetIndexTimesheetResponses, - GetIndexTimesheetErrors, + (options.client ?? client).get< + GetIndexBenefitRenewalRequestResponses, + GetIndexBenefitRenewalRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timesheets', + url: '/api/eor/v1/benefit-renewal-requests', ...options, }); /** - * Create a legal entity + * Reassign default legal entity * - * Create a new legal entity for a company in a given country, with KYB automatically passed. + * Set a different legal entity as the company's default entity. * - * The entity is created with active status and can be set as the company's default - * using the reassign default entity endpoint. + * 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 postCreateLegalEntityCompany = < +export const putReassignDefaultEntityCompany = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostCreateLegalEntityCompanyResponses, - PostCreateLegalEntityCompanyErrors, + (options.client ?? client).put< + PutReassignDefaultEntityCompanyResponses, + PutReassignDefaultEntityCompanyErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sandbox/companies/{company_id}/legal-entities', + url: '/api/eor/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}', ...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. - * - * 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 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 employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | View contracts (`contract:read`) | - | * */ -export const getShowEmployment = ( - options: Options, +export const getIndexEmploymentContract = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetShowEmploymentResponses, - GetShowEmploymentErrors, + GetIndexEmploymentContractResponses, + GetIndexEmploymentContractErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}', + url: '/api/eor/v1/employment-contracts', ...options, }); /** - * 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. + * Cancel Contract Amendment * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * Use this endpoint to cancel an existing contract amendment request. * - * 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 is only available in Sandbox, otherwise it will respond with a 404. * + */ +export const putCancelContractAmendment = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).put< + PutCancelContractAmendmentResponses, + PutCancelContractAmendmentErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel', + ...options, + }); + +/** + * Download payslip in the PDF format * - * Please contact Remote if you need to update contractors via API since it's currently not supported. + * 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. * * * ## 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 patchUpdateEmployment2 = ( - options: Options, +export const getDownloadPayslipPayslip = ( + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateEmployment2Responses, - PatchUpdateEmployment2Errors, + (options.client ?? client).get< + GetDownloadPayslipPayslipResponses, + GetDownloadPayslipPayslipErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}', + url: '/api/eor/v1/payslips/{payslip_id}/pdf', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update employment + * Approve Time Off * - * Updates an employment. + * Approve a time off request. * - * **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 timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * - * **For `invited` employments:** You can update the work_email. + */ +export const postCreateApproval = ( + options: Options, +) => + (options.client ?? client).post< + PostCreateApprovalResponses, + PostCreateApprovalErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/timeoff/{timeoff_id}/approve', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * List all companies * - * 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. + * 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. * - * It is possible to update the `external_id` of the employment for all employment statuses. + * ## Scopes * - * ## Global Payroll Employees + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * - * To update a Global Payment employment your input data must comply with the global payroll json schemas. + */ +export const getIndexCompany = ( + options: Options, +) => + (options.client ?? client).get< + GetIndexCompanyResponses, + GetIndexCompanyErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies', + ...options, + }); + +/** + * Create a company * - * **For `active` employments:** In addition to the above list, you can update personal_details. + * Creates a new company. * - * ## Direct Employees + * ### 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`. * - * To update an HRIS employment your input data must comply with the HRIS json schemas. + * 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. * - * 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. + * 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. * - * 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. + * ### Accepting the Terms of Service * - * 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. + * A required step for creating a company in Remote is to accept our Terms of Service (ToS). * - * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. + * 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 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. + * 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)". * * - * 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`) | + * + */ +export const postCreateCompany = ( + options: Options, +) => + (options.client ?? client).post< + PostCreateCompanyResponses, + PostCreateCompanyErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * List company structure nodes + * + * Shows all the company structure nodes of an 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 company structure (`company_structure:read`) | - | * */ -export const patchUpdateEmployment = ( - options: Options, +export const getIndexEmploymentCompanyStructureNode = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).put< - PatchUpdateEmploymentResponses, - PatchUpdateEmploymentErrors, + (options.client ?? client).get< + GetIndexEmploymentCompanyStructureNodeResponses, + GetIndexEmploymentCompanyStructureNodeErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/employments/{employment_id}/company-structure-nodes', + ...options, + }); + +/** + * 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`) | + * + */ +export const postCreateProbationCompletionLetter = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).post< + PostCreateProbationCompletionLetterResponses, + PostCreateProbationCompletionLetterErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}', + url: '/api/eor/v1/probation-completion-letter', ...options, headers: { 'Content-Type': 'application/json', @@ -4390,86 +4268,320 @@ export const patchUpdateEmployment = ( }); /** - * List users via SCIM v2.0 + * Creates PDF cost estimation of employments * - * Retrieves a list of users for the authenticated company following SCIM 2.0 standard + * Creates a PDF cost estimation of employments based on the provided parameters. */ -export const getListUsersScim = ( - options?: Options, +export const postCreateEstimationPdf = ( + options?: Options, ) => - (options?.client ?? client).get< - GetListUsersScimResponses, - GetListUsersScimErrors, + (options?.client ?? client).post< + PostCreateEstimationPdfResponses, + PostCreateEstimationPdfErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/cost-calculator/estimation-pdf', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Token + * + * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows + */ +export const postTokenOAuth2Token2 = ( + options?: Options, +) => + (options?.client ?? client).post< + PostTokenOAuth2Token2Responses, + PostTokenOAuth2Token2Errors, + ThrowOnError + >({ + security: [{ scheme: 'basic', type: 'http' }], + url: '/api/eor/auth/oauth2/token', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Download a document for the 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`) | + * + */ +export const getShowEmployeeDocument = ( + options: Options, +) => + (options.client ?? client).get< + GetShowEmployeeDocumentResponses, + GetShowEmployeeDocumentErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Users', + url: '/api/eor/v1/employee/documents/{id}', ...options, }); /** - * List Company Payroll Calendar + * Replay Webhook Events * - * List all payroll calendars for the company within the requested cycle. + * Replay webhook events * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | + * | Manage company resources (`company_admin`) | - | Manage webhooks (`webhook:write`) | * */ -export const getIndexPayrollCalendar = ( - options: Options, +export const postReplayWebhookEvent = ( + options: Options, +) => + (options.client ?? client).post< + PostReplayWebhookEventResponses, + PostReplayWebhookEventErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/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 postTriggerWebhookCallback = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).post< + PostTriggerWebhookCallbackResponses, + PostTriggerWebhookCallbackErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/sandbox/webhook-callbacks/trigger', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, + }); + +/** + * Show bulk employment job + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | + * + */ +export const getShowBulkEmployment = ( + options: Options, ) => (options.client ?? client).get< - GetIndexPayrollCalendarResponses, - GetIndexPayrollCalendarErrors, + GetShowBulkEmploymentResponses, + GetShowBulkEmploymentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payroll-calendars/{cycle}', + url: '/api/eor/v1/bulk-employment-jobs/{job_id}', ...options, }); /** - * Show Legal Entity Administrative details + * 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 getIndexBulkEmploymentRow = ( + options: Options, +) => + (options.client ?? client).get< + GetIndexBulkEmploymentRowResponses, + GetIndexBulkEmploymentRowErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/bulk-employment-jobs/{job_id}/rows', + ...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. + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage company resources (`company_admin`) | - | Create magic links (`magic_link:write`) | + * + */ +export const postGenerateMagicLink = ( + options: Options, +) => + (options.client ?? client).post< + PostGenerateMagicLinkResponses, + PostGenerateMagicLinkErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/magic-link', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, + }); + +/** + * 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. + * + * + * ## 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 getShowCompany = ( + options: Options, +) => + (options.client ?? client).get< + GetShowCompanyResponses, + GetShowCompanyErrors, + ThrowOnError + >({ + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/companies/{company_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". * - * Show administrative details of legal entity for the authorized company specified in the 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) * * * ## 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 getShowAdministrativeDetails = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchUpdateCompany2 = ( + options: Options, ) => - (options.client ?? client).get< - GetShowAdministrativeDetailsResponses, - GetShowAdministrativeDetailsErrors, + (options.client ?? client).patch< + PatchUpdateCompany2Responses, + PatchUpdateCompany2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies/{company_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Update Legal Entity Administrative details + * Update a company * - * Update administrative details of legal entity for the authorized company specified in the request. + * 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 @@ -4479,21 +4591,16 @@ export const getShowAdministrativeDetails = < * | Manage companies (`company_management`) | - | Manage companies (`company:write`) | * */ -export const putUpdateAdministrativeDetails = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchUpdateCompany = ( + options: Options, ) => (options.client ?? client).put< - PutUpdateAdministrativeDetailsResponses, - PutUpdateAdministrativeDetailsErrors, + PatchUpdateCompanyResponses, + PatchUpdateCompanyErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies/{company_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -4502,435 +4609,398 @@ export const putUpdateAdministrativeDetails = < }); /** - * Show region fields + * 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 company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company: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 getShowRegionField = ( - options: Options, +export const getShowCompanySchema = ( + options: Options, ) => (options.client ?? client).get< - GetShowRegionFieldResponses, - GetShowRegionFieldErrors, + GetShowCompanySchemaResponses, + GetShowCompanySchemaErrors, 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', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies/schema', ...options, }); /** - * Show Offboarding + * List pricing plan partner templates + * + * List all pricing plan partner templates. * - * 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 companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getShowOffboarding = ( - options: Options, +export const getIndexPricingPlanPartnerTemplate = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => - (options.client ?? client).get< - GetShowOffboardingResponses, - GetShowOffboardingErrors, + (options?.client ?? client).get< + GetIndexPricingPlanPartnerTemplateResponses, + GetIndexPricingPlanPartnerTemplateErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/offboardings/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/pricing-plan-partner-templates', ...options, }); /** - * Get Employee Details for a Payroll Run + * Show engagement agreement details JSON Schema * - * Gets the employee details for a payroll run + * Returns the engagement agreement details JSON Schema for a given country * * ## 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 forms (`form:read`) | - | * */ -export const getEmployeeDetailsPayrollRun = < +export const getShowEngagementAgreementDetailsCountry = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetEmployeeDetailsPayrollRunResponses, - GetEmployeeDetailsPayrollRunErrors, + GetShowEngagementAgreementDetailsCountryResponses, + GetShowEngagementAgreementDetailsCountryErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payroll-runs/{payroll_run_id}/employee-details', + url: '/api/eor/v1/countries/{country_code}/engagement-agreement-details', ...options, }); /** - * List bulk employment rows + * Show product prices in the company's desired currency + * + * 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. * - * 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 companies (`company_management`) | View pricing plans (`pricing_plan:read`) | Manage pricing plans (`pricing_plan:write`) | * */ -export const getIndexBulkEmploymentRow = ( - options: Options, +export const getIndexCompanyProductPrice = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetIndexBulkEmploymentRowResponses, - GetIndexBulkEmploymentRowErrors, + GetIndexCompanyProductPriceResponses, + GetIndexCompanyProductPriceErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/bulk-employment-jobs/{job_id}/rows', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies/{company_id}/product-prices', ...options, }); /** - * 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) + * Create a new token for a company * + * Creates new tokens for a given company */ -export const postCreateEmployment = ( - options: Options, +export const postCreateTokenCompanyToken = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostCreateEmploymentResponses, - PostCreateEmploymentErrors, + PostCreateTokenCompanyTokenResponses, + PostCreateTokenCompanyTokenErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/companies/{company_id}/create-token', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Create contract eligibility - * - * Create contract eligibility for an employment. + * Get Employment Profile * - * This will create a new contract eligibility for the employment. + * Gets necessary information to perform the identity verification of an employee. * * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage contract eligibility (`contract_eligibility:write`) | + * | Manage employment documents (`employment_documents`) | View identity verification (`identity_verification:read`) | Manage identity verification (`identity_verification:write`) | * */ -export const postCreateContractEligibility = < +export const getGetIdentityVerificationDataIdentityVerification = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + GetGetIdentityVerificationDataIdentityVerificationData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostCreateContractEligibilityResponses, - PostCreateContractEligibilityErrors, + (options.client ?? client).get< + GetGetIdentityVerificationDataIdentityVerificationResponses, + GetGetIdentityVerificationDataIdentityVerificationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/contract-eligibility', + url: '/api/eor/v1/identity-verification/{employment_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * 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. + * Download a receipt by id * + * Download a receipt by id. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View countries (`country:read`) | - | + * | Manage expenses (`employment_payments`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getSupportedCountry = ( - options: Options, +export const getDownloadByIdExpenseReceipt = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetSupportedCountryResponses, - GetSupportedCountryErrors, + GetDownloadByIdExpenseReceiptResponses, + GetDownloadByIdExpenseReceiptErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/countries', + url: '/api/eor/v1/expenses/{expense_id}/receipts/{receipt_id}', ...options, }); /** - * Create a new token for a company + * List groups via SCIM v2.0 * - * Creates new tokens for a given company + * Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard */ -export const postCreateTokenCompanyToken = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getListGroupsScim = ( + options?: Options, ) => - (options.client ?? client).post< - PostCreateTokenCompanyTokenResponses, - PostCreateTokenCompanyTokenErrors, + (options?.client ?? client).get< + GetListGroupsScimResponses, + GetListGroupsScimErrors, ThrowOnError >({ security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies/{company_id}/create-token', + url: '/api/eor/v1/scim/v2/Groups', ...options, }); /** - * List Company Legal Entities - * - * Lists all active legal entities for the authorized company specified in the request. + * Show expense * + * Shows a single expense record * * ## 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`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getIndexCompanyLegalEntities = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowExpense = ( + options: Options, ) => (options.client ?? client).get< - GetIndexCompanyLegalEntitiesResponses, - GetIndexCompanyLegalEntitiesErrors, + GetShowExpenseResponses, + GetShowExpenseErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/companies/{company_id}/legal-entities', - ...options, - }); - -/** - * Complete onboarding - * - * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status - * - * @deprecated - */ -export const postCompleteOnboardingEmployment = < - ThrowOnError extends boolean = false, ->( - options: Options, -) => - (options.client ?? client).post< - PostCompleteOnboardingEmploymentResponses, - PostCompleteOnboardingEmploymentErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/ready', + url: '/api/eor/v1/expenses/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List Leave Policies Details + * Update an expense * - * Describe the leave policies (custom or not) for a given employment + * Updates an expense * * ## 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`) | - | Manage expenses (`expense:write`) | * */ -export const getIndexLeavePoliciesDetails = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const patchUpdateExpense2 = ( + options: Options, ) => - (options.client ?? client).get< - GetIndexLeavePoliciesDetailsResponses, - GetIndexLeavePoliciesDetailsErrors, + (options.client ?? client).patch< + PatchUpdateExpense2Responses, + PatchUpdateExpense2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/leave-policies/details/{employment_id}', + url: '/api/eor/v1/expenses/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * 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). + * Update an expense * + * Updates an expense * * ## 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`) | - | Manage expenses (`expense:write`) | * */ -export const getTimeoffTypesTimeoff = ( - options: Options, +export const patchUpdateExpense = ( + options: Options, ) => - (options.client ?? client).get< - GetTimeoffTypesTimeoffResponses, - GetTimeoffTypesTimeoffErrors, + (options.client ?? client).put< + PatchUpdateExpenseResponses, + PatchUpdateExpenseErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/types', + url: '/api/eor/v1/expenses/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Creates a CSV cost estimation of employments + * 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. * - * Creates CSV cost estimation of employments */ -export const postCreateEstimationCsv = ( - options?: Options, +export const postCreateBenefitRenewalRequest = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).post< - PostCreateEstimationCsvResponses, - PostCreateEstimationCsvErrors, + (options.client ?? client).post< + PostCreateBenefitRenewalRequestResponses, + PostCreateBenefitRenewalRequestErrors, 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: '/api/eor/v1/sandbox/benefit-renewal-requests', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * List groups via SCIM v2.0 + * 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`) | * - * Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard */ -export const getListGroupsScim = ( - options?: Options, +export const getIndexLeavePoliciesSummary = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options?.client ?? client).get< - GetListGroupsScimResponses, - GetListGroupsScimErrors, + (options.client ?? client).get< + GetIndexLeavePoliciesSummaryResponses, + GetIndexLeavePoliciesSummaryErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Groups', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/leave-policies/summary/{employment_id}', ...options, }); /** - * Create a contract document for a contractor - * - * Create a contract document for a contractor. + * Cancel Time Off * + * Cancel a time off request that was already approved. * * ## 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 postCreateContractDocument = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postCreateCancellation = ( + options: Options, ) => (options.client ?? client).post< - PostCreateContractDocumentResponses, - PostCreateContractDocumentErrors, + PostCreateCancellationResponses, + PostCreateCancellationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contract-documents', + url: '/api/eor/v1/timeoff/{timeoff_id}/cancel', ...options, headers: { 'Content-Type': 'application/json', @@ -4939,156 +5009,159 @@ export const postCreateContractDocument = < }); /** - * Trigger a Webhook + * Get Help Center Article * - * 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. + * 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 postTriggerWebhookCallback = < - ThrowOnError extends boolean = false, ->( - options?: Options, +export const getShowHelpCenterArticle = ( + options: Options, ) => - (options?.client ?? client).post< - PostTriggerWebhookCallbackResponses, - PostTriggerWebhookCallbackErrors, + (options.client ?? client).get< + GetShowHelpCenterArticleResponses, + GetShowHelpCenterArticleErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sandbox/webhook-callbacks/trigger', + url: '/api/eor/v1/help-center-articles/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options?.headers, - }, }); /** - * Download payslip in the PDF format + * Upload file * - * 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. + * 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`) | View payslips (`payslip:read`) | - | + * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | * */ -export const getDownloadPayslipPayslip = ( - options: Options, +export const postUploadEmployeeFileFile = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetDownloadPayslipPayslipResponses, - GetDownloadPayslipPayslipErrors, + (options.client ?? client).post< + PostUploadEmployeeFileFileResponses, + PostUploadEmployeeFileFileErrors, ThrowOnError >({ + ...formDataBodySerializer, security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payslips/{payslip_id}/pdf', + url: '/api/eor/v1/documents', ...options, + headers: { + 'Content-Type': null, + ...options.headers, + }, }); /** - * Convert currency using dynamic rates + * Verify Employment Identity + * + * Endpoint to confirms the employment profile is from the actual employee * - * 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 employment documents (`employment_documents`) | - | Manage identity verification (`identity_verification:write`) | * */ -export const postConvertWithSpreadCurrencyConverter = < +export const postVerifyIdentityVerification = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostConvertWithSpreadCurrencyConverterResponses, - PostConvertWithSpreadCurrencyConverterErrors, + PostVerifyIdentityVerificationResponses, + PostVerifyIdentityVerificationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/currency-converter/effective', + url: '/api/eor/v1/identity-verification/{employment_id}/verify', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show Time Off + * Lists custom fields definitions * - * Shows a single Time Off record + * Returns custom fields definitions * * ## 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`) | - | Manage custom fields (`custom_field:write`) | * */ -export const getShowTimeoff = ( - options: Options, +export const getIndexEmploymentCustomField = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => - (options.client ?? client).get< - GetShowTimeoffResponses, - GetShowTimeoffErrors, + (options?.client ?? client).get< + GetIndexEmploymentCustomFieldResponses, + GetIndexEmploymentCustomFieldErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{id}', + url: '/api/eor/v1/custom-fields', ...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. + * Create Custom Field Definition * + * Creates a new custom field definition. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * | Manage employments (`employments`) | View custom fields (`custom_field:read`) | Manage custom fields (`custom_field:write`) | * */ -export const patchUpdateTimeoff2 = ( - options: Options, +export const postCreateEmploymentCustomField = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateTimeoff2Responses, - PatchUpdateTimeoff2Errors, + (options.client ?? client).post< + PostCreateEmploymentCustomFieldResponses, + PostCreateEmploymentCustomFieldErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{id}', + url: '/api/eor/v1/custom-fields', ...options, headers: { 'Content-Type': 'application/json', @@ -5097,33 +5170,30 @@ export const patchUpdateTimeoff2 = ( }); /** - * 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 Webhook Callback * + * Register a callback to be used 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 patchUpdateTimeoff = ( - options: Options, +export const postCreateWebhookCallback = ( + options: Options, ) => - (options.client ?? client).put< - PatchUpdateTimeoffResponses, - PatchUpdateTimeoffErrors, + (options.client ?? client).post< + PostCreateWebhookCallbackResponses, + PostCreateWebhookCallbackErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{id}', + url: '/api/eor/v1/webhook-callbacks', ...options, headers: { 'Content-Type': 'application/json', @@ -5132,116 +5202,86 @@ export const patchUpdateTimeoff = ( }); /** - * Decline Time Off + * Approve reserve payment * - * Decline a time off request. Please note that only time off requests on the `requested` status can be declined. + * Approve the reserve payment for a Contractor of Record employment without the intervention of a Remote admin. * - * ## Scopes + * This moves the employment past the awaiting reserve payment state and triggers all related processing (state transitions, webhooks, notifications). * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const postCreateDecline = ( - options: Options, +export const postApproveReservePaymentRiskReserve = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).post< - PostCreateDeclineResponses, - PostCreateDeclineErrors, + PostApproveReservePaymentRiskReserveResponses, + PostApproveReservePaymentRiskReserveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{timeoff_id}/decline', + url: '/api/eor/v1/sandbox/employments/{employment_id}/approve-reserve-payment', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * 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. - * + * 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 employments (`employments`) | - | Manage contract amendments (`contract_amendment:write`) | + * | Manage company resources (`company_admin`) | - | Manage SSO (`sso_configuration:write`) | * */ -export const postAutomatableContractAmendment = < +export const getDetailsSsoConfiguration = < ThrowOnError extends boolean = false, >( - options: Options, + options?: Options, ) => - (options.client ?? client).post< - PostAutomatableContractAmendmentResponses, - PostAutomatableContractAmendmentErrors, + (options?.client ?? client).get< + GetDetailsSsoConfigurationResponses, + GetDetailsSsoConfigurationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contract-amendments/automatable', + url: '/api/eor/v1/sso-configuration/details', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Approve Time Off - * - * Approve a time off request. + * Sign a document for a contractor * * ## 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`) | - | Manage documents (`document:write`) | * */ -export const postCreateApproval = ( - options: Options, +export const postSignContractDocument = ( + options: Options, ) => (options.client ?? client).post< - PostCreateApprovalResponses, - PostCreateApprovalErrors, + PostSignContractDocumentResponses, + PostSignContractDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{timeoff_id}/approve', + url: '/api/eor/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign', ...options, headers: { 'Content-Type': 'application/json', @@ -5250,93 +5290,109 @@ export const postCreateApproval = ( }); /** - * List employment files - * - * Lists files associated with a specific employment. + * List users via SCIM v2.0 * - * Supports filtering by file type and sub_type. + * Retrieves a list of users for the authenticated company following SCIM 2.0 standard + */ +export const getListUsersScim = ( + options?: Options, +) => + (options?.client ?? client).get< + GetListUsersScimResponses, + GetListUsersScimErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/scim/v2/Users', + ...options, + }); + +/** + * Show Resignation * + * Shows the details of a resignation with status `submitted`. * * ## 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 resignations (`resignation:read`) | Manage resignations (`resignation:write`) | * */ -export const getIndexEmploymentFile = ( - options: Options, +export const getShowResignation = ( + options: Options, ) => (options.client ?? client).get< - GetIndexEmploymentFileResponses, - GetIndexEmploymentFileErrors, + GetShowResignationResponses, + GetShowResignationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/files', + url: '/api/eor/v1/resignations/{offboarding_request_id}', ...options, }); /** - * Lists custom fields definitions + * Get Billing Document Breakdown * - * Returns custom fields definitions + * Get billing document breakdown * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom fields (`custom_field:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getIndexEmploymentCustomField = < +export const getGetBreakdownBillingDocument = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetIndexEmploymentCustomFieldResponses, - GetIndexEmploymentCustomFieldErrors, + (options.client ?? client).get< + GetGetBreakdownBillingDocumentResponses, + GetGetBreakdownBillingDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/custom-fields', + url: '/api/eor/v1/billing-documents/{billing_document_id}/breakdown', ...options, }); /** - * Create Custom Field Definition + * Decline a time off cancellation request + * + * Decline a time off cancellation request. * - * 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 timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postCreateEmploymentCustomField = < +export const postDeclineCancellationRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostCreateEmploymentCustomFieldResponses, - PostCreateEmploymentCustomFieldErrors, + PostDeclineCancellationRequestResponses, + PostDeclineCancellationRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/custom-fields', + url: '/api/eor/v1/timeoff/{timeoff_id}/cancel-request/decline', ...options, headers: { 'Content-Type': 'application/json', @@ -5345,59 +5401,125 @@ export const postCreateEmploymentCustomField = < }); /** - * List company supported currencies + * List EOR Payroll Calendar * - * List company supported currencies + * List all active payroll calendars for EOR. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View company currencies (`company_currencies:read`) | - | + * | Manage payroll runs (`payroll`) | View payroll calendars (`payroll_calendar:read`) | - | * */ -export const getIndexCompanyCurrency = ( - options?: Options, +export const getIndexEorPayrollCalendar = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => (options?.client ?? client).get< - GetIndexCompanyCurrencyResponses, - GetIndexCompanyCurrencyErrors, + GetIndexEorPayrollCalendarResponses, + GetIndexEorPayrollCalendarErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/payroll-calendars', + ...options, + }); + +/** + * Payroll processing details API resource + * + * API to retrieve header details of a pay group + */ +export const getPayDetailGph = ( + options: Options, +) => + (options.client ?? client).get< + GetPayDetailGphResponses, + GetPayDetailGphErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/wd/gph/payDetail', + ...options, + }); + +/** + * 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`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | + * + */ +export const getShowContractAmendmentSchema = < + ThrowOnError extends boolean = false, +>( + options: Options, +) => + (options.client ?? client).get< + GetShowContractAmendmentSchemaResponses, + GetShowContractAmendmentSchemaErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-currencies', + url: '/api/eor/v1/contract-amendments/schema', ...options, }); /** - * Update employment + * Get a mock JSON Schema * - * Updates an employment. Use this endpoint to: - * - modify employment states for testing - * - Backdate employment start dates + * Get a mock JSON Schema for testing purposes + */ +export const getShowTestSchema = ( + options?: Options, +) => + (options?.client ?? client).get< + GetShowTestSchemaResponses, + unknown, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/test-schema', + ...options, + }); + +/** + * Update Time Off as Employee * - * This endpoint will respond with a 404 outside of the Sandbox environment. + * Updates a Time Off record as Employee * - * 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 timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchUpdateEmployment4 = ( - options: Options, +export const patchUpdateEmployeeTimeoff2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).patch< - PatchUpdateEmployment4Responses, - PatchUpdateEmployment4Errors, + PatchUpdateEmployeeTimeoff2Responses, + PatchUpdateEmployeeTimeoff2Errors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments/{employment_id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employee/timeoff/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -5406,30 +5528,29 @@ export const patchUpdateEmployment4 = ( }); /** - * Update employment + * Update Time Off as Employee * - * Updates an employment. Use this endpoint to: - * - modify employment states for testing - * - Backdate employment start dates + * Updates a Time Off record as Employee * - * 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 timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchUpdateEmployment3 = ( - options: Options, +export const patchUpdateEmployeeTimeoff = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).put< - PatchUpdateEmployment3Responses, - PatchUpdateEmployment3Errors, + PatchUpdateEmployeeTimeoffResponses, + PatchUpdateEmployeeTimeoffErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/employments/{employment_id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employee/timeoff/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -5438,418 +5559,434 @@ export const patchUpdateEmployment3 = ( }); /** - * Get employment contract pending changes + * Get group by ID via SCIM v2.0 + * + * Retrieves a single group (department) for the authenticated company by group ID + */ +export const getGetGroupScim = ( + options: Options, +) => + (options.client ?? client).get< + GetGetGroupScimResponses, + GetGetGroupScimErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/scim/v2/Groups/{id}', + ...options, + }); + +/** + * 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. + * * - * 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 company resources (`company_admin`) | View forms (`form:read`) | - | * */ -export const getPendingChangesEmploymentContract = < +export const getShowLegalEntityFormCountry = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetPendingChangesEmploymentContractResponses, - GetPendingChangesEmploymentContractErrors, + GetShowLegalEntityFormCountryResponses, + GetShowLegalEntityFormCountryErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employment-contracts/{employment_id}/pending-changes', + url: '/api/eor/v1/countries/{country_code}/legal_entity_forms/{form}', ...options, }); /** - * Show Resignation + * Get employment contract pending changes * - * Shows the details of a resignation with status `submitted`. + * 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 resignations (`resignation:read`) | Manage resignations (`resignation:write`) | + * | Manage employments (`employments`) | View contracts (`contract:read`) | - | * */ -export const getShowResignation = ( - options: Options, +export const getPendingChangesEmploymentContract = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetShowResignationResponses, - GetShowResignationErrors, + GetPendingChangesEmploymentContractResponses, + GetPendingChangesEmploymentContractErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/resignations/{offboarding_request_id}', + url: '/api/eor/v1/employment-contracts/{employment_id}/pending-changes', ...options, }); /** - * Upload file - * - * Uploads a file associated with a specified employment. - * - * Please contact api-support@remote.com to request access to this endpoint. - * - * - * ## Scopes + * Report SDK errors * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * Receives error telemetry from the frontend SDK. + * Errors are logged to observability backend for monitoring and debugging. * */ -export const postUploadEmployeeFileFile = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postReportErrorsTelemetry = ( + options: Options, ) => (options.client ?? client).post< - PostUploadEmployeeFileFileResponses, - PostUploadEmployeeFileFileErrors, + PostReportErrorsTelemetryResponses, + PostReportErrorsTelemetryErrors, ThrowOnError >({ - ...formDataBodySerializer, security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/documents', + url: '/api/eor/v1/sdk/telemetry-errors', ...options, headers: { - 'Content-Type': null, + 'Content-Type': 'application/json', ...options.headers, }, }); /** - * 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. + * Get Company Compliance Profile * - * In this case, reselect benefits by updating `contract_details` JSON Schema form. + * 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 postInviteEmploymentInvitation = < +export const getShowCompanyComplianceProfile = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostInviteEmploymentInvitationResponses, - PostInviteEmploymentInvitationErrors, + (options.client ?? client).get< + GetShowCompanyComplianceProfileResponses, + GetShowCompanyComplianceProfileErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/invite', + url: '/api/eor/v1/companies/{company_id}/compliance-profile', ...options, }); /** - * Show expense + * Show payslip + * + * Given an ID, shows a payslip. + * + * Please contact api-support@remote.com to request access to this endpoint. * - * Shows a single expense record * * ## 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 payslips (`payslip:read`) | - | * */ -export const getShowExpense = ( - options: Options, +export const getShowPayslip = ( + options: Options, ) => (options.client ?? client).get< - GetShowExpenseResponses, - GetShowExpenseErrors, + GetShowPayslipResponses, + GetShowPayslipErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/expenses/{id}', + url: '/api/eor/v1/payslips/{id}', ...options, }); /** - * Update an expense + * 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`. * - * Updates an expense * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const patchUpdateExpense2 = ( - options: Options, +export const postApproveCancellationRequest = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateExpense2Responses, - PatchUpdateExpense2Errors, + (options.client ?? client).post< + PostApproveCancellationRequestResponses, + PostApproveCancellationRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/expenses/{id}', + url: '/api/eor/v1/timeoff/{timeoff_id}/cancel-request/approve', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update an expense + * List Webhook Events * - * Updates an expense + * List all webhook events * * ## 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 webhooks (`webhook:read`) | Manage webhooks (`webhook:write`) | * */ -export const patchUpdateExpense = ( - options: Options, +export const getIndexWebhookEvent = ( + options?: Options, ) => - (options.client ?? client).put< - PatchUpdateExpenseResponses, - PatchUpdateExpenseErrors, + (options?.client ?? client).get< + GetIndexWebhookEventResponses, + GetIndexWebhookEventErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/expenses/{id}', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/webhook-events', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show Benefit Renewal Request + * 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 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 timeoffs (`time_and_attendance`) | View timeoffs (`timeoff:read`) | Manage timeoffs (`timeoff:write`) | * */ -export const getShowBenefitRenewalRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getTimeoffTypesTimeoff = ( + options: Options, ) => (options.client ?? client).get< - GetShowBenefitRenewalRequestResponses, - GetShowBenefitRenewalRequestErrors, + GetTimeoffTypesTimeoffResponses, + GetTimeoffTypesTimeoffErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}', + url: '/api/eor/v1/timeoff/types', ...options, }); /** - * Updates a Benefit Renewal Request Response + * List Company Legal Entities + * + * Lists all active legal entities for the authorized company specified in the request. * - * Updates a Benefit Renewal Request with the given response. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | - | Manage benefit renewals (`benefit_renewal:write`) | + * | Manage company resources (`company_admin`) | View companies (`company:read`) | Manage companies (`company:write`) | * */ -export const postUpdateBenefitRenewalRequest = < +export const getIndexCompanyLegalEntities = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostUpdateBenefitRenewalRequestResponses, - PostUpdateBenefitRenewalRequestErrors, + (options.client ?? client).get< + GetIndexCompanyLegalEntitiesResponses, + GetIndexCompanyLegalEntitiesErrors, ThrowOnError >({ 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, - }, + ], + url: '/api/eor/v1/companies/{company_id}/legal-entities', + ...options, }); /** - * Show onboarding steps for an employment + * Create contract eligibility + * + * Create contract eligibility for an employment. + * + * This will create a new contract eligibility for the employment. * - * Returns onboarding steps and substeps in a hierarchical, ordered structure. * * ## 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 contract eligibility (`contract_eligibility:write`) | * */ -export const getShowEmploymentOnboardingSteps = < +export const postCreateContractEligibility = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetShowEmploymentOnboardingStepsResponses, - GetShowEmploymentOnboardingStepsErrors, + (options.client ?? client).post< + PostCreateContractEligibilityResponses, + PostCreateContractEligibilityErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/onboarding-steps', + url: '/api/eor/v1/employments/{employment_id}/contract-eligibility', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List company structure nodes + * List all currencies for the contractor * - * Shows all the company structure nodes of an employment. + * 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 company resources (`company_admin`) | View company structure (`company_structure:read`) | - | + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getIndexEmploymentCompanyStructureNode = < +export const getIndexContractorCurrency = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetIndexEmploymentCompanyStructureNodeResponses, - GetIndexEmploymentCompanyStructureNodeErrors, + GetIndexContractorCurrencyResponses, + GetIndexContractorCurrencyErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/company-structure-nodes', + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-currencies', ...options, }); /** - * List custom field value for an employment + * List payslips + * + * Lists all payslips belonging to a company. Can also filter for a single employment belonging + * to that company. * - * 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 employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | * */ -export const getIndexEmploymentCustomFieldValue = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexPayslip = ( + options?: Options, ) => - (options.client ?? client).get< - GetIndexEmploymentCustomFieldValueResponses, - GetIndexEmploymentCustomFieldValueErrors, + (options?.client ?? client).get< + GetIndexPayslipResponses, + GetIndexPayslipErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employments/{employment_id}/custom-fields', + url: '/api/eor/v1/payslips', ...options, }); /** - * Validate resignation request + * Create employment * - * Validates a resignation employment request + * Creates an employment without provisional_start_date validation. * - * ## Scopes + * 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 * - * | Category | Read only Scope | Write only Scope (read access implicit) | - * |---|---|---| - * | Manage employments (`employments`) | - | Manage resignations (`resignation:write`) | + * 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 putValidateResignation = ( - options: Options, +export const postCreateEmployment = ( + options: Options, ) => - (options.client ?? client).put< - PutValidateResignationResponses, - PutValidateResignationErrors, + (options.client ?? client).post< + PostCreateEmploymentResponses, + PostCreateEmploymentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/resignations/{offboarding_request_id}/validate', + url: '/api/eor/v1/sandbox/employments', ...options, headers: { 'Content-Type': 'application/json', @@ -5858,188 +5995,195 @@ export const putValidateResignation = ( }); /** - * Reassign default legal entity + * Show Company Payroll Runs * - * Set a different legal entity as the company's default entity. + * 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. * - * 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 payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const putReassignDefaultEntityCompany = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowPayrollRun = ( + options: Options, ) => - (options.client ?? client).put< - PutReassignDefaultEntityCompanyResponses, - PutReassignDefaultEntityCompanyErrors, + (options.client ?? client).get< + GetShowPayrollRunResponses, + GetShowPayrollRunErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}', + url: '/api/eor/v1/payroll-runs/{payroll_run_id}', ...options, }); /** - * List Webhook Callbacks + * Show Offboarding * - * List callbacks for a given company + * Shows an Offboarding request. * * ## 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 offboarding requests (`offboarding:read`) | Manage offboarding (`offboarding:write`) | * */ -export const getIndexWebhookCallback = ( - options: Options, +export const getShowOffboarding = ( + options: Options, ) => (options.client ?? client).get< - GetIndexWebhookCallbackResponses, - GetIndexWebhookCallbackErrors, + GetShowOffboardingResponses, + GetShowOffboardingErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/companies/{company_id}/webhook-callbacks', + url: '/api/eor/v1/offboardings/{id}', ...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. + * List expenses * + * Lists all expenses records * * ## 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`) | View expenses (`expense:read`) | Manage expenses (`expense:write`) | * */ -export const getContractorEligibilityCompanyLegalEntities = < - ThrowOnError extends boolean = false, ->( - options: Options< - GetContractorEligibilityCompanyLegalEntitiesData, - ThrowOnError - >, +export const getIndexExpense = ( + options: Options, ) => (options.client ?? client).get< - GetContractorEligibilityCompanyLegalEntitiesResponses, - GetContractorEligibilityCompanyLegalEntitiesErrors, + GetIndexExpenseResponses, + GetIndexExpenseErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility', + url: '/api/eor/v1/expenses', ...options, }); /** - * Show a custom field value + * Create expense * - * Returns a custom field value for a given employment + * Creates an **approved** expense * * ## 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 expenses (`employment_payments`) | - | Manage expenses (`expense:write`) | * */ -export const getShowEmploymentCustomFieldValue = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postCreateExpense = ( + options: Options, ) => - (options.client ?? client).get< - GetShowEmploymentCustomFieldValueResponses, - GetShowEmploymentCustomFieldValueErrors, + (options.client ?? client).post< + PostCreateExpenseResponses, + PostCreateExpenseErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + url: '/api/eor/v1/expenses', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Update a Custom Field Value + * 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. * - * 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 patchUpdateEmploymentCustomFieldValue2 = < +export const postInviteEmploymentInvitation = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).patch< - PatchUpdateEmploymentCustomFieldValue2Responses, - PatchUpdateEmploymentCustomFieldValue2Errors, + (options.client ?? client).post< + PostInviteEmploymentInvitationResponses, + PostInviteEmploymentInvitationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + url: '/api/eor/v1/employments/{employment_id}/invite', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update a Custom Field Value + * Create Probation Extension * - * Updates a custom field value for a given employment. + * Create a probation extension request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage custom field values (`custom_field_value:write`) | + * | Manage employment documents (`employment_documents`) | - | Manage probation documents (`probation_document:write`) | * */ -export const patchUpdateEmploymentCustomFieldValue = < +export const postCreateProbationExtension = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).put< - PatchUpdateEmploymentCustomFieldValueResponses, - PatchUpdateEmploymentCustomFieldValueErrors, + (options.client ?? client).post< + PostCreateProbationExtensionResponses, + PostCreateProbationExtensionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}', + url: '/api/eor/v1/probation-extensions', ...options, headers: { 'Content-Type': 'application/json', @@ -6048,257 +6192,249 @@ export const patchUpdateEmploymentCustomFieldValue = < }); /** - * Show a contractor of record (COR) termination request - * - * Retrieves a Contractor of Record termination request by ID. - * + * 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 employments (`employment:read`) | Manage employments (`employment:write`) | + * This endpoint is only available in Sandbox, otherwise it will respond with a 404. * */ -export const getShowCorTerminationRequestSubscription = < +export const putApproveContractAmendment = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetShowCorTerminationRequestSubscriptionResponses, - GetShowCorTerminationRequestSubscriptionErrors, + (options.client ?? client).put< + PutApproveContractAmendmentResponses, + PutApproveContractAmendmentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}', + url: '/api/eor/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve', ...options, }); /** - * Terminate contractor of record employment + * Get Onboarding Reserves Status for Employment * - * **Deprecated.** Use `POST /contractors/employments/{employment_id}/cor-termination-requests` instead. + * Returns the onboarding reserves status for a specific employment. * - * 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 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 employments (`employments`) | - | Manage employments (`employment:write`) | - * + * | Manage employments (`employments`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * - * @deprecated */ -export const postTerminateContractorOfRecordEmploymentSubscription = < +export const getShowCompanyEmploymentOnboardingReservesStatus = < ThrowOnError extends boolean = false, >( options: Options< - PostTerminateContractorOfRecordEmploymentSubscriptionData, + GetShowCompanyEmploymentOnboardingReservesStatusData, ThrowOnError >, ) => - (options.client ?? client).post< - PostTerminateContractorOfRecordEmploymentSubscriptionResponses, - PostTerminateContractorOfRecordEmploymentSubscriptionErrors, + (options.client ?? client).get< + GetShowCompanyEmploymentOnboardingReservesStatusResponses, + GetShowCompanyEmploymentOnboardingReservesStatusErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment', + url: '/api/eor/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status', ...options, }); /** - * Sign a document for a contractor + * Show Contractor Invoice + * + * Shows a single Contractor Invoice record. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | - | Manage documents (`document:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postSignContractDocument = ( - options: Options, +export const getShowContractorInvoice = ( + options: Options, ) => - (options.client ?? client).post< - PostSignContractDocumentResponses, - PostSignContractDocumentErrors, + (options.client ?? client).get< + GetShowContractorInvoiceResponses, + GetShowContractorInvoiceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign', + url: '/api/eor/v1/contractor-invoices/{id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Get token identity + * Payroll Feature API resource * - * Shows information about the entities that can be controlled by the current auth token. + * API to retrieve feature properties from the vendor system + */ +export const getPayProcessingFeatureGph = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => + (options?.client ?? client).get< + GetPayProcessingFeatureGphResponses, + GetPayProcessingFeatureGphErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/wd/gph/payProcessingFeature', + ...options, + }); + +/** + * Payroll processing progress API resource * + * API to retrieve the processing stages of a pay group */ -export const getCurrentIdentity = ( - options: Options, +export const getPayProgressGph = ( + options: Options, ) => (options.client ?? client).get< - GetCurrentIdentityResponses, - GetCurrentIdentityErrors, + GetPayProgressGphResponses, + GetPayProgressGphErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/identity/current', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/wd/gph/payProgress', ...options, }); /** - * Delete an Incentive - * - * Delete an incentive. - * - * `one_time` incentives that have the following status **CANNOT** be deleted: - * * `processing` - * * `paid` + * List company supported currencies * + * List company supported currencies * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage company resources (`company_admin`) | View company currencies (`company_currencies:read`) | - | * */ -export const deleteDeleteIncentive = ( - options: Options, +export const getIndexCompanyCurrency = ( + options?: Options, ) => - (options.client ?? client).delete< - DeleteDeleteIncentiveResponses, - DeleteDeleteIncentiveErrors, + (options?.client ?? client).get< + GetIndexCompanyCurrencyResponses, + GetIndexCompanyCurrencyErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/{id}', + url: '/api/eor/v1/company-currencies', ...options, }); /** - * Show Incentive - * - * Show an Incentive's details + * Get a employment benefit offers JSON schema * * ## 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 offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | * */ -export const getShowIncentive = ( - options: Options, +export const getShowSchema = ( + options: Options, ) => (options.client ?? client).get< - GetShowIncentiveResponses, - GetShowIncentiveErrors, + GetShowSchemaResponses, + GetShowSchemaErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/{id}', + url: '/api/eor/v1/employments/{employment_id}/benefit-offers/schema', ...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. + * List Contractor Invoice Schedules * + * Lists Contractor Invoice Schedule records. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const patchUpdateIncentive2 = ( - options: Options, +export const getIndexScheduledContractorInvoice = < + ThrowOnError extends boolean = false, +>( + options?: Options, ) => - (options.client ?? client).patch< - PatchUpdateIncentive2Responses, - PatchUpdateIncentive2Errors, + (options?.client ?? client).get< + GetIndexScheduledContractorInvoiceResponses, + GetIndexScheduledContractorInvoiceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/{id}', + url: '/api/eor/v1/contractor-invoice-schedules', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Update Incentive - * - * Updates an Incentive. - * - * Incentives use the currency of the employment specified provided in the `employment_id` field. + * Create Contractor Invoice Schedules * - * The API doesn't support updating paid incentives. + * 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 expenses (`employment_payments`) | - | Manage incentives (`incentive:write`) | + * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const patchUpdateIncentive = ( - options: Options, +export const postBulkCreateScheduledContractorInvoice = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).put< - PatchUpdateIncentiveResponses, - PatchUpdateIncentiveErrors, + (options.client ?? client).post< + PostBulkCreateScheduledContractorInvoiceResponses, + PostBulkCreateScheduledContractorInvoiceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/incentives/{id}', + url: '/api/eor/v1/contractor-invoice-schedules', ...options, headers: { 'Content-Type': 'application/json', @@ -6307,316 +6443,342 @@ export const patchUpdateIncentive = ( }); /** - * 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 work authorization request * + * Show a single work authorization request. * * ## 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 work authorizations (`work_authorization:read`) | Manage work authorizations (`work_authorization:write`) | * */ -export const getShowEligibilityQuestionnaire = < +export const getShowWorkAuthorizationRequest = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetShowEligibilityQuestionnaireResponses, - GetShowEligibilityQuestionnaireErrors, + GetShowWorkAuthorizationRequestResponses, + GetShowWorkAuthorizationRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/schemas/eligibility-questionnaire', + url: '/api/eor/v1/work-authorization-requests/{id}', ...options, }); /** - * List work authorization requests + * Update work authorization request * - * List work authorization requests. + * Updates a 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`) | - | Manage work authorizations (`work_authorization:write`) | * */ -export const getIndexWorkAuthorizationRequest = < +export const patchUpdateWorkAuthorizationRequest2 = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetIndexWorkAuthorizationRequestResponses, - GetIndexWorkAuthorizationRequestErrors, + (options.client ?? client).patch< + PatchUpdateWorkAuthorizationRequest2Responses, + PatchUpdateWorkAuthorizationRequest2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/work-authorization-requests', + url: '/api/eor/v1/work-authorization-requests/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Show bulk employment job + * Update work authorization request + * + * Updates a work authorization request. * * ## 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`) | - | Manage work authorizations (`work_authorization:write`) | * */ -export const getShowBulkEmployment = ( - options: Options, +export const patchUpdateWorkAuthorizationRequest = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetShowBulkEmploymentResponses, - GetShowBulkEmploymentErrors, + (options.client ?? client).put< + PatchUpdateWorkAuthorizationRequestResponses, + PatchUpdateWorkAuthorizationRequestErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/bulk-employment-jobs/{job_id}', + url: '/api/eor/v1/work-authorization-requests/{id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Benefit Offers - * - * List benefit offers for each country. + * 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 company resources (`company_admin`) | View benefit offers (`benefit_offer:read`) | Manage benefit offers (`benefit_offer:write`) | + * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const getIndexBenefitOffersCountrySummary = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postCreateDecline = ( + options: Options, ) => - (options.client ?? client).get< - GetIndexBenefitOffersCountrySummaryResponses, - GetIndexBenefitOffersCountrySummaryErrors, + (options.client ?? client).post< + PostCreateDeclineResponses, + PostCreateDeclineErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/benefit-offers/country-summaries', + url: '/api/eor/v1/timeoff/{timeoff_id}/decline', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * List Benefit Offers By Employment + * Get eligibility questionnaire schema * - * List benefit offers by employment. + * 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. * * * ## 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`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const getIndexBenefitOffersByEmployment = < +export const getShowEligibilityQuestionnaire = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).get< - GetIndexBenefitOffersByEmploymentResponses, - GetIndexBenefitOffersByEmploymentErrors, + GetShowEligibilityQuestionnaireResponses, + GetShowEligibilityQuestionnaireErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/benefit-offers', + url: '/api/eor/v1/contractors/schemas/eligibility-questionnaire', ...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. + * Token * - */ -export const putCancelContractAmendment = < - ThrowOnError extends boolean = false, ->( - options: Options, + * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows + */ +export const postTokenOAuth2Token = ( + options?: Options, ) => - (options.client ?? client).put< - PutCancelContractAmendmentResponses, - PutCancelContractAmendmentErrors, + (options?.client ?? client).post< + PostTokenOAuth2TokenResponses, + PostTokenOAuth2TokenErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel', + security: [{ scheme: 'basic', type: 'http' }], + url: '/api/eor/oauth2/token', ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers, + }, }); /** - * Create a Pending Time Off + * Delete contractor of record subscription intent + * + * Deletes Contractor of Record subscription intent. * - * 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`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postCreateEmployeeTimeoff = ( - options: Options, +export const deleteDeleteContractorCorSubscriptionSubscription = < + ThrowOnError extends boolean = false, +>( + options: Options< + DeleteDeleteContractorCorSubscriptionSubscriptionData, + ThrowOnError + >, ) => - (options.client ?? client).post< - PostCreateEmployeeTimeoffResponses, - PostCreateEmployeeTimeoffErrors, + (options.client ?? client).delete< + DeleteDeleteContractorCorSubscriptionSubscriptionResponses, + DeleteDeleteContractorCorSubscriptionSubscriptionErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/timeoff', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-cor-subscription', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * Show Probation Extension + * Create contractor of record subscription intent * - * Shows a Probation Extension Request. + * 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 employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const getShowProbationExtension = ( - options: Options, +export const postManageContractorCorSubscriptionSubscription = < + ThrowOnError extends boolean = false, +>( + options: Options< + PostManageContractorCorSubscriptionSubscriptionData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetShowProbationExtensionResponses, - GetShowProbationExtensionErrors, + (options.client ?? client).post< + PostManageContractorCorSubscriptionSubscriptionResponses, + PostManageContractorCorSubscriptionSubscriptionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/probation-extensions/{id}', + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-cor-subscription', ...options, }); /** - * List payslips - * - * Lists all payslips belonging to a company. Can also filter for a single employment belonging - * to that company. + * Show Contract Amendment * + * Show a single Contract Amendment request. * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employment documents (`employment_documents`) | View payslips (`payslip:read`) | - | + * | Manage employments (`employments`) | View contract amendments (`contract_amendment:read`) | Manage contract amendments (`contract_amendment:write`) | * */ -export const getIndexPayslip = ( - options?: Options, +export const getShowContractAmendment = ( + options: Options, ) => - (options?.client ?? client).get< - GetIndexPayslipResponses, - GetIndexPayslipErrors, + (options.client ?? client).get< + GetShowContractAmendmentResponses, + GetShowContractAmendmentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payslips', + url: '/api/eor/v1/contract-amendments/{id}', ...options, }); /** - * Download a receipt by id + * Decline Identity Verification + * + * Declines the identity verification of an employee. * - * 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 identity verification (`identity_verification:write`) | * */ -export const getDownloadByIdExpenseReceipt = < +export const postDeclineIdentityVerification = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetDownloadByIdExpenseReceiptResponses, - GetDownloadByIdExpenseReceiptErrors, + (options.client ?? client).post< + PostDeclineIdentityVerificationResponses, + PostDeclineIdentityVerificationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/expenses/{expense_id}/receipts/{receipt_id}', + url: '/api/eor/v1/identity-verification/{employment_id}/decline', ...options, }); /** - * Token + * Creates a CSV cost estimation of employments * - * Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows + * Creates CSV cost estimation of employments */ -export const postTokenOAuth2Token = ( - options?: Options, +export const postCreateEstimationCsv = ( + options?: Options, ) => (options?.client ?? client).post< - PostTokenOAuth2TokenResponses, - PostTokenOAuth2TokenErrors, + PostCreateEstimationCsvResponses, + PostCreateEstimationCsvErrors, ThrowOnError >({ - security: [{ scheme: 'basic', type: 'http' }], - url: '/auth/oauth2/token', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/cost-calculator/estimation-csv', ...options, headers: { 'Content-Type': 'application/json', @@ -6625,116 +6787,91 @@ export const postTokenOAuth2Token = ( }); /** - * 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 * + * List billing documents for a company * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage company resources (`company_admin`) | View forms (`form:read`) | - | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const getShowLegalEntityFormCountry = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexBillingDocument = ( + options: Options, ) => (options.client ?? client).get< - GetShowLegalEntityFormCountryResponses, - GetShowLegalEntityFormCountryErrors, + GetIndexBillingDocumentResponses, + GetIndexBillingDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/countries/{country_code}/legal_entity_forms/{form}', + url: '/api/eor/v1/billing-documents', ...options, }); /** - * Manage contractor plus subscription + * Show Billing Document * - * 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. + * 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 employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage invoices (`invoices`) | View invoices (`invoices:read`) | Manage invoices (`invoices:write`) | * */ -export const postManageContractorPlusSubscriptionSubscription = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostManageContractorPlusSubscriptionSubscriptionData, - ThrowOnError - >, +export const getShowBillingDocument = ( + options: Options, ) => - (options.client ?? client).post< - PostManageContractorPlusSubscriptionSubscriptionResponses, - PostManageContractorPlusSubscriptionSubscriptionErrors, + (options.client ?? client).get< + GetShowBillingDocumentResponses, + GetShowBillingDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription', + url: '/api/eor/v1/billing-documents/{billing_document_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * List Time Off - * - * Lists all Time Off records. + * Indexes all the documents for the 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`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const getIndexTimeoff = ( - options: Options, +export const getIndexEmployeeDocument = ( + options?: Options, ) => - (options.client ?? client).get< - GetIndexTimeoffResponses, - GetIndexTimeoffErrors, + (options?.client ?? client).get< + GetIndexEmployeeDocumentResponses, + GetIndexEmployeeDocumentErrors, ThrowOnError >({ - security: [ - { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, - ], - url: '/v1/timeoff', + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employee/documents', ...options, }); /** - * Create Time Off + * Create a Pending Time Off * - * Creates a Time Off record + * Creates a pending Time Off record * * ## Scopes * @@ -6743,19 +6880,68 @@ export const getIndexTimeoff = ( * | Manage timeoffs (`time_and_attendance`) | - | Manage timeoffs (`timeoff:write`) | * */ -export const postCreateTimeoff = ( - options: Options, +export const postCreateEmployeeTimeoff = ( + options: Options, +) => + (options.client ?? client).post< + PostCreateEmployeeTimeoffResponses, + PostCreateEmployeeTimeoffErrors, + ThrowOnError + >({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/eor/v1/employee/timeoff', + ...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-work) tool. + * + * + * + * ## Scopes + * + * | Category | Read only Scope | Write only Scope (read access implicit) | + * |---|---|---| + * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * + */ +export const putUpdateEmploymentPersonalDetails = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).post< - PostCreateTimeoffResponses, - PostCreateTimeoffErrors, + (options.client ?? client).put< + PutUpdateEmploymentPersonalDetailsResponses, + PutUpdateEmploymentPersonalDetailsErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff', + url: '/api/eor/v1/employments/{employment_id}/personal_details', ...options, headers: { 'Content-Type': 'application/json', @@ -6764,109 +6950,119 @@ export const postCreateTimeoff = ( }); /** - * List Company Payroll Runs + * Show Probation Extension + * + * Shows a Probation Extension 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 employment documents (`employment_documents`) | View probation documents (`probation_document:read`) | Manage probation documents (`probation_document:write`) | * */ -export const getIndexPayrollRun = ( - options?: Options, +export const getShowProbationExtension = ( + options: Options, ) => - (options?.client ?? client).get< - GetIndexPayrollRunResponses, - GetIndexPayrollRunErrors, + (options.client ?? client).get< + GetShowProbationExtensionResponses, + GetShowProbationExtensionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/payroll-runs', + url: '/api/eor/v1/probation-extensions/{id}', ...options, }); /** - * Get group by ID via SCIM v2.0 + * 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`) | * - * Retrieves a single group (department) for the authenticated company by group ID */ -export const getGetGroupScim = ( - options: Options, +export const getShowFile = ( + options: Options, ) => (options.client ?? client).get< - GetGetGroupScimResponses, - GetGetGroupScimErrors, + GetShowFileResponses, + GetShowFileErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/scim/v2/Groups/{id}', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/files/{id}', ...options, }); /** - * List Employment Contract. + * List Company Departments + * + * Lists all departments for the authorized company specified in the request. * - * 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 company resources (`company_admin`) | View departments (`company_department:read`) | Manage departments (`company_department:write`) | * */ -export const getIndexEmploymentContract = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getIndexCompanyDepartment = ( + options: Options, ) => (options.client ?? client).get< - GetIndexEmploymentContractResponses, - GetIndexEmploymentContractErrors, + GetIndexCompanyDepartmentResponses, + GetIndexCompanyDepartmentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/employment-contracts', + url: '/api/eor/v1/company-departments', ...options, }); /** - * Convert currency using dynamic rates + * Create New Department * - * Convert currency using the rates Remote applies during employment creation and invoicing. + * 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`) | Convert currencies (`convert_currency:read`) | - | + * | Manage company resources (`company_admin`) | - | Manage departments (`company_department:write`) | * */ -export const postConvertWithSpreadCurrencyConverter2 = < +export const postCreateCompanyDepartment = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => (options.client ?? client).post< - PostConvertWithSpreadCurrencyConverter2Responses, - PostConvertWithSpreadCurrencyConverter2Errors, + PostCreateCompanyDepartmentResponses, + PostCreateCompanyDepartmentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, - { scheme: 'bearer', type: 'http' }, ], - url: '/v1/currency-converter', + url: '/api/eor/v1/company-departments', ...options, headers: { 'Content-Type': 'application/json', @@ -6875,95 +7071,128 @@ export const postConvertWithSpreadCurrencyConverter2 = < }); /** - * List all companies + * Get 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. + * Gets the employee details for a payroll run * * ## 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 payroll runs (`payroll`) | View payroll runs (`payroll_run:read`) | - | * */ -export const getIndexCompany = ( - options: Options, +export const getEmployeeDetailsPayrollRun = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => (options.client ?? client).get< - GetIndexCompanyResponses, - GetIndexCompanyErrors, + GetEmployeeDetailsPayrollRunResponses, + GetEmployeeDetailsPayrollRunErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/payroll-runs/{payroll_run_id}/employee-details', ...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`. + * Show employment * - * 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. + * Shows all the information of an employment. * - * 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. + * 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. * - * ### Accepting the Terms of Service + * 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. * - * A required step for creating a company in Remote is to accept our Terms of Service (ToS). + * 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. * - * 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. + * For more information on JSON Schemas, see the **How JSON Schemas work** documentation. * - * 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 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. * - * 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`) | View employments (`employment:read`) | Manage employments (`employment:write`) | * */ -export const postCreateCompany = ( - options: Options, +export const getShowEmployment = ( + options: Options, ) => - (options.client ?? client).post< - PostCreateCompanyResponses, - PostCreateCompanyErrors, + (options.client ?? client).get< + GetShowEmploymentResponses, + GetShowEmploymentErrors, ThrowOnError >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/companies', + security: [ + { scheme: 'bearer', type: 'http' }, + { scheme: 'bearer', type: 'http' }, + ], + url: '/api/eor/v1/employments/{employment_id}', ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers, - }, }); /** - * 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. + * + * 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. * - * 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 * @@ -6972,51 +7201,94 @@ export const postCreateCompany = ( * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | * */ -export const postCreateBulkEmployment = ( - options?: Options, +export const patchUpdateEmployment2 = ( + options: Options, ) => - (options?.client ?? client).post< - PostCreateBulkEmploymentResponses, - PostCreateBulkEmploymentErrors, + (options.client ?? client).patch< + PatchUpdateEmployment2Responses, + PatchUpdateEmployment2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/bulk-employment-jobs', + url: '/api/eor/v1/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers, + ...options.headers, }, }); /** - * Send back a timesheet for review or modification + * 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. * - * 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 postSendBackTimesheet = ( - options: Options, +export const patchUpdateEmployment = ( + options: Options, ) => - (options.client ?? client).post< - PostSendBackTimesheetResponses, - PostSendBackTimesheetErrors, + (options.client ?? client).put< + PatchUpdateEmploymentResponses, + PatchUpdateEmploymentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timesheets/{timesheet_id}/send-back', + url: '/api/eor/v1/employments/{employment_id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7025,171 +7297,169 @@ export const postSendBackTimesheet = ( }); /** - * Deletes a Company Manager user + * Show a custom field value * - * Deletes a 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`) | - | 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 deleteDeleteCompanyManager = < +export const getShowEmploymentCustomFieldValue = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).delete< - DeleteDeleteCompanyManagerResponses, - DeleteDeleteCompanyManagerErrors, + (options.client ?? client).get< + GetShowEmploymentCustomFieldValueResponses, + GetShowEmploymentCustomFieldValueErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-managers/{user_id}', + url: '/api/eor/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, }); /** - * Show company manager user + * Update a Custom Field Value * - * Shows a single company manager user + * Updates 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`) | - | Manage custom field values (`custom_field_value:write`) | * */ -export const getShowCompanyManager = ( - options: Options, +export const patchUpdateEmploymentCustomFieldValue2 = < + ThrowOnError extends boolean = false, +>( + options: Options, ) => - (options.client ?? client).get< - GetShowCompanyManagerResponses, - GetShowCompanyManagerErrors, + (options.client ?? client).patch< + PatchUpdateEmploymentCustomFieldValue2Responses, + PatchUpdateEmploymentCustomFieldValue2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/company-managers/{user_id}', + url: '/api/eor/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Delete contractor of record subscription intent - * - * Deletes Contractor of Record subscription intent. + * 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 deleteDeleteContractorCorSubscriptionSubscription = < +export const patchUpdateEmploymentCustomFieldValue = < ThrowOnError extends boolean = false, >( - options: Options< - DeleteDeleteContractorCorSubscriptionSubscriptionData, - ThrowOnError - >, + options: Options, ) => - (options.client ?? client).delete< - DeleteDeleteContractorCorSubscriptionSubscriptionResponses, - DeleteDeleteContractorCorSubscriptionSubscriptionErrors, + (options.client ?? client).put< + PatchUpdateEmploymentCustomFieldValueResponses, + PatchUpdateEmploymentCustomFieldValueErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', + url: '/api/eor/v1/custom-fields/{custom_field_id}/values/{employment_id}', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * 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. + * Validate resignation request * + * Validates a resignation employment request * * ## Scopes * * | Category | Read only Scope | Write only Scope (read access implicit) | * |---|---|---| - * | Manage employments (`employments`) | - | Manage employments (`employment:write`) | + * | Manage employments (`employments`) | - | Manage resignations (`resignation:write`) | * */ -export const postManageContractorCorSubscriptionSubscription = < - ThrowOnError extends boolean = false, ->( - options: Options< - PostManageContractorCorSubscriptionSubscriptionData, - ThrowOnError - >, +export const putValidateResignation = ( + options: Options, ) => - (options.client ?? client).post< - PostManageContractorCorSubscriptionSubscriptionResponses, - PostManageContractorCorSubscriptionSubscriptionErrors, + (options.client ?? client).put< + PutValidateResignationResponses, + PutValidateResignationErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription', + url: '/api/eor/v1/resignations/{offboarding_request_id}/validate', ...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 getIndexScheduledContractorInvoice = < +export const getShowScheduledContractorInvoice = < ThrowOnError extends boolean = false, >( - options?: Options, + options: Options, ) => - (options?.client ?? client).get< - GetIndexScheduledContractorInvoiceResponses, - GetIndexScheduledContractorInvoiceErrors, + (options.client ?? client).get< + GetShowScheduledContractorInvoiceResponses, + GetShowScheduledContractorInvoiceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoice-schedules', + url: '/api/eor/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 * @@ -7198,21 +7468,21 @@ export const getIndexScheduledContractorInvoice = < * | Manage invoices (`invoices`) | - | Manage invoices (`invoices:write`) | * */ -export const postBulkCreateScheduledContractorInvoice = < +export const patchUpdateScheduledContractorInvoice2 = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).post< - PostBulkCreateScheduledContractorInvoiceResponses, - PostBulkCreateScheduledContractorInvoiceErrors, + (options.client ?? client).patch< + PatchUpdateScheduledContractorInvoice2Responses, + PatchUpdateScheduledContractorInvoice2Errors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/contractor-invoice-schedules', + url: '/api/eor/v1/contractor-invoice-schedules/{id}', ...options, headers: { 'Content-Type': 'application/json', @@ -7221,147 +7491,129 @@ export const postBulkCreateScheduledContractorInvoice = < }); /** - * Get Billing Document Breakdown + * Updates Contractor Invoice Schedule * - * Get billing document breakdown + * Updates a 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 getGetBreakdownBillingDocument = < +export const patchUpdateScheduledContractorInvoice = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options, ) => - (options.client ?? client).get< - GetGetBreakdownBillingDocumentResponses, - GetGetBreakdownBillingDocumentErrors, + (options.client ?? client).put< + PatchUpdateScheduledContractorInvoiceResponses, + PatchUpdateScheduledContractorInvoiceErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/billing-documents/{billing_document_id}/breakdown', - ...options, - }); - -/** - * Indexes all the documents for the 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`) | - * - */ -export const getIndexEmployeeDocument = ( - options?: Options, -) => - (options?.client ?? client).get< - GetIndexEmployeeDocumentResponses, - GetIndexEmployeeDocumentErrors, - ThrowOnError - >({ - security: [{ scheme: 'bearer', type: 'http' }], - url: '/v1/employee/documents', + url: '/api/eor/v1/contractor-invoice-schedules/{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`. + * Create risk reserve * + * Create a new risk reserve * * ## 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 risk reserves (`risk_reserve:write`) | * */ -export const postApproveCancellationRequest = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const postCreateRiskReserve = ( + options: Options, ) => (options.client ?? client).post< - PostApproveCancellationRequestResponses, - PostApproveCancellationRequestErrors, + PostCreateRiskReserveResponses, + PostCreateRiskReserveErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/timeoff/{timeoff_id}/cancel-request/approve', + url: '/api/eor/v1/risk-reserve', ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers, + }, }); /** - * Verify Employment Identity - * - * Endpoint to confirms the employment profile is from the actual employee - * + * 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 identity verification (`identity_verification:write`) | + * | Manage employment documents (`employment_documents`) | View documents (`document:read`) | Manage documents (`document:write`) | * */ -export const postVerifyIdentityVerification = < - ThrowOnError extends boolean = false, ->( - options: Options, +export const getShowContractDocument = ( + options: Options, ) => - (options.client ?? client).post< - PostVerifyIdentityVerificationResponses, - PostVerifyIdentityVerificationErrors, + (options.client ?? client).get< + GetShowContractDocumentResponses, + GetShowContractDocumentErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/identity-verification/{employment_id}/verify', + url: '/api/eor/v1/contractors/employments/{employment_id}/contract-documents/{id}', ...options, }); /** - * Download a billing document PDF + * 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. * - * Downloads a billing document PDF * * ## 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 getDownloadPdfBillingDocument = < +export const postCreateCorTerminationRequestSubscription = < ThrowOnError extends boolean = false, >( - options: Options, + options: Options< + PostCreateCorTerminationRequestSubscriptionData, + ThrowOnError + >, ) => - (options.client ?? client).get< - GetDownloadPdfBillingDocumentResponses, - GetDownloadPdfBillingDocumentErrors, + (options.client ?? client).post< + PostCreateCorTerminationRequestSubscriptionResponses, + PostCreateCorTerminationRequestSubscriptionErrors, ThrowOnError >({ security: [ { scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }, ], - url: '/v1/billing-documents/{billing_document_id}/pdf', + url: '/api/eor/v1/contractors/employments/{employment_id}/cor-termination-requests', ...options, }); diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts index 7a9e9f93b..e9ef215f8 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: 'http://localhost:4000' | (string & {}); }; /** @@ -85,7 +82,7 @@ export type ContractorInvoiceItemType = 'manual' | 'time_tracking' | 'expense'; /** * TimesheetResponse * - * Timesheet response + * Response containing a full timesheet with all hour breakdowns and time tracking entries. */ export type TimesheetResponse = { data?: { @@ -120,16 +117,42 @@ export type CountryCode = string; /** * TerminationOffboarding + * + * An offboarding request initiated by the employer to terminate an employment. Includes termination details, risk assessment, and status tracking through Remote's review process. */ export type TerminationOffboarding = { + /** + * Additional comments or context about the termination provided by the employer. + */ additional_comments: string | null; + /** + * Whether the employer agreed with the employee's PTO balance at the time of the termination request. + */ agrees_to_pto_amount?: boolean; + /** + * Whether this offboarding request is confidential. Confidential requests are only visible to the user who authorized the token or integration; non-confidential requests are visible to all company admins. + */ confidential: boolean; + /** + * Details about whether and when the employee was informed about their termination. Only present if the employee was informed before the offboarding request was submitted. + */ employee_awareness?: { + /** + * The date when the employee was told about the termination. + */ date?: string | null; + /** + * Notes about how the termination was communicated to the employee. + */ note?: string | null; }; + /** + * The unique identifier (UUID) of the employment being terminated. + */ employment_id: string; + /** + * The unique identifier (UUID) of the offboarding request. + */ id: string; /** * Remote will use this email address for post-termination communication. @@ -137,9 +160,21 @@ export type TerminationOffboarding = { * */ personal_email?: string; + /** + * The employer's proposed termination date. The actual termination date may differ based on local labor laws and notice period requirements. + */ proposed_termination_date: string; + /** + * A detailed description of the circumstances leading to the termination. + */ reason_description: string; + /** + * The unique identifier (UUID) of the company admin who submitted the termination request. + */ requested_by: string; + /** + * Reasons that may increase the legal risk of this termination (e.g., the employee is pregnant, on family leave, etc.). + */ risk_assessment_reasons: Array< | 'caring_responsibilities' | 'disabled_or_health_condition' @@ -151,12 +186,27 @@ export type TerminationOffboarding = { | 'requested_medical_or_family_leave' | 'sick_leave' >; + /** + * The current status of the offboarding request. + * + * - `submitted`: The request has been submitted and is awaiting review by Remote. + * - `in_review`: Remote is reviewing the request for legal compliance and risks. + * - `done`: The offboarding has been completed and the employment is terminated. + * - `canceled`: The offboarding request was canceled before completion. + * + */ status: 'submitted' | 'in_review' | 'done' | 'canceled'; + /** + * The timestamp when the offboarding request was submitted. + */ submitted_at: string; /** * Most updated termination date for the offboarding. This date is subject to change through the offboarding process even after it is finalized. */ termination_date: string | null; + /** + * The reason for the termination, as submitted by the employer. + */ termination_reason: | 'cancellation_before_start_date' | 'compliance_issue' @@ -179,16 +229,33 @@ export type TerminationOffboarding = { | 'performance' | 'values' | 'workforce_reduction'; + /** + * The type of offboarding. Always `"termination"` for employer-initiated terminations. + */ type: 'termination'; + /** + * Whether the employer believes the employee is likely to challenge their termination. + */ will_challenge_termination: boolean; + /** + * Additional details about why the employee may challenge the termination, if applicable. + */ will_challenge_termination_description?: string; }; /** * BenefitProvider + * + * The insurance carrier or provider that underwrites a benefit tier. May be null if the benefit tier does not have a specific external provider assigned. */ export type BenefitProvider = { + /** + * The unique identifier (UUID) of the benefit provider. + */ id: string; + /** + * The name of the insurance carrier or benefit provider (e.g., "Allianz", "Bupa"). + */ name: string; } | null; @@ -206,7 +273,7 @@ export type UnifiedEmploymentUpsertBenefitOffersRequest = { /** * EmploymentCustomFieldValueResponse * - * EmploymentCustomFieldValueResponse + * Response containing a single custom field value for an employment. */ export type EmploymentCustomFieldValueResponse = { data: { @@ -227,11 +294,13 @@ export type PeriodProperties = { /** * EmployeeDetailsResponse + * + * Paginated response containing per-employee payroll cost breakdowns for a specific payroll run. */ export type EmployeeDetailsResponse = { data: { /** - * The employee details for the payroll run + * List of per-employee cost breakdowns for the payroll run. */ employee_details: Array; }; @@ -355,6 +424,8 @@ export type CreateSsoConfigurationResponse = { /** * OfferedBenefitTier + * + * A benefit tier that has been offered to employees, combined with enrollment statistics for that tier. */ export type OfferedBenefitTier = { benefit_tier: BenefitTier; @@ -399,15 +470,27 @@ export type SignatoryStatus = 'pending' | 'signed' | 'unassigned'; /** * EmploymentCustomField * - * EmploymentCustomField + * A custom field definition that can be applied to employments within a company. Custom fields allow you to store additional structured data on employments beyond the standard fields. */ export type EmploymentCustomField = { data_entry_access: CustomFieldDataEntryAccess; + /** + * The unique identifier (UUID) of the custom field definition. + */ id: string; + /** + * Additional configuration for the field. For `single_select` fields, contains the list of selectable options. For `currency` fields, contains the currency code. Null for simple field types. + */ metadata: { [key: string]: unknown; } | null; + /** + * The display name of the custom field (e.g., "Internal ID", "T-Shirt Size"). + */ name: string; + /** + * Whether this custom field is required for all employments in the company. + */ required: boolean; type: CustomFieldDataType; visibility_scope: CustomFieldVisibilityScope; @@ -456,11 +539,29 @@ export type ListDocumentsResponse = { * WebhookEvent */ export type WebhookEvent = { + /** + * The unique identifier (UUID) of the company this event belongs to. + */ company_id: string; + /** + * The type of event that was triggered (e.g., "timesheet.created", "employment.activated"). + */ event_type: string; + /** + * The timestamp when this event was first triggered. + */ first_triggered_at: string; + /** + * The unique identifier (UUID) of the webhook event. + */ id: string; + /** + * The timestamp of the most recent delivery attempt for this event. + */ last_triggered_at: string; + /** + * Whether the webhook event was successfully delivered to the callback URL (received a 2XX response). + */ successfully_delivered: boolean; }; @@ -525,9 +626,15 @@ export type EmploymentContract = { contract_details: { [key: string]: unknown; }; + /** + * The unique identifier (UUID) of this contract. + */ contract_id: string; country: Country; effective_at: DateTimeIso8601; + /** + * The job title as specified in this contract. + */ job_title: string; status: EmploymentContractStatus; }; @@ -566,10 +673,16 @@ export type UnifiedEmploymentBenefitGroup = { /** * EmploymentCustomFieldValueJsonValue * - * EmploymentCustomFieldValueJsonValue + * The value for a single-select custom field, containing both the option ID and its human-readable label. */ export type EmploymentCustomFieldValueJsonValue = { + /** + * The unique identifier of the selected option. + */ selected_option: string; + /** + * The human-readable label of the selected option (e.g., "XL"). + */ selected_option_label: string; }; @@ -587,22 +700,40 @@ export type CycleFrequency = 'monthly' | 'bi_monthly' | 'bi_weekly' | 'weekly'; */ export type BillingDocumentBreakdownItem = { country_code: CountryCode; + /** + * A human-readable description of this cost item. + */ description: string; employment_id: UuidSlug; + /** + * The foreign exchange rate applied to convert from the source currency to the invoice currency. + */ fx_rate: string; /** * Invoice amount in cents */ invoice_amount: number; invoice_currency: CurrencyCode; + /** + * The invoice number associated with this breakdown item. + */ invoice_number: string; + /** + * The invoice period in YYYY-MM format. + */ invoice_period: string; /** * Source amount in cents */ source_amount: number; source_currency: CurrencyCode; + /** + * The cost category (e.g., "Base Salary", "Employer Contributions", "Benefits"). + */ type: string; + /** + * A human-readable note about any variance between the breakdown amount and the invoiced amount, typically due to FX rounding. + */ variance_from_invoice: string | null; /** * Variance from invoice amount in cents @@ -623,19 +754,36 @@ export type BillingDocumentBreakdownResponse = { /** * MinimalCountry + * + * A lightweight country representation with basic identification fields. */ export type MinimalCountry = { + /** + * The ISO 3166-1 alpha-2 country code (e.g., "PT", "US", "GB"). + */ alpha_2_code: string; + /** + * The ISO 3166-1 alpha-3 country code (e.g., "PRT", "USA", "GBR"). This is the primary code used across the Remote API. + */ code: string; + /** + * Feature flags indicating which Remote services are available in this country. + */ features?: Array; + /** + * The country's full English name. + */ name: string; + /** + * A unique URL-friendly identifier for the country. + */ slug: string; }; /** * Employment * - * Complete information of an employment + * Complete information of an employment, including all onboarding task statuses, country-specific form data (address, contract, administrative, etc.), and contractor-specific settings where applicable. */ export type Employment = { /** @@ -649,6 +797,9 @@ export type Employment = { * Name of related department, if any. Otherwise, null. */ department?: string | null; + /** + * The email address of the employee's manager. Null if no manager is assigned. + */ manager_email: string | null; provisional_start_date?: ProvisionalStartDate; /** @@ -658,6 +809,9 @@ export type Employment = { [key: string]: unknown; }; pricing_plan_details: PricingPlanDetails; + /** + * The employee's full name. + */ full_name: string; /** * For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and @@ -718,6 +872,9 @@ export type Employment = { */ type?: 'hourly' | 'daily' | 'weekly' | 'monthly' | 'one_off'; } | null; + /** + * The unique identifier (UUID) of the company this employment belongs to. + */ company_id: string; /** * Work address information. Its properties may vary depending on the country. @@ -725,8 +882,14 @@ export type Employment = { work_address_details: { [key: string]: unknown; }; + /** + * The employee's work email address, typically provided by the employer. + */ work_email: string; status: EmploymentStatus; + /** + * The timestamp when this employment record was last updated. + */ updated_at: string; /** * Employment basic information. Its properties may vary depending on the country. @@ -735,8 +898,17 @@ export type Employment = { basic_information?: { [key: string]: unknown; }; + /** + * The employee's job title. May be null if not yet set. + */ job_title: string | null; + /** + * The unique identifier (UUID) of the employment. + */ id: string; + /** + * The date when the employee's probation period ends, if applicable. + */ probation_period_end_date?: string; /** * DepartmentID @@ -744,7 +916,13 @@ export type Employment = { * Unique ID of related department, if any. Otherwise, null. */ department_id?: string | null; + /** + * The full name of the employee's manager. + */ manager?: string; + /** + * The email address the employee uses to log in to the Remote platform. + */ login_email: string; /** * A unique reference code for the employment record in a non-Remote system. While uniqueness is recommended, it is not strictly enforced within Remote's system. @@ -756,6 +934,9 @@ export type Employment = { * */ employment_model: 'global_payroll' | 'peo' | 'eor'; + /** + * The employee's personal email address, used for account-related communications. + */ personal_email: string; country: NullableCountry; user_status?: UserStatus; @@ -763,7 +944,13 @@ export type Employment = { bank_account_details: Array<{ [key: string]: unknown; }>; + /** + * Documents associated with this employment (e.g., contracts, tax forms, identity documents). + */ files: Array; + /** + * The unique identifier (UUID) of the currently active contract for this employment. + */ active_contract_id?: string; /** * Billing address information. Its properties may vary depending on the country. @@ -784,8 +971,17 @@ export type Employment = { emergency_contact_details: { [key: string]: unknown; }; + /** + * Whether this employment can still be cancelled during the onboarding process. Once the employment is active, this will be false. + */ eligible_for_onboarding_cancellation: boolean; + /** + * The employment ID of the employee's manager on Remote, if the manager is also managed through Remote. Null otherwise. + */ manager_employment_id: string | null; + /** + * The timestamp when this employment record was created. + */ created_at: string; }; @@ -802,8 +998,13 @@ export type ContractorInvoiceResponse = { /** * CreateRiskReserveParams + * + * Parameters for creating a risk reserve deposit for an employment. A risk reserve is a refundable deposit held by Remote to cover potential liabilities during the onboarding period, such as severance obligations or statutory entitlements. The reserve amount is calculated automatically based on the employment's country, contract terms, and applicable labor laws. */ export type CreateRiskReserveParams = { + /** + * The unique identifier (UUID) of the employment to create a risk reserve for. The employment must exist and be in a state that allows risk reserve creation. + */ employment_slug: string; }; @@ -818,12 +1019,26 @@ export type HolidaysResponse = { /** * BenefitOffersEmployment + * + * A lightweight employment representation used in benefit offer listings. */ export type BenefitOffersEmployment = { country: Country; + /** + * The employee's given (first) name. Null if not available. + */ given_name: string | null; + /** + * The unique identifier (UUID) of the employment. + */ id: string; + /** + * The employee's full name. + */ name: string; + /** + * The employee's surname (last name). Null if not available. + */ surname: string | null; }; @@ -885,7 +1100,7 @@ export type TotalPay = { /** * IncentiveResponse * - * Incentive response + * Response containing a single incentive record. */ export type IncentiveResponse = { data?: { @@ -896,7 +1111,7 @@ export type IncentiveResponse = { /** * ExpenseResponse * - * Expense response + * Response containing a single expense record. */ export type ExpenseResponse = { data: { @@ -977,6 +1192,9 @@ export type ActionError = { export type BenefitOfferByEmploymentResponse = { data: { benefit_offers_by_employment: Array; + /** + * The unique identifier (UUID) of the company. + */ company_id: string; currency: Currency; }; @@ -985,7 +1203,7 @@ export type BenefitOfferByEmploymentResponse = { /** * EmploymentShowResponse * - * Complete information of an employment + * Response containing the full employment record, including the termination date if the employment has an active offboarding. */ export type EmploymentShowResponse = { data: { @@ -1010,7 +1228,7 @@ export type OAuth2TokenParams = /** * SentBackTimesheetResponse * - * Sent back timesheet response + * Response returned after a timesheet has been sent back to the employee for revision. */ export type SentBackTimesheetResponse = { data?: { @@ -1052,7 +1270,7 @@ export type CompanyCurrenciesResponse = { /** * DownloadFileResponse * - * A supported file + * Response containing the file's metadata and its base64-encoded content for download. */ export type DownloadFileResponse = { data: { @@ -1070,17 +1288,26 @@ export type DownloadFileResponse = { /** * MinimalTimesheet * - * Minimal Timesheet + * A lightweight timesheet representation returned after create and approve operations. Contains basic identification and status fields but not the detailed hours breakdown or time tracking entries. */ export type MinimalTimesheet = { + /** + * Whether this timesheet requires explicit approval before processing. + */ approval_required: boolean; country_code: CountryCode; employment_id: UuidSlug; end_date: Date; id: UuidSlug; + /** + * Optional notes added by the employee. + */ notes: string | null; start_date: Date; status: TimesheetStatus; + /** + * The timestamp when the employee submitted this timesheet. Null if not yet submitted. + */ submitted_at: string | null; }; @@ -1091,6 +1318,12 @@ export type ConflictErrorResponse = ValidationError | MessageResponse; /** * IdentityCurrentResponse + * + * The response from `GET /v1/identity/current`. Returns information about the entities associated with the current authentication token. The shape of the response depends on the type of token used: + * + * - **Client Credentials Token**: Returns the integration's `client_id` and details. No company or user context. + * - **Company Access Token** (Authorization Code flow): Returns full context — integration credentials, the company being accessed, and the authorizing user. + * - **Customer API Token**: Returns only the company and user. No integration credentials since the company is accessing its own data directly. */ export type IdentityCurrentResponse = | IdentityClientCredentialsResponse @@ -1099,52 +1332,150 @@ export type IdentityCurrentResponse = /** * EmployeeDetails + * + * Payroll cost breakdown for a single employee within a payroll run. All monetary amounts are represented as an object with `amount` (integer, in cents) and `currency` (ISO 4217 code). */ export type EmployeeDetails = { /** - * When payroll run is in `processing` or `preparing` status, the estimated salary may change after final payroll calculations. + * The employee's base salary component for this payroll period. When the payroll run is in `preparing` or `processing` status, this is an estimate that may change after final payroll calculations. Amount in cents. */ base_salary: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * Total cost of employee benefits (health insurance, pension, etc.) for this payroll run. Amount in cents. + */ benefits: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * Total deductions from the employee's gross pay, including taxes and social contributions. Amount in cents. + */ deductions: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * Total employer-side contributions and costs (employer social contributions, taxes, etc.) beyond the employee's gross pay. Amount in cents. + */ employer_costs: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * The unique identifier of the employment record for this employee. + */ employment_id?: string; + /** + * Total approved expenses reimbursed to the employee in this payroll run. Amount in cents. + */ expenses: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * The full name of the employee. May be null if the employee's profile is incomplete. + */ full_name: string | null; + /** + * The employee's gross pay before any deductions. Amount in cents. + */ gross_pay: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * Total incentives (bonuses, commissions, etc.) paid to the employee in this payroll run. Amount in cents. + */ incentives: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * The net amount paid to the employee after all deductions (taxes, social contributions, etc.). Amount in cents. + */ net_pay: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * Any other payroll components not categorized as salary, benefits, expenses, or incentives. Amount in cents. + */ other: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; + /** + * The unique identifier of the employee's payslip for this payroll run. Null when the payroll run is still in `preparing` or `processing` status and payslips have not yet been generated. + */ payslip_id: string | null; + /** + * The total cost to the employer for this employee in this payroll run, including salary, benefits, employer contributions, expenses, and incentives. Amount in cents. + */ total_cost: { + /** + * Amount in cents. + */ amount?: number; + /** + * ISO 4217 currency code. + */ currency?: string; }; }; @@ -1161,27 +1492,56 @@ export type Variance = { /** * CostCalculatorDiscountResponse + * + * The discount applied to a cost estimate, showing the annual and monthly savings. */ export type CostCalculatorDiscountResponse = { + /** + * The annual discount amount in cents. + */ annual_amount: number; + /** + * The monthly discount amount in cents. + */ monthly_amount: number; + /** + * The number of months the discount applies to. + */ months: number; + /** + * A human-readable label for the discount. + */ text: string; }; /** * DownloadDocumentResponse * - * Download a supported document + * Response containing a document's metadata and its base64-encoded content for download. */ export type DownloadDocumentResponse = { data: { document?: { + /** + * The document content, base64-encoded. + */ content?: Blob | File; + /** + * The unique identifier (UUID) of the document. + */ id?: string; inserted_at?: DateTimeIso8601; + /** + * The file name including extension. + */ name?: string; + /** + * A more specific classification of the document. Null if no sub-type applies. + */ sub_type?: string | null; + /** + * The broad category of the document. + */ type?: string; }; }; @@ -1225,7 +1585,7 @@ export type ApproveExpenseParams = { /** * TypeOfDayBreakdown * - * Type of day breakdown for the respective time of day + * Hours breakdown by type of day (regular working day, weekend, or public holiday) for a specific time of day (day or night). */ export type TypeOfDayBreakdown = { holiday: HoursAndMinutes; @@ -1238,7 +1598,7 @@ export type MaybeBenefitTier = BenefitTier | null; /** * EmploymentBasicResponse * - * Complete information of an employment + * A lightweight employment representation returned after creation. Contains basic identification, country, and status fields but not the full onboarding details or country-specific form data. */ export type EmploymentBasicResponse = { /** @@ -1249,20 +1609,47 @@ export type EmploymentBasicResponse = { basic_information?: { [key: string]: unknown; }; + /** + * The unique identifier (UUID) of the company. + */ company_id?: string; + /** + * The ISO 3166-1 3-letter country code for this employment. + */ country_code?: string; + /** + * When this employment was created. + */ created_at?: string; employment_lifecycle_stage?: EmploymentLifecycleStage; + /** + * The employee's full name. + */ full_name?: string; id?: UuidSlug; + /** + * The employee's job title. May be null if not yet set. + */ job_title?: string | null; + /** + * The email the employee uses to log in to Remote. + */ login_email?: string; + /** + * The employee's personal email address. + */ personal_email?: string; /** * Required for employees, optional for contractors */ provisional_start_date?: string; + /** + * The type of employment. + */ type?: 'employee' | 'contractor'; + /** + * When this employment was last updated. + */ updated_at?: string; }; @@ -1298,9 +1685,18 @@ export type BenefitRenewalRequestsBenefitRenewalRequest = { coverage_end_date: Date; coverage_start_date: Date; current_benefit_tier?: NullableMinimalBenefitTier; + /** + * The unique identifier (UUID) of the benefit renewal request. + */ id: string; + /** + * The number of employees who will be affected by this benefit renewal. + */ number_of_affected_employees: number; renewal_selection_end_date: Date; + /** + * Instructions for the employer about the renewal process, available plans, and deadlines. + */ renewal_selection_instructions: string; renewal_selection_start_date: Date; }; @@ -1369,10 +1765,16 @@ export type BenefitRenewalRequestsUpdateBenefitRenewalRequest = { */ export type CompanyDepartment = { /** - * Company ID + * The unique identifier (UUID) of the company this department belongs to. */ company_id: string; + /** + * The unique identifier (UUID) of the department. + */ id: string; + /** + * The name of the department (e.g., "Marketing", "Engineering"). + */ name: string; }; @@ -1448,8 +1850,17 @@ export type ContractorInvoiceStatus = * Compensation */ export type Compensation = { + /** + * The compensation amount in cents. Null if compensation is not yet set. + */ amount: number | null; + /** + * The ISO 4217 currency code for the compensation. Null if not yet set. + */ currency_code: string | null; + /** + * Whether the employee is paid hourly or on a salary basis. Null if not yet set. + */ wage_type: 'hourly' | 'salary'; }; @@ -1511,18 +1922,47 @@ export type ListContractorInvoicesResponse = { /** * CostCalculatorEmploymentParam + * + * Parameters for a single employment to include in the cost estimate. Provide the region and salary (or total cost) — the calculator will compute all employer costs, contributions, and benefits. */ export type CostCalculatorEmploymentParam = { + /** + * The employee's age. Used in some countries to calculate age-dependent benefits or contributions. + */ age?: number; + /** + * The annual gross salary in the region's local currency, in cents. Provide this OR `annual_total_cost`, not both. + */ annual_gross_salary?: number; + /** + * The annual gross salary in the employer's preferred currency, in cents. Used when you want to specify salary in a different currency than the region's. + */ annual_gross_salary_in_employer_currency?: number; + /** + * The target total annual cost (salary + all employer costs) in the region's local currency, in cents. The calculator will derive the gross salary. Provide this OR `annual_gross_salary`, not both. + */ annual_total_cost?: number; + /** + * The target total annual cost in the employer's preferred currency, in cents. + */ annual_total_cost_in_employer_currency?: number; + /** + * Specific benefit selections to include in the estimate. + */ benefits?: Array; discount?: CostCalculatorDiscount; employment_term?: EmploymentTermType; + /** + * The unique identifier (slug) of the region/country for this employment. Required. + */ region_slug: string; + /** + * A custom exchange rate from the regional currency to the employer currency. If not provided, the current market rate is used. + */ regional_to_employer_exchange_rate?: string; + /** + * An optional label for this employment in the estimate (e.g., the job title or role name). + */ title?: string; }; @@ -1601,9 +2041,21 @@ export type AccountsLoginSyncedWith = 'none' | 'personal' | 'work'; * NullableMinimalBenefitTier */ export type NullableMinimalBenefitTier = { + /** + * A description of what this tier includes. + */ description: string; + /** + * A human-readable cost estimate for this tier (e.g., "~$100"). Null if cost is not available. + */ display_cost?: string | null; + /** + * The unique identifier (UUID) of the benefit tier. + */ id: string; + /** + * The name of the benefit tier (e.g., "Premium", "Standard"). + */ name: string; } | null; @@ -1625,9 +2077,17 @@ export type CreateTimeoffParams = { /** * JobAssociation + * + * A reference to a related job classification entity (job family, sub-family, career track, or job level). Null if not assigned. */ export type JobAssociation = { + /** + * The unique identifier (UUID) of the associated entity. + */ id?: string; + /** + * The human-readable name of the associated entity. + */ label?: string; } | null; @@ -1672,18 +2132,45 @@ export type IntegrationsScimGroupListResponse = { * A supported country on Remote */ export type Country = { + /** + * The ISO 3166-1 alpha-2 country code (e.g., "PT"). + */ alpha_2_code: string; + /** + * The ISO 3166-1 alpha-3 country code (e.g., "PRT"). This is the primary code used across the Remote API. + */ code: string; /** * Contractor product names available for this country */ contractor_products_available?: Array<'standard' | 'plus' | 'cor'>; + /** + * 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 EOR (Employer of Record) onboarding is available in this country. + */ eor_onboarding?: boolean; + /** + * When benefit plan selections become locked for this country (e.g., "after_first_hire" means benefits cannot be changed after the first employee is hired). + */ locked_benefits?: string; + /** + * The country's full English name. + */ name: string; + /** + * The geographic region the country belongs to (e.g., "Europe", "Asia", "Americas"). + */ region?: string; + /** + * The geographic subregion (e.g., "Southern Europe", "Southeast Asia"). Null for some countries. + */ subregion?: string | null; + /** + * The list of JSON schema form names available for this country (e.g., "address_details", "contract_details"). Use these with the Show form schema endpoint to get country-specific field requirements. + */ supported_json_schemas?: Array; }; @@ -1703,6 +2190,9 @@ export type BulkContractorInvoiceScheduleCreateParams = { * CreateOffboardingParams */ export type CreateOffboardingParams = { + /** + * The unique identifier (UUID) of the employment to be terminated. + */ employment_id: string; termination_details: TerminationDetailsParams; /** @@ -1723,7 +2213,15 @@ export type CreatePricingPlanParams = /** * UserStatus * - * The status of the user + * The status of the user account associated with this employment. + * + * - `active`: The user account is active and the user can log in. + * - `created`: The user account has been created but not yet activated. + * - `initiated`: The user has been invited but has not completed registration. + * - `cancelled`: The user account was cancelled before activation. + * - `inactive`: The user account has been deactivated (e.g., after offboarding). + * - `deleted`: The user account has been deleted. + * */ export type UserStatus = | 'active' @@ -1810,7 +2308,12 @@ export type CompanyCreationResponse = { /** * ContractorContractDocumentStatus * - * Contract document status. + * The signing status of a contract document. + * + * - `draft`: The document is being prepared and has not been sent for signing. + * - `awaiting_signatures`: The document has been sent and is waiting for one or more parties to sign. + * - `finished`: All required signatures have been collected and the contract is fully executed. + * */ export type ContractorContractDocumentStatus = | 'draft' @@ -1871,18 +2374,32 @@ export type MaybeCurrencyDefinition = CurrencyDefinition | null; /** * BenefitGroup + * + * A category of benefits (e.g., "Health", "Dental", "Life Insurance") with a defined policy period. Each group contains one or more tiers representing different coverage levels. */ export type BenefitGroup = { + /** + * The unique identifier (UUID) of the benefit group. + */ id: string; + /** + * The name of the benefit category (e.g., "Health", "Dental", "Life Insurance"). + */ name: string; + /** + * The date when the policy period ends for this benefit group (ISO 8601 format). Benefits may need to be renewed after this date. + */ policy_end_date: string; + /** + * The date when the policy period begins for this benefit group (ISO 8601 format). + */ policy_start_date: string; }; /** * MinimalTimesheetResponse * - * Timesheet response + * Response containing a minimal timesheet representation, returned after create and approve operations. */ export type MinimalTimesheetResponse = { data?: { @@ -1923,21 +2440,38 @@ export type InternalServerErrorResponse = ValidationError | MessageResponse; /** * CostCalculatorEstimateParams + * + * Parameters for generating a cost estimate for one or more employments across different countries/regions. */ export type CostCalculatorEstimateParams = { /** - * Company name + * The company name, used for labeling in PDF/CSV exports. */ company_name?: string; /** - * Currency Slug + * The ISO 4217 currency code for the employer's preferred currency (e.g., "USD"). All costs will be converted to this currency. */ employer_currency_slug: string; + /** + * One or more employments to estimate costs for. + */ employments: Array; global_discount?: CostCalculatorDiscount; + /** + * Whether to include benefit costs in the estimate. Defaults to false if not provided. + */ include_benefits?: boolean; + /** + * Whether to include detailed cost breakdowns (individual contributions, benefits, etc.) in the response. + */ include_cost_breakdowns?: boolean; + /** + * Whether to include Remote's management fee in the total cost calculation. + */ include_management_fee?: boolean; + /** + * Whether to include premium benefit options in the estimate. + */ include_premium_benefits?: boolean; }; @@ -2007,7 +2541,7 @@ export type CustomFieldSimpleDataType = /** * Offboarding * - * Offboarding + * A wrapper containing an offboarding record, which can be either a termination (employer-initiated) or a resignation (employee-initiated). */ export type Offboarding = { offboarding?: ResignationOrTerminationOffboarding; @@ -2076,8 +2610,13 @@ export type CorTerminationRequestCreatedResponse = { /** * NotFoundResponse + * + * Returned when the requested resource does not exist or is not accessible with the current authentication credentials. */ export type NotFoundResponse = { + /** + * A message indicating which resource was not found. + */ message?: string; }; @@ -2140,25 +2679,59 @@ export type Timezone = string; /** * CountrySummary + * + * A per-country summary of benefit offerings, including aggregate enrollment statistics and a breakdown of all offered benefit groups and their tiers for that country. */ export type CountrySummary = { country: Country; employee_stats: EmployeeStats; + /** + * All benefit groups that have been offered to employees in this country. + */ offered_benefit_groups: Array; }; /** * ResignationOffboarding + * + * An offboarding request initiated by the employee (a resignation). Includes the employee's proposed last working day, reason, and status tracking through Remote's process. */ export type ResignationOffboarding = { + /** + * Additional comments or context about the resignation. + */ additional_comments?: string | null; + /** + * Whether the employer agrees with the employee's PTO balance. + */ agrees_to_pto_amount?: boolean; + /** + * A description of how and when the employer was made aware of the resignation. + */ employer_awareness?: string; + /** + * The unique identifier (UUID) of the employment being resigned from. + */ employment_id: string; + /** + * The unique identifier (UUID) of the offboarding request. + */ id: string; + /** + * The employee's proposed last working day. The actual last day may differ based on notice period requirements. + */ proposed_last_working_day: string; + /** + * A detailed description of the employee's reason for resigning. + */ reason_description?: string; + /** + * The unique identifier (UUID) of the employee who submitted the resignation. + */ requested_by: string; + /** + * The reason the employee gave for their resignation. + */ resignation_reason: | 'cancellation_before_start_date' | 'company_culture_or_values' @@ -2184,12 +2757,27 @@ export type ResignationOffboarding = { | 'transfer_between_remote_customer' | 'transfer_from_remote_to_customer' | 'transfer_from_remote_to_other_eor'; + /** + * The current status of the offboarding request. + * + * - `submitted`: The resignation has been submitted and is awaiting review. + * - `in_review`: Remote is processing the resignation. + * - `done`: The offboarding has been completed. + * - `canceled`: The resignation was withdrawn or canceled. + * + */ status: 'submitted' | 'in_review' | 'done' | 'canceled'; + /** + * The timestamp when the resignation was submitted. + */ submitted_at: string; /** * Most updated termination date for the offboarding. This date is subject to change through the offboarding process even after it is finalized. */ termination_date: string | null; + /** + * The type of offboarding. Always `"resignation"` for employee-initiated resignations. + */ type: 'resignation'; }; @@ -2271,13 +2859,25 @@ export type CustomFieldDataType = /** * File * - * A supported file + * A file associated with an employment, such as a contract, tax form, or identity document. */ export type File = { + /** + * The unique identifier (UUID) of the file. + */ id: string; inserted_at: DateTimeIso8601; + /** + * The file name including extension (e.g., "id.pdf", "contract.pdf"). + */ name: string; + /** + * A more specific classification of the file within its type (e.g., "personal_id" within type "id", or "ir_35" within type "contract"). Null if no sub-type applies. + */ sub_type?: string | null; + /** + * The broad category of the file (e.g., "id", "contract", "tax_form"). + */ type: string; }; @@ -2308,7 +2908,7 @@ export type Stage = { /** * OffboardingResponse * - * Offboarding response + * Response containing a single offboarding record with full details. */ export type OffboardingResponse = { data?: Offboarding; @@ -2320,10 +2920,22 @@ export type OffboardingResponse = { * Employment document file */ export type EmploymentDocument = { + /** + * The unique identifier (UUID) of the file. + */ id: string; inserted_at: DateTimeIso8601; + /** + * The file name including extension (e.g., "id.pdf", "contract.pdf"). + */ name: string; + /** + * A more specific classification of the file within its type (e.g., "personal_id" within type "id", or "ir_35" within type "contract"). Null if no sub-type applies. + */ sub_type?: string | null; + /** + * The broad category of the file (e.g., "id", "contract", "tax_form"). + */ type: string; } | null; @@ -2446,6 +3058,9 @@ export type EmploymentFullParams = { billing_address_details?: { [key: string]: unknown; }; + /** + * The unique identifier (UUID) of the company. Optional when updating. + */ company_id?: string; /** * Contract information. As its properties may vary depending on the country, @@ -2456,6 +3071,9 @@ export type EmploymentFullParams = { [key: string]: unknown; }; country?: Country; + /** + * The ISO 3166-1 3-letter country code for this employment. + */ country_code?: string; /** * The department of the employment. The department must belong to the same company as the employment. @@ -2510,6 +3128,8 @@ export type EmploymentFullParams = { /** * PayrollRunResponse + * + * Response containing a single payroll run with full details including cost totals and employee breakdowns. */ export type PayrollRunResponse = { payroll_run?: PayrollRun; @@ -2597,7 +3217,10 @@ export type CreateWebhookCallbackParams = { | 'employment.contractor_of_record_termination.initiated' | 'employment.details.updated' | 'employment.employment_agreement.available' + | 'employment.cor_hiring.invoice_created' | 'employment.eor_hiring.invoice_created' + | 'employment.cor_hiring.proof_of_payment_accepted' + | 'employment.cor_hiring.proof_of_payment_submitted' | 'employment.eor_hiring.proof_of_payment_accepted' | 'employment.eor_hiring.proof_of_payment_submitted' | 'employment.no_longer_eligible_for_onboarding_cancellation' @@ -2675,10 +3298,22 @@ export type CreateWebhookCallbackParams = { * Employment image file */ export type EmploymentImage = { + /** + * The unique identifier (UUID) of the file. + */ id: string; inserted_at: DateTimeIso8601; + /** + * The file name including extension (e.g., "id.pdf", "contract.pdf"). + */ name: string; + /** + * A more specific classification of the file within its type (e.g., "personal_id" within type "id", or "ir_35" within type "contract"). Null if no sub-type applies. + */ sub_type?: string | null; + /** + * The broad category of the file (e.g., "id", "contract", "tax_form"). + */ type: string; } | null; @@ -2758,9 +3393,14 @@ export type CountriesResponse = { /** * DataSyncEvent + * + * A record of a data synchronization event, showing when it ran, what data type it covered, and whether it succeeded. */ export type DataSyncEvent = { data_type: 'benefits' | 'kdb' | 'countries' | 'help-center-articles'; + /** + * The timestamp when the sync event occurred. + */ inserted_at: string; status: 'pass' | 'fail'; }; @@ -2802,11 +3442,17 @@ export type AssertionTokenParams = { /** * SentBackTimesheet * - * Sent back timesheet + * A timesheet that has been sent back to the employee for revision. The status will be `in_calibration` and includes the reason provided by the reviewer. */ export type SentBackTimesheet = { id: UuidSlug; + /** + * Always `true` for sent-back timesheets, indicating the timesheet was returned for revision. + */ sent_back: boolean; + /** + * The reason provided by the reviewer for why the timesheet needs to be revised. + */ sent_back_reason: string; status: TimesheetStatus; }; @@ -2891,10 +3537,21 @@ export type Payment = { /** * BenefitRenewalRequests.MinimalBenefitGroup + * + * A lightweight benefit group reference used in renewal requests. */ export type BenefitRenewalRequestsMinimalBenefitGroup = { + /** + * The ISO 3166-1 3-letter country code for this benefit group. + */ country_code: string; + /** + * The unique identifier (UUID) of the benefit group. + */ id: string; + /** + * The name of the benefit group (e.g., "Health", "Life Insurance"). + */ name: string; }; @@ -2917,8 +3574,13 @@ export type OptionValue = string; /** * ListPayrollRunResponse + * + * Response containing a list of payroll runs for the company. Each payroll run includes summary information but not per-employee breakdowns. */ export type ListPayrollRunResponse = { + /** + * List of payroll runs matching the query filters. + */ payroll_runs?: Array; }; @@ -3080,7 +3742,7 @@ export type JsonSchema = { /** * PricingPlan * - * Pricing plan + * A pricing plan assigned to a company, defining the product, billing frequency, and cost. */ export type PricingPlan = { base_price: Price; @@ -3088,6 +3750,9 @@ export type PricingPlan = { * End date of the pricing plan this will be nil if the pricing plan is unlimited otherwise it will be the last day of the month */ end_date: string | null; + /** + * The unique identifier (UUID) of the pricing plan. + */ id: string; price: Price; product: Product; @@ -3095,6 +3760,9 @@ export type PricingPlan = { * Start date of the pricing plan this will always be the first of the month, for example 2025-01-01 will be used if the user provided 2025-01-02 */ start_date: string; + /** + * The pricing plan type (e.g., "termed" for fixed-term, "evergreen" for ongoing). + */ type: string; }; @@ -3179,17 +3847,36 @@ export type MinimalUser = { /** * CostCalculatorCost + * + * A single cost line item within a cost breakdown (e.g., a specific employer contribution, benefit, or statutory payment). */ export type CostCalculatorCost = { + /** + * The cost amount in cents. + */ amount: number; + /** + * A human-readable explanation of how this cost is calculated or what it covers. + */ description: string | null; + /** + * The name of this cost item (e.g., "Health Insurance", "Social Security"). + */ name: string; + /** + * The ID of the related help article, if available. + */ zendesk_article_id: string | null; + /** + * A link to a help article with more information about this cost, if available. + */ zendesk_article_url: string | null; }; /** * MinimalPayrollRun + * + * A lightweight representation of a payroll run used in list responses. Contains summary information and the total cost, but not the per-employee breakdown or cost category totals. */ export type MinimalPayrollRun = { approval_date: NullableDate; @@ -3197,9 +3884,23 @@ export type MinimalPayrollRun = { currency_code: CurrencyCode; cutoff_date?: NullableDate; expected_payout_date: Date; + /** + * The unique identifier of the payroll run. + */ id: string; period_end: Date; period_start: Date; + /** + * The current status of the payroll run. + * + * - `preparing`: The payroll run is being assembled. Costs are estimates. + * - `processing`: Submitted for processing. Costs are still estimates. + * - `completed`: Processing is complete. Costs are final. + * - `finalized`: Payments have been or will be disbursed. + * - `waiting_for_customer_approval`: Requires company approval before proceeding. + * - `rejected`: Rejected during approval and needs revision. + * + */ status: | 'preparing' | 'processing' @@ -3207,7 +3908,21 @@ export type MinimalPayrollRun = { | 'finalized' | 'waiting_for_customer_approval' | 'rejected'; + /** + * The total cost of this payroll run across all employees. Amount in cents. + */ total_payroll_cost: number; + /** + * The type of payroll run. + * + * - `main`: Regular recurring payroll. + * - `one_off`: Ad-hoc off-cycle payment. + * - `pro_forma`: Simulated run for cost estimation. + * - `tax_documents`: Tax document generation only. + * - `expenses`: Dedicated expense reimbursement run. + * - `parallel`: Supplementary run alongside the main payroll. + * + */ type: | 'main' | 'one_off' @@ -3279,7 +3994,10 @@ export type WebhookTriggerEmploymentParams = { | 'employment.contractor_of_record_termination.initiated' | 'employment.details.updated' | 'employment.employment_agreement.available' + | 'employment.cor_hiring.invoice_created' | 'employment.eor_hiring.invoice_created' + | 'employment.cor_hiring.proof_of_payment_accepted' + | 'employment.cor_hiring.proof_of_payment_submitted' | 'employment.eor_hiring.proof_of_payment_accepted' | 'employment.eor_hiring.proof_of_payment_submitted' | 'employment.no_longer_eligible_for_onboarding_cancellation' @@ -3417,11 +4135,25 @@ export type TimeoffDaysParams = { /** * IdentityUser + * + * The user (company manager) associated with the current authentication token. Represents the person who authorized access to the company's data. */ export type IdentityUser = { + /** + * The email address of the user who authorized the token. + */ email: string; + /** + * The unique identifier (UUID) of the user. + */ id: string; + /** + * The full name of the user who authorized the token. + */ name: string; + /** + * The current account status of the user on the Remote platform. + */ status: string; }; @@ -3596,15 +4328,36 @@ export type ContractorCurrencyResponse = { /** * Product * - * Product + * A Remote product offering (e.g., EOR, Contractor Management) with its tier and billing frequency. */ export type Product = { + /** + * A description of the product. + */ description?: string; + /** + * Features included in this product tier. + */ features?: Array; + /** + * The billing frequency (e.g., "monthly", "annually"). + */ frequency: string; + /** + * A unique machine-readable identifier for this product. + */ identifier?: string; + /** + * The full product name (e.g., "EOR Monthly"). + */ name: string; + /** + * A short display name for the product (e.g., "EOR"). + */ short_name?: string; + /** + * The product tier (e.g., "standard", "premium"). + */ tier: string; }; @@ -3612,7 +4365,13 @@ export type Product = { * TimeoffDaysAndHours */ export type TimeoffDaysAndHours = { + /** + * The number of whole days. + */ days?: number; + /** + * The number of additional hours beyond whole days. + */ hours?: number; }; @@ -3869,38 +4628,76 @@ export type ImportJobColumnMapping = { /** * OfferedBenefitGroup + * + * A benefit group that has been offered to employees, including enrollment statistics aggregated across all tiers and the individual offered tiers with their own statistics. */ export type OfferedBenefitGroup = { benefit_group: BenefitGroup; employee_stats: EmployeeStats; + /** + * The individual tiers within this group that have been offered, each with their own enrollment statistics. + */ offered_benefit_tiers: Array; }; /** * PayrollRun + * + * A payroll run represents a single payroll processing cycle for a company in a specific country and period. It progresses through statuses from preparation to finalization, and contains cost totals aggregated across all employees included in the run. */ export type PayrollRun = { approval_date: NullableDate; + /** + * The total benefits cost across all employees in this payroll run. Amount in cents. + */ benefits_total: number; country: Country; currency_code: CurrencyCode; cutoff_date?: NullableDate; /** + * Per-employee cost breakdown for this payroll run. Deprecated — use the dedicated `GET /v1/payroll-runs/{payroll_run_id}/employee-details` endpoint instead, which supports pagination. + * * @deprecated */ employee_details: Array; + /** + * The total employer-side contributions (social contributions, employer taxes, etc.) across all employees. Amount in cents. + */ employer_contributions_total: number; expected_payout_date: Date; + /** + * The total reimbursed expenses across all employees in this payroll run. Amount in cents. + */ expenses_total: number; /** - * The ID of the payroll run + * The unique identifier of the payroll run. */ id: string; + /** + * The total incentives (bonuses, commissions, etc.) across all employees in this payroll run. Amount in cents. + */ incentives_total: number; + /** + * The total of other payroll components not categorized elsewhere. Amount in cents. + */ other_total: number; period_end: Date; period_start: Date; + /** + * The total base salary amount across all employees in this payroll run. Amount in cents. + */ salary_total: number; + /** + * The current status of the payroll run. + * + * - `preparing`: The payroll run is being assembled. Employee details and costs are estimates and may change. + * - `processing`: The payroll run has been submitted for processing by the local payroll provider. Costs are still estimates. + * - `completed`: Payroll processing is complete. Costs are final and payslips are available. + * - `finalized`: The payroll run has been finalized and payments have been or will be disbursed. + * - `waiting_for_customer_approval`: The payroll run requires approval from the company before it can proceed. + * - `rejected`: The payroll run was rejected during the approval process and needs to be revised. + * + */ status: | 'preparing' | 'processing' @@ -3908,7 +4705,21 @@ export type PayrollRun = { | 'finalized' | 'waiting_for_customer_approval' | 'rejected'; + /** + * The total cost of this payroll run across all employees, including salaries, benefits, employer contributions, expenses, and incentives. Amount in cents. + */ total_payroll_cost: number; + /** + * The type of payroll run. + * + * - `main`: The regular recurring payroll for the period. + * - `one_off`: An ad-hoc payroll run outside the regular cycle, typically for off-cycle payments. + * - `pro_forma`: A simulated payroll run used for cost estimation purposes. Not actually processed. + * - `tax_documents`: A payroll run for generating tax-related documents only. + * - `expenses`: A payroll run dedicated to reimbursing approved expenses. + * - `parallel`: A supplementary payroll run that runs alongside the main payroll for the same period. + * + */ type?: | 'main' | 'one_off' @@ -3939,13 +4750,22 @@ export type ReferencedItem = { export type BillingDocumentsResponse = { data: { billing_documents: Array<{ + /** + * The entity issuing the billing document. Null if not applicable. + */ bill_from?: string | null; + /** + * The billing period in YYYY-MM format. + */ billing_document_period?: string; billing_document_type?: | 'reconciliation_invoice' | 'prefunding_invoice' | 'supplemental_service_invoice' | 'reconciliation_credit_note'; + /** + * The unique identifier (UUID) of the billing document. + */ id?: string; }>; /** @@ -4128,17 +4948,50 @@ export type BackgroundChecksBackgroundCheckRequestItem = { /** * BillingDocument * - * Information of a billing document + * A billing document (invoice or credit note) issued to a company by Remote for employment management services. */ export type BillingDocument = { + /** + * The ISO 4217 currency code of the billing document. + */ billing_document_currency: string; + /** + * The human-readable document number (e.g., invoice number). + */ billing_document_number: string; + /** + * The billing period this document covers, in YYYY-MM format. + */ billing_document_period: string; + /** + * The type of billing document. + * + * - `reconciliation_invoice`: A regular invoice reconciling payroll costs for the period. + * - `prefunding_invoice`: An invoice for advance funding of payroll before it is processed. + * - `supplemental_service_invoice`: An invoice for additional services beyond standard payroll. + * - `reconciliation_credit_note`: A credit note adjusting a previous reconciliation invoice. + * + */ billing_document_type: string; + /** + * The unique identifier (UUID) of the company this billing document belongs to. + */ company_id: string; + /** + * The unique identifier (UUID) of the billing document. + */ id: string; + /** + * The date the billing document was issued (ISO 8601 date format). + */ issued_date: string; + /** + * The line items that make up this billing document. + */ items: Array; + /** + * The total amount of the billing document, in cents. + */ total: number; }; @@ -4178,13 +5031,19 @@ export type TravelLetterResponse = { /** * TimeTrackingParams * - * Params to create a time tracking + * Parameters for creating a time tracking entry within a timesheet. Provide the time range and type of work; hour breakdowns are calculated automatically from the clock-in/out times. */ export type TimeTrackingParams = { clock_in: DateTimeIso8601; clock_out: DateTimeIso8601; + /** + * Optional free-text notes about this time entry, such as project or task details. + */ notes?: string | null; timezone: Timezone; + /** + * The category of time being tracked (e.g., regular hours, overtime, on-call). + */ type: 'regular_hours' | 'overtime' | 'on_call' | 'break' | 'unpaid_break'; }; @@ -4198,18 +5057,29 @@ export type UnifiedMinimalBenefitGroup = { /** * Payslip + * + * A payslip issued to an employee for a specific payroll period. */ export type Payslip = { + /** + * The unique identifier (UUID) of the employment this payslip belongs to. + */ employment_id: string; expected_payout_date?: Date; + /** + * The unique identifier (UUID) of the payslip. + */ id: string; + /** + * The date the payslip was issued. + */ issued_at: string; /** - * This field is only shown if available + * The net pay amount converted to the company's billing currency, in cents. Only shown if available. */ net_pay_converted_amount?: number; /** - * This field is only shown if available + * The net pay amount in the source (local) currency, in cents. Only shown if available. */ net_pay_source_amount?: number; }; @@ -4267,7 +5137,7 @@ export type ListPricingPlanPartnerTemplatesResponse = { /** * MinimalEmployment * - * Minimal information of an employment. + * A lightweight employment representation used in list responses. Contains key identification, status, and type fields but not the full onboarding details or country-specific form data. */ export type MinimalEmployment = { country: NullableCountry; @@ -4282,18 +5152,39 @@ export type MinimalEmployment = { */ department_id?: string | null; employment_lifecycle_stage: EmploymentLifecycleStage; + /** + * The employment model. `eor` (Employer of Record), `peo` (Professional Employer Organization), or `global_payroll`. + */ employment_model: 'eor' | 'peo' | 'global_payroll'; /** * A unique reference code for the employment record in a non-Remote system. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ external_id: string | null; + /** + * The employee's full name. + */ full_name: string; + /** + * The unique identifier (UUID) of the employment. + */ id: string; + /** + * The employee's job title. + */ job_title: string; + /** + * The email the employee uses to log in to Remote. + */ login_email: string; + /** + * The employee's personal email address. + */ personal_email: string; short_id: ShortId; status: EmploymentStatus; + /** + * The type of employment. + */ type: | 'employee' | 'contractor' @@ -4305,6 +5196,9 @@ export type MinimalEmployment = { work_address_details: { [key: string]: unknown; }; + /** + * The employee's work email address. Null if not set. + */ work_email: string | null; }; @@ -4324,18 +5218,38 @@ export type ProvisionalStartDate = string; * BeforeAfterRequiredParams */ export type BeforeAfterRequiredParams = { + /** + * Only replay events triggered after this timestamp (ISO 8601). + */ after: string; + /** + * Only replay events triggered before this timestamp (ISO 8601). + */ before: string; + /** + * Optional filter to only replay events for a specific company. + */ company_id?: string; + /** + * Optional filter to only replay events of this type. + */ event_type?: string; + /** + * Optional filter by delivery status. Set to false to replay only failed deliveries. + */ successfully_delivered?: boolean; }; /** * ResourceErrorResponse + * + * Returned when an operation fails due to a resource-level conflict or constraint. Includes a structured error with a machine-readable code, a human-readable message, and the type and ID of the affected resource. */ export type ResourceErrorResponse = { message: { + /** + * A machine-readable error code identifying the specific type of resource error. + */ code?: | 'resource_not_eligible' | 'resource_already_exists' @@ -4353,8 +5267,17 @@ export type ResourceErrorResponse = { | 'parameter_unknown' | 'parameter_map_empty' | 'resource_not_supported_for_country'; + /** + * A human-readable message explaining the error and how to resolve it. + */ message?: string; + /** + * The unique identifier of the specific resource that caused the error. May be null if the resource has not been created yet. + */ resource_id?: string | null; + /** + * The type of resource that caused the error (e.g., "termination_request", "employment"). + */ resource_type?: string; }; }; @@ -4419,6 +5342,9 @@ export type TimeoffBalance = { * */ upcoming_requested: TimeoffDaysAndHours | null; + /** + * The number of working hours per day as defined in the employment's contract. Used to convert between days and hours. + */ working_hours_per_day: number; }; @@ -4470,9 +5396,12 @@ export type PricingPlanPartnerTemplate = { /** * ContractAmendment * - * Contract Amendment + * A full contract amendment record, including the requested changes with their previous and current values. */ export type ContractAmendment = { + /** + * The unique identifier of the contract being amended. Null if no specific contract was targeted. + */ amendment_contract_id: string | null; /** * Describes all the changes requested for the contract and contract details with all their previous and current values. @@ -4480,12 +5409,27 @@ export type ContractAmendment = { changes: { [key: string]: unknown; }; + /** + * The unique identifier (UUID) of the employment. + */ employment_id: string; + /** + * The unique identifier (UUID) of the contract amendment. + */ id: string; request_details: RequestDetails; + /** + * The unique identifier (UUID) of the user who submitted the amendment. + */ requested_by: string; status: ContractAmendmentStatus; + /** + * The timestamp when the amendment was submitted. + */ submitted_at: string; + /** + * A link to the support ticket associated with this amendment, if one was created. Null otherwise. + */ zendesk_ticket_url: string | null; }; @@ -4595,6 +5539,9 @@ export type ContractDocumentItem = { * Description and status of an onboarding task. */ export type TaskDescription = { + /** + * A human-readable description of what this onboarding task requires. + */ description?: string; /** * TaskStatus @@ -4659,11 +5606,20 @@ export type OnboardingReservesStatus = { /** * CompanyTokenResponse * - * CompanyTokenResponse + * OAuth2 tokens returned after a company authorizes access. Use the access token in the Authorization header for subsequent API calls. Use the refresh token to obtain a new access token when the current one expires. */ export type CompanyTokenResponse = { + /** + * The OAuth2 access token (JWT). Include this in the `Authorization: Bearer ` header for API requests. + */ access_token: string; + /** + * The number of seconds until the access token expires. + */ expires_in: number; + /** + * The refresh token used to obtain a new access token when the current one expires. + */ refresh_token: string; }; @@ -4708,9 +5664,17 @@ export type TimeoffDocumentParams = { /** * Costs + * + * The cost breakdown between employee and employer for a benefit. Amounts are in the company's billing currency, in cents. */ export type Costs = { + /** + * The employee's portion of the benefit cost, in cents. + */ employee_cost: number; + /** + * The employer's portion of the benefit cost, in cents. + */ employer_cost: number; } | null; @@ -4723,8 +5687,17 @@ export type MaybeUnifiedEmploymentBenefitTier = * A subdivision of a supported country on Remote */ export type CountrySubdivision = { + /** + * The ISO 3166-2 subdivision code (e.g., "PT-11" for Lisboa). + */ code?: string; + /** + * The subdivision's name (e.g., "Lisboa", "California"). + */ name: string; + /** + * The type of subdivision (e.g., "District", "State", "Province"). + */ subdivision_type?: string; }; @@ -4732,27 +5705,45 @@ export type CountrySubdivision = { * ResignationAfterStartDateRequestParams */ export type ResignationAfterStartDateRequestParams = { + /** + * Whether the employer accepts the proposed notice period and last working day. If false, provide an alternative `proposed_last_date`. + */ accepts_proposed_notice: boolean; + /** + * Whether the employer agrees with the employee's current PTO balance. If false, provide notes explaining the discrepancy. + */ agrees_to_pto_amount: boolean; /** * Required if `agrees_to_pto_amount` is set to false. */ agrees_to_pto_amount_notes?: string; + /** + * Whether the employer agrees with the resignation reason stated by the employee. If false, provide notes with the employer's perspective. + */ agrees_to_resignation_reason: boolean; /** * required if `agrees_to_resignation_reason` is set to false. */ agrees_to_resignation_reason_notes?: string; + /** + * Whether the employer has additional information to share about the resignation. If true, provide notes. + */ has_additional_information: boolean; /** * required if `has_additional_information` is set to true. */ has_additional_information_notes?: string; + /** + * Whether there are salary adjustments or additional salary information to communicate. If true, provide notes. + */ has_more_salary_info: boolean; /** * required if `has_more_salary_info` is set to true. */ has_more_salary_info_notes?: string; + /** + * Whether the employee is owed any outstanding expense reimbursements. If true, provide the amount and notes. + */ is_owed_outstanding_reimbursements: boolean; /** * required if `is_owed_outstanding_reimbursements` is set to true. @@ -4793,6 +5784,9 @@ export type ResignationAfterStartDateRequestParams = { * */ timesheet_file?: ResignationFile; + /** + * Whether the employee intends to take more PTO before their last working day. If true, provide notes with details. + */ will_take_more_pto: boolean; /** * required if `will_take_more_pto` is set to true. @@ -4938,16 +5932,42 @@ export type EmploymentLifecycleStage = /** * RecurringIncentive + * + * A recurring incentive (e.g., monthly meal allowance, housing stipend) that automatically generates individual incentive payments on a monthly schedule. */ export type RecurringIncentive = { + /** + * The recurring payment amount in the employment's currency, in cents. + */ amount: number; amount_tax_type: AmountTaxType; + /** + * The unique identifier (UUID) of the employment. + */ employment_id: string; + /** + * The date the recurring incentive stops generating payments. Null for open-ended recurring incentives. + */ end_date?: string | null; + /** + * The unique identifier (UUID) of the recurring incentive. + */ id: string; + /** + * An optional note describing the purpose of this recurring incentive. + */ note?: string | null; + /** + * The date the recurring incentive starts generating payments. + */ start_date: string; + /** + * Whether this recurring incentive is currently active and generating payments, or inactive (paused/ended). + */ status: 'active' | 'inactive'; + /** + * The type of recurring incentive (e.g., "meal_allowance", "housing_allowance"). + */ type: | 'acting_up_allowance' | 'allowance' @@ -4973,6 +5993,8 @@ export type RecurringIncentive = { /** * IdentityCustomerAccessTokenResponse + * + * Returned when the current token is a Customer API Token. These tokens are used by companies accessing their own data directly (not through an integration partner), so only company and user information is included — there are no integration credentials. */ export type IdentityCustomerAccessTokenResponse = { data: { @@ -5011,6 +6033,15 @@ export type ValidationError = { /** * ProbationExtensionStatus + * + * The current status of a probation extension request. + * + * - `submitted`: The request has been submitted and is awaiting review. + * - `in_review`: Remote is reviewing the request for compliance. + * - `done`: The probation extension has been approved and applied. + * - `canceled`: The request was canceled. + * - `deleted`: The request was deleted. + * */ export type ProbationExtensionStatus = | 'submitted' @@ -5093,19 +6124,54 @@ export type BenefitOffer = { /** * Incentive + * + * An incentive (bonus, commission, or other additional payment) for an employee. Incentives are paid out through payroll on the next applicable cycle after the effective date. */ export type Incentive = { + /** + * The incentive amount in the employment's currency, in cents. For example, EUR 500.25 would be represented as 50025. + */ amount: number; amount_tax_type: AmountTaxType; + /** + * The date the incentive takes effect. Determines which payroll cycle the incentive will be paid in. + */ effective_date: string | null; + /** + * The unique identifier (UUID) of the employment this incentive belongs to. + */ employment_id: string; + /** + * The expected date when this incentive will be paid to the employee. Null if not yet determined. + */ expected_payout_date?: string | null; + /** + * The unique identifier (UUID) of the incentive. + */ id: string; + /** + * An optional note describing the reason or context for this incentive. + */ note?: string | null; + /** + * The end date of the period this incentive covers. Null for non-periodic incentives. + */ period_end?: string | null; + /** + * The start date of the period this incentive covers (e.g., for quarterly bonuses). Null for non-periodic incentives. + */ period_start?: string | null; + /** + * If this incentive was generated from a recurring incentive schedule, this is the ID of the parent recurring incentive. Null for one-time incentives. + */ recurring_incentive_id?: string | null; + /** + * The current status of the incentive (e.g., "pending", "scheduled", "paid", "cancelled"). + */ status: string; + /** + * The type of incentive (e.g., "signing_bonus", "performance_bonus", "commission", "referral_bonus"). + */ type: string; }; @@ -5145,18 +6211,45 @@ export type Signatory = { * A supported country on Remote */ export type NullableCountry = { + /** + * The ISO 3166-1 alpha-2 country code (e.g., "PT"). + */ alpha_2_code: string; + /** + * The ISO 3166-1 alpha-3 country code (e.g., "PRT"). This is the primary code used across the Remote API. + */ code: string; /** * Contractor product names available for this country */ contractor_products_available?: Array<'standard' | 'plus' | 'cor'>; + /** + * 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 EOR (Employer of Record) onboarding is available in this country. + */ eor_onboarding?: boolean; + /** + * When benefit plan selections become locked for this country (e.g., "after_first_hire" means benefits cannot be changed after the first employee is hired). + */ locked_benefits?: string; + /** + * The country's full English name. + */ name: string; + /** + * The geographic region the country belongs to (e.g., "Europe", "Asia", "Americas"). + */ region?: string; + /** + * The geographic subregion (e.g., "Southern Europe", "Southeast Asia"). Null for some countries. + */ subregion?: string | null; + /** + * The list of JSON schema form names available for this country (e.g., "address_details", "contract_details"). Use these with the Show form schema endpoint to get country-specific field requirements. + */ supported_json_schemas?: Array; } | null; @@ -5221,9 +6314,17 @@ export type UpdateEmployeeTimeoffParams = { /** * HoursAndMinutes + * + * A duration expressed as hours and minutes. */ export type HoursAndMinutes = { + /** + * The number of whole hours. + */ hours?: number; + /** + * The number of remaining minutes (0-59). + */ minutes?: number; }; @@ -5240,11 +6341,25 @@ export type DeclinedTravelLetter = { /** * SSOConfiguration + * + * A complete SSO configuration for a company, including both Remote-generated values (sso_url, audience_uri) and company-provided values (domain, identity_provider_url). */ export type SsoConfiguration = { + /** + * The audience URI (Entity ID) for SAML assertions. + */ audience_uri: string; + /** + * The email domain(s) that should be routed through SSO. Multiple domains can be comma-separated (e.g., "company.com,company.co.uk"). + */ domain: string; + /** + * The URL of the company's SAML identity provider (IdP) login endpoint. + */ identity_provider_url: string; + /** + * The SSO login callback URL (Assertion Consumer Service URL). + */ sso_url: string; }; @@ -5279,7 +6394,7 @@ export type OnboardingTasks = { /** * CustomFieldDataEntryAccess * - * The data entry access of the custom field + * Who can enter or edit values for this custom field. Controls which users see the field as editable vs read-only. */ export type CustomFieldDataEntryAccess = | 'company_admin_only' @@ -5321,9 +6436,21 @@ export type UpdateIncentiveParams = CommonIncentiveParams & { * Parameters to upload a file */ export type FileParams = { + /** + * The unique identifier (UUID) of the employment to attach this file to. + */ employment_id: string; + /** + * The file content, base64-encoded. + */ file: Blob | File; + /** + * A more specific classification within the type (e.g., "ir_35" for a UK contractor tax determination). + */ sub_type?: string; + /** + * The broad category of the file (e.g., "contract", "id", "tax_form"). + */ type?: string; }; @@ -5436,13 +6563,29 @@ export type EmploymentCreationResponse = { * Parameters to complete onboarding */ export type CompleteOnboarding = { + /** + * The unique identifier (UUID) of the employment to complete onboarding for. + */ employment_id?: string; }; /** * EmploymentStatus * - * The status of employment + * The current status of the employment record. + * + * - `active`: The employee is fully onboarded and actively working. + * - `created`: The employment has been created but onboarding has not started. + * - `pre_hire`: A pre-hire employment record, created before formal onboarding begins. + * - `created_awaiting_reserve`: The employment is created but waiting for a risk reserve deposit to be paid. + * - `created_reserve_paid`: The risk reserve has been paid and the employment can proceed with onboarding. + * - `initiated`: Onboarding has been started by the employer. + * - `invited`: The employee has been invited to complete their self-enrollment on Remote. + * - `pending`: The employment is pending review or further action before it can become active. + * - `review`: The employment is under review by Remote (e.g., contract or compliance review). + * - `archived`: The employment has been terminated or offboarded. + * - `deleted`: The employment record has been deleted. + * */ export type EmploymentStatus = | 'active' @@ -5459,13 +6602,27 @@ export type EmploymentStatus = /** * CostCalculatorEmployment + * + * A cost estimate for a single employment, including costs in both the regional (local) currency and the employer's preferred currency. */ export type CostCalculatorEmployment = { country: MinimalCountry; + /** + * A link to Remote's guide on benefits available in this country. Null if not available. + */ country_benefits_details_url: string | null; + /** + * A link to Remote's country hiring guide. Null if not available. + */ country_guide_url: string | null; employer_currency_costs: CostCalculatorCosts; + /** + * Whether this country has extra statutory payments (e.g., 13th month salary in the Philippines). + */ has_extra_statutory_payment: boolean; + /** + * The minimum number of business days required to onboard an employee in this country. Null if not determined. + */ minimum_onboarding_time: number | null; region: MinimalRegion; regional_currency_costs: CostCalculatorCosts; @@ -5723,12 +6880,15 @@ export type UuidSlug = string; /** * CreateTimesheetParams * - * Params to create a timesheet + * Parameters for creating a new timesheet for an employee. The timesheet will be created in `open` status. Include one or more time tracking entries with clock-in/out times. */ export type CreateTimesheetParams = { employment_id: UuidSlug; end_date: Date; start_date: Date; + /** + * One or more time tracking entries to include in the timesheet. + */ time_trackings: Array; }; @@ -5750,9 +6910,17 @@ export type ImportJobRowError = { /** * EmployeeStats + * + * Enrollment statistics for a benefit at a given level (country, group, or tier). Shows how many employees have been offered the benefit versus how many are actively enrolled. */ export type EmployeeStats = { + /** + * The number of employees currently enrolled in this benefit. An enrolled employee has an active benefit record. + */ number_of_employees_enrolled: number; + /** + * The total number of employees who have been offered this benefit. An employee is counted as offered once a benefit offer record exists, regardless of whether they have enrolled. + */ number_of_employees_offered: number; }; @@ -5778,9 +6946,14 @@ export type PayItemParams = { /** * Job + * + * A job assigned to an employment, including its classification within the company's job architecture (family, sub-family, career track, level) and any custom field values. */ export type Job = { career_track?: JobAssociation; + /** + * An optional company-defined code for this job (e.g., "JOB-0"). Null if not set. + */ code?: string | null; custom_field_values?: Array<{ definition?: { @@ -5790,12 +6963,24 @@ export type Job = { }; value?: string | number | boolean; }>; + /** + * A description of the job's responsibilities and scope. Null if not set. + */ description?: string | null; + /** + * The unique identifier (UUID) of the job. + */ id: string; + /** + * A company-defined identifier for this job (e.g., "eng-001"). + */ identifier: string; job_family?: JobAssociation; job_level?: JobAssociation; job_sub_family?: JobAssociation; + /** + * The display name of the job (e.g., "Senior Backend Engineer"). + */ label: string; }; @@ -5811,9 +6996,12 @@ export type CustomNumberLinkable = { /** * Timesheet * - * Timesheet + * A timesheet represents an employee's recorded working hours for a specific date range. It contains aggregated hour totals and individual time tracking entries. Timesheets progress through a lifecycle: open (draft) -> submitted -> approved -> processed, or they may be sent back for revision. */ export type Timesheet = { + /** + * Whether this timesheet requires explicit approval before it can be processed. When false, the timesheet may be auto-approved based on the company's configuration. + */ approval_required: boolean; break_hours: HoursAndMinutes; country_code: CountryCode; @@ -5822,13 +7010,22 @@ export type Timesheet = { holiday_hours: HoursAndMinutes; id: UuidSlug; night_hours: HoursAndMinutes; + /** + * Optional notes added by the employee when submitting the timesheet. + */ notes: string | null; on_call_hours: HoursAndMinutes; overtime_hours: HoursAndMinutes; regular_hours: HoursAndMinutes; start_date: Date; status: TimesheetStatus; + /** + * The timestamp when the employee submitted this timesheet for approval. Null if the timesheet has not been submitted yet (status is `open`). + */ submitted_at: string | null; + /** + * The individual time tracking entries that make up this timesheet. + */ time_trackings: Array; timeoff_hours?: HoursAndMinutes; total_hours: HoursAndMinutes; @@ -5846,15 +7043,38 @@ export type Timesheet = { */ export type Benefit = { costs: Costs; + /** + * The date when benefit coverage ends (ISO 8601). + */ coverage_end_date: string; + /** + * The date when benefit coverage begins (ISO 8601). + */ coverage_start_date: string; + /** + * The unique identifier (UUID) of the benefit. + */ id: string; + /** + * The name of the benefit (e.g., "Health Insurance", "Dental Plan"). + */ name: string; projected_costs: Costs; provider: BenefitProvider; - status: 'offered' | 'enrolled' | 'waived'; - type: string; -}; + /** + * The enrollment status of this benefit for the employee. + * + * - `offered`: The benefit has been offered but the employee has not yet enrolled. + * - `enrolled`: The employee is actively enrolled in this benefit. + * - `waived`: The employee declined or opted out of this benefit. + * + */ + status: 'offered' | 'enrolled' | 'waived'; + /** + * The type/category of the benefit. + */ + type: string; +}; /** * BaseTokenResponse @@ -6007,6 +7227,9 @@ export type ListEmploymentCustomFieldValuePaginatedResponse = { * ResignationBeforeStartDateRequestParams */ export type ResignationBeforeStartDateRequestParams = { + /** + * Whether the employer accepts the employee's resignation. If false, notes are required explaining why. + */ proposed_resignation_accepted: boolean; /** * Required if `proposed_resignation_accepted` is set to false. @@ -6016,17 +7239,30 @@ export type ResignationBeforeStartDateRequestParams = { /** * SSOConfigurationDetails + * + * The SSO configuration details needed to set up your identity provider (IdP) to connect with Remote. */ export type SsoConfigurationDetails = { + /** + * The audience URI (Entity ID) for the SAML assertion. Configure this in your identity provider's SAML settings. + */ audience_uri: string; + /** + * The SSO login callback URL. Configure this as the Assertion Consumer Service (ACS) URL in your identity provider. + */ sso_url: string; }; /** * SuccessResponse + * + * A generic success response returned by operations that don't produce a specific resource (e.g., updates, deletes). */ export type SuccessResponse = { data: { + /** + * The result status. Always `"ok"` for successful operations. + */ status?: string; }; }; @@ -6043,14 +7279,14 @@ export type ManageContractorPlusSubscriptionOperationsParams = { /** * CustomFieldVisibilityScope * - * The visibility scope of the custom field + * Who can see this custom field and its values. Controls visibility across different user roles. */ export type CustomFieldVisibilityScope = 'company_admin_only' | 'everyone'; /** * TimeBreakdown * - * Time breakdown for a TimeTracking + * Detailed hours breakdown for a time tracking entry, split by time of day (day vs night) and then by type of day (regular, weekend, holiday). Useful for calculating overtime, night shift premiums, and holiday pay. */ export type TimeBreakdown = { day: TypeOfDayBreakdown; @@ -6086,20 +7322,58 @@ export type UpdateTravelLetterRequestParams = /** * TravelLetterRequest * - * Travel Letter Request + * A travel letter request submitted by an employee who needs a formal letter from their employer to support a visa or travel application. The request goes through a two-stage approval: first by the employer manager, then by Remote. */ export type TravelLetterRequest = { + /** + * Additional information provided by the employee about their travel plans. + */ additional_information: string; destination_country: Country; + /** + * The address of the embassy or consulate where the travel letter will be submitted. + */ embassy_address: string; employer_approver: TravelLetterUser; + /** + * Special instructions from the employer to include in the travel letter. Null if none provided. + */ employer_special_instructions: string | null; + /** + * The unique identifier (UUID) of the travel letter request. + */ id: string; + /** + * The purpose of the travel (e.g., business meeting, conference, client visit). + */ reason: string; + /** + * Whether the employee needs to provide a specific travel address (accommodation address at the destination). + */ requires_travel_address: boolean; + /** + * Who is responsible for accommodation costs during the trip. Set by the employer during approval. Null if not yet approved. + */ responsible_for_accommodation_cost: 'employee' | 'employer'; + /** + * Who is responsible for meal costs during the trip. Set by the employer during approval. Null if not yet approved. + */ responsible_for_meal_cost: 'employee' | 'employer'; + /** + * Who is responsible for transportation costs. Set by the employer during approval. Null if not yet approved. + */ responsible_for_travel_cost: 'employee' | 'employer'; + /** + * The current status of the travel letter request. + * + * - `pending`: Submitted by the employee and awaiting manager review. + * - `cancelled`: Cancelled by the employee before approval. + * - `declined_by_manager`: The employer manager declined the request. + * - `declined_by_remote`: Remote declined the request after manager approval (e.g., compliance reasons). + * - `approved_by_manager`: Approved by the employer manager, awaiting Remote's review. + * - `approved_by_remote`: Fully approved by both the manager and Remote. The travel letter will be generated. + * + */ status: | 'pending' | 'cancelled' @@ -6108,11 +7382,23 @@ export type TravelLetterRequest = { | 'approved_by_manager' | 'approved_by_remote'; submitted_at: DateTimeIso8601; + /** + * The employee's accommodation address at the destination. Null if `requires_travel_address` is false or not yet provided. + */ travel_address: string | null; travel_date_end: Date; travel_date_start: Date; + /** + * The employee's travel document (passport) number. + */ travel_document_number: string; + /** + * The category of travel reason selected by the employee. + */ travel_reason: string; + /** + * Detailed explanation of the travel reason provided by the employee. + */ travel_reason_details: string; user: TravelLetterUser; }; @@ -6120,7 +7406,7 @@ export type TravelLetterRequest = { /** * Resignation * - * Resignation + * Resignation details for an offboarding request. The shape depends on whether the employee resigned before or after their employment start date. */ export type Resignation = { resignation?: ResignationBeforeStartDate | ResignationAfterStartDate; @@ -6140,10 +7426,21 @@ export type EmployeeLeavePolicy = { /** * CreateSSOConfigurationParams + * + * Parameters for setting up SAML SSO for a company. Requires the email domain, identity provider URL, and the IdP's SAML signing certificate. */ export type CreateSsoConfigurationParams = { + /** + * The SAML signing certificate from your identity provider, base64-encoded. + */ certificate: Blob | File; + /** + * The email domain(s) to route through SSO (e.g., "example.com"). + */ domain: string; + /** + * The URL of the SAML identity provider login endpoint. + */ identity_provider_url: string; }; @@ -6293,20 +7590,35 @@ export type ImportJobRowsResponse = { /** * CostCalculatorDiscount * - * Allows to apply discounts to estimates + * Configuration for applying a discount to a cost estimate. Provide either an `amount` or `percent` — not both. */ export type CostCalculatorDiscount = { + /** + * The fixed discount amount in cents. Mutually exclusive with `percent`. + */ amount?: number; + /** + * The number of months the discount applies to (1-12). Defaults to 12. + */ months?: number; + /** + * The discount as a decimal fraction (e.g., 0.1 for 10%). Mutually exclusive with `amount`. + */ percent?: number; + /** + * The originally quoted amount before discount, in cents. + */ quoted_amount?: number; + /** + * A human-readable label for the discount (e.g., "10% Discount"). + */ text: string; }; /** * CreateEmploymentCustomFieldResponse * - * CreateEmploymentCustomFieldResponse + * Response returned after successfully creating a new custom field definition. */ export type CreateEmploymentCustomFieldResponse = { data: { @@ -6324,10 +7636,18 @@ export type Status = { /** * LeavePolicy + * + * The leave policy associated with a time off request. Policies define the rules and entitlements for specific types of leave. */ export type LeavePolicy = { + /** + * The unique identifier (slug) of the specific policy variant. + */ leave_policy_variant_slug: string; leave_type: TimeoffType; + /** + * The display name of the leave policy (e.g., "Self-Care", "Annual Leave"). + */ name: string; }; @@ -6339,6 +7659,9 @@ export type CompanyLegalEntity = { * ISO 3166-1 alpha-3 country code (e.g., 'USA', 'GBR', 'DEU') */ country_code?: string | null; + /** + * Whether Global Payroll services are enabled for this legal entity. + */ global_payroll_enabled: boolean; /** * Company slug @@ -6348,6 +7671,9 @@ export type CompanyLegalEntity = { * Indicates if this is the default legal entity for the company */ is_default?: boolean; + /** + * The registered name of the legal entity. + */ name: string; }; @@ -6406,10 +7732,25 @@ export type Company = { bank_account_details?: { [key: string]: unknown; }; + /** + * The email address of the company owner who administers the Remote account. + */ company_owner_email: string; + /** + * The full name of the company owner. Cannot be changed after company creation. + */ company_owner_name?: string; + /** + * The unique identifier (UUID) of the company owner's user account on Remote. + */ company_owner_user_id: string; + /** + * The ISO 3166-1 3-letter country code where the company is registered. + */ country_code: string; + /** + * The timestamp when the company was created on Remote. + */ created_at: string; /** * The credit risk status of the company default legal entity. @@ -6430,11 +7771,29 @@ export type Company = { | 'fail' | 'deposit_required' | 'no_deposit_required'; + /** + * The ISO 4217 currency code the company prefers for billing and invoicing (e.g., "USD", "EUR"). + */ desired_currency: string; + /** + * A unique reference code for this company in a non-Remote system. Null if not set. + */ external_id?: string | null; + /** + * The unique identifier (UUID) of the company. + */ id: string; + /** + * The company's registered name. Can only be changed while the company is in `pending` status. + */ name: string; + /** + * The company's contact phone number. + */ phone_number?: string; + /** + * The company's business registration number. Null if not provided. Can only be set while the company is in `pending` status. + */ registration_number?: string | null; /** * The company status determines what a company is allowed to do: @@ -6447,8 +7806,17 @@ export type Company = { * */ status: 'pending' | 'review' | 'active' | 'archived'; + /** + * The company's tax identification number. Null if not provided. Can only be set while the company is in `pending` status. + */ tax_number?: string | null; + /** + * The timestamp when the company owner accepted Remote's Terms of Service. + */ terms_of_service_accepted_at: string; + /** + * The timestamp when the company record was last updated. + */ updated_at: string; }; @@ -6477,9 +7845,14 @@ export type EmployeesProcessed = { /** * IdentityCompanyAccessTokenResponse + * + * Returned when the current token was obtained via the OAuth2 Authorization Code flow and is scoped to a specific company managed by an integration partner. Contains the full context: the integration's credentials, the company being accessed, and the user who authorized access. */ export type IdentityCompanyAccessTokenResponse = { data: { + /** + * The OAuth2 client ID of the integration partner that obtained this token. + */ client_id: string; company: IdentityCompany; integration: IdentityIntegration; @@ -6499,11 +7872,20 @@ export type PayValue = { /** * TravelLetterUser * - * Travel Letter User + * A user associated with a travel letter request (either the employee or the employer approver). */ export type TravelLetterUser = { + /** + * The user's email address. + */ email: string; + /** + * The unique identifier (UUID) of the user. + */ id: string; + /** + * The user's full name. + */ name: string; } | null; @@ -6524,6 +7906,15 @@ export type UnifiedEmploymentBenefitOffer = { /** * TimesheetStatus + * + * The current status of a timesheet in its lifecycle. + * + * - `open`: The timesheet is a draft and only visible to the employee. It has not been submitted yet. + * - `submitted`: The employee has submitted the timesheet for review. It is awaiting approval. + * - `approved`: The timesheet has been approved and will be included in the next payroll run. + * - `in_calibration`: The timesheet was sent back to the employee for revision. The employee needs to correct and resubmit it. + * - `processed`: The timesheet has been processed as part of a payroll run. This is a terminal state. + * */ export type TimesheetStatus = | 'open' @@ -6610,6 +8001,9 @@ export type TimeoffEntitlement = { * */ expiry_date: string | null; + /** + * A human-readable name for this entitlement (e.g., "Annual paid time off", "Extra days for good performance"). Null for the default contractual entitlement. + */ name: string | null; /** * Indicates how much time off the employment has remaining in this entitlement. @@ -6638,6 +8032,8 @@ export type TimeoffEntitlement = { /** * TooManyRequestsResponse + * + * Returned when the API rate limit has been exceeded (HTTP 429). Wait before retrying. Check the `Retry-After` response header for the recommended wait time. */ export type TooManyRequestsResponse = { message?: string; @@ -6748,7 +8144,7 @@ export type CreateRecurringIncentiveParams = CommonIncentiveParams & { /** * UploadFileResponse * - * A supported file + * Response returned after successfully uploading a file. */ export type UploadFileResponse = { data?: { @@ -6758,9 +8154,17 @@ export type UploadFileResponse = { /** * IdentityCompany + * + * The company that the current authentication token is scoped to. Only present when using a company-scoped access token or customer API token. */ export type IdentityCompany = { + /** + * The unique identifier (UUID) of the company. Use this ID when making subsequent API calls that require a company reference. + */ id: string; + /** + * The registered name of the company on the Remote platform. + */ name: string; }; @@ -6779,8 +8183,13 @@ export type CreateGeneralCustomFieldDefinitionParams = { /** * ConflictResponse + * + * Returned when the request conflicts with the current state of a resource (HTTP 409). For example, trying to create a resource that already exists or performing an action that requires the resource to be in a different state. */ export type ConflictResponse = { + /** + * A human-readable message describing the conflict and the expected state. + */ message?: string; }; @@ -6806,10 +8215,18 @@ export type ContractorEligibilityResponse = { /** * CountrySummariesResponse + * + * Response containing a company's benefit offering summaries broken down by country. Each country includes aggregate enrollment statistics and details of all offered benefit groups and tiers. */ export type CountrySummariesResponse = { data: { + /** + * The unique identifier (UUID) of the company these benefit summaries belong to. + */ company_id: string; + /** + * Benefit offering summaries for each country where the company has employees. + */ country_summaries: Array; }; }; @@ -6853,8 +8270,13 @@ export type ListSignatory = { /** * WebhookCallback + * + * A registered webhook callback endpoint. Remote sends HTTP POST requests to the configured URL when subscribed events occur. */ export type WebhookCallback = { + /** + * The unique identifier (UUID) of the webhook callback. + */ id: string; /** * This key will be used to sign the signature provided with webhook requests we @@ -6903,7 +8325,10 @@ export type WebhookCallback = { | 'employment.contractor_of_record_termination.initiated' | 'employment.details.updated' | 'employment.employment_agreement.available' + | 'employment.cor_hiring.invoice_created' | 'employment.eor_hiring.invoice_created' + | 'employment.cor_hiring.proof_of_payment_accepted' + | 'employment.cor_hiring.proof_of_payment_submitted' | 'employment.eor_hiring.proof_of_payment_accepted' | 'employment.eor_hiring.proof_of_payment_submitted' | 'employment.no_longer_eligible_for_onboarding_cancellation' @@ -6972,6 +8397,9 @@ export type WebhookCallback = { | 'work_authorization.declined_by_remote' | 'work_authorization.requested' >; + /** + * The HTTPS URL where Remote will send webhook event payloads. + */ url: string; }; @@ -6980,18 +8408,26 @@ export type MaybeAccountsAccount = AccountsAccount | null; /** * TimeoffDay * - * TimeoffDay schema + * A single day within a time off request, specifying the date and the number of hours taken off that day. */ export type TimeoffDay = { day: Date; + /** + * The number of hours taken off on this day (e.g., 8 for a full day, 4 for a half day). + */ hours: number; }; /** * BadRequestResponse + * + * Returned when the request is malformed or contains invalid parameters. The message may be a simple string or a structured object with a code and detailed message. */ export type BadRequestResponse = | { + /** + * A human-readable error message describing what was wrong with the request. + */ message: string; } | { @@ -7050,9 +8486,12 @@ export type ListPayslipsResponse = { /** * SendBackTimesheetParams * - * Params to send a timesheet back to the employee for review or modification + * Parameters for sending a submitted timesheet back to the employee for revision. The timesheet status will change to `in_calibration` and the employee will be notified. */ export type SendBackTimesheetParams = { + /** + * A required explanation of why the timesheet is being sent back. This will be visible to the employee. + */ sent_back_reason: string; }; @@ -7096,10 +8535,16 @@ export type AccountsUser = /** * CompanyCurrency * - * Company currency + * A currency available for use by a company on the Remote platform. */ export type CompanyCurrency = { + /** + * The ISO 4217 currency code (e.g., "USD", "EUR"). + */ code: string; + /** + * A URL-friendly identifier for the currency (e.g., "usd", "eur"). + */ slug: string; }; @@ -7139,6 +8584,8 @@ export type ContractorCurrencyItem = { /** * UnauthorizedResponse + * + * Returned when the request does not include valid authentication credentials. Ensure you are passing a valid OAuth2 access token or API token in the Authorization header. */ export type UnauthorizedResponse = { message: string; @@ -7150,6 +8597,9 @@ export type UnauthorizedResponse = { * Selected type of payment. */ export type PricingPlanDetails = { + /** + * How often Remote bills the employer for management fees. Annual billing typically offers a discount. + */ frequency: 'annually' | 'monthly'; }; @@ -7225,23 +8675,37 @@ export type UpdateCompanyParams = { /** * ResignationBeforeStartDate + * + * Resignation details for an employee who resigned before their employment start date. Contains basic contract and resignation information only. */ export type ResignationBeforeStartDate = { + /** + * The job title from the employee's contract. + */ contract_job_title: string; + /** + * The original start date from the employee's contract. + */ contract_start_date: string; /** - * UTC date + * The date the employee submitted their resignation (UTC). */ resignation_date: string; + /** + * A human-readable label describing the reason for resignation (e.g., "Decided not to join before starting"). + */ resignation_reason_label: string; }; /** * DraftExpense * - * Draft expense + * A draft expense that the employee has saved but not yet submitted for approval. Draft expenses may have incomplete (null) data since the employee hasn't finalized them yet. All monetary amounts are integers in the currency's minor unit (cents) when present. */ export type DraftExpense = { + /** + * The expense amount in the original currency, in cents. Null if not yet entered. + */ amount: number | null; /** * Categories allowed for an expense (legacy, deprecated) @@ -7275,10 +8739,19 @@ export type DraftExpense = { | 'home_office' | 'phone_utilities' | 'travel'; + /** + * The converted expense amount in the company's billing currency, in cents. Null if not yet calculated. + */ converted_amount: number | null; converted_currency: CurrencyDefinition | null; + /** + * The converted tax portion, in cents. Null if not yet calculated. + */ converted_tax_amount: number | null; currency: CurrencyDefinition | null; + /** + * The unique identifier (UUID) of the employment this expense belongs to. + */ employment_id: string; /** * New hierarchical expense category (recommended) @@ -7297,23 +8770,66 @@ export type DraftExpense = { */ title?: string; } | null; + /** + * The date the expense was incurred. May be null in drafts. + */ expense_date: string | null; + /** + * The unique identifier (UUID) of the draft expense. + */ id: string; + /** + * Not applicable for draft expenses. Always null. + */ invoice_period?: string | null; + /** + * Optional additional notes about the expense. + */ notes?: string | null; + /** + * Not applicable for draft expenses. Always null. + */ reason?: string | null; + /** + * Uploaded receipt files. May be empty for drafts. Maximum 5 receipts. + */ receipts?: Array; + /** + * Not applicable for draft expenses. Always null. + */ reviewed_at?: string | null; + /** + * Not applicable for draft expenses. Always null. + */ reviewer?: { + /** + * The reviewer's email address. + */ user_email?: string; + /** + * The unique identifier of the reviewer. + */ user_id?: string; + /** + * The reviewer's full name. + */ user_name?: string; } | null; /** - * Draft status + * The draft status. + * + * - `draft`: The expense is saved as a draft by the employee and not submitted for approval. + * - `archived`: The draft was soft-deleted by the employee. + * */ status?: 'draft' | 'archived'; + /** + * The tax portion in the original currency, in cents. Null if not yet entered. + */ tax_amount: number | null; + /** + * A short description of the expense. May be null in drafts. + */ title: string | null; }; @@ -7347,10 +8863,21 @@ export type BulkImportImportJobStage = /** * IdentityIntegration + * + * Details about the integration partner associated with the current authentication token. */ export type IdentityIntegration = { + /** + * The primary contact email address registered for this integration partner. + */ contact_email: string; + /** + * The human-readable display name of the integration partner, as shown to users. + */ display_name: string; + /** + * The unique machine-readable identifier for the integration partner. Used internally to reference this integration. + */ name: string; }; @@ -7431,6 +8958,9 @@ export type ContractorInvoiceScheduleCreateResponseFailure = { * IdsRequiredParams */ export type IdsRequiredParams = { + /** + * A list of webhook event IDs to replay. + */ ids: Array; }; @@ -7524,11 +9054,20 @@ export type TimeoffTypesEmploymentType = 'contractor' | 'full_time'; /** * WorkAuthorizationUser * - * Work Authorization User + * A user associated with a work authorization request (either the employee or the employer approver). */ export type WorkAuthorizationUser = { + /** + * The user's email address. + */ email: string; + /** + * The unique identifier (UUID) of the user. + */ id: string; + /** + * The user's full name. + */ name: string; } | null; @@ -7538,11 +9077,23 @@ export type WorkAuthorizationUser = { * SignContractDocument schema */ export type SignContractDocument = { + /** + * The signer's full legal name as their electronic signature. + */ signature: string; }; /** * ContractAmendmentStatus + * + * The current status of a contract amendment request. + * + * - `submitted`: The amendment has been submitted and is awaiting Remote's review. + * - `in_review`: Remote is reviewing the amendment for compliance and feasibility. + * - `done`: The amendment has been approved and applied to the contract. + * - `canceled`: The amendment request was canceled before completion. + * - `deleted`: The amendment request was deleted. + * */ export type ContractAmendmentStatus = | 'submitted' @@ -7580,11 +9131,20 @@ export type ErrorResponse = { /** * ListEmploymentCustomFieldValueResponse * - * ListEmploymentCustomFieldValueResponse + * A custom field value as returned in list responses, including the field definition details alongside the value. */ export type ListEmploymentCustomFieldValueResponse = { + /** + * The unique identifier (UUID) of the custom field definition. + */ custom_field_id: string; + /** + * The display name of the custom field. + */ name: string; + /** + * The data type of the custom field (e.g., "string", "integer", "single_select"). + */ type: string; value: | string @@ -7610,6 +9170,9 @@ export type ListEmploymentCustomFieldValueResponse = { * */ export type ParamsToCreateExpense = { + /** + * The expense amount in the specified currency, in cents. + */ amount: number; /** * Categories allowed for an expense (legacy, deprecated).
@@ -7671,8 +9234,14 @@ export type ParamsToCreateExpense = { * If the person reviewing the expense is a user in Remote, you can provide its user id for this field. If a value is not provided, defaults to the user that generated the API token. */ reviewer_id?: string; + /** + * The tax portion of the expense amount, in cents. Use 0 if no tax applies. + */ tax_amount?: number; timezone?: Timezone; + /** + * A short description of the expense (e.g., "New keyboard", "Team dinner"). + */ title: string; }; @@ -7733,15 +9302,38 @@ export type ActionErrors = Array; /** * WorkAuthorizationRequest * - * Schema for work authorization request + * A work authorization request submitted by an employee who needs authorization to work in a different country. Similar to a travel letter request but specifically for work authorization purposes. */ export type WorkAuthorizationRequest = { + /** + * Additional information provided by the employee about their work authorization needs. + */ additional_information: string; destination_country: Country; employer_approver: WorkAuthorizationUser; + /** + * Special instructions from the employer. Null if none provided. + */ employer_special_instructions: string | null; + /** + * The unique identifier (UUID) of the work authorization request. + */ id: string; + /** + * The reason for the work authorization request. + */ reason: string; + /** + * The current status of the work authorization request. + * + * - `pending`: Submitted and awaiting manager review. + * - `cancelled`: Cancelled by the employee. + * - `declined_by_manager`: Declined by the employer manager. + * - `declined_by_remote`: Declined by Remote after manager approval. + * - `approved_by_manager`: Approved by the manager, awaiting Remote's review. + * - `approved_by_remote`: Fully approved by both manager and Remote. + * + */ status: | 'pending' | 'cancelled' @@ -7752,9 +9344,18 @@ export type WorkAuthorizationRequest = { submitted_at: DateTimeIso8601; travel_date_end: Date; travel_date_start: Date; + /** + * The employee's travel document (passport) number. + */ travel_document_number: string; user: WorkAuthorizationUser; + /** + * Whether the employee will negotiate or sign contracts on behalf of the company in the destination country. This may affect the type of work authorization required. + */ will_negotiate_or_sign_contracts: boolean | null; + /** + * The specific work location or address in the destination country. Null if not specified. + */ work_location: string | null; }; @@ -7840,11 +9441,11 @@ export type CreateCustomFieldDefinitionParams = */ export type CostCalculatorBenefitParam = { /** - * Benefit Group Slug + * The unique identifier (slug) of the benefit group to include in the estimate. */ benefit_group_slug: string; /** - * Benefit Tier Slug + * The unique identifier (slug) of the benefit tier within the group. Determines the level of coverage and cost. */ benefit_tier_slug: string; }; @@ -7868,11 +9469,25 @@ export type EmploymentFederalTaxesParams = { /** * BenefitTier + * + * A specific coverage level within a benefit group. For example, a "Health" benefit group might have tiers like "Basic", "Standard", and "Premium", each with different coverage and providers. */ export type BenefitTier = { + /** + * A detailed description of what this tier covers, including the types of benefits included. + */ description: string; + /** + * The unique identifier (UUID) of the benefit tier. + */ id: string; + /** + * The name of this tier (e.g., "Premium 2024 (Medical, Dental and Vision)"). + */ name: string; + /** + * The insurance carriers or providers associated with this tier. + */ providers: Array; }; @@ -7887,17 +9502,29 @@ export type ScheduleId = string; * TerminationDetailsParams */ export type TerminationDetailsParams = { + /** + * Whether the employer acknowledges and agrees to follow Remote's termination procedure for this jurisdiction. + */ acknowledge_termination_procedure?: boolean | null; /** * Additional details regarding the termination process. */ additional_comments?: string | null; + /** + * Whether the employer agrees with the employee's current paid time off balance. If false, you may provide a timesheet file documenting any discrepancies. + */ agrees_to_pto_amount?: boolean | null; + /** + * Additional notes about the PTO balance, especially if there are discrepancies. + */ agrees_to_pto_amount_notes?: string | null; /** * Confidential requests are visible for who authorized the token or integration. Non-confidential requests are visible to all admins in the company. */ confidential: boolean; + /** + * Whether the employer has already informed the employee about the termination. Remote advises not informing the employee until the request has been reviewed for legal risks. + */ customer_informed_employee?: boolean | null; /** * Remote advises not to inform the employee of their termination until we review your request for legal risks. When we approve your request, you can inform the employee and we’ll take it from there. This field is only required if employee was informed before creating the offboarding request. @@ -8190,6 +9817,9 @@ export type CreateSsoConfigurationResult = { * Benefit Renewal Request Form */ export type BenefitRenewalRequestsCreateBenefitRenewalRequest = { + /** + * The unique identifier (UUID) of the benefit group to create a renewal request for. + */ benefit_group_id: string; }; @@ -8258,15 +9888,29 @@ export type ListIncentivesResponse = { * Probation completion letter file */ export type ProbationCompletionLetterFile = { + /** + * The unique identifier (UUID) of the file. + */ id: string; inserted_at: DateTimeIso8601; + /** + * The file name including extension (e.g., "id.pdf", "contract.pdf"). + */ name: string; + /** + * A more specific classification of the file within its type (e.g., "personal_id" within type "id", or "ir_35" within type "contract"). Null if no sub-type applies. + */ sub_type?: string | null; + /** + * The broad category of the file (e.g., "id", "contract", "tax_form"). + */ type: string; } | null; /** * GenericFile + * + * A file represented as a base64-encoded string. */ export type GenericFile = Blob | File; @@ -8330,7 +9974,10 @@ export type UpdateWebhookCallbackParams = { | 'employment.contractor_of_record_termination.initiated' | 'employment.details.updated' | 'employment.employment_agreement.available' + | 'employment.cor_hiring.invoice_created' | 'employment.eor_hiring.invoice_created' + | 'employment.cor_hiring.proof_of_payment_accepted' + | 'employment.cor_hiring.proof_of_payment_submitted' | 'employment.eor_hiring.proof_of_payment_accepted' | 'employment.eor_hiring.proof_of_payment_submitted' | 'employment.no_longer_eligible_for_onboarding_cancellation' @@ -8402,6 +10049,32 @@ export type UpdateWebhookCallbackParams = { url?: string; }; +/** + * EngagementAgreementDetailsResponse + * + * Engagement agreement details JSON Schema response + */ +export type EngagementAgreementDetailsResponse = { + data?: { + /** + * Field-level permissions + */ + permissions?: { + [key: string]: unknown; + }; + /** + * The JSON Schema + */ + schema?: { + [key: string]: unknown; + }; + /** + * Schema version number + */ + version?: number; + }; +}; + /** * TimeoffType */ @@ -8485,6 +10158,8 @@ export type ProbationExtensionResponse = { /** * Decimal + * + * A decimal number represented as a string to preserve precision. Supports negative values and fractional digits. */ export type Decimal = string; @@ -8509,7 +10184,7 @@ export type ListExpenseCategoriesResponse = { /** * Price * - * Price + * A monetary amount with its currency, used for pricing plan costs. */ export type Price = { /** @@ -8557,9 +10232,14 @@ export type MessageResponse = { /** * IdentityClientCredentialsResponse + * + * Returned when the current token was obtained via the OAuth2 Client Credentials flow. Contains the integration's client ID and details, but no company or user information since client credentials tokens are not scoped to a specific company. */ export type IdentityClientCredentialsResponse = { data: { + /** + * The OAuth2 client ID used to obtain this token. + */ client_id: string; integration: IdentityIntegration; }; @@ -8590,14 +10270,29 @@ export type CreateContractAmendmentParams = { /** * ProbationExtension * - * Probation Extension + * A request to extend an employee's probation period. Requires Remote's review for compliance with local labor laws. */ export type ProbationExtension = { + /** + * The unique identifier (UUID) of the employment. + */ employment_id: string; + /** + * The unique identifier (UUID) of the probation extension request. + */ id: string; + /** + * The unique identifier (UUID) of the user who submitted the request. + */ requested_by: string; status: ProbationExtensionStatus; + /** + * The timestamp when the extension request was submitted. + */ submitted_at: string; + /** + * A link to the support ticket for this extension, if one was created. Null otherwise. + */ zendesk_ticket_url: string | null; }; @@ -8616,11 +10311,20 @@ export type CompanyNotEligibleForCreationErrorResponse = { /** * MinimalContractAmendment * - * Minimal Contract Amendment + * A lightweight contract amendment representation used in list responses. */ export type MinimalContractAmendment = { + /** + * The unique identifier (UUID) of the employment. + */ employment_id: string; + /** + * The unique identifier (UUID) of the contract amendment. + */ id: string; + /** + * The current job title from the employment's contract. + */ job_title?: string; reason_for_change: | 'annual_pay_adjustment' @@ -8629,9 +10333,18 @@ export type MinimalContractAmendment = { | 'job_change_reevaluation' | 'promotion' | 'other'; + /** + * The unique identifier (UUID) of the user who submitted the amendment request. + */ requested_by: string; + /** + * The date when the amendment changes should take effect. + */ requested_effective_date: string; status: ContractAmendmentStatus; + /** + * The timestamp when the amendment was submitted. + */ submitted_at: string; }; @@ -8725,9 +10438,12 @@ export type DeclineExpenseParams = { /** * EmploymentCustomFieldValue * - * EmploymentCustomFieldValue + * The value of a custom field for a specific employment. The type of `value` depends on the custom field's data type. */ export type EmploymentCustomFieldValue = { + /** + * The unique identifier (UUID) of the custom field definition this value belongs to. + */ custom_field_id: string; value: | string @@ -8756,20 +10472,57 @@ export type RequestError = { /** * Timeoff + * + * A time off record for an employee, representing a period of leave (e.g., vacation, sick leave, parental leave). */ export type Timeoff = { + /** + * The timestamp when the time off was approved. Null if not yet approved. + */ approved_at?: string | null; approver_id?: NullableApproverId; + /** + * Whether this time off was automatically created by the system (e.g., public holidays) rather than requested by the employee. + */ automatic?: boolean; + /** + * The reason provided when the time off was cancelled. Null if not cancelled. + */ cancel_reason?: string | null; cancelled_at?: NullableDateTime; document?: File; + /** + * The unique identifier (UUID) of the employment this time off belongs to. + */ employment_id: string; + /** + * The last day of the time off period (ISO 8601 date). + */ end_date: string; + /** + * The unique identifier (UUID) of the time off record. + */ id: string; leave_policy: LeavePolicy; + /** + * Optional notes provided by the employee when requesting the time off. + */ notes?: string | null; + /** + * The first day of the time off period (ISO 8601 date). + */ start_date: string; + /** + * The current status of a time off request. + * + * - `requested`: The employee has submitted a time off request and it is awaiting approval. + * - `approved`: The time off request has been approved by a manager. + * - `cancelled`: The time off request was cancelled by the employee or an admin. + * - `declined`: The time off request was declined by a manager. + * - `taken`: The approved time off has been taken (the dates have passed). + * - `cancel_requested`: The employee has requested cancellation of a previously approved time off, pending manager approval. + * + */ status: | 'requested' | 'approved' @@ -8777,6 +10530,9 @@ export type Timeoff = { | 'declined' | 'taken' | 'cancel_requested'; + /** + * The individual days and hours within this time off period. + */ timeoff_days: Array; timeoff_type: TimeoffType; timezone: Timezone; @@ -8849,6 +10605,9 @@ export type EmploymentCreateParams = { * This optional field is deprecated. */ company_id?: string; + /** + * The ISO 3166-1 3-letter country code where the employee will be based (e.g., `AUS`, `GBR`, `USA`). + */ country_code: string; /** * This field is required to create a global payroll employee. @@ -8867,20 +10626,35 @@ export type EmploymentCreateParams = { /** * TimeTracking * - * Time tracking schema + * A single time tracking entry within a timesheet, representing a block of work with clock-in/out times. Includes detailed breakdowns of hours by type (regular, overtime, night, weekend, holiday). */ export type TimeTracking = { clock_in: DateTimeIso8601; clock_out: DateTimeIso8601; + /** + * Whether this time tracking entry includes any hours worked on public holidays. + */ has_holiday_hours: boolean; + /** + * Whether this time tracking entry includes any hours worked during night hours. + */ has_night_hours: boolean; + /** + * Whether this time tracking entry includes any hours worked on weekends. + */ has_weekend_hours: boolean; holiday_hours: HoursAndMinutes; night_hours: HoursAndMinutes; + /** + * Optional free-text notes about this time tracking entry, such as project or task details. + */ notes: string | null; time_breakdown: TimeBreakdown; timezone: Timezone; total_hours: HoursAndMinutes; + /** + * The category of time being tracked (e.g., regular hours, overtime, on-call, break time). + */ type: | 'regular_hours' | 'overtime' @@ -8904,6 +10678,16 @@ export type CustomDate = { /** * TimeoffStatus + * + * The current status of a time off request. + * + * - `requested`: The employee has submitted a time off request and it is awaiting approval. + * - `approved`: The time off request has been approved by a manager. + * - `cancelled`: The time off request was cancelled by the employee or an admin. + * - `declined`: The time off request was declined by a manager. + * - `taken`: The approved time off has been taken (the dates have passed). + * - `cancel_requested`: The employee has requested cancellation of a previously approved time off, pending manager approval. + * */ export type TimeoffStatus = | 'approved' @@ -8951,6 +10735,8 @@ export type ContractorInvoiceScheduleItem = { /** * ForbiddenResponse + * + * Returned when the authenticated user or token does not have permission to perform the requested action. Check that the token has the required OAuth2 scopes and that the user has the necessary role. */ export type ForbiddenResponse = { message: string; @@ -8958,20 +10744,49 @@ export type ForbiddenResponse = { /** * ResignationAfterStartDate + * + * Resignation details for an employee who resigned after their employment start date. Includes contract terms, notice period calculations, and PTO breakdown needed for the employer to validate the resignation. */ export type ResignationAfterStartDate = { + /** + * The ISO 4217 currency code of the employee's contract (used for any reimbursement calculations). + */ contract_currency_code: string; + /** + * The job title from the employee's contract. + */ contract_job_title: string; + /** + * Whether the employee's probation period has passed. Affects notice period requirements in many jurisdictions. + */ contract_proabtion_period_passed: boolean; + /** + * The end date of the employee's probation period. Null if the contract has no probation period. + */ contract_probation_period_end_date: string | null; + /** + * The original start date from the employee's contract. + */ contract_start_date: string; + /** + * The number of calendar days of notice required based on the contract terms and local labor laws. + */ days_of_notice: number; + /** + * Human-readable breakdown of the employee's paid time off usage and balance (e.g., "Used until today: 60 days", "Waiting for approval: 0 days"). + */ paid_timeoffs_breakdown_labels: Array; + /** + * The employee's proposed last working day, calculated based on the notice period and local labor laws. + */ proposed_last_day: string; /** - * UTC date + * The date the employee submitted their resignation (UTC). */ resignation_date: string; + /** + * A human-readable label describing the reason for resignation (e.g., "Retirement", "Other job opportunity"). + */ resignation_reason_label: string; }; @@ -9040,7 +10855,7 @@ export type WebhookCallbackResponse = { /** * EmploymentResponse * - * Complete information of an employment + * Response containing the full employment record after an update operation. */ export type EmploymentResponse = { data: { @@ -9051,9 +10866,12 @@ export type EmploymentResponse = { /** * Expense * - * Expense + * A submitted expense record with complete data. All monetary amounts are integers in the currency's minor unit (cents). */ export type Expense = { + /** + * The expense amount in the original currency, in cents. + */ amount: number; /** * Categories allowed for an expense (legacy, deprecated) @@ -9087,10 +10905,19 @@ export type Expense = { | 'home_office' | 'phone_utilities' | 'travel'; + /** + * The expense amount converted to the company's billing currency, in cents. + */ converted_amount: number; converted_currency: CurrencyDefinition; + /** + * The tax portion converted to the company's billing currency, in cents. + */ converted_tax_amount: number; currency: CurrencyDefinition; + /** + * The unique identifier (UUID) of the employment this expense belongs to. + */ employment_id: string; /** * New hierarchical expense category (recommended) @@ -9109,20 +10936,61 @@ export type Expense = { */ title?: string; } | null; + /** + * The date the expense was incurred (ISO 8601 format). Must be in the past. + */ expense_date: string; + /** + * The unique identifier (UUID) of the expense. + */ id: string; + /** + * The payroll invoice period this expense is associated with, in YYYY-MM format. Null if not yet assigned to a payroll period. + */ invoice_period?: string | null; + /** + * Optional additional notes or context about the expense. + */ notes?: string | null; + /** + * The reason provided when the expense was declined. Null for non-declined expenses. + */ reason?: string | null; + /** + * Uploaded receipt files for this expense. Maximum 5 receipts. + */ receipts?: Array; + /** + * The date the expense was reviewed. Null if not yet reviewed. + */ reviewed_at?: string | null; + /** + * The person who reviewed (approved or declined) this expense. Null if not yet reviewed. + */ reviewer?: { + /** + * The reviewer's email address. + */ user_email?: string; + /** + * The unique identifier of the reviewer. + */ user_id?: string; + /** + * The reviewer's full name. + */ user_name?: string; } | null; /** - * Expense status + * The current status of the expense. + * + * - `pending`: Submitted and awaiting approval. + * - `approved`: Approved by a reviewer and queued for reimbursement. + * - `declined`: Declined by a reviewer. See `reason` for details. + * - `canceled`: Canceled by the employee before approval. + * - `processing`: Being processed as part of a payroll run. + * - `reimbursed`: Successfully reimbursed to the employee. + * */ status?: | 'canceled' @@ -9131,7 +10999,13 @@ export type Expense = { | 'approved' | 'processing' | 'reimbursed'; + /** + * The tax portion of the expense amount in the original currency, in cents. + */ tax_amount: number; + /** + * A short description of the expense (e.g., "New keyboard", "Team dinner"). + */ title: string; }; @@ -9188,9 +11062,12 @@ export type CorTerminationRequestResponse = { /** * ContractDocument * - * ContractDocument schema + * A contract document for a contractor employment, tracking its signing status. */ export type ContractDocument = { + /** + * The unique identifier (UUID) of the contract document. + */ id: string; status: ContractorContractDocumentStatus; }; @@ -9301,13 +11178,33 @@ export type ContractorInvoice = { /** * BillingDocumentAmountItem + * + * A line item on a billing document, representing a specific cost category (e.g., base salary, allowances, taxes) for an employment. */ export type BillingDocumentAmountItem = { + /** + * The amount for this line item in the billing document currency, in cents. + */ billing_document_amount: number; + /** + * The ISO 4217 currency code of the billing document. + */ billing_document_currency: string | null; + /** + * The unique identifier (UUID) of the employment this line item relates to. Null for company-level charges. + */ employment_id?: string | null; + /** + * The original amount in the source (local) currency, in cents. May differ from billing_document_amount due to currency conversion. + */ source_amount?: number; + /** + * The ISO 4217 currency code of the source (local) currency. Null if same as billing document currency. + */ source_currency?: string | null; + /** + * The cost category for this line item (e.g., "base_salary", "allowances", "bonuses", "deductions", "taxes"). + */ type: string; }; @@ -9375,41 +11272,17 @@ export type ContractorInvoiceScheduleCreateResponseSuccess = { start_date: string; }; -export type GetIndexOffboardingData = { - body?: never; +export type PostConvertWithSpreadCurrencyConverter2Data = { + /** + * Convert currency parameters + */ + body: ConvertCurrencyParams; 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; - /** - * Change the amount of records returned per page, defaults to 20, limited to 100 - */ - page_size?: number; - }; - url: '/v1/offboardings'; + query?: never; + url: '/api/eor/v1/currency-converter'; }; -export type GetIndexOffboardingErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostConvertWithSpreadCurrencyConverter2Errors = { /** * Unauthorized */ @@ -9422,88 +11295,72 @@ export type GetIndexOffboardingErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetIndexOffboardingError = - GetIndexOffboardingErrors[keyof GetIndexOffboardingErrors]; +export type PostConvertWithSpreadCurrencyConverter2Error = + PostConvertWithSpreadCurrencyConverter2Errors[keyof PostConvertWithSpreadCurrencyConverter2Errors]; -export type GetIndexOffboardingResponses = { +export type PostConvertWithSpreadCurrencyConverter2Responses = { /** * Success */ - 200: ListOffboardingResponse; + 200: ConvertCurrencyResponse; }; -export type GetIndexOffboardingResponse = - GetIndexOffboardingResponses[keyof GetIndexOffboardingResponses]; +export type PostConvertWithSpreadCurrencyConverter2Response = + PostConvertWithSpreadCurrencyConverter2Responses[keyof PostConvertWithSpreadCurrencyConverter2Responses]; -export type PostCreateOffboardingData = { - /** - * Offboarding - */ - body?: CreateOffboardingParams; - path?: never; +export type GetIndexSubscriptionData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/offboardings'; + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-subscriptions'; }; -export type PostCreateOffboardingErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetIndexSubscriptionErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; + 403: ForbiddenResponse; /** - * Internal Server Error + * Not Found */ - 500: RequestError; + 404: NotFoundResponse; }; -export type PostCreateOffboardingError = - PostCreateOffboardingErrors[keyof PostCreateOffboardingErrors]; +export type GetIndexSubscriptionError = + GetIndexSubscriptionErrors[keyof GetIndexSubscriptionErrors]; -export type PostCreateOffboardingResponses = { +export type GetIndexSubscriptionResponses = { /** * Success */ - 201: OffboardingResponse; + 200: ContractorSubscriptionSummariesResponse; }; -export type PostCreateOffboardingResponse = - PostCreateOffboardingResponses[keyof PostCreateOffboardingResponses]; +export type GetIndexSubscriptionResponse = + GetIndexSubscriptionResponses[keyof GetIndexSubscriptionResponses]; -export type GetShowTimesheetData = { - body?: never; - path: { - /** - * Timesheet ID - */ - id: string; - }; +export type PostConvertRawCurrencyConverterData = { + /** + * Convert currency parameters + */ + body: ConvertCurrencyParams; + path?: never; query?: never; - url: '/v1/timesheets/{id}'; + url: '/api/eor/v1/currency-converter/raw'; }; -export type GetShowTimesheetErrors = { +export type PostConvertRawCurrencyConverterErrors = { /** * Unauthorized */ @@ -9518,67 +11375,97 @@ export type GetShowTimesheetErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowTimesheetError = - GetShowTimesheetErrors[keyof GetShowTimesheetErrors]; +export type PostConvertRawCurrencyConverterError = + PostConvertRawCurrencyConverterErrors[keyof PostConvertRawCurrencyConverterErrors]; -export type GetShowTimesheetResponses = { +export type PostConvertRawCurrencyConverterResponses = { /** * Success */ - 200: TimesheetResponse; + 200: ConvertCurrencyResponse; }; -export type GetShowTimesheetResponse = - GetShowTimesheetResponses[keyof GetShowTimesheetResponses]; +export type PostConvertRawCurrencyConverterResponse = + PostConvertRawCurrencyConverterResponses[keyof PostConvertRawCurrencyConverterResponses]; -export type PostUpdateCancelOnboardingData = { +export type GetIndexIncentiveData = { 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; }; + path?: never; query?: { /** - * Whether the request should be performed async - * + * Filter by Employment ID */ - async?: boolean; + 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/cancel-onboarding/{employment_id}'; + url: '/api/eor/v1/incentives'; }; -export type PostUpdateCancelOnboardingErrors = { +export type GetIndexIncentiveErrors = { /** * Bad Request */ 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostUpdateCancelOnboardingError = - PostUpdateCancelOnboardingErrors[keyof PostUpdateCancelOnboardingErrors]; +export type GetIndexIncentiveError = + GetIndexIncentiveErrors[keyof GetIndexIncentiveErrors]; -export type PostUpdateCancelOnboardingResponses = { +export type GetIndexIncentiveResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListIncentivesResponse; }; -export type PostUpdateCancelOnboardingResponse = - PostUpdateCancelOnboardingResponses[keyof PostUpdateCancelOnboardingResponses]; +export type GetIndexIncentiveResponse = + GetIndexIncentiveResponses[keyof GetIndexIncentiveResponses]; -export type GetShowContractAmendmentSchemaData = { - body?: never; +export type PostCreateIncentiveData = { + /** + * Incentive + */ + body?: CreateOneTimeIncentiveParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -9589,28 +11476,15 @@ export type GetShowContractAmendmentSchemaData = { 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'; + query?: never; + url: '/api/eor/v1/incentives'; }; -export type GetShowContractAmendmentSchemaErrors = { +export type PostCreateIncentiveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -9623,83 +11497,85 @@ export type GetShowContractAmendmentSchemaErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetShowContractAmendmentSchemaError = - GetShowContractAmendmentSchemaErrors[keyof GetShowContractAmendmentSchemaErrors]; +export type PostCreateIncentiveError = + PostCreateIncentiveErrors[keyof PostCreateIncentiveErrors]; -export type GetShowContractAmendmentSchemaResponses = { +export type PostCreateIncentiveResponses = { /** * Success */ - 200: ContractAmendmentFormResponse; + 201: IncentiveResponse; }; -export type GetShowContractAmendmentSchemaResponse = - GetShowContractAmendmentSchemaResponses[keyof GetShowContractAmendmentSchemaResponses]; +export type PostCreateIncentiveResponse = + PostCreateIncentiveResponses[keyof PostCreateIncentiveResponses]; -export type PostBulkCreatePayItemsData = { - /** - * Pay Items - */ - body: BulkCreatePayItemsParams; +export type GetIndexBenefitOffersByEmploymentData = { + 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'; + url: '/api/eor/v1/benefit-offers'; }; -export type PostBulkCreatePayItemsErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; +export type GetIndexBenefitOffersByEmploymentErrors = { /** - * Unprocessable Entity + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PostBulkCreatePayItemsError = - PostBulkCreatePayItemsErrors[keyof PostBulkCreatePayItemsErrors]; +export type GetIndexBenefitOffersByEmploymentError = + GetIndexBenefitOffersByEmploymentErrors[keyof GetIndexBenefitOffersByEmploymentErrors]; -export type PostBulkCreatePayItemsResponses = { +export type GetIndexBenefitOffersByEmploymentResponses = { /** * Success */ - 200: BulkCreatePayItemsResponse; + 200: BenefitOfferByEmploymentResponse; }; -export type PostBulkCreatePayItemsResponse = - PostBulkCreatePayItemsResponses[keyof PostBulkCreatePayItemsResponses]; +export type GetIndexBenefitOffersByEmploymentResponse = + GetIndexBenefitOffersByEmploymentResponses[keyof GetIndexBenefitOffersByEmploymentResponses]; -export type GetIndexDataSyncData = { - body?: never; +export type PostCompleteOnboardingEmploymentData = { + /** + * Employment slug + */ + body?: CompleteOnboarding; + 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/data-sync'; + url: '/api/eor/v1/ready'; }; -export type GetIndexDataSyncErrors = { +export type PostCompleteOnboardingEmploymentErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; /** * Forbidden */ @@ -9718,75 +11594,95 @@ export type GetIndexDataSyncErrors = { 429: TooManyRequestsResponse; }; -export type GetIndexDataSyncError = - GetIndexDataSyncErrors[keyof GetIndexDataSyncErrors]; +export type PostCompleteOnboardingEmploymentError = + PostCompleteOnboardingEmploymentErrors[keyof PostCompleteOnboardingEmploymentErrors]; -export type GetIndexDataSyncResponses = { +export type PostCompleteOnboardingEmploymentResponses = { /** * Success */ - 200: ListDataSyncEventsResponse; + 200: EmploymentResponse; }; -export type GetIndexDataSyncResponse = - GetIndexDataSyncResponses[keyof GetIndexDataSyncResponses]; +export type PostCompleteOnboardingEmploymentResponse = + PostCompleteOnboardingEmploymentResponses[keyof PostCompleteOnboardingEmploymentResponses]; -export type PostCreateDataSyncData = { +export type PostCreateEstimationData = { /** - * DataSync + * Estimate params */ - body: CreateDataSyncParams; + body: CostCalculatorEstimateParams; path?: never; query?: never; - url: '/v1/data-sync'; + url: '/api/eor/v1/cost-calculator/estimation'; }; -export type PostCreateDataSyncErrors = { +export type PostCreateEstimationErrors = { /** - * Bad Request + * Not Found */ - 400: BadRequestResponse; + 404: NotFoundResponse; /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictErrorResponse; - /** - * Unprocessable Entity + * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostCreateDataSyncError = - PostCreateDataSyncErrors[keyof PostCreateDataSyncErrors]; +export type PostCreateEstimationError = + PostCreateEstimationErrors[keyof PostCreateEstimationErrors]; -export type PostCreateDataSyncResponses = { +export type PostCreateEstimationResponses = { /** - * Accepted + * Success */ - 202: unknown; + 200: CostCalculatorEstimateResponse; }; -export type GetIndexCompanyPricingPlanData = { +export type PostCreateEstimationResponse = + PostCreateEstimationResponses[keyof PostCreateEstimationResponses]; + +export type GetIndexRecurringIncentiveData = { 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; }; - query?: never; - url: '/v1/companies/{company_id}/pricing-plans'; + 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: '/api/eor/v1/incentives/recurring'; }; -export type GetIndexCompanyPricingPlanErrors = { +export type GetIndexRecurringIncentiveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -9799,37 +11695,49 @@ export type GetIndexCompanyPricingPlanErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetIndexCompanyPricingPlanError = - GetIndexCompanyPricingPlanErrors[keyof GetIndexCompanyPricingPlanErrors]; +export type GetIndexRecurringIncentiveError = + GetIndexRecurringIncentiveErrors[keyof GetIndexRecurringIncentiveErrors]; -export type GetIndexCompanyPricingPlanResponses = { +export type GetIndexRecurringIncentiveResponses = { /** * Success */ - 200: ListCompanyPricingPlansResponse; + 201: ListRecurringIncentivesResponse; }; -export type GetIndexCompanyPricingPlanResponse = - GetIndexCompanyPricingPlanResponses[keyof GetIndexCompanyPricingPlanResponses]; +export type GetIndexRecurringIncentiveResponse = + GetIndexRecurringIncentiveResponses[keyof GetIndexRecurringIncentiveResponses]; -export type PostCreateCompanyPricingPlanData = { +export type PostCreateRecurringIncentiveData = { /** - * Create Pricing Plan parameters + * RecurringIncentive */ - body: CreatePricingPlanParams; - path: { + body?: CreateRecurringIncentiveParams; + 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: '/api/eor/v1/incentives/recurring'; }; -export type PostCreateCompanyPricingPlanErrors = { +export type PostCreateRecurringIncentiveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -9842,34 +11750,54 @@ export type PostCreateCompanyPricingPlanErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostCreateCompanyPricingPlanError = - PostCreateCompanyPricingPlanErrors[keyof PostCreateCompanyPricingPlanErrors]; +export type PostCreateRecurringIncentiveError = + PostCreateRecurringIncentiveErrors[keyof PostCreateRecurringIncentiveErrors]; -export type PostCreateCompanyPricingPlanResponses = { +export type PostCreateRecurringIncentiveResponses = { /** * Success */ - 200: CreatePricingPlanResponse; + 201: RecurringIncentiveResponse; }; -export type PostCreateCompanyPricingPlanResponse = - PostCreateCompanyPricingPlanResponses[keyof PostCreateCompanyPricingPlanResponses]; +export type PostCreateRecurringIncentiveResponse = + PostCreateRecurringIncentiveResponses[keyof PostCreateRecurringIncentiveResponses]; -export type GetShowProbationCompletionLetterData = { +export type GetIndexTimesheetData = { body?: never; - path: { + path?: never; + query?: { /** - * probation completion letter ID + * Filter timesheets by their status */ - id: string; + 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; }; - query?: never; - url: '/v1/probation-completion-letter/{id}'; + url: '/api/eor/v1/timesheets'; }; -export type GetShowProbationCompletionLetterErrors = { +export type GetIndexTimesheetErrors = { /** * Unauthorized */ @@ -9884,40 +11812,38 @@ export type GetShowProbationCompletionLetterErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowProbationCompletionLetterError = - GetShowProbationCompletionLetterErrors[keyof GetShowProbationCompletionLetterErrors]; +export type GetIndexTimesheetError = + GetIndexTimesheetErrors[keyof GetIndexTimesheetErrors]; -export type GetShowProbationCompletionLetterResponses = { +export type GetIndexTimesheetResponses = { /** * Success */ - 200: ProbationCompletionLetterResponse; + 200: ListTimesheetsResponse; }; -export type GetShowProbationCompletionLetterResponse = - GetShowProbationCompletionLetterResponses[keyof GetShowProbationCompletionLetterResponses]; +export type GetIndexTimesheetResponse = + GetIndexTimesheetResponses[keyof GetIndexTimesheetResponses]; -export type GetShowContractorInvoiceData = { - body?: never; - path: { - /** - * Resource unique identifier - */ - id: UuidSlug; - }; +export type PostCreateTimesheetData = { + /** + * Timesheet + */ + body?: CreateTimesheetParams; + path?: never; query?: never; - url: '/v1/contractor-invoices/{id}'; + url: '/api/eor/v1/timesheets'; }; -export type GetShowContractorInvoiceErrors = { +export type PostCreateTimesheetErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -9928,30 +11854,32 @@ export type GetShowContractorInvoiceErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowContractorInvoiceError = - GetShowContractorInvoiceErrors[keyof GetShowContractorInvoiceErrors]; +export type PostCreateTimesheetError = + PostCreateTimesheetErrors[keyof PostCreateTimesheetErrors]; -export type GetShowContractorInvoiceResponses = { +export type PostCreateTimesheetResponses = { /** * Success */ - 200: ContractorInvoiceResponse; + 200: TimesheetResponse; }; -export type GetShowContractorInvoiceResponse = - GetShowContractorInvoiceResponses[keyof GetShowContractorInvoiceResponses]; +export type PostCreateTimesheetResponse = + PostCreateTimesheetResponses[keyof PostCreateTimesheetResponses]; -export type PostConvertRawCurrencyConverterData = { - /** - * Convert currency parameters - */ - body: ConvertCurrencyParams; - path?: never; +export type PostApproveTimesheetData = { + body?: never; + path: { + /** + * Timesheet ID + */ + timesheet_id: string; + }; query?: never; - url: '/v1/currency-converter/raw'; + url: '/api/eor/v1/timesheets/{timesheet_id}/approve'; }; -export type PostConvertRawCurrencyConverterErrors = { +export type PostApproveTimesheetErrors = { /** * Unauthorized */ @@ -9966,41 +11894,27 @@ export type PostConvertRawCurrencyConverterErrors = { 422: UnprocessableEntityResponse; }; -export type PostConvertRawCurrencyConverterError = - PostConvertRawCurrencyConverterErrors[keyof PostConvertRawCurrencyConverterErrors]; +export type PostApproveTimesheetError = + PostApproveTimesheetErrors[keyof PostApproveTimesheetErrors]; -export type PostConvertRawCurrencyConverterResponses = { +export type PostApproveTimesheetResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: MinimalTimesheetResponse; }; -export type PostConvertRawCurrencyConverterResponse = - PostConvertRawCurrencyConverterResponses[keyof PostConvertRawCurrencyConverterResponses]; +export type PostApproveTimesheetResponse = + PostApproveTimesheetResponses[keyof PostApproveTimesheetResponses]; -export type GetShowContractorContractDetailsCountryData = { +export type GetIndexDataSyncData = { body?: never; - path: { - /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; - }; - query?: { - /** - * Employment ID - */ - employment_id?: string; - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/countries/{country_code}/contractor-contract-details'; + path?: never; + query?: never; + url: '/api/eor/v1/data-sync'; }; -export type GetShowContractorContractDetailsCountryErrors = { +export type GetIndexDataSyncErrors = { /** * Bad Request */ @@ -10010,9 +11924,13 @@ export type GetShowContractorContractDetailsCountryErrors = { */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -10023,57 +11941,518 @@ export type GetShowContractorContractDetailsCountryErrors = { 429: TooManyRequestsResponse; }; -export type GetShowContractorContractDetailsCountryError = - GetShowContractorContractDetailsCountryErrors[keyof GetShowContractorContractDetailsCountryErrors]; +export type GetIndexDataSyncError = + GetIndexDataSyncErrors[keyof GetIndexDataSyncErrors]; -export type GetShowContractorContractDetailsCountryResponses = { +export type GetIndexDataSyncResponses = { /** * Success */ - 200: ContractorContractDetailsResponse; + 200: ListDataSyncEventsResponse; }; -export type GetShowContractorContractDetailsCountryResponse = - GetShowContractorContractDetailsCountryResponses[keyof GetShowContractorContractDetailsCountryResponses]; - -export type GetIndexEmploymentData = { +export type GetIndexDataSyncResponse = + GetIndexDataSyncResponses[keyof GetIndexDataSyncResponses]; + +export type PostCreateDataSyncData = { + /** + * DataSync + */ + body: CreateDataSyncParams; + path?: never; + query?: never; + url: '/api/eor/v1/data-sync'; +}; + +export type PostCreateDataSyncErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictErrorResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type PostCreateDataSyncError = + PostCreateDataSyncErrors[keyof PostCreateDataSyncErrors]; + +export type PostCreateDataSyncResponses = { + /** + * Accepted + */ + 202: unknown; +}; + +export type GetShowProbationCompletionLetterData = { + body?: never; + path: { + /** + * probation completion letter ID + */ + id: string; + }; + query?: never; + url: '/api/eor/v1/probation-completion-letter/{id}'; +}; + +export type GetShowProbationCompletionLetterErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetShowProbationCompletionLetterError = + GetShowProbationCompletionLetterErrors[keyof GetShowProbationCompletionLetterErrors]; + +export type GetShowProbationCompletionLetterResponses = { + /** + * Success + */ + 200: ProbationCompletionLetterResponse; +}; + +export type GetShowProbationCompletionLetterResponse = + GetShowProbationCompletionLetterResponses[keyof GetShowProbationCompletionLetterResponses]; + +export type GetShowSsoConfigurationData = { + body?: never; + path?: never; + query?: never; + url: '/api/eor/v1/sso-configuration'; +}; + +export type GetShowSsoConfigurationErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type GetShowSsoConfigurationError = + GetShowSsoConfigurationErrors[keyof GetShowSsoConfigurationErrors]; + +export type GetShowSsoConfigurationResponses = { + /** + * Success + */ + 200: SsoConfigurationResponse; +}; + +export type GetShowSsoConfigurationResponse = + GetShowSsoConfigurationResponses[keyof GetShowSsoConfigurationResponses]; + +export type PostCreateSsoConfigurationData = { + /** + * CreateSSOConfiguration + */ + body: CreateSsoConfigurationParams; + path?: never; + query?: never; + url: '/api/eor/v1/sso-configuration'; +}; + +export type PostCreateSsoConfigurationErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type PostCreateSsoConfigurationError = + PostCreateSsoConfigurationErrors[keyof PostCreateSsoConfigurationErrors]; + +export type PostCreateSsoConfigurationResponses = { + /** + * Created + */ + 201: CreateSsoConfigurationResponse; +}; + +export type PostCreateSsoConfigurationResponse = + PostCreateSsoConfigurationResponses[keyof PostCreateSsoConfigurationResponses]; + +export type GetIndexOffboardingData = { + 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; + /** + * Change the amount of records returned per page, defaults to 20, limited to 100 + */ + page_size?: number; + }; + url: '/api/eor/v1/offboardings'; +}; + +export type GetIndexOffboardingErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type GetIndexOffboardingError = + GetIndexOffboardingErrors[keyof GetIndexOffboardingErrors]; + +export type GetIndexOffboardingResponses = { + /** + * Success + */ + 200: ListOffboardingResponse; +}; + +export type GetIndexOffboardingResponse = + GetIndexOffboardingResponses[keyof GetIndexOffboardingResponses]; + +export type PostCreateOffboardingData = { + /** + * Offboarding + */ + body?: CreateOffboardingParams; + path?: never; + query?: never; + url: '/api/eor/v1/offboardings'; +}; + +export type PostCreateOffboardingErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; + /** + * Internal Server Error + */ + 500: RequestError; +}; + +export type PostCreateOffboardingError = + PostCreateOffboardingErrors[keyof PostCreateOffboardingErrors]; + +export type PostCreateOffboardingResponses = { + /** + * Success + */ + 201: OffboardingResponse; +}; + +export type PostCreateOffboardingResponse = + PostCreateOffboardingResponses[keyof PostCreateOffboardingResponses]; + +export type PostCreateContractDocumentData = { + /** + * CreateContractDocumentParams + */ + body: CreateContractDocument; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/api/eor/v1/contractors/employments/{employment_id}/contract-documents'; +}; + +export type PostCreateContractDocumentErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostCreateContractDocumentError = + PostCreateContractDocumentErrors[keyof PostCreateContractDocumentErrors]; + +export type PostCreateContractDocumentResponses = { + /** + * Success + */ + 200: CreateContractDocumentResponse; +}; + +export type PostCreateContractDocumentResponse = + PostCreateContractDocumentResponses[keyof PostCreateContractDocumentResponses]; + +export type PutUpdateEmploymentFederalTaxesData = { + /** + * Employment federal taxes params + */ + body?: EmploymentFederalTaxesParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/api/eor/v1/employments/{employment_id}/federal-taxes'; +}; + +export type PutUpdateEmploymentFederalTaxesErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; +}; + +export type PutUpdateEmploymentFederalTaxesError = + PutUpdateEmploymentFederalTaxesErrors[keyof PutUpdateEmploymentFederalTaxesErrors]; + +export type PutUpdateEmploymentFederalTaxesResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; + +export type PutUpdateEmploymentFederalTaxesResponse = + PutUpdateEmploymentFederalTaxesResponses[keyof PutUpdateEmploymentFederalTaxesResponses]; + +export type GetIndexCompanyPricingPlanData = { + body?: never; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + }; + query?: never; + url: '/api/eor/v1/companies/{company_id}/pricing-plans'; +}; + +export type GetIndexCompanyPricingPlanErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetIndexCompanyPricingPlanError = + GetIndexCompanyPricingPlanErrors[keyof GetIndexCompanyPricingPlanErrors]; + +export type GetIndexCompanyPricingPlanResponses = { + /** + * Success + */ + 200: ListCompanyPricingPlansResponse; +}; + +export type GetIndexCompanyPricingPlanResponse = + GetIndexCompanyPricingPlanResponses[keyof GetIndexCompanyPricingPlanResponses]; + +export type PostCreateCompanyPricingPlanData = { + /** + * Create Pricing Plan parameters + */ + body: CreatePricingPlanParams; + path: { + /** + * Company ID + */ + company_id: UuidSlug; + }; + query?: never; + url: '/api/eor/v1/companies/{company_id}/pricing-plans'; +}; + +export type PostCreateCompanyPricingPlanErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostCreateCompanyPricingPlanError = + PostCreateCompanyPricingPlanErrors[keyof PostCreateCompanyPricingPlanErrors]; + +export type PostCreateCompanyPricingPlanResponses = { + /** + * Success + */ + 200: CreatePricingPlanResponse; +}; + +export type PostCreateCompanyPricingPlanResponse = + PostCreateCompanyPricingPlanResponses[keyof PostCreateCompanyPricingPlanResponses]; + +export type GetIndexTravelLetterRequestData = { 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?: { /** - * Company ID + * Filter results on the given status */ - company_id?: string; + status?: + | 'pending' + | 'cancelled' + | 'declined_by_manager' + | 'declined_by_remote' + | 'approved_by_manager' + | 'approved_by_remote'; /** - * Filters the results by employments whose login email matches the value + * Filter results on the given employment slug */ - email?: string; + employment_id?: 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. - * + * Filter results on the given employee name */ - status?: string; + employee_name?: string; /** - * Filters the results by employments whose employment product type matches the value + * Sort order */ - employment_type?: string; + order?: 'asc' | 'desc'; /** - * Filters the results by employments whose employment model matches the value. - * Possible values: `global_payroll`, `peo`, `eor` - * + * Field to sort by */ - employment_model?: 'global_payroll' | 'peo' | 'eor'; + sort_by?: 'submitted_at'; /** * Starts fetching records after the given page */ @@ -10083,70 +12462,134 @@ export type GetIndexEmploymentData = { */ page_size?: number; }; - url: '/v1/employments'; + url: '/api/eor/v1/travel-letter-requests'; }; -export type GetIndexEmploymentErrors = { +export type GetIndexTravelLetterRequestErrors = { + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type GetIndexTravelLetterRequestError = + GetIndexTravelLetterRequestErrors[keyof GetIndexTravelLetterRequestErrors]; + +export type GetIndexTravelLetterRequestResponses = { + /** + * Success + */ + 200: ListTravelLettersResponse; +}; + +export type GetIndexTravelLetterRequestResponse = + GetIndexTravelLetterRequestResponses[keyof GetIndexTravelLetterRequestResponses]; + +export type GetPaySummaryGphData = { + 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: '/api/eor/v1/wd/gph/paySummary'; +}; + +export type GetPaySummaryGphErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; +}; + +export type GetPaySummaryGphError = + GetPaySummaryGphErrors[keyof GetPaySummaryGphErrors]; + +export type GetPaySummaryGphResponses = { /** - * Unprocessable Entity + * Success */ - 422: UnprocessableEntityResponse; + 200: PaySummaryResponse; +}; + +export type GetPaySummaryGphResponse = + GetPaySummaryGphResponses[keyof GetPaySummaryGphResponses]; + +export type GetIndexEmploymentJobData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: never; + url: '/api/eor/v1/employments/{employment_id}/job'; +}; + +export type GetIndexEmploymentJobErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetIndexEmploymentError = - GetIndexEmploymentErrors[keyof GetIndexEmploymentErrors]; +export type GetIndexEmploymentJobError = + GetIndexEmploymentJobErrors[keyof GetIndexEmploymentJobErrors]; -export type GetIndexEmploymentResponses = { +export type GetIndexEmploymentJobResponses = { /** * Success */ - 200: ListEmploymentsResponse; + 200: EmploymentJobResponse; }; -export type GetIndexEmploymentResponse = - GetIndexEmploymentResponses[keyof GetIndexEmploymentResponses]; +export type GetIndexEmploymentJobResponse = + GetIndexEmploymentJobResponses[keyof GetIndexEmploymentJobResponses]; -export type PostCreateEmployment2Data = { +export type PostCreateBulkEmploymentData = { /** - * Employment params + * Bulk 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; - }; + body?: BulkEmploymentCreateParams; path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/employments'; + query?: never; + url: '/api/eor/v1/bulk-employment-jobs'; }; -export type PostCreateEmployment2Errors = { +export type PostCreateBulkEmploymentErrors = { /** * Bad Request */ @@ -10155,10 +12598,6 @@ export type PostCreateEmployment2Errors = { * Forbidden */ 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -10169,148 +12608,211 @@ export type PostCreateEmployment2Errors = { 429: TooManyRequestsResponse; }; -export type PostCreateEmployment2Error = - PostCreateEmployment2Errors[keyof PostCreateEmployment2Errors]; +export type PostCreateBulkEmploymentError = + PostCreateBulkEmploymentErrors[keyof PostCreateBulkEmploymentErrors]; -export type PostCreateEmployment2Responses = { +export type PostCreateBulkEmploymentResponses = { /** - * Success + * Accepted */ - 200: EmploymentCreationResponse; + 202: BulkEmploymentImportJobResponse; }; -export type PostCreateEmployment2Response = - PostCreateEmployment2Responses[keyof PostCreateEmployment2Responses]; +export type PostCreateBulkEmploymentResponse = + PostCreateBulkEmploymentResponses[keyof PostCreateBulkEmploymentResponses]; -export type GetShowCompanyEmploymentOnboardingReservesStatusData = { +export type GetIndexContractAmendmentData = { 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?: { /** * Employment ID */ - employment_id: UuidSlug; + 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; }; - query?: never; - url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status'; + url: '/api/eor/v1/contract-amendments'; }; -export type GetShowCompanyEmploymentOnboardingReservesStatusErrors = { +export type GetIndexContractAmendmentErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetShowCompanyEmploymentOnboardingReservesStatusError = - GetShowCompanyEmploymentOnboardingReservesStatusErrors[keyof GetShowCompanyEmploymentOnboardingReservesStatusErrors]; +export type GetIndexContractAmendmentError = + GetIndexContractAmendmentErrors[keyof GetIndexContractAmendmentErrors]; -export type GetShowCompanyEmploymentOnboardingReservesStatusResponses = { +export type GetIndexContractAmendmentResponses = { /** * Success */ - 200: OnboardingReservesStatusResponse; + 200: ListContractAmendmentResponse; }; -export type GetShowCompanyEmploymentOnboardingReservesStatusResponse = - GetShowCompanyEmploymentOnboardingReservesStatusResponses[keyof GetShowCompanyEmploymentOnboardingReservesStatusResponses]; +export type GetIndexContractAmendmentResponse = + GetIndexContractAmendmentResponses[keyof GetIndexContractAmendmentResponses]; -export type GetShowHelpCenterArticleData = { - body?: never; - path: { +export type PostCreateContractAmendmentData = { + /** + * Contract Amendment + */ + body?: CreateContractAmendmentParams; + headers: { /** - * Help Center Article Zendesk 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: number; + Authorization: string; }; - query?: never; - url: '/v1/help-center-articles/{id}'; + path?: never; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/api/eor/v1/contract-amendments'; }; -export type GetShowHelpCenterArticleErrors = { +export type PostCreateContractAmendmentErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetShowHelpCenterArticleError = - GetShowHelpCenterArticleErrors[keyof GetShowHelpCenterArticleErrors]; +export type PostCreateContractAmendmentError = + PostCreateContractAmendmentErrors[keyof PostCreateContractAmendmentErrors]; -export type GetShowHelpCenterArticleResponses = { +export type PostCreateContractAmendmentResponses = { /** * Success */ - 200: HelpCenterArticleResponse; + 200: ContractAmendmentResponse; }; -export type GetShowHelpCenterArticleResponse = - GetShowHelpCenterArticleResponses[keyof GetShowHelpCenterArticleResponses]; +export type PostCreateContractAmendmentResponse = + PostCreateContractAmendmentResponses[keyof PostCreateContractAmendmentResponses]; -export type GetGetUserScimData = { +export type DeleteDeleteRecurringIncentiveData = { 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 (slug) + * Recurring Incentive ID */ id: string; }; query?: never; - url: '/v1/scim/v2/Users/{id}'; + url: '/api/eor/v1/incentives/recurring/{id}'; }; -export type GetGetUserScimErrors = { +export type DeleteDeleteRecurringIncentiveErrors = { /** - * 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; }; -export type GetGetUserScimError = - GetGetUserScimErrors[keyof GetGetUserScimErrors]; +export type DeleteDeleteRecurringIncentiveError = + DeleteDeleteRecurringIncentiveErrors[keyof DeleteDeleteRecurringIncentiveErrors]; -export type GetGetUserScimResponses = { +export type DeleteDeleteRecurringIncentiveResponses = { /** * Success */ - 200: IntegrationsScimUser; + 200: DeleteRecurringIncentiveResponse; }; -export type GetGetUserScimResponse = - GetGetUserScimResponses[keyof GetGetUserScimResponses]; +export type DeleteDeleteRecurringIncentiveResponse = + DeleteDeleteRecurringIncentiveResponses[keyof DeleteDeleteRecurringIncentiveResponses]; -export type GetShowEmployeeDocumentData = { +export type GetShowBenefitRenewalRequestData = { 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: { /** - * Document ID + * Benefit Renewal Request Id */ - id: string; + benefit_renewal_request_id: UuidSlug; }; query?: never; - url: '/v1/employee/documents/{id}'; + url: '/api/eor/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; }; -export type GetShowEmployeeDocumentErrors = { +export type GetShowBenefitRenewalRequestErrors = { /** * Unauthorized */ @@ -10325,158 +12827,156 @@ export type GetShowEmployeeDocumentErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowEmployeeDocumentError = - GetShowEmployeeDocumentErrors[keyof GetShowEmployeeDocumentErrors]; +export type GetShowBenefitRenewalRequestError = + GetShowBenefitRenewalRequestErrors[keyof GetShowBenefitRenewalRequestErrors]; -export type GetShowEmployeeDocumentResponses = { +export type GetShowBenefitRenewalRequestResponses = { /** * Success */ - 200: DownloadDocumentResponse; + 200: BenefitRenewalRequestsBenefitRenewalRequestResponse; }; -export type GetShowEmployeeDocumentResponse = - GetShowEmployeeDocumentResponses[keyof GetShowEmployeeDocumentResponses]; +export type GetShowBenefitRenewalRequestResponse = + GetShowBenefitRenewalRequestResponses[keyof GetShowBenefitRenewalRequestResponses]; -export type GetIndexContractorInvoiceData = { - 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. - */ - 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'; +export type PostUpdateBenefitRenewalRequestData = { + /** + * Benefit Renewal Request Response + */ + body?: BenefitRenewalRequestsUpdateBenefitRenewalRequest; + headers: { /** - * Sort order + * 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. + * */ - order?: 'asc' | 'desc'; + Authorization: string; + }; + path: { /** - * Starts fetching records after the given page + * Benefit Renewal Request Id */ - page?: number; + benefit_renewal_request_id: UuidSlug; + }; + query?: { /** - * Number of items per page + * Version of the form schema */ - page_size?: number; + json_schema_version?: number | 'latest'; }; - url: '/v1/contractor-invoices'; + url: '/api/eor/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; }; -export type GetIndexContractorInvoiceErrors = { +export type PostUpdateBenefitRenewalRequestErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetIndexContractorInvoiceError = - GetIndexContractorInvoiceErrors[keyof GetIndexContractorInvoiceErrors]; +export type PostUpdateBenefitRenewalRequestError = + PostUpdateBenefitRenewalRequestErrors[keyof PostUpdateBenefitRenewalRequestErrors]; -export type GetIndexContractorInvoiceResponses = { +export type PostUpdateBenefitRenewalRequestResponses = { /** * Success */ - 200: ListContractorInvoicesResponse; + 200: SuccessResponse; }; -export type GetIndexContractorInvoiceResponse = - GetIndexContractorInvoiceResponses[keyof GetIndexContractorInvoiceResponses]; +export type PostUpdateBenefitRenewalRequestResponse = + PostUpdateBenefitRenewalRequestResponses[keyof PostUpdateBenefitRenewalRequestResponses]; -export type PostReportErrorsTelemetryData = { - /** - * SDK Error Report - */ - body: SdkErrorPayload; - path?: never; - query?: never; - url: '/v1/sdk/telemetry-errors'; +export type GetIndexHolidayData = { + 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 3166-1 3-digit alphabetic codes + */ + country_code: string; + /** + * Year for the holidays + */ + year: string; + }; + query?: { + /** + * Country subdivision code according to ISO 3166-2 codes + */ + country_subdivision_code?: string; + }; + url: '/api/eor/v1/countries/{country_code}/holidays/{year}'; }; -export type PostReportErrorsTelemetryErrors = { +export type GetIndexHolidayErrors = { /** - * Bad Request + * Unauthorized */ - 400: ErrorResponse; + 401: UnauthorizedResponse; /** - * Too Many Requests + * Not Found */ - 429: RateLimitResponse; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type PostReportErrorsTelemetryError = - PostReportErrorsTelemetryErrors[keyof PostReportErrorsTelemetryErrors]; +export type GetIndexHolidayError = + GetIndexHolidayErrors[keyof GetIndexHolidayErrors]; -export type PostReportErrorsTelemetryResponses = { +export type GetIndexHolidayResponses = { /** - * No Content + * Success */ - 204: unknown; + 200: HolidaysResponse; }; -export type GetDetailsSsoConfigurationData = { - body?: never; - path?: never; - query?: never; - url: '/v1/sso-configuration/details'; +export type GetIndexHolidayResponse = + GetIndexHolidayResponses[keyof GetIndexHolidayResponses]; + +export type GetIndexEmploymentCustomFieldValueData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/api/eor/v1/employments/{employment_id}/custom-fields'; }; -export type GetDetailsSsoConfigurationErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetIndexEmploymentCustomFieldValueErrors = { /** * Unauthorized */ @@ -10488,33 +12988,39 @@ export type GetDetailsSsoConfigurationErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetDetailsSsoConfigurationError = - GetDetailsSsoConfigurationErrors[keyof GetDetailsSsoConfigurationErrors]; +export type GetIndexEmploymentCustomFieldValueError = + GetIndexEmploymentCustomFieldValueErrors[keyof GetIndexEmploymentCustomFieldValueErrors]; -export type GetDetailsSsoConfigurationResponses = { +export type GetIndexEmploymentCustomFieldValueResponses = { /** * Success */ - 200: SsoConfigurationDetailsResponse; + 200: ListEmploymentCustomFieldValuePaginatedResponse; }; -export type GetDetailsSsoConfigurationResponse = - GetDetailsSsoConfigurationResponses[keyof GetDetailsSsoConfigurationResponses]; +export type GetIndexEmploymentCustomFieldValueResponse = + GetIndexEmploymentCustomFieldValueResponses[keyof GetIndexEmploymentCustomFieldValueResponses]; -export type PostCreateEstimationData = { - /** - * Estimate params - */ - body: CostCalculatorEstimateParams; - path?: never; +export type GetShowTimesheetData = { + body?: never; + path: { + /** + * Timesheet ID + */ + id: string; + }; query?: never; - url: '/v1/cost-calculator/estimation'; + url: '/api/eor/v1/timesheets/{id}'; }; -export type PostCreateEstimationErrors = { +export type GetShowTimesheetErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -10525,40 +13031,53 @@ export type PostCreateEstimationErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateEstimationError = - PostCreateEstimationErrors[keyof PostCreateEstimationErrors]; +export type GetShowTimesheetError = + GetShowTimesheetErrors[keyof GetShowTimesheetErrors]; -export type PostCreateEstimationResponses = { +export type GetShowTimesheetResponses = { /** * Success */ - 200: CostCalculatorEstimateResponse; + 200: TimesheetResponse; }; -export type PostCreateEstimationResponse = - PostCreateEstimationResponses[keyof PostCreateEstimationResponses]; +export type GetShowTimesheetResponse = + GetShowTimesheetResponses[keyof GetShowTimesheetResponses]; -export type GetShowCompanySchemaData = { +export type GetIndexCompanyManagerData = { 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: { + query?: { /** - * Country code according to ISO 3-digit alphabetic codes. + * A Company ID to filter the results (only applicable for Integration Partners). */ - country_code: string; + company_id?: string; /** - * Name of the desired form + * Starts fetching records after the given page */ - form: 'address_details'; + 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/companies/schema'; + url: '/api/eor/v1/company-managers'; }; -export type GetShowCompanySchemaErrors = { +export type GetIndexCompanyManagerErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -10571,51 +13090,61 @@ export type GetShowCompanySchemaErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetShowCompanySchemaError = - GetShowCompanySchemaErrors[keyof GetShowCompanySchemaErrors]; +export type GetIndexCompanyManagerError = + GetIndexCompanyManagerErrors[keyof GetIndexCompanyManagerErrors]; -export type GetShowCompanySchemaResponses = { +export type GetIndexCompanyManagerResponses = { /** * Success */ - 200: CompanyFormResponse; + 200: CompanyManagersResponse; }; -export type GetShowCompanySchemaResponse = - GetShowCompanySchemaResponses[keyof GetShowCompanySchemaResponses]; +export type GetIndexCompanyManagerResponse = + GetIndexCompanyManagerResponses[keyof GetIndexCompanyManagerResponses]; -export type GetIndexBenefitOfferData = { - body?: never; - path: { +export type PostCreateCompanyManagerData = { + /** + * Company Manager params + */ + body?: CompanyManagerParams; + headers: { /** - * Unique identifier of the employment + * 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?: { /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Complementary action(s) to perform when creating a company manager: + * + * - `no_invite` skips the email invitation step + * */ - page_size?: number; + actions?: string; }; - url: '/v1/employments/{employment_id}/benefit-offers'; + url: '/api/eor/v1/company-managers'; }; -export type GetIndexBenefitOfferErrors = { +export type PostCreateCompanyManagerErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -10624,86 +13153,84 @@ export type GetIndexBenefitOfferErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetIndexBenefitOfferError = - GetIndexBenefitOfferErrors[keyof GetIndexBenefitOfferErrors]; +export type PostCreateCompanyManagerError = + PostCreateCompanyManagerErrors[keyof PostCreateCompanyManagerErrors]; -export type GetIndexBenefitOfferResponses = { +export type PostCreateCompanyManagerResponses = { /** * Success */ - 200: EmploymentsBenefitOffersListBenefitOffers; + 201: CompanyManagerData; }; -export type GetIndexBenefitOfferResponse = - GetIndexBenefitOfferResponses[keyof GetIndexBenefitOfferResponses]; +export type PostCreateCompanyManagerResponse = + PostCreateCompanyManagerResponses[keyof PostCreateCompanyManagerResponses]; -export type PutUpdateBenefitOfferData = { +export type PostBulkCreatePayItemsData = { /** - * Upsert employment benefit offers request + * Pay Items */ - 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'; + body: BulkCreatePayItemsParams; + path?: never; + query?: never; + url: '/api/eor/v1/pay-items/bulk'; }; -export type PutUpdateBenefitOfferErrors = { +export type PostBulkCreatePayItemsErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PutUpdateBenefitOfferError = - PutUpdateBenefitOfferErrors[keyof PutUpdateBenefitOfferErrors]; +export type PostBulkCreatePayItemsError = + PostBulkCreatePayItemsErrors[keyof PostBulkCreatePayItemsErrors]; -export type PutUpdateBenefitOfferResponses = { +export type PostBulkCreatePayItemsResponses = { /** * Success */ - 200: SuccessResponse; + 200: BulkCreatePayItemsResponse; }; -export type PutUpdateBenefitOfferResponse = - PutUpdateBenefitOfferResponses[keyof PutUpdateBenefitOfferResponses]; +export type PostBulkCreatePayItemsResponse = + PostBulkCreatePayItemsResponses[keyof PostBulkCreatePayItemsResponses]; -export type GetGetIdentityVerificationDataIdentityVerificationData = { +export type GetShowTravelLetterRequestData = { body?: never; path: { /** - * Employment ID + * travel letter request ID */ - employment_id: string; + id: UuidSlug; }; query?: never; - url: '/v1/identity-verification/{employment_id}'; + url: '/api/eor/v1/travel-letter-requests/{id}'; }; -export type GetGetIdentityVerificationDataIdentityVerificationErrors = { +export type GetShowTravelLetterRequestErrors = { /** * Unauthorized */ @@ -10718,104 +13245,78 @@ export type GetGetIdentityVerificationDataIdentityVerificationErrors = { 422: UnprocessableEntityResponse; }; -export type GetGetIdentityVerificationDataIdentityVerificationError = - GetGetIdentityVerificationDataIdentityVerificationErrors[keyof GetGetIdentityVerificationDataIdentityVerificationErrors]; +export type GetShowTravelLetterRequestError = + GetShowTravelLetterRequestErrors[keyof GetShowTravelLetterRequestErrors]; -export type GetGetIdentityVerificationDataIdentityVerificationResponses = { +export type GetShowTravelLetterRequestResponses = { /** * Success */ - 200: IdentityVerificationResponse; + 200: TravelLetterResponse; }; -export type GetGetIdentityVerificationDataIdentityVerificationResponse = - GetGetIdentityVerificationDataIdentityVerificationResponses[keyof GetGetIdentityVerificationDataIdentityVerificationResponses]; +export type GetShowTravelLetterRequestResponse = + GetShowTravelLetterRequestResponses[keyof GetShowTravelLetterRequestResponses]; -export type GetIndexSubscriptionData = { - body?: never; +export type PatchUpdateTravelLetterRequest2Data = { + /** + * Travel letter Request + */ + body: UpdateTravelLetterRequestParams; path: { /** - * Employment ID + * Travel letter Request ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-subscriptions'; + url: '/api/eor/v1/travel-letter-requests/{id}'; }; -export type GetIndexSubscriptionErrors = { +export type PatchUpdateTravelLetterRequest2Errors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetIndexSubscriptionError = - GetIndexSubscriptionErrors[keyof GetIndexSubscriptionErrors]; +export type PatchUpdateTravelLetterRequest2Error = + PatchUpdateTravelLetterRequest2Errors[keyof PatchUpdateTravelLetterRequest2Errors]; -export type GetIndexSubscriptionResponses = { +export type PatchUpdateTravelLetterRequest2Responses = { /** * Success */ - 200: ContractorSubscriptionSummariesResponse; + 200: TravelLetterResponse; }; -export type GetIndexSubscriptionResponse = - GetIndexSubscriptionResponses[keyof GetIndexSubscriptionResponses]; +export type PatchUpdateTravelLetterRequest2Response = + PatchUpdateTravelLetterRequest2Responses[keyof PatchUpdateTravelLetterRequest2Responses]; -export type GetIndexWebhookEventData = { - 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'; - /** - * Starts fetching records after the given page - */ - page?: number; +export type PatchUpdateTravelLetterRequestData = { + /** + * Travel letter Request + */ + body: UpdateTravelLetterRequestParams; + path: { /** - * Number of items per page + * Travel letter Request ID */ - page_size?: number; + id: string; }; - url: '/v1/webhook-events'; + query?: never; + url: '/api/eor/v1/travel-letter-requests/{id}'; }; -export type GetIndexWebhookEventErrors = { +export type PatchUpdateTravelLetterRequestErrors = { /** * Unauthorized */ @@ -10830,18 +13331,18 @@ export type GetIndexWebhookEventErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexWebhookEventError = - GetIndexWebhookEventErrors[keyof GetIndexWebhookEventErrors]; +export type PatchUpdateTravelLetterRequestError = + PatchUpdateTravelLetterRequestErrors[keyof PatchUpdateTravelLetterRequestErrors]; -export type GetIndexWebhookEventResponses = { +export type PatchUpdateTravelLetterRequestResponses = { /** * Success */ - 200: ListWebhookEventsResponse; + 200: TravelLetterResponse; }; -export type GetIndexWebhookEventResponse = - GetIndexWebhookEventResponses[keyof GetIndexWebhookEventResponses]; +export type PatchUpdateTravelLetterRequestResponse = + PatchUpdateTravelLetterRequestResponses[keyof PatchUpdateTravelLetterRequestResponses]; export type PostBypassEligibilityChecksCompanyData = { body?: never; @@ -10861,7 +13362,7 @@ export type PostBypassEligibilityChecksCompanyData = { company_id: string; }; query?: never; - url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks'; + url: '/api/eor/v1/sandbox/companies/{company_id}/bypass-eligibility-checks'; }; export type PostBypassEligibilityChecksCompanyErrors = { @@ -10900,59 +13401,19 @@ export type PostBypassEligibilityChecksCompanyResponses = { export type PostBypassEligibilityChecksCompanyResponse = PostBypassEligibilityChecksCompanyResponses[keyof PostBypassEligibilityChecksCompanyResponses]; -export type GetShowTestSchemaData = { - body?: never; - path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/test-schema'; -}; - -export type GetShowTestSchemaResponses = { - /** - * Success - */ - 200: CompanyFormResponse; -}; - -export type GetShowTestSchemaResponse = - GetShowTestSchemaResponses[keyof GetShowTestSchemaResponses]; - -export type GetIndexHolidayData = { +export type GetIndexWebhookCallbackData = { 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 3166-1 3-digit alphabetic codes - */ - country_code: string; - /** - * Year for the holidays - */ - year: string; - }; - query?: { - /** - * Country subdivision code according to ISO 3166-2 codes + * Company ID */ - country_subdivision_code?: string; + company_id: string; }; - url: '/v1/countries/{country_code}/holidays/{year}'; + query?: never; + url: '/api/eor/v1/companies/{company_id}/webhook-callbacks'; }; -export type GetIndexHolidayErrors = { +export type GetIndexWebhookCallbackErrors = { /** * Unauthorized */ @@ -10961,45 +13422,43 @@ export type GetIndexHolidayErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetIndexHolidayError = - GetIndexHolidayErrors[keyof GetIndexHolidayErrors]; +export type GetIndexWebhookCallbackError = + GetIndexWebhookCallbackErrors[keyof GetIndexWebhookCallbackErrors]; -export type GetIndexHolidayResponses = { +export type GetIndexWebhookCallbackResponses = { /** * Success */ - 200: HolidaysResponse; + 200: ListWebhookCallbacksResponse; }; -export type GetIndexHolidayResponse = - GetIndexHolidayResponses[keyof GetIndexHolidayResponses]; +export type GetIndexWebhookCallbackResponse = + GetIndexWebhookCallbackResponses[keyof GetIndexWebhookCallbackResponses]; -export type PostCreateCancellationData = { - /** - * CancelTimeoff - */ - body: CancelTimeoffParams; +export type GetDownloadPdfBillingDocumentData = { + 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: { /** - * Time Off ID + * The billing document's ID */ - timeoff_id: string; + billing_document_id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel'; + url: '/api/eor/v1/billing-documents/{billing_document_id}/pdf'; }; -export type PostCreateCancellationErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetDownloadPdfBillingDocumentErrors = { /** * Unauthorized */ @@ -11012,38 +13471,43 @@ export type PostCreateCancellationErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostCreateCancellationError = - PostCreateCancellationErrors[keyof PostCreateCancellationErrors]; +export type GetDownloadPdfBillingDocumentError = + GetDownloadPdfBillingDocumentErrors[keyof GetDownloadPdfBillingDocumentErrors]; -export type PostCreateCancellationResponses = { +export type GetDownloadPdfBillingDocumentResponses = { /** * Success */ - 200: TimeoffResponse; + 200: GenericFile; }; -export type PostCreateCancellationResponse = - PostCreateCancellationResponses[keyof PostCreateCancellationResponses]; +export type GetDownloadPdfBillingDocumentResponse = + GetDownloadPdfBillingDocumentResponses[keyof GetDownloadPdfBillingDocumentResponses]; -export type GetIndexEmploymentJobData = { +export type DeleteDeleteWebhookCallbackData = { 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 + * Webhook Callback ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employments/{employment_id}/job'; + url: '/api/eor/v1/webhook-callbacks/{id}'; }; -export type GetIndexEmploymentJobErrors = { +export type DeleteDeleteWebhookCallbackErrors = { /** * Unauthorized */ @@ -11058,27 +13522,35 @@ export type GetIndexEmploymentJobErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexEmploymentJobError = - GetIndexEmploymentJobErrors[keyof GetIndexEmploymentJobErrors]; +export type DeleteDeleteWebhookCallbackError = + DeleteDeleteWebhookCallbackErrors[keyof DeleteDeleteWebhookCallbackErrors]; -export type GetIndexEmploymentJobResponses = { +export type DeleteDeleteWebhookCallbackResponses = { /** * Success */ - 200: EmploymentJobResponse; + 200: SuccessResponse; }; -export type GetIndexEmploymentJobResponse = - GetIndexEmploymentJobResponses[keyof GetIndexEmploymentJobResponses]; +export type DeleteDeleteWebhookCallbackResponse = + DeleteDeleteWebhookCallbackResponses[keyof DeleteDeleteWebhookCallbackResponses]; -export type GetIndexPricingPlanPartnerTemplateData = { - body?: never; - path?: never; +export type PatchUpdateWebhookCallbackData = { + /** + * WebhookCallback + */ + body?: UpdateWebhookCallbackParams; + path: { + /** + * Webhook Callback ID + */ + id: string; + }; query?: never; - url: '/v1/pricing-plan-partner-templates'; + url: '/api/eor/v1/webhook-callbacks/{id}'; }; -export type GetIndexPricingPlanPartnerTemplateErrors = { +export type PatchUpdateWebhookCallbackErrors = { /** * Unauthorized */ @@ -11093,44 +13565,39 @@ export type GetIndexPricingPlanPartnerTemplateErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexPricingPlanPartnerTemplateError = - GetIndexPricingPlanPartnerTemplateErrors[keyof GetIndexPricingPlanPartnerTemplateErrors]; +export type PatchUpdateWebhookCallbackError = + PatchUpdateWebhookCallbackErrors[keyof PatchUpdateWebhookCallbackErrors]; -export type GetIndexPricingPlanPartnerTemplateResponses = { +export type PatchUpdateWebhookCallbackResponses = { /** * Success */ - 200: ListPricingPlanPartnerTemplatesResponse; + 200: WebhookCallbackResponse; }; -export type GetIndexPricingPlanPartnerTemplateResponse = - GetIndexPricingPlanPartnerTemplateResponses[keyof GetIndexPricingPlanPartnerTemplateResponses]; +export type PatchUpdateWebhookCallbackResponse = + PatchUpdateWebhookCallbackResponses[keyof PatchUpdateWebhookCallbackResponses]; -export type GetIndexEorPayrollCalendarData = { +export type GetSupportedCountryData = { body?: never; - path?: never; - 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; + 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/payroll-calendars'; + path?: never; + query?: never; + url: '/api/eor/v1/countries'; }; -export type GetIndexEorPayrollCalendarErrors = { +export type GetSupportedCountryErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -11143,41 +13610,42 @@ export type GetIndexEorPayrollCalendarErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetIndexEorPayrollCalendarError = - GetIndexEorPayrollCalendarErrors[keyof GetIndexEorPayrollCalendarErrors]; +export type GetSupportedCountryError = + GetSupportedCountryErrors[keyof GetSupportedCountryErrors]; -export type GetIndexEorPayrollCalendarResponses = { +export type GetSupportedCountryResponses = { /** * Success */ - 200: PayrollCalendarsEorResponse; + 200: CountriesResponse; }; -export type GetIndexEorPayrollCalendarResponse = - GetIndexEorPayrollCalendarResponses[keyof GetIndexEorPayrollCalendarResponses]; +export type GetSupportedCountryResponse = + GetSupportedCountryResponses[keyof GetSupportedCountryResponses]; -export type PatchUpdateEmployeeTimeoff2Data = { - /** - * UpdateTimeoff - */ - body: UpdateEmployeeTimeoffParams; +export type GetContractorEligibilityCompanyLegalEntitiesData = { + body?: never; path: { /** - * Timeoff ID + * Company ID */ - id: string; + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; }; query?: never; - url: '/v1/employee/timeoff/{id}'; + url: '/api/eor/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility'; }; -export type PatchUpdateEmployeeTimeoff2Errors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetContractorEligibilityCompanyLegalEntitiesErrors = { /** * Unauthorized */ @@ -11186,49 +13654,32 @@ export type PatchUpdateEmployeeTimeoff2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchUpdateEmployeeTimeoff2Error = - PatchUpdateEmployeeTimeoff2Errors[keyof PatchUpdateEmployeeTimeoff2Errors]; +export type GetContractorEligibilityCompanyLegalEntitiesError = + GetContractorEligibilityCompanyLegalEntitiesErrors[keyof GetContractorEligibilityCompanyLegalEntitiesErrors]; -export type PatchUpdateEmployeeTimeoff2Responses = { +export type GetContractorEligibilityCompanyLegalEntitiesResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ContractorEligibilityResponse; }; -export type PatchUpdateEmployeeTimeoff2Response = - PatchUpdateEmployeeTimeoff2Responses[keyof PatchUpdateEmployeeTimeoff2Responses]; +export type GetContractorEligibilityCompanyLegalEntitiesResponse = + GetContractorEligibilityCompanyLegalEntitiesResponses[keyof GetContractorEligibilityCompanyLegalEntitiesResponses]; -export type PatchUpdateEmployeeTimeoffData = { +export type PostConvertWithSpreadCurrencyConverterData = { /** - * UpdateTimeoff + * Convert currency parameters */ - body: UpdateEmployeeTimeoffParams; - path: { - /** - * Timeoff ID - */ - id: string; - }; + body: ConvertCurrencyParams; + path?: never; query?: never; - url: '/v1/employee/timeoff/{id}'; + url: '/api/eor/v1/currency-converter/effective'; }; -export type PatchUpdateEmployeeTimeoffErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostConvertWithSpreadCurrencyConverterErrors = { /** * Unauthorized */ @@ -11241,26 +13692,22 @@ export type PatchUpdateEmployeeTimeoffErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PatchUpdateEmployeeTimeoffError = - PatchUpdateEmployeeTimeoffErrors[keyof PatchUpdateEmployeeTimeoffErrors]; +export type PostConvertWithSpreadCurrencyConverterError = + PostConvertWithSpreadCurrencyConverterErrors[keyof PostConvertWithSpreadCurrencyConverterErrors]; -export type PatchUpdateEmployeeTimeoffResponses = { +export type PostConvertWithSpreadCurrencyConverterResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ConvertCurrencyResponse; }; -export type PatchUpdateEmployeeTimeoffResponse = - PatchUpdateEmployeeTimeoffResponses[keyof PatchUpdateEmployeeTimeoffResponses]; +export type PostConvertWithSpreadCurrencyConverterResponse = + PostConvertWithSpreadCurrencyConverterResponses[keyof PostConvertWithSpreadCurrencyConverterResponses]; -export type GetIndexRecurringIncentiveData = { +export type GetShowFormCountryData = { body?: never; headers: { /** @@ -11271,33 +13718,38 @@ export type GetIndexRecurringIncentiveData = { */ Authorization: string; }; - path?: never; - query?: { + path: { /** - * Filter by recurring incentive status: active or deactive. + * Country code according to ISO 3-digit alphabetic codes */ - status?: string; + country_code: string; /** - * Filter by recurring incentive type. + * Name of the desired form */ - type?: string; + form: string; + }; + query?: { /** - * Filter by recurring incentives that contain the value in their notes. + * Required for `contract_amendment` form */ - note?: string; + employment_id?: string; /** - * Starts fetching records after the given page + * FOR TESTING PURPOSES ONLY: Include scheduled benefit groups. */ - page?: number; + only_for_testing_include_scheduled_benefit_groups?: boolean; /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ - page_size?: number; + skip_benefits?: boolean; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; }; - url: '/v1/incentives/recurring'; + url: '/api/eor/v1/countries/{country_code}/{form}'; }; -export type GetIndexRecurringIncentiveErrors = { +export type GetShowFormCountryErrors = { /** * Bad Request */ @@ -11315,29 +13767,26 @@ export type GetIndexRecurringIncentiveErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetIndexRecurringIncentiveError = - GetIndexRecurringIncentiveErrors[keyof GetIndexRecurringIncentiveErrors]; +export type GetShowFormCountryError = + GetShowFormCountryErrors[keyof GetShowFormCountryErrors]; -export type GetIndexRecurringIncentiveResponses = { +export type GetShowFormCountryResponses = { /** * Success */ - 201: ListRecurringIncentivesResponse; + 200: CountryFormResponse; }; -export type GetIndexRecurringIncentiveResponse = - GetIndexRecurringIncentiveResponses[keyof GetIndexRecurringIncentiveResponses]; +export type GetShowFormCountryResponse = + GetShowFormCountryResponses[keyof GetShowFormCountryResponses]; -export type PostCreateRecurringIncentiveData = { - /** - * RecurringIncentive - */ - body?: CreateRecurringIncentiveParams; +export type GetIndexTimeoffData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -11348,11 +13797,40 @@ export type PostCreateRecurringIncentiveData = { Authorization: string; }; path?: never; - query?: never; - url: '/v1/incentives/recurring'; + 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; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/api/eor/v1/timeoff'; }; -export type PostCreateRecurringIncentiveErrors = { +export type GetIndexTimeoffErrors = { /** * Bad Request */ @@ -11370,29 +13848,29 @@ export type PostCreateRecurringIncentiveErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PostCreateRecurringIncentiveError = - PostCreateRecurringIncentiveErrors[keyof PostCreateRecurringIncentiveErrors]; +export type GetIndexTimeoffError = + GetIndexTimeoffErrors[keyof GetIndexTimeoffErrors]; -export type PostCreateRecurringIncentiveResponses = { +export type GetIndexTimeoffResponses = { /** * Success */ - 201: RecurringIncentiveResponse; + 200: ListTimeoffResponse; }; -export type PostCreateRecurringIncentiveResponse = - PostCreateRecurringIncentiveResponses[keyof PostCreateRecurringIncentiveResponses]; +export type GetIndexTimeoffResponse = + GetIndexTimeoffResponses[keyof GetIndexTimeoffResponses]; -export type PostCreateBenefitRenewalRequestData = { +export type PostCreateTimeoffData = { /** - * Benefit Renewal Request + * Timeoff */ - body: BenefitRenewalRequestsCreateBenefitRenewalRequest; + body: CreateApprovedTimeoffParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -11404,10 +13882,10 @@ export type PostCreateBenefitRenewalRequestData = { }; path?: never; query?: never; - url: '/v1/sandbox/benefit-renewal-requests'; + url: '/api/eor/v1/timeoff'; }; -export type PostCreateBenefitRenewalRequestErrors = { +export type PostCreateTimeoffErrors = { /** * Bad Request */ @@ -11416,6 +13894,10 @@ export type PostCreateBenefitRenewalRequestErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -11426,93 +13908,58 @@ export type PostCreateBenefitRenewalRequestErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateBenefitRenewalRequestError = - PostCreateBenefitRenewalRequestErrors[keyof PostCreateBenefitRenewalRequestErrors]; - -export type PostCreateBenefitRenewalRequestResponses = { - /** - * Success - */ - 200: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse; -}; - -export type PostCreateBenefitRenewalRequestResponse = - PostCreateBenefitRenewalRequestResponses[keyof PostCreateBenefitRenewalRequestResponses]; - -export type GetShowContractDocumentData = { - 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 PostCreateTimeoffError = + PostCreateTimeoffErrors[keyof PostCreateTimeoffErrors]; -export type GetShowContractDocumentErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; +export type PostCreateTimeoffResponses = { /** - * Unprocessable Entity + * Created */ - 422: UnprocessableEntityResponse; + 201: TimeoffResponse; }; -export type GetShowContractDocumentError = - GetShowContractDocumentErrors[keyof GetShowContractDocumentErrors]; +export type PostCreateTimeoffResponse = + PostCreateTimeoffResponses[keyof PostCreateTimeoffResponses]; -export type GetShowContractDocumentResponses = { +export type GetIndexCountryData = { + body?: never; + path?: never; + query?: { + /** + * If the premium benefits should be included in the response + */ + include_premium_benefits?: boolean; + }; + url: '/api/eor/v1/cost-calculator/countries'; +}; + +export type GetIndexCountryResponses = { /** * Success */ - 200: ContractDocumentResponse; + 200: CostCalculatorListCountryResponse; }; -export type GetShowContractDocumentResponse = - GetShowContractDocumentResponses[keyof GetShowContractDocumentResponses]; +export type GetIndexCountryResponse = + GetIndexCountryResponses[keyof GetIndexCountryResponses]; -export type GetIndexEmploymentContractDocumentData = { +export type GetShowBackgroundCheckData = { body?: never; 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 + * Employment Id */ - page?: number; + employment_id: UuidSlug; /** - * Number of items per page + * Background Check Id */ - page_size?: number; + background_check_id: UuidSlug; }; - url: '/v1/employments/{employment_id}/contract-documents'; + query?: never; + url: '/api/eor/v1/employments/{employment_id}/background-checks/{background_check_id}'; }; -export type GetIndexEmploymentContractDocumentErrors = { +export type GetShowBackgroundCheckErrors = { /** * Unauthorized */ @@ -11527,20 +13974,20 @@ export type GetIndexEmploymentContractDocumentErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexEmploymentContractDocumentError = - GetIndexEmploymentContractDocumentErrors[keyof GetIndexEmploymentContractDocumentErrors]; +export type GetShowBackgroundCheckError = + GetShowBackgroundCheckErrors[keyof GetShowBackgroundCheckErrors]; -export type GetIndexEmploymentContractDocumentResponses = { +export type GetShowBackgroundCheckResponses = { /** * Success */ - 200: IndexContractDocumentsResponse; + 200: BackgroundChecksBackgroundCheckResponse; }; -export type GetIndexEmploymentContractDocumentResponse = - GetIndexEmploymentContractDocumentResponses[keyof GetIndexEmploymentContractDocumentResponses]; +export type GetShowBackgroundCheckResponse = + GetShowBackgroundCheckResponses[keyof GetShowBackgroundCheckResponses]; -export type GetIndexExpenseData = { +export type GetShowTimeoffBalanceData = { body?: never; headers: { /** @@ -11551,21 +13998,17 @@ export type GetIndexExpenseData = { */ 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 + * Employment ID for which to show the time off balance */ - page_size?: number; + employment_id: string; }; - url: '/v1/expenses'; + query?: never; + url: '/api/eor/v1/timeoff-balances/{employment_id}'; }; -export type GetIndexExpenseErrors = { +export type GetShowTimeoffBalanceErrors = { /** * Bad Request */ @@ -11575,9 +14018,9 @@ export type GetIndexExpenseErrors = { */ 401: UnauthorizedResponse; /** - * Not Found + * TimeoffBalanceNotFoundResponse */ - 404: NotFoundResponse; + 404: TimeoffBalanceNotFoundResponse; /** * Unprocessable Entity */ @@ -11588,39 +14031,32 @@ export type GetIndexExpenseErrors = { 429: TooManyRequestsResponse; }; -export type GetIndexExpenseError = - GetIndexExpenseErrors[keyof GetIndexExpenseErrors]; +export type GetShowTimeoffBalanceError = + GetShowTimeoffBalanceErrors[keyof GetShowTimeoffBalanceErrors]; -export type GetIndexExpenseResponses = { +export type GetShowTimeoffBalanceResponses = { /** * Success */ - 201: ListExpenseResponse; + 200: TimeoffBalanceResponse; }; -export type GetIndexExpenseResponse = - GetIndexExpenseResponses[keyof GetIndexExpenseResponses]; +export type GetShowTimeoffBalanceResponse = + GetShowTimeoffBalanceResponses[keyof GetShowTimeoffBalanceResponses]; -export type PostCreateExpenseData = { - /** - * Expenses - */ - body?: ParamsToCreateExpense; - headers: { +export type GetDownloadResignationLetterData = { + 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. - * + * Offboarding request ID */ - Authorization: string; + offboarding_request_id: string; }; - path?: never; query?: never; - url: '/v1/expenses'; + url: '/api/eor/v1/resignations/{offboarding_request_id}/resignation-letter'; }; -export type PostCreateExpenseErrors = { +export type GetDownloadResignationLetterErrors = { /** * Bad Request */ @@ -11629,6 +14065,10 @@ export type PostCreateExpenseErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -11638,32 +14078,46 @@ export type PostCreateExpenseErrors = { */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PostCreateExpenseError = - PostCreateExpenseErrors[keyof PostCreateExpenseErrors]; +export type GetDownloadResignationLetterError = + GetDownloadResignationLetterErrors[keyof GetDownloadResignationLetterErrors]; -export type PostCreateExpenseResponses = { +export type GetDownloadResignationLetterResponses = { /** * Success */ - 201: ExpenseResponse; + 200: GenericFile; }; -export type PostCreateExpenseResponse = - PostCreateExpenseResponses[keyof PostCreateExpenseResponses]; +export type GetDownloadResignationLetterResponse = + GetDownloadResignationLetterResponses[keyof GetDownloadResignationLetterResponses]; -export type GetShowSsoConfigurationData = { +export type DeleteDeleteCompanyManagerData = { 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: { + /** + * User ID + */ + user_id: string; + }; query?: never; - url: '/v1/sso-configuration'; + url: '/api/eor/v1/company-managers/{user_id}'; }; -export type GetShowSsoConfigurationErrors = { +export type DeleteDeleteCompanyManagerErrors = { /** * Bad Request */ @@ -11679,33 +14133,39 @@ export type GetShowSsoConfigurationErrors = { /** * Unprocessable Entity */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ 429: TooManyRequestsResponse; }; -export type GetShowSsoConfigurationError = - GetShowSsoConfigurationErrors[keyof GetShowSsoConfigurationErrors]; +export type DeleteDeleteCompanyManagerError = + DeleteDeleteCompanyManagerErrors[keyof DeleteDeleteCompanyManagerErrors]; -export type GetShowSsoConfigurationResponses = { +export type DeleteDeleteCompanyManagerResponses = { /** * Success */ - 200: SsoConfigurationResponse; + 200: SuccessResponse; }; -export type GetShowSsoConfigurationResponse = - GetShowSsoConfigurationResponses[keyof GetShowSsoConfigurationResponses]; +export type DeleteDeleteCompanyManagerResponse = + DeleteDeleteCompanyManagerResponses[keyof DeleteDeleteCompanyManagerResponses]; -export type PostCreateSsoConfigurationData = { - /** - * CreateSSOConfiguration - */ - body: CreateSsoConfigurationParams; - path?: never; +export type GetShowCompanyManagerData = { + body?: never; + path: { + /** + * User ID + */ + user_id: string; + }; query?: never; - url: '/v1/sso-configuration'; + url: '/api/eor/v1/company-managers/{user_id}'; }; -export type PostCreateSsoConfigurationErrors = { +export type GetShowCompanyManagerErrors = { /** * Bad Request */ @@ -11718,50 +14178,42 @@ export type PostCreateSsoConfigurationErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostCreateSsoConfigurationError = - PostCreateSsoConfigurationErrors[keyof PostCreateSsoConfigurationErrors]; +export type GetShowCompanyManagerError = + GetShowCompanyManagerErrors[keyof GetShowCompanyManagerErrors]; -export type PostCreateSsoConfigurationResponses = { +export type GetShowCompanyManagerResponses = { /** - * Created + * Success */ - 201: CreateSsoConfigurationResponse; + 200: CompanyManagerResponse; }; -export type PostCreateSsoConfigurationResponse = - PostCreateSsoConfigurationResponses[keyof PostCreateSsoConfigurationResponses]; +export type GetShowCompanyManagerResponse = + GetShowCompanyManagerResponses[keyof GetShowCompanyManagerResponses]; -export type PutApproveContractAmendmentData = { +export type GetShowEmploymentOnboardingStepsData = { body?: never; path: { /** - * Contract amendment request ID + * Employment ID */ - contract_amendment_request_id: string; + employment_id: UuidSlug; }; query?: never; - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve'; + url: '/api/eor/v1/employments/{employment_id}/onboarding-steps'; }; -export type PutApproveContractAmendmentErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowEmploymentOnboardingStepsErrors = { /** * Unauthorized */ @@ -11770,89 +14222,94 @@ export type PutApproveContractAmendmentErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PutApproveContractAmendmentError = - PutApproveContractAmendmentErrors[keyof PutApproveContractAmendmentErrors]; +export type GetShowEmploymentOnboardingStepsError = + GetShowEmploymentOnboardingStepsErrors[keyof GetShowEmploymentOnboardingStepsErrors]; -export type PutApproveContractAmendmentResponses = { +export type GetShowEmploymentOnboardingStepsResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: EmploymentOnboardingStepsResponse; }; -export type PutApproveContractAmendmentResponse = - PutApproveContractAmendmentResponses[keyof PutApproveContractAmendmentResponses]; +export type GetShowEmploymentOnboardingStepsResponse = + GetShowEmploymentOnboardingStepsResponses[keyof GetShowEmploymentOnboardingStepsResponses]; -export type GetIndexContractorCurrencyData = { - body?: never; - path: { +export type PostAutomatableContractAmendmentData = { + /** + * Contract Amendment + */ + body?: CreateContractAmendmentParams; + 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?: { /** - * Restrict to currencies which payout is guaranteed (default: true) + * Version of the form schema */ - restrict_to_guaranteed_pay_out_currencies?: boolean; + json_schema_version?: number | 'latest'; }; - url: '/v1/contractors/employments/{employment_id}/contractor-currencies'; + url: '/api/eor/v1/contract-amendments/automatable'; }; -export type GetIndexContractorCurrencyErrors = { +export type PostAutomatableContractAmendmentErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; /** - * Internal Server Error + * Unprocessable Entity */ - 500: InternalServerErrorResponse; + 422: UnprocessableEntityResponse; }; -export type GetIndexContractorCurrencyError = - GetIndexContractorCurrencyErrors[keyof GetIndexContractorCurrencyErrors]; +export type PostAutomatableContractAmendmentError = + PostAutomatableContractAmendmentErrors[keyof PostAutomatableContractAmendmentErrors]; -export type GetIndexContractorCurrencyResponses = { +export type PostAutomatableContractAmendmentResponses = { /** * Success */ - 200: ContractorCurrencyResponse; + 200: ContractAmendmentAutomatableResponse; }; -export type GetIndexContractorCurrencyResponse = - GetIndexContractorCurrencyResponses[keyof GetIndexContractorCurrencyResponses]; +export type PostAutomatableContractAmendmentResponse = + PostAutomatableContractAmendmentResponses[keyof PostAutomatableContractAmendmentResponses]; -export type PostReplayWebhookEventData = { - /** - * WebhookEvent - */ - body: ReplayWebhookEventsParams; +export type GetIndexPayrollRunData = { + body?: never; path?: never; - query?: never; - url: '/v1/webhook-events/replay'; + 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: '/api/eor/v1/payroll-runs'; }; -export type PostReplayWebhookEventErrors = { +export type GetIndexPayrollRunErrors = { /** * Unauthorized */ @@ -11867,21 +14324,33 @@ export type PostReplayWebhookEventErrors = { 422: UnprocessableEntityResponse; }; -export type PostReplayWebhookEventError = - PostReplayWebhookEventErrors[keyof PostReplayWebhookEventErrors]; +export type GetIndexPayrollRunError = + GetIndexPayrollRunErrors[keyof GetIndexPayrollRunErrors]; -export type PostReplayWebhookEventResponses = { +export type GetIndexPayrollRunResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListPayrollRunResponse; }; -export type PostReplayWebhookEventResponse = - PostReplayWebhookEventResponses[keyof PostReplayWebhookEventResponses]; +export type GetIndexPayrollRunResponse = + GetIndexPayrollRunResponses[keyof GetIndexPayrollRunResponses]; -export type PostCreateCorTerminationRequestSubscriptionData = { - body?: never; +export type PatchUpdateEmployment4Data = { + /** + * 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: { /** * Employment ID @@ -11889,58 +14358,78 @@ export type PostCreateCorTerminationRequestSubscriptionData = { employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/cor-termination-requests'; + url: '/api/eor/v1/sandbox/employments/{employment_id}'; }; -export type PostCreateCorTerminationRequestSubscriptionErrors = { +export type PatchUpdateEmployment4Errors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostCreateCorTerminationRequestSubscriptionError = - PostCreateCorTerminationRequestSubscriptionErrors[keyof PostCreateCorTerminationRequestSubscriptionErrors]; +export type PatchUpdateEmployment4Error = + PatchUpdateEmployment4Errors[keyof PatchUpdateEmployment4Errors]; -export type PostCreateCorTerminationRequestSubscriptionResponses = { +export type PatchUpdateEmployment4Responses = { /** - * Created + * Success */ - 201: CorTerminationRequestCreatedResponse; + 200: EmploymentResponse; }; -export type PostCreateCorTerminationRequestSubscriptionResponse = - PostCreateCorTerminationRequestSubscriptionResponses[keyof PostCreateCorTerminationRequestSubscriptionResponses]; +export type PatchUpdateEmployment4Response = + PatchUpdateEmployment4Responses[keyof PatchUpdateEmployment4Responses]; -export type GetShowBackgroundCheckData = { - body?: never; - path: { +export type PatchUpdateEmployment3Data = { + /** + * Employment params + */ + body?: EmploymentUpdateParams; + 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: UuidSlug; + Authorization: string; + }; + path: { /** - * Background Check Id + * Employment ID */ - background_check_id: UuidSlug; + employment_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/background-checks/{background_check_id}'; + url: '/api/eor/v1/sandbox/employments/{employment_id}'; }; -export type GetShowBackgroundCheckErrors = { +export type PatchUpdateEmployment3Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -11949,24 +14438,32 @@ export type GetShowBackgroundCheckErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetShowBackgroundCheckError = - GetShowBackgroundCheckErrors[keyof GetShowBackgroundCheckErrors]; +export type PatchUpdateEmployment3Error = + PatchUpdateEmployment3Errors[keyof PatchUpdateEmployment3Errors]; -export type GetShowBackgroundCheckResponses = { +export type PatchUpdateEmployment3Responses = { /** * Success */ - 200: BackgroundChecksBackgroundCheckResponse; + 200: EmploymentResponse; }; -export type GetShowBackgroundCheckResponse = - GetShowBackgroundCheckResponses[keyof GetShowBackgroundCheckResponses]; +export type PatchUpdateEmployment3Response = + PatchUpdateEmployment3Responses[keyof PatchUpdateEmployment3Responses]; export type GetSchemaBenefitRenewalRequestData = { body?: never; @@ -11991,7 +14488,7 @@ export type GetSchemaBenefitRenewalRequestData = { */ json_schema_version?: number | 'latest'; }; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema'; + url: '/api/eor/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema'; }; export type GetSchemaBenefitRenewalRequestErrors = { @@ -12022,46 +14519,7 @@ export type GetSchemaBenefitRenewalRequestResponses = { export type GetSchemaBenefitRenewalRequestResponse = GetSchemaBenefitRenewalRequestResponses[keyof GetSchemaBenefitRenewalRequestResponses]; -export type PostGenerateMagicLinkData = { - /** - * Magic links generator body - */ - body: MagicLinkParams; - 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/magic-link'; -}; - -export type PostGenerateMagicLinkErrors = { - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type PostGenerateMagicLinkError = - PostGenerateMagicLinkErrors[keyof PostGenerateMagicLinkErrors]; - -export type PostGenerateMagicLinkResponses = { - /** - * Success - */ - 200: MagicLinkResponse; -}; - -export type PostGenerateMagicLinkResponse = - PostGenerateMagicLinkResponses[keyof PostGenerateMagicLinkResponses]; - -export type DeleteDeleteRecurringIncentiveData = { +export type DeleteDeleteIncentiveData = { body?: never; headers: { /** @@ -12074,15 +14532,15 @@ export type DeleteDeleteRecurringIncentiveData = { }; path: { /** - * Recurring Incentive ID + * Incentive ID */ id: string; }; query?: never; - url: '/v1/incentives/recurring/{id}'; + url: '/api/eor/v1/incentives/{id}'; }; -export type DeleteDeleteRecurringIncentiveErrors = { +export type DeleteDeleteIncentiveErrors = { /** * Bad Request */ @@ -12095,6 +14553,10 @@ export type DeleteDeleteRecurringIncentiveErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -12105,20 +14567,20 @@ export type DeleteDeleteRecurringIncentiveErrors = { 429: TooManyRequestsResponse; }; -export type DeleteDeleteRecurringIncentiveError = - DeleteDeleteRecurringIncentiveErrors[keyof DeleteDeleteRecurringIncentiveErrors]; +export type DeleteDeleteIncentiveError = + DeleteDeleteIncentiveErrors[keyof DeleteDeleteIncentiveErrors]; -export type DeleteDeleteRecurringIncentiveResponses = { +export type DeleteDeleteIncentiveResponses = { /** * Success */ - 200: DeleteRecurringIncentiveResponse; + 200: SuccessResponse; }; -export type DeleteDeleteRecurringIncentiveResponse = - DeleteDeleteRecurringIncentiveResponses[keyof DeleteDeleteRecurringIncentiveResponses]; +export type DeleteDeleteIncentiveResponse = + DeleteDeleteIncentiveResponses[keyof DeleteDeleteIncentiveResponses]; -export type GetIndexIncentiveData = { +export type GetShowIncentiveData = { body?: never; headers: { /** @@ -12129,33 +14591,17 @@ export type GetIndexIncentiveData = { */ 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 + * Incentive ID */ - page_size?: number; + id: string; }; - url: '/v1/incentives'; + query?: never; + url: '/api/eor/v1/incentives/{id}'; }; -export type GetIndexIncentiveErrors = { +export type GetShowIncentiveErrors = { /** * Bad Request */ @@ -12178,24 +14624,24 @@ export type GetIndexIncentiveErrors = { 429: TooManyRequestsResponse; }; -export type GetIndexIncentiveError = - GetIndexIncentiveErrors[keyof GetIndexIncentiveErrors]; +export type GetShowIncentiveError = + GetShowIncentiveErrors[keyof GetShowIncentiveErrors]; -export type GetIndexIncentiveResponses = { +export type GetShowIncentiveResponses = { /** * Success */ - 200: ListIncentivesResponse; + 200: IncentiveResponse; }; -export type GetIndexIncentiveResponse = - GetIndexIncentiveResponses[keyof GetIndexIncentiveResponses]; +export type GetShowIncentiveResponse = + GetShowIncentiveResponses[keyof GetShowIncentiveResponses]; -export type PostCreateIncentiveData = { +export type PatchUpdateIncentive2Data = { /** * Incentive */ - body?: CreateOneTimeIncentiveParams; + body?: UpdateIncentiveParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -12205,12 +14651,17 @@ export type PostCreateIncentiveData = { */ Authorization: string; }; - path?: never; + path: { + /** + * Incentive ID + */ + id: string; + }; query?: never; - url: '/v1/incentives'; + url: '/api/eor/v1/incentives/{id}'; }; -export type PostCreateIncentiveErrors = { +export type PatchUpdateIncentive2Errors = { /** * Bad Request */ @@ -12223,6 +14674,10 @@ export type PostCreateIncentiveErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -12233,30 +14688,48 @@ export type PostCreateIncentiveErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateIncentiveError = - PostCreateIncentiveErrors[keyof PostCreateIncentiveErrors]; +export type PatchUpdateIncentive2Error = + PatchUpdateIncentive2Errors[keyof PatchUpdateIncentive2Errors]; -export type PostCreateIncentiveResponses = { +export type PatchUpdateIncentive2Responses = { /** * Success */ - 201: IncentiveResponse; + 200: IncentiveResponse; }; -export type PostCreateIncentiveResponse = - PostCreateIncentiveResponses[keyof PostCreateIncentiveResponses]; +export type PatchUpdateIncentive2Response = + PatchUpdateIncentive2Responses[keyof PatchUpdateIncentive2Responses]; -export type PostCreateProbationCompletionLetterData = { +export type PatchUpdateIncentiveData = { /** - * Work Authorization Request + * Incentive */ - body: CreateProbationCompletionLetterParams; - path?: never; + 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/probation-completion-letter'; + url: '/api/eor/v1/incentives/{id}'; }; -export type PostCreateProbationCompletionLetterErrors = { +export type PatchUpdateIncentiveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -12265,140 +14738,205 @@ export type PostCreateProbationCompletionLetterErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostCreateProbationCompletionLetterError = - PostCreateProbationCompletionLetterErrors[keyof PostCreateProbationCompletionLetterErrors]; +export type PatchUpdateIncentiveError = + PatchUpdateIncentiveErrors[keyof PatchUpdateIncentiveErrors]; -export type PostCreateProbationCompletionLetterResponses = { +export type PatchUpdateIncentiveResponses = { /** * Success */ - 200: ProbationCompletionLetterResponse; + 200: IncentiveResponse; }; -export type PostCreateProbationCompletionLetterResponse = - PostCreateProbationCompletionLetterResponses[keyof PostCreateProbationCompletionLetterResponses]; +export type PatchUpdateIncentiveResponse = + PatchUpdateIncentiveResponses[keyof PatchUpdateIncentiveResponses]; -export type GetShowScheduledContractorInvoiceData = { +export type GetShowAdministrativeDetailsData = { body?: never; path: { /** - * Resource unique identifier + * Company ID */ - id: UuidSlug; + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; }; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/api/eor/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; }; -export type GetShowScheduledContractorInvoiceErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowAdministrativeDetailsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetShowScheduledContractorInvoiceError = - GetShowScheduledContractorInvoiceErrors[keyof GetShowScheduledContractorInvoiceErrors]; +export type GetShowAdministrativeDetailsError = + GetShowAdministrativeDetailsErrors[keyof GetShowAdministrativeDetailsErrors]; -export type GetShowScheduledContractorInvoiceResponses = { +export type GetShowAdministrativeDetailsResponses = { /** - * Success + * ShowLegalEntityAdministrativeDetailsResponse + * + * Country specific json schema driven administrative details for legal entities */ - 200: ContractorInvoiceScheduleResponse; + 200: { + data: { + [key: string]: unknown; + }; + }; }; -export type GetShowScheduledContractorInvoiceResponse = - GetShowScheduledContractorInvoiceResponses[keyof GetShowScheduledContractorInvoiceResponses]; +export type GetShowAdministrativeDetailsResponse = + GetShowAdministrativeDetailsResponses[keyof GetShowAdministrativeDetailsResponses]; -export type PatchUpdateScheduledContractorInvoice2Data = { +export type PutUpdateAdministrativeDetailsData = { /** - * Update parameters + * Legal entity administrative details params */ - body: UpdateScheduleContractorInvoiceParams; + body?: AdministrativeDetailsParams; path: { /** - * Resource unique identifier + * Company ID */ - id: UuidSlug; + company_id: UuidSlug; + /** + * Legal entity ID + */ + legal_entity_id: UuidSlug; }; query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/api/eor/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; }; -export type PatchUpdateScheduledContractorInvoice2Errors = { +export type PutUpdateAdministrativeDetailsErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PatchUpdateScheduledContractorInvoice2Error = - PatchUpdateScheduledContractorInvoice2Errors[keyof PatchUpdateScheduledContractorInvoice2Errors]; +export type PutUpdateAdministrativeDetailsError = + PutUpdateAdministrativeDetailsErrors[keyof PutUpdateAdministrativeDetailsErrors]; -export type PatchUpdateScheduledContractorInvoice2Responses = { +export type PutUpdateAdministrativeDetailsResponses = { /** - * Success + * ShowLegalEntityAdministrativeDetailsResponse + * + * Country specific json schema driven administrative details for legal entities */ - 200: ContractorInvoiceScheduleResponse; + 200: { + data: { + [key: string]: unknown; + }; + }; }; -export type PatchUpdateScheduledContractorInvoice2Response = - PatchUpdateScheduledContractorInvoice2Responses[keyof PatchUpdateScheduledContractorInvoice2Responses]; +export type PutUpdateAdministrativeDetailsResponse = + PutUpdateAdministrativeDetailsResponses[keyof PutUpdateAdministrativeDetailsResponses]; -export type PatchUpdateScheduledContractorInvoiceData = { - /** - * Update parameters - */ - body: UpdateScheduleContractorInvoiceParams; - path: { +export type GetIndexContractorInvoiceData = { + body?: never; + path?: never; + query?: { /** - * Resource unique identifier + * Filters contractor invoices by status matching the value. */ - id: UuidSlug; + 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; }; - query?: never; - url: '/v1/contractor-invoice-schedules/{id}'; + url: '/api/eor/v1/contractor-invoices'; }; -export type PatchUpdateScheduledContractorInvoiceErrors = { +export type GetIndexContractorInvoiceErrors = { /** * Unauthorized */ @@ -12417,46 +14955,40 @@ export type PatchUpdateScheduledContractorInvoiceErrors = { 422: UnprocessableEntityResponse; }; -export type PatchUpdateScheduledContractorInvoiceError = - PatchUpdateScheduledContractorInvoiceErrors[keyof PatchUpdateScheduledContractorInvoiceErrors]; +export type GetIndexContractorInvoiceError = + GetIndexContractorInvoiceErrors[keyof GetIndexContractorInvoiceErrors]; -export type PatchUpdateScheduledContractorInvoiceResponses = { +export type GetIndexContractorInvoiceResponses = { /** * Success */ - 200: ContractorInvoiceScheduleResponse; + 200: ListContractorInvoicesResponse; }; -export type PatchUpdateScheduledContractorInvoiceResponse = - PatchUpdateScheduledContractorInvoiceResponses[keyof PatchUpdateScheduledContractorInvoiceResponses]; +export type GetIndexContractorInvoiceResponse = + GetIndexContractorInvoiceResponses[keyof GetIndexContractorInvoiceResponses]; -export type GetShowBillingDocumentData = { +export type GetCategoriesExpenseData = { 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. - * + * The employment ID for which to list categories. Required if expense_id is not provided. */ - Authorization: string; - }; - path: { + employment_id?: string; /** - * The billing document's ID + * 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. */ - billing_document_id: string; - }; - query?: { + expense_id?: string; /** - * When true, includes billing document items whose type is not part of the standard set for the invoice type. + * Include un-selectable intermediate categories in the response */ - include_unrecognized_types?: boolean; + include_parents?: boolean; }; - url: '/v1/billing-documents/{billing_document_id}'; + url: '/api/eor/v1/expenses/categories'; }; -export type GetShowBillingDocumentErrors = { +export type GetCategoriesExpenseErrors = { /** * Bad Request */ @@ -12474,35 +15006,58 @@ export type GetShowBillingDocumentErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type GetShowBillingDocumentError = - GetShowBillingDocumentErrors[keyof GetShowBillingDocumentErrors]; +export type GetCategoriesExpenseError = + GetCategoriesExpenseErrors[keyof GetCategoriesExpenseErrors]; -export type GetShowBillingDocumentResponses = { +export type GetCategoriesExpenseResponses = { /** * Success */ - 200: BillingDocumentResponse; + 200: ListExpenseCategoriesResponse; }; -export type GetShowBillingDocumentResponse = - GetShowBillingDocumentResponses[keyof GetShowBillingDocumentResponses]; +export type GetCategoriesExpenseResponse = + GetCategoriesExpenseResponses[keyof GetCategoriesExpenseResponses]; -export type PostCreateEstimationPdfData = { - /** - * Estimate params - */ - body?: CostCalculatorEstimateParams; - path?: never; - query?: never; - url: '/v1/cost-calculator/estimation-pdf'; +export type GetIndexEmploymentContractDocumentData = { + body?: never; + 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 + */ + page_size?: number; + }; + url: '/api/eor/v1/employments/{employment_id}/contract-documents'; }; -export type PostCreateEstimationPdfErrors = { +export type GetIndexEmploymentContractDocumentErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -12513,32 +15068,49 @@ export type PostCreateEstimationPdfErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateEstimationPdfError = - PostCreateEstimationPdfErrors[keyof PostCreateEstimationPdfErrors]; +export type GetIndexEmploymentContractDocumentError = + GetIndexEmploymentContractDocumentErrors[keyof GetIndexEmploymentContractDocumentErrors]; -export type PostCreateEstimationPdfResponses = { +export type GetIndexEmploymentContractDocumentResponses = { /** * Success */ - 200: CostCalculatorEstimatePdfResponse; + 200: IndexContractDocumentsResponse; }; -export type PostCreateEstimationPdfResponse = - PostCreateEstimationPdfResponses[keyof PostCreateEstimationPdfResponses]; +export type GetIndexEmploymentContractDocumentResponse = + GetIndexEmploymentContractDocumentResponses[keyof GetIndexEmploymentContractDocumentResponses]; -export type GetShowWorkAuthorizationRequestData = { +export type GetShowContractorContractDetailsCountryData = { body?: never; path: { /** - * work authorization request ID + * Country code according to ISO 3-digit alphabetic codes */ - id: string; + country_code: string; }; - query?: never; - url: '/v1/work-authorization-requests/{id}'; + query?: { + /** + * Employment ID + */ + employment_id?: string; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/api/eor/v1/countries/{country_code}/contractor-contract-details'; }; -export type GetShowWorkAuthorizationRequestErrors = { +export type GetShowContractorContractDetailsCountryErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -12547,80 +15119,95 @@ export type GetShowWorkAuthorizationRequestErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetShowWorkAuthorizationRequestError = - GetShowWorkAuthorizationRequestErrors[keyof GetShowWorkAuthorizationRequestErrors]; +export type GetShowContractorContractDetailsCountryError = + GetShowContractorContractDetailsCountryErrors[keyof GetShowContractorContractDetailsCountryErrors]; -export type GetShowWorkAuthorizationRequestResponses = { +export type GetShowContractorContractDetailsCountryResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: ContractorContractDetailsResponse; }; -export type GetShowWorkAuthorizationRequestResponse = - GetShowWorkAuthorizationRequestResponses[keyof GetShowWorkAuthorizationRequestResponses]; +export type GetShowContractorContractDetailsCountryResponse = + GetShowContractorContractDetailsCountryResponses[keyof GetShowContractorContractDetailsCountryResponses]; -export type PatchUpdateWorkAuthorizationRequest2Data = { - /** - * Work Authorization Request - */ - body: UpdateWorkAuthorizationRequestParams; +export type GetGetUserScimData = { + body?: never; path: { /** - * work authorization request ID + * User ID (slug) */ id: string; }; query?: never; - url: '/v1/work-authorization-requests/{id}'; + url: '/api/eor/v1/scim/v2/Users/{id}'; }; -export type PatchUpdateWorkAuthorizationRequest2Errors = { +export type GetGetUserScimErrors = { /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: IntegrationsScimErrorResponse; /** - * Unprocessable Entity + * Not Found */ - 422: UnprocessableEntityResponse; + 404: IntegrationsScimErrorResponse; }; -export type PatchUpdateWorkAuthorizationRequest2Error = - PatchUpdateWorkAuthorizationRequest2Errors[keyof PatchUpdateWorkAuthorizationRequest2Errors]; +export type GetGetUserScimError = + GetGetUserScimErrors[keyof GetGetUserScimErrors]; -export type PatchUpdateWorkAuthorizationRequest2Responses = { +export type GetGetUserScimResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: IntegrationsScimUser; }; -export type PatchUpdateWorkAuthorizationRequest2Response = - PatchUpdateWorkAuthorizationRequest2Responses[keyof PatchUpdateWorkAuthorizationRequest2Responses]; +export type GetGetUserScimResponse = + GetGetUserScimResponses[keyof GetGetUserScimResponses]; -export type PatchUpdateWorkAuthorizationRequestData = { - /** - * Work Authorization Request - */ - body: UpdateWorkAuthorizationRequestParams; +export type GetIndexEmploymentFileData = { + body?: never; path: { /** - * work authorization request ID + * Employment ID */ - id: string; + employment_id: string; }; - query?: never; - url: '/v1/work-authorization-requests/{id}'; + 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: '/api/eor/v1/employments/{employment_id}/files'; }; -export type PatchUpdateWorkAuthorizationRequestErrors = { +export type GetIndexEmploymentFileErrors = { /** * Unauthorized */ @@ -12635,181 +15222,206 @@ export type PatchUpdateWorkAuthorizationRequestErrors = { 422: UnprocessableEntityResponse; }; -export type PatchUpdateWorkAuthorizationRequestError = - PatchUpdateWorkAuthorizationRequestErrors[keyof PatchUpdateWorkAuthorizationRequestErrors]; +export type GetIndexEmploymentFileError = + GetIndexEmploymentFileErrors[keyof GetIndexEmploymentFileErrors]; -export type PatchUpdateWorkAuthorizationRequestResponses = { +export type GetIndexEmploymentFileResponses = { /** * Success */ - 200: WorkAuthorizationRequestResponse; + 200: ListFilesResponse; }; -export type PatchUpdateWorkAuthorizationRequestResponse = - PatchUpdateWorkAuthorizationRequestResponses[keyof PatchUpdateWorkAuthorizationRequestResponses]; +export type GetIndexEmploymentFileResponse = + GetIndexEmploymentFileResponses[keyof GetIndexEmploymentFileResponses]; -export type PostCreateProbationExtensionData = { +export type PostManageContractorPlusSubscriptionSubscriptionData = { /** - * ProbationExtension + * Manage Contractor Plus subscription params */ - body: CreateProbationExtensionParams; - path?: never; + body: ManageContractorPlusSubscriptionOperationsParams; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/probation-extensions'; + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-plus-subscription'; }; -export type PostCreateProbationExtensionErrors = { +export type PostManageContractorPlusSubscriptionSubscriptionErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity + * Forbidden */ - 422: UnprocessableEntityResponse; + 403: ForbiddenResponse; }; -export type PostCreateProbationExtensionError = - PostCreateProbationExtensionErrors[keyof PostCreateProbationExtensionErrors]; +export type PostManageContractorPlusSubscriptionSubscriptionError = + PostManageContractorPlusSubscriptionSubscriptionErrors[keyof PostManageContractorPlusSubscriptionSubscriptionErrors]; -export type PostCreateProbationExtensionResponses = { +export type PostManageContractorPlusSubscriptionSubscriptionResponses = { /** * Success */ - 200: ProbationExtensionResponse; + 200: SuccessResponse; }; -export type PostCreateProbationExtensionResponse = - PostCreateProbationExtensionResponses[keyof PostCreateProbationExtensionResponses]; +export type PostManageContractorPlusSubscriptionSubscriptionResponse = + PostManageContractorPlusSubscriptionSubscriptionResponses[keyof PostManageContractorPlusSubscriptionSubscriptionResponses]; -export type PostCreateRiskReserveData = { +export type PostCreateEligibilityQuestionnaireData = { /** - * Risk Reserve + * Eligibility questionnaire submission */ - body: CreateRiskReserveParams; + body: SubmitEligibilityQuestionnaireRequest; path?: never; - query?: never; - url: '/v1/risk-reserve'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/api/eor/v1/contractors/eligibility-questionnaire'; }; -export type PostCreateRiskReserveErrors = { +export type PostCreateEligibilityQuestionnaireErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictErrorResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type PostCreateRiskReserveError = - PostCreateRiskReserveErrors[keyof PostCreateRiskReserveErrors]; +export type PostCreateEligibilityQuestionnaireError = + PostCreateEligibilityQuestionnaireErrors[keyof PostCreateEligibilityQuestionnaireErrors]; -export type PostCreateRiskReserveResponses = { +export type PostCreateEligibilityQuestionnaireResponses = { /** - * Success + * Questionnaire submitted successfully */ - 200: SuccessResponse; + 201: EligibilityQuestionnaireResponse; }; -export type PostCreateRiskReserveResponse = - PostCreateRiskReserveResponses[keyof PostCreateRiskReserveResponses]; +export type PostCreateEligibilityQuestionnaireResponse = + PostCreateEligibilityQuestionnaireResponses[keyof PostCreateEligibilityQuestionnaireResponses]; -export type GetShowCompanyComplianceProfileData = { - body?: never; +export type PutUpdateEmploymentBasicInformationData = { + /** + * Employment basic information params + */ + body?: EmploymentBasicInformationParams; path: { /** - * Company ID + * Employment ID */ - company_id: UuidSlug; + employment_id: string; }; query?: never; - url: '/v1/companies/{company_id}/compliance-profile'; + url: '/api/eor/v1/employments/{employment_id}/basic_information'; }; -export type GetShowCompanyComplianceProfileErrors = { +export type PutUpdateEmploymentBasicInformationErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetShowCompanyComplianceProfileError = - GetShowCompanyComplianceProfileErrors[keyof GetShowCompanyComplianceProfileErrors]; +export type PutUpdateEmploymentBasicInformationError = + PutUpdateEmploymentBasicInformationErrors[keyof PutUpdateEmploymentBasicInformationErrors]; -export type GetShowCompanyComplianceProfileResponses = { +export type PutUpdateEmploymentBasicInformationResponses = { /** * Success */ - 200: CompanyComplianceProfileResponse; + 200: EmploymentResponse; }; -export type GetShowCompanyComplianceProfileResponse = - GetShowCompanyComplianceProfileResponses[keyof GetShowCompanyComplianceProfileResponses]; +export type PutUpdateEmploymentBasicInformationResponse = + PutUpdateEmploymentBasicInformationResponses[keyof PutUpdateEmploymentBasicInformationResponses]; -export type GetIndexCompanyProductPriceData = { +export type GetShowCorTerminationRequestSubscriptionData = { body?: never; path: { /** - * Company ID + * Employment ID */ - company_id: UuidSlug; + employment_id: string; + /** + * Termination Request ID + */ + termination_request_id: string; }; query?: never; - url: '/v1/companies/{company_id}/product-prices'; + url: '/api/eor/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}'; }; -export type GetIndexCompanyProductPriceErrors = { +export type GetShowCorTerminationRequestSubscriptionErrors = { /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetIndexCompanyProductPriceError = - GetIndexCompanyProductPriceErrors[keyof GetIndexCompanyProductPriceErrors]; +export type GetShowCorTerminationRequestSubscriptionError = + GetShowCorTerminationRequestSubscriptionErrors[keyof GetShowCorTerminationRequestSubscriptionErrors]; -export type GetIndexCompanyProductPriceResponses = { +export type GetShowCorTerminationRequestSubscriptionResponses = { /** * Success */ - 200: ListProductPricesResponse; + 200: CorTerminationRequestResponse; }; -export type GetIndexCompanyProductPriceResponse = - GetIndexCompanyProductPriceResponses[keyof GetIndexCompanyProductPriceResponses]; +export type GetShowCorTerminationRequestSubscriptionResponse = + GetShowCorTerminationRequestSubscriptionResponses[keyof GetShowCorTerminationRequestSubscriptionResponses]; -export type GetShowCompanyData = { - body?: never; +export type PostCreateLegalEntityCompanyData = { + /** + * Create legal entity params + */ + 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. @@ -12826,10 +15438,10 @@ export type GetShowCompanyData = { company_id: string; }; query?: never; - url: '/v1/companies/{company_id}'; + url: '/api/eor/v1/sandbox/companies/{company_id}/legal-entities'; }; -export type GetShowCompanyErrors = { +export type PostCreateLegalEntityCompanyErrors = { /** * Bad Request */ @@ -12852,54 +15464,65 @@ export type GetShowCompanyErrors = { 429: TooManyRequestsResponse; }; -export type GetShowCompanyError = - GetShowCompanyErrors[keyof GetShowCompanyErrors]; +export type PostCreateLegalEntityCompanyError = + PostCreateLegalEntityCompanyErrors[keyof PostCreateLegalEntityCompanyErrors]; -export type GetShowCompanyResponses = { +export type PostCreateLegalEntityCompanyResponses = { /** - * Success + * Legal entity created */ - 200: CompanyResponse; + 201: { + data?: { + /** + * Legal entity slug + */ + legal_entity_id?: string; + /** + * Legal entity name + */ + name?: string; + /** + * Legal entity status + */ + status?: string; + }; + }; }; -export type GetShowCompanyResponse = - GetShowCompanyResponses[keyof GetShowCompanyResponses]; +export type PostCreateLegalEntityCompanyResponse = + PostCreateLegalEntityCompanyResponses[keyof PostCreateLegalEntityCompanyResponses]; -export type PatchUpdateCompany2Data = { - /** - * Update Company params - */ - body?: UpdateCompanyParams; - headers: { +export type GetPayDetailDataGphData = { + 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. - * + * The preferred language of the inquiring user in Workday */ - Authorization: string; + accept_language?: string; }; - path: { + path?: never; + query: { /** - * Company ID - * + * The pay group ID for identifying the pay group at the vendor system */ - company_id: string; - }; - query?: { + payGroupExternalId: string; /** - * Version of the address_details form schema + * The run type id provided in the paySummary API */ - address_details_json_schema_version?: number | 'latest'; + runTypeId: string; /** - * Version of the bank_account_details form schema + * The cycle type id, defaults to the main run if not provided */ - bank_account_details_json_schema_version?: number | 'latest'; + cycleTypeId?: string; + /** + * The period end date in question, defaults to current period if not provided + */ + periodEndDate?: Date; }; - url: '/v1/companies/{company_id}'; + url: '/api/eor/v1/wd/gph/payDetailData'; }; -export type PatchUpdateCompany2Errors = { +export type GetPayDetailDataGphErrors = { /** * Bad Request */ @@ -12912,128 +15535,85 @@ export type PatchUpdateCompany2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchUpdateCompany2Error = - PatchUpdateCompany2Errors[keyof PatchUpdateCompany2Errors]; +export type GetPayDetailDataGphError = + GetPayDetailDataGphErrors[keyof GetPayDetailDataGphErrors]; -export type PatchUpdateCompany2Responses = { +export type GetPayDetailDataGphResponses = { /** * Success */ - 200: CompanyResponse; + 200: PayDetailDataResponse; }; -export type PatchUpdateCompany2Response = - PatchUpdateCompany2Responses[keyof PatchUpdateCompany2Responses]; +export type GetPayDetailDataGphResponse = + GetPayDetailDataGphResponses[keyof GetPayDetailDataGphResponses]; -export type PatchUpdateCompanyData = { - /** - * 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 GetShowRegionFieldData = { + body?: never; path: { /** - * Company ID - * + * Slug */ - company_id: string; + slug: string; }; query?: { /** - * Version of the address_details form schema - */ - address_details_json_schema_version?: number | 'latest'; - /** - * Version of the bank_account_details form schema + * If the premium benefits should be included in the response */ - bank_account_details_json_schema_version?: number | 'latest'; + include_premium_benefits?: boolean; }; - url: '/v1/companies/{company_id}'; + url: '/api/eor/v1/cost-calculator/regions/{slug}/fields'; }; -export type PatchUpdateCompanyErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowRegionFieldErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests + * Internal Server Error */ - 429: TooManyRequestsResponse; + 500: InternalServerErrorResponse; }; -export type PatchUpdateCompanyError = - PatchUpdateCompanyErrors[keyof PatchUpdateCompanyErrors]; +export type GetShowRegionFieldError = + GetShowRegionFieldErrors[keyof GetShowRegionFieldErrors]; -export type PatchUpdateCompanyResponses = { +export type GetShowRegionFieldResponses = { /** * Success */ - 200: CompanyResponse; + 200: JsonSchemaResponse; }; -export type PatchUpdateCompanyResponse = - PatchUpdateCompanyResponses[keyof PatchUpdateCompanyResponses]; +export type GetShowRegionFieldResponse = + GetShowRegionFieldResponses[keyof GetShowRegionFieldResponses]; -export type GetDownloadResignationLetterData = { +export type PostUpdateCancelOnboardingData = { body?: never; path: { /** - * Offboarding request ID + * Employment ID */ - offboarding_request_id: string; + employment_id: string; + }; + query?: { + /** + * Whether the request should be performed async + * + */ + async?: boolean; }; - query?: never; - url: '/v1/resignations/{offboarding_request_id}/resignation-letter'; + url: '/api/eor/v1/cancel-onboarding/{employment_id}'; }; -export type GetDownloadResignationLetterErrors = { +export type PostUpdateCancelOnboardingErrors = { /** * Bad Request */ 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -13044,51 +15624,47 @@ export type GetDownloadResignationLetterErrors = { 429: TooManyRequestsResponse; }; -export type GetDownloadResignationLetterError = - GetDownloadResignationLetterErrors[keyof GetDownloadResignationLetterErrors]; +export type PostUpdateCancelOnboardingError = + PostUpdateCancelOnboardingErrors[keyof PostUpdateCancelOnboardingErrors]; -export type GetDownloadResignationLetterResponses = { +export type PostUpdateCancelOnboardingResponses = { /** * Success */ - 200: GenericFile; + 200: SuccessResponse; }; -export type GetDownloadResignationLetterResponse = - GetDownloadResignationLetterResponses[keyof GetDownloadResignationLetterResponses]; +export type PostUpdateCancelOnboardingResponse = + PostUpdateCancelOnboardingResponses[keyof PostUpdateCancelOnboardingResponses]; -export type PutUpdateEmploymentFederalTaxesData = { +export type PostCancelEmployeeTimeoffData = { /** - * Employment federal taxes params + * CancelTimeoff */ - body?: EmploymentFederalTaxesParams; + body: CancelTimeoffParams; path: { /** - * Employment ID + * Timeoff ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employments/{employment_id}/federal-taxes'; + url: '/api/eor/v1/employee/timeoff/{id}/cancel'; }; -export type PutUpdateEmploymentFederalTaxesErrors = { +export type PostCancelEmployeeTimeoffErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -13099,57 +15675,44 @@ export type PutUpdateEmploymentFederalTaxesErrors = { 429: TooManyRequestsResponse; }; -export type PutUpdateEmploymentFederalTaxesError = - PutUpdateEmploymentFederalTaxesErrors[keyof PutUpdateEmploymentFederalTaxesErrors]; +export type PostCancelEmployeeTimeoffError = + PostCancelEmployeeTimeoffErrors[keyof PostCancelEmployeeTimeoffErrors]; -export type PutUpdateEmploymentFederalTaxesResponses = { +export type PostCancelEmployeeTimeoffResponses = { /** * Success */ - 200: SuccessResponse; + 200: TimeoffResponse; }; -export type PutUpdateEmploymentFederalTaxesResponse = - PutUpdateEmploymentFederalTaxesResponses[keyof PutUpdateEmploymentFederalTaxesResponses]; +export type PostCancelEmployeeTimeoffResponse = + PostCancelEmployeeTimeoffResponses[keyof PostCancelEmployeeTimeoffResponses]; -export type GetIndexContractAmendmentData = { +export type GetDownloadExpenseReceiptData = { 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 - */ - employment_id?: string; - /** - * Contract Amendment status - */ - status?: ContractAmendmentStatus; - /** - * Starts fetching records after the given page - */ - page?: number; + path: { /** - * Number of items per page + * The expense ID */ - page_size?: number; + expense_id: string; }; - url: '/v1/contract-amendments'; + query?: never; + url: '/api/eor/v1/expenses/{expense_id}/receipt'; }; -export type GetIndexContractAmendmentErrors = { +export type GetDownloadExpenseReceiptErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -13158,26 +15721,27 @@ export type GetIndexContractAmendmentErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetIndexContractAmendmentError = - GetIndexContractAmendmentErrors[keyof GetIndexContractAmendmentErrors]; +export type GetDownloadExpenseReceiptError = + GetDownloadExpenseReceiptErrors[keyof GetDownloadExpenseReceiptErrors]; -export type GetIndexContractAmendmentResponses = { +export type GetDownloadExpenseReceiptResponses = { /** * Success */ - 200: ListContractAmendmentResponse; + 200: GenericFile; }; -export type GetIndexContractAmendmentResponse = - GetIndexContractAmendmentResponses[keyof GetIndexContractAmendmentResponses]; +export type GetDownloadExpenseReceiptResponse = + GetDownloadExpenseReceiptResponses[keyof GetDownloadExpenseReceiptResponses]; -export type PostCreateContractAmendmentData = { - /** - * Contract Amendment - */ - body?: CreateContractAmendmentParams; +export type GetIndexBenefitOffersCountrySummaryData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -13188,20 +15752,11 @@ export type PostCreateContractAmendmentData = { Authorization: string; }; path?: never; - query?: { - /** - * Version of the form schema - */ - json_schema_version?: number | 'latest'; - }; - url: '/v1/contract-amendments'; + query?: never; + url: '/api/eor/v1/benefit-offers/country-summaries'; }; -export type PostCreateContractAmendmentErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetIndexBenefitOffersCountrySummaryErrors = { /** * Not Found */ @@ -13212,32 +15767,32 @@ export type PostCreateContractAmendmentErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateContractAmendmentError = - PostCreateContractAmendmentErrors[keyof PostCreateContractAmendmentErrors]; +export type GetIndexBenefitOffersCountrySummaryError = + GetIndexBenefitOffersCountrySummaryErrors[keyof GetIndexBenefitOffersCountrySummaryErrors]; -export type PostCreateContractAmendmentResponses = { +export type GetIndexBenefitOffersCountrySummaryResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 200: CountrySummariesResponse; }; -export type PostCreateContractAmendmentResponse = - PostCreateContractAmendmentResponses[keyof PostCreateContractAmendmentResponses]; +export type GetIndexBenefitOffersCountrySummaryResponse = + GetIndexBenefitOffersCountrySummaryResponses[keyof GetIndexBenefitOffersCountrySummaryResponses]; -export type GetShowPayrollRunData = { +export type GetIndexLeavePoliciesDetailsData = { body?: never; path: { /** - * Payroll run ID + * Employment ID */ - payroll_run_id: string; + employment_id: string; }; query?: never; - url: '/v1/payroll-runs/{payroll_run_id}'; + url: '/api/eor/v1/leave-policies/details/{employment_id}'; }; -export type GetShowPayrollRunErrors = { +export type GetIndexLeavePoliciesDetailsErrors = { /** * Unauthorized */ @@ -13252,88 +15807,62 @@ export type GetShowPayrollRunErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowPayrollRunError = - GetShowPayrollRunErrors[keyof GetShowPayrollRunErrors]; +export type GetIndexLeavePoliciesDetailsError = + GetIndexLeavePoliciesDetailsErrors[keyof GetIndexLeavePoliciesDetailsErrors]; -export type GetShowPayrollRunResponses = { +export type GetIndexLeavePoliciesDetailsResponses = { /** * Success */ - 200: PayrollRunResponse; + 200: ListLeavePoliciesDetailsResponse; }; -export type GetShowPayrollRunResponse = - GetShowPayrollRunResponses[keyof GetShowPayrollRunResponses]; +export type GetIndexLeavePoliciesDetailsResponse = + GetIndexLeavePoliciesDetailsResponses[keyof GetIndexLeavePoliciesDetailsResponses]; -export type GetDownloadExpenseReceiptData = { +export type GetIndexWorkAuthorizationRequestData = { body?: never; - path: { + path?: never; + query?: { /** - * The expense ID + * Filter results on the given status */ - expense_id: string; - }; - query?: never; - url: '/v1/expenses/{expense_id}/receipt'; -}; - -export type GetDownloadExpenseReceiptErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; -}; - -export type GetDownloadExpenseReceiptError = - GetDownloadExpenseReceiptErrors[keyof GetDownloadExpenseReceiptErrors]; - -export type GetDownloadExpenseReceiptResponses = { - /** - * Success - */ - 200: GenericFile; -}; - -export type GetDownloadExpenseReceiptResponse = - GetDownloadExpenseReceiptResponses[keyof GetDownloadExpenseReceiptResponses]; - -export type GetShowTravelLetterRequestData = { - body?: never; - path: { + status?: + | 'pending' + | 'cancelled' + | 'declined_by_manager' + | 'declined_by_remote' + | 'approved_by_manager' + | 'approved_by_remote'; /** - * travel letter request ID + * Filter results on the given employment slug */ - id: UuidSlug; + 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/travel-letter-requests/{id}'; + url: '/api/eor/v1/work-authorization-requests'; }; -export type GetShowTravelLetterRequestErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetIndexWorkAuthorizationRequestErrors = { /** * Not Found */ @@ -13344,39 +15873,49 @@ export type GetShowTravelLetterRequestErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowTravelLetterRequestError = - GetShowTravelLetterRequestErrors[keyof GetShowTravelLetterRequestErrors]; +export type GetIndexWorkAuthorizationRequestError = + GetIndexWorkAuthorizationRequestErrors[keyof GetIndexWorkAuthorizationRequestErrors]; -export type GetShowTravelLetterRequestResponses = { +export type GetIndexWorkAuthorizationRequestResponses = { /** * Success */ - 200: TravelLetterResponse; + 200: ListWorkAuthorizationRequestsResponse; }; -export type GetShowTravelLetterRequestResponse = - GetShowTravelLetterRequestResponses[keyof GetShowTravelLetterRequestResponses]; +export type GetIndexWorkAuthorizationRequestResponse = + GetIndexWorkAuthorizationRequestResponses[keyof GetIndexWorkAuthorizationRequestResponses]; -export type PatchUpdateTravelLetterRequest2Data = { - /** - * Travel letter Request - */ - body: UpdateTravelLetterRequestParams; +export type GetIndexBenefitOfferData = { + body?: never; path: { /** - * Travel letter Request ID + * Unique identifier of the employment */ - id: string; + employment_id: UuidSlug; }; - query?: never; - url: '/v1/travel-letter-requests/{id}'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/api/eor/v1/employments/{employment_id}/benefit-offers'; }; -export type PatchUpdateTravelLetterRequest2Errors = { +export type GetIndexBenefitOfferErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -13387,39 +15926,48 @@ export type PatchUpdateTravelLetterRequest2Errors = { 422: UnprocessableEntityResponse; }; -export type PatchUpdateTravelLetterRequest2Error = - PatchUpdateTravelLetterRequest2Errors[keyof PatchUpdateTravelLetterRequest2Errors]; +export type GetIndexBenefitOfferError = + GetIndexBenefitOfferErrors[keyof GetIndexBenefitOfferErrors]; -export type PatchUpdateTravelLetterRequest2Responses = { +export type GetIndexBenefitOfferResponses = { /** * Success */ - 200: TravelLetterResponse; + 200: EmploymentsBenefitOffersListBenefitOffers; }; -export type PatchUpdateTravelLetterRequest2Response = - PatchUpdateTravelLetterRequest2Responses[keyof PatchUpdateTravelLetterRequest2Responses]; +export type GetIndexBenefitOfferResponse = + GetIndexBenefitOfferResponses[keyof GetIndexBenefitOfferResponses]; -export type PatchUpdateTravelLetterRequestData = { +export type PutUpdateBenefitOfferData = { /** - * Travel letter Request + * Upsert employment benefit offers request */ - body: UpdateTravelLetterRequestParams; + body: UnifiedEmploymentUpsertBenefitOffersRequest; path: { /** - * Travel letter Request ID + * Unique identifier of the employment */ - id: string; + employment_id: UuidSlug; }; - query?: never; - url: '/v1/travel-letter-requests/{id}'; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/api/eor/v1/employments/{employment_id}/benefit-offers'; }; -export type PatchUpdateTravelLetterRequestErrors = { +export type PutUpdateBenefitOfferErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -13430,20 +15978,20 @@ export type PatchUpdateTravelLetterRequestErrors = { 422: UnprocessableEntityResponse; }; -export type PatchUpdateTravelLetterRequestError = - PatchUpdateTravelLetterRequestErrors[keyof PatchUpdateTravelLetterRequestErrors]; +export type PutUpdateBenefitOfferError = + PutUpdateBenefitOfferErrors[keyof PutUpdateBenefitOfferErrors]; -export type PatchUpdateTravelLetterRequestResponses = { +export type PutUpdateBenefitOfferResponses = { /** * Success */ - 200: TravelLetterResponse; + 200: SuccessResponse; }; -export type PatchUpdateTravelLetterRequestResponse = - PatchUpdateTravelLetterRequestResponses[keyof PatchUpdateTravelLetterRequestResponses]; +export type PutUpdateBenefitOfferResponse = + PutUpdateBenefitOfferResponses[keyof PutUpdateBenefitOfferResponses]; -export type GetShowTimeoffBalanceData = { +export type GetIndexEmploymentData = { body?: never; headers: { /** @@ -13454,68 +16002,106 @@ export type GetShowTimeoffBalanceData = { */ Authorization: string; }; - path: { + path?: never; + query?: { /** - * Employment ID for which to show the time off balance + * Company ID */ - employment_id: string; + 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'; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - query?: never; - url: '/v1/timeoff-balances/{employment_id}'; + url: '/api/eor/v1/employments'; }; -export type GetShowTimeoffBalanceErrors = { +export type GetIndexEmploymentErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** - * TimeoffBalanceNotFoundResponse + * Conflict */ - 404: TimeoffBalanceNotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetShowTimeoffBalanceError = - GetShowTimeoffBalanceErrors[keyof GetShowTimeoffBalanceErrors]; +export type GetIndexEmploymentError = + GetIndexEmploymentErrors[keyof GetIndexEmploymentErrors]; -export type GetShowTimeoffBalanceResponses = { +export type GetIndexEmploymentResponses = { /** * Success */ - 200: TimeoffBalanceResponse; + 200: ListEmploymentsResponse; }; -export type GetShowTimeoffBalanceResponse = - GetShowTimeoffBalanceResponses[keyof GetShowTimeoffBalanceResponses]; +export type GetIndexEmploymentResponse = + GetIndexEmploymentResponses[keyof GetIndexEmploymentResponses]; -export type PutUpdateEmploymentBasicInformationData = { +export type PostCreateEmployment2Data = { /** - * Employment basic information params + * Employment params */ - body?: EmploymentBasicInformationParams; - path: { + 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; }; - query?: never; - url: '/v1/employments/{employment_id}/basic_information'; + path?: never; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/api/eor/v1/employments'; }; -export type PutUpdateEmploymentBasicInformationErrors = { +export type PostCreateEmployment2Errors = { /** * Bad Request */ @@ -13538,80 +16124,30 @@ export type PutUpdateEmploymentBasicInformationErrors = { 429: TooManyRequestsResponse; }; -export type PutUpdateEmploymentBasicInformationError = - PutUpdateEmploymentBasicInformationErrors[keyof PutUpdateEmploymentBasicInformationErrors]; +export type PostCreateEmployment2Error = + PostCreateEmployment2Errors[keyof PostCreateEmployment2Errors]; -export type PutUpdateEmploymentBasicInformationResponses = { +export type PostCreateEmployment2Responses = { /** * Success */ - 200: EmploymentResponse; + 200: EmploymentCreationResponse; }; -export type PutUpdateEmploymentBasicInformationResponse = - PutUpdateEmploymentBasicInformationResponses[keyof PutUpdateEmploymentBasicInformationResponses]; +export type PostCreateEmployment2Response = + PostCreateEmployment2Responses[keyof PostCreateEmployment2Responses]; -export type GetCategoriesExpenseData = { +export type GetShowTimeoffData = { body?: never; - path?: never; - query?: { - /** - * The employment ID for which to list categories. Required if expense_id is not provided. - */ - 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; + headers: { /** - * Include un-selectable intermediate categories in the response + * 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_parents?: boolean; + Authorization: string; }; - url: '/v1/expenses/categories'; -}; - -export type GetCategoriesExpenseErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; -}; - -export type GetCategoriesExpenseError = - GetCategoriesExpenseErrors[keyof GetCategoriesExpenseErrors]; - -export type GetCategoriesExpenseResponses = { - /** - * Success - */ - 200: ListExpenseCategoriesResponse; -}; - -export type GetCategoriesExpenseResponse = - GetCategoriesExpenseResponses[keyof GetCategoriesExpenseResponses]; - -export type PostCancelEmployeeTimeoffData = { - /** - * CancelTimeoff - */ - body: CancelTimeoffParams; path: { /** * Timeoff ID @@ -13619,10 +16155,10 @@ export type PostCancelEmployeeTimeoffData = { id: string; }; query?: never; - url: '/v1/employee/timeoff/{id}/cancel'; + url: '/api/eor/v1/timeoff/{id}'; }; -export type PostCancelEmployeeTimeoffErrors = { +export type GetShowTimeoffErrors = { /** * Bad Request */ @@ -13645,21 +16181,24 @@ export type PostCancelEmployeeTimeoffErrors = { 429: TooManyRequestsResponse; }; -export type PostCancelEmployeeTimeoffError = - PostCancelEmployeeTimeoffErrors[keyof PostCancelEmployeeTimeoffErrors]; +export type GetShowTimeoffError = + GetShowTimeoffErrors[keyof GetShowTimeoffErrors]; -export type PostCancelEmployeeTimeoffResponses = { +export type GetShowTimeoffResponses = { /** * Success */ 200: TimeoffResponse; }; -export type PostCancelEmployeeTimeoffResponse = - PostCancelEmployeeTimeoffResponses[keyof PostCancelEmployeeTimeoffResponses]; +export type GetShowTimeoffResponse = + GetShowTimeoffResponses[keyof GetShowTimeoffResponses]; -export type GetShowFormCountryData = { - body?: never; +export type PatchUpdateTimeoff2Data = { + /** + * UpdateTimeoff + */ + body: UpdateApprovedTimeoffParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -13671,36 +16210,15 @@ export type GetShowFormCountryData = { }; 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: '/api/eor/v1/timeoff/{id}'; }; -export type GetShowFormCountryErrors = { +export type PatchUpdateTimeoff2Errors = { /** * Bad Request */ @@ -13723,32 +16241,48 @@ export type GetShowFormCountryErrors = { 429: TooManyRequestsResponse; }; -export type GetShowFormCountryError = - GetShowFormCountryErrors[keyof GetShowFormCountryErrors]; +export type PatchUpdateTimeoff2Error = + PatchUpdateTimeoff2Errors[keyof PatchUpdateTimeoff2Errors]; -export type GetShowFormCountryResponses = { +export type PatchUpdateTimeoff2Responses = { /** * Success */ - 200: CountryFormResponse; + 200: TimeoffResponse; }; -export type GetShowFormCountryResponse = - GetShowFormCountryResponses[keyof GetShowFormCountryResponses]; +export type PatchUpdateTimeoff2Response = + PatchUpdateTimeoff2Responses[keyof PatchUpdateTimeoff2Responses]; -export type GetShowFileData = { - body?: never; +export type PatchUpdateTimeoffData = { + /** + * UpdateTimeoff + */ + 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: { /** - * File ID + * Timeoff ID */ id: string; }; query?: never; - url: '/v1/files/{id}'; + url: '/api/eor/v1/timeoff/{id}'; }; -export type GetShowFileErrors = { +export type PatchUpdateTimeoffErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -13761,42 +16295,45 @@ export type GetShowFileErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetShowFileError = GetShowFileErrors[keyof GetShowFileErrors]; +export type PatchUpdateTimeoffError = + PatchUpdateTimeoffErrors[keyof PatchUpdateTimeoffErrors]; -export type GetShowFileResponses = { +export type PatchUpdateTimeoffResponses = { /** * Success */ - 200: DownloadFileResponse; + 200: TimeoffResponse; }; -export type GetShowFileResponse = - GetShowFileResponses[keyof GetShowFileResponses]; +export type PatchUpdateTimeoffResponse = + PatchUpdateTimeoffResponses[keyof PatchUpdateTimeoffResponses]; -export type GetShowContractAmendmentData = { +export type GetCurrentIdentityData = { 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. + * 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: { - /** - * Contract amendment request ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/contract-amendments/{id}'; + url: '/api/eor/v1/identity/current'; }; -export type GetShowContractAmendmentErrors = { +export type GetCurrentIdentityErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -13809,51 +16346,56 @@ export type GetShowContractAmendmentErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetShowContractAmendmentError = - GetShowContractAmendmentErrors[keyof GetShowContractAmendmentErrors]; +export type GetCurrentIdentityError = + GetCurrentIdentityErrors[keyof GetCurrentIdentityErrors]; -export type GetShowContractAmendmentResponses = { +export type GetCurrentIdentityResponses = { /** * Success */ - 200: ContractAmendmentResponse; + 201: IdentityCurrentResponse; }; -export type GetShowContractAmendmentResponse = - GetShowContractAmendmentResponses[keyof GetShowContractAmendmentResponses]; +export type GetCurrentIdentityResponse = + GetCurrentIdentityResponses[keyof GetCurrentIdentityResponses]; -export type GetIndexCompanyManagerData = { +export type GetPayVarianceGphData = { body?: never; - headers: { + 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. - * + * The preferred language of the inquiring user in Workday */ - Authorization: string; + accept_language?: string; }; path?: never; - query?: { + query: { /** - * A Company ID to filter the results (only applicable for Integration Partners). + * The pay group ID for identifying the pay group at the vendor system */ - company_id?: string; + payGroupExternalId: string; /** - * Starts fetching records after the given page + * The run type id provided in the paySummary API */ - page?: number; + runTypeId: string; /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * The cycle type id, defaults to the main run if not provided */ - page_size?: number; + cycleTypeId?: string; + /** + * The period end date in question, defaults to current period if not provided + */ + periodEndDate?: Date; }; - url: '/v1/company-managers'; + url: '/api/eor/v1/wd/gph/payVariance'; }; -export type GetIndexCompanyManagerErrors = { +export type GetPayVarianceGphErrors = { /** * Bad Request */ @@ -13866,61 +16408,43 @@ export type GetIndexCompanyManagerErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetIndexCompanyManagerError = - GetIndexCompanyManagerErrors[keyof GetIndexCompanyManagerErrors]; +export type GetPayVarianceGphError = + GetPayVarianceGphErrors[keyof GetPayVarianceGphErrors]; -export type GetIndexCompanyManagerResponses = { +export type GetPayVarianceGphResponses = { /** * Success */ - 200: CompanyManagersResponse; + 200: PayVarianceResponse; }; -export type GetIndexCompanyManagerResponse = - GetIndexCompanyManagerResponses[keyof GetIndexCompanyManagerResponses]; +export type GetPayVarianceGphResponse = + GetPayVarianceGphResponses[keyof GetPayVarianceGphResponses]; -export type PostCreateCompanyManagerData = { - /** - * Company Manager params - */ - body?: CompanyManagerParams; - headers: { +export type GetIndexPayrollCalendarData = { + 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. - * + * The cycle for which to list the payroll calendars. Format: YYYY-MM */ - Authorization: string; + cycle: string; }; - 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: '/api/eor/v1/payroll-calendars/{cycle}'; }; -export type PostCreateCompanyManagerErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetIndexPayrollCalendarErrors = { /** * Unauthorized */ @@ -13933,60 +16457,81 @@ export type PostCreateCompanyManagerErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostCreateCompanyManagerError = - PostCreateCompanyManagerErrors[keyof PostCreateCompanyManagerErrors]; +export type GetIndexPayrollCalendarError = + GetIndexPayrollCalendarErrors[keyof GetIndexPayrollCalendarErrors]; -export type PostCreateCompanyManagerResponses = { +export type GetIndexPayrollCalendarResponses = { /** * Success */ - 201: CompanyManagerData; + 200: PayrollCalendarsResponse; }; -export type PostCreateCompanyManagerResponse = - PostCreateCompanyManagerResponses[keyof PostCreateCompanyManagerResponses]; +export type GetIndexPayrollCalendarResponse = + GetIndexPayrollCalendarResponses[keyof GetIndexPayrollCalendarResponses]; -export type GetIndexCountryData = { +export type PostTerminateContractorOfRecordEmploymentSubscriptionData = { body?: never; - path?: never; - query?: { + path: { /** - * If the premium benefits should be included in the response + * Employment ID */ - include_premium_benefits?: boolean; + employment_id: string; }; - url: '/v1/cost-calculator/countries'; + query?: never; + url: '/api/eor/v1/contractors/employments/{employment_id}/terminate-cor-employment'; }; -export type GetIndexCountryResponses = { +export type PostTerminateContractorOfRecordEmploymentSubscriptionErrors = { /** - * Success + * Bad Request */ - 200: CostCalculatorListCountryResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetIndexCountryResponse = - GetIndexCountryResponses[keyof GetIndexCountryResponses]; +export type PostTerminateContractorOfRecordEmploymentSubscriptionError = + PostTerminateContractorOfRecordEmploymentSubscriptionErrors[keyof PostTerminateContractorOfRecordEmploymentSubscriptionErrors]; + +export type PostTerminateContractorOfRecordEmploymentSubscriptionResponses = { + /** + * Success + */ + 200: SuccessResponse; +}; -export type PostDeclineIdentityVerificationData = { - body?: never; +export type PostTerminateContractorOfRecordEmploymentSubscriptionResponse = + PostTerminateContractorOfRecordEmploymentSubscriptionResponses[keyof PostTerminateContractorOfRecordEmploymentSubscriptionResponses]; + +export type PostSendBackTimesheetData = { + /** + * SendBackTimesheetParams + */ + body?: SendBackTimesheetParams; path: { /** - * Employment ID + * Timesheet ID */ - employment_id: string; + timesheet_id: string; }; query?: never; - url: '/v1/identity-verification/{employment_id}/decline'; + url: '/api/eor/v1/timesheets/{timesheet_id}/send-back'; }; -export type PostDeclineIdentityVerificationErrors = { +export type PostSendBackTimesheetErrors = { /** * Unauthorized */ @@ -14001,20 +16546,20 @@ export type PostDeclineIdentityVerificationErrors = { 422: UnprocessableEntityResponse; }; -export type PostDeclineIdentityVerificationError = - PostDeclineIdentityVerificationErrors[keyof PostDeclineIdentityVerificationErrors]; +export type PostSendBackTimesheetError = + PostSendBackTimesheetErrors[keyof PostSendBackTimesheetErrors]; -export type PostDeclineIdentityVerificationResponses = { +export type PostSendBackTimesheetResponses = { /** * Success */ - 200: SuccessResponse; + 200: SentBackTimesheetResponse; }; -export type PostDeclineIdentityVerificationResponse = - PostDeclineIdentityVerificationResponses[keyof PostDeclineIdentityVerificationResponses]; +export type PostSendBackTimesheetResponse = + PostSendBackTimesheetResponses[keyof PostSendBackTimesheetResponses]; -export type GetIndexBillingDocumentData = { +export type GetIndexBenefitRenewalRequestData = { body?: never; headers: { /** @@ -14027,10 +16572,6 @@ export type GetIndexBillingDocumentData = { }; path?: never; query?: { - /** - * The month for the billing documents (in ISO-8601 format) - */ - period?: string; /** * Starts fetching records after the given page */ @@ -14040,10 +16581,14 @@ export type GetIndexBillingDocumentData = { */ page_size?: number; }; - url: '/v1/billing-documents'; + url: '/api/eor/v1/benefit-renewal-requests'; }; -export type GetIndexBillingDocumentErrors = { +export type GetIndexBenefitRenewalRequestErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -14056,22 +16601,26 @@ export type GetIndexBillingDocumentErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetIndexBillingDocumentError = - GetIndexBillingDocumentErrors[keyof GetIndexBillingDocumentErrors]; +export type GetIndexBenefitRenewalRequestError = + GetIndexBenefitRenewalRequestErrors[keyof GetIndexBenefitRenewalRequestErrors]; -export type GetIndexBillingDocumentResponses = { +export type GetIndexBenefitRenewalRequestResponses = { /** * Success */ - 200: BillingDocumentsResponse; + 200: BenefitRenewalRequestsListBenefitRenewalRequestResponse; }; -export type GetIndexBillingDocumentResponse = - GetIndexBillingDocumentResponses[keyof GetIndexBillingDocumentResponses]; +export type GetIndexBenefitRenewalRequestResponse = + GetIndexBenefitRenewalRequestResponses[keyof GetIndexBenefitRenewalRequestResponses]; -export type DeleteDeleteWebhookCallbackData = { +export type PutReassignDefaultEntityCompanyData = { body?: never; headers: { /** @@ -14084,15 +16633,23 @@ export type DeleteDeleteWebhookCallbackData = { }; path: { /** - * Webhook Callback ID + * Company ID */ - id: string; + company_id: string; + /** + * Legal Entity ID to set as the new default + */ + legal_entity_id: string; }; query?: never; - url: '/v1/webhook-callbacks/{id}'; + url: '/api/eor/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}'; }; -export type DeleteDeleteWebhookCallbackErrors = { +export type PutReassignDefaultEntityCompanyErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -14105,41 +16662,59 @@ export type DeleteDeleteWebhookCallbackErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type DeleteDeleteWebhookCallbackError = - DeleteDeleteWebhookCallbackErrors[keyof DeleteDeleteWebhookCallbackErrors]; +export type PutReassignDefaultEntityCompanyError = + PutReassignDefaultEntityCompanyErrors[keyof PutReassignDefaultEntityCompanyErrors]; -export type DeleteDeleteWebhookCallbackResponses = { +export type PutReassignDefaultEntityCompanyResponses = { /** * Success */ 200: SuccessResponse; }; -export type DeleteDeleteWebhookCallbackResponse = - DeleteDeleteWebhookCallbackResponses[keyof DeleteDeleteWebhookCallbackResponses]; +export type PutReassignDefaultEntityCompanyResponse = + PutReassignDefaultEntityCompanyResponses[keyof PutReassignDefaultEntityCompanyResponses]; -export type PatchUpdateWebhookCallbackData = { - /** - * WebhookCallback - */ - body?: UpdateWebhookCallbackParams; - path: { +export type GetIndexEmploymentContractData = { + body?: never; + headers: { /** - * Webhook Callback 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/webhook-callbacks/{id}'; + path?: never; + query: { + /** + * Employment ID + */ + employment_id: string; + /** + * Only Active + */ + only_active?: boolean; + }; + url: '/api/eor/v1/employment-contracts'; }; -export type PatchUpdateWebhookCallbackErrors = { +export type GetIndexEmploymentContractErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -14150,113 +16725,148 @@ export type PatchUpdateWebhookCallbackErrors = { 422: UnprocessableEntityResponse; }; -export type PatchUpdateWebhookCallbackError = - PatchUpdateWebhookCallbackErrors[keyof PatchUpdateWebhookCallbackErrors]; +export type GetIndexEmploymentContractError = + GetIndexEmploymentContractErrors[keyof GetIndexEmploymentContractErrors]; -export type PatchUpdateWebhookCallbackResponses = { +export type GetIndexEmploymentContractResponses = { /** * Success */ - 200: WebhookCallbackResponse; + 200: ListEmploymentContractResponse; }; -export type PatchUpdateWebhookCallbackResponse = - PatchUpdateWebhookCallbackResponses[keyof PatchUpdateWebhookCallbackResponses]; +export type GetIndexEmploymentContractResponse = + GetIndexEmploymentContractResponses[keyof GetIndexEmploymentContractResponses]; -export type PutUpdateEmploymentPersonalDetailsData = { - /** - * Employment personal details params - */ - body?: EmploymentPersonalDetailsParams; +export type PutCancelContractAmendmentData = { + body?: never; path: { /** - * Employment ID + * Contract amendment request ID */ - employment_id: string; + contract_amendment_request_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/personal_details'; + url: '/api/eor/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel'; }; -export type PutUpdateEmploymentPersonalDetailsErrors = { +export type PutCancelContractAmendmentErrors = { /** * 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 PutUpdateEmploymentPersonalDetailsError = - PutUpdateEmploymentPersonalDetailsErrors[keyof PutUpdateEmploymentPersonalDetailsErrors]; +export type PutCancelContractAmendmentError = + PutCancelContractAmendmentErrors[keyof PutCancelContractAmendmentErrors]; -export type PutUpdateEmploymentPersonalDetailsResponses = { +export type PutCancelContractAmendmentResponses = { /** * Success */ - 200: EmploymentResponse; + 200: SuccessResponse; }; -export type PutUpdateEmploymentPersonalDetailsResponse = - PutUpdateEmploymentPersonalDetailsResponses[keyof PutUpdateEmploymentPersonalDetailsResponses]; +export type PutCancelContractAmendmentResponse = + PutCancelContractAmendmentResponses[keyof PutCancelContractAmendmentResponses]; -export type GetIndexTravelLetterRequestData = { +export type GetDownloadPayslipPayslipData = { 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'; + headers: { /** - * Field to sort by + * 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. + * */ - sort_by?: 'submitted_at'; + Authorization: string; + }; + path: { /** - * Starts fetching records after the given page + * Payslip ID */ - page?: number; + payslip_id: string; + }; + query?: never; + url: '/api/eor/v1/payslips/{payslip_id}/pdf'; +}; + +export type GetDownloadPayslipPayslipErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; +}; + +export type GetDownloadPayslipPayslipError = + GetDownloadPayslipPayslipErrors[keyof GetDownloadPayslipPayslipErrors]; + +export type GetDownloadPayslipPayslipResponses = { + /** + * Success + */ + 200: PayslipDownloadResponse; +}; + +export type GetDownloadPayslipPayslipResponse = + GetDownloadPayslipPayslipResponses[keyof GetDownloadPayslipPayslipResponses]; + +export type PostCreateApprovalData = { + /** + * ApproveTimeoff + */ + body: ApproveTimeoffParams; + path: { /** - * Number of items per page + * Time Off ID */ - page_size?: number; + timeoff_id: string; }; - url: '/v1/travel-letter-requests'; + query?: never; + url: '/api/eor/v1/timeoff/{timeoff_id}/approve'; }; -export type GetIndexTravelLetterRequestErrors = { +export type PostCreateApprovalErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -14265,28 +16875,32 @@ export type GetIndexTravelLetterRequestErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetIndexTravelLetterRequestError = - GetIndexTravelLetterRequestErrors[keyof GetIndexTravelLetterRequestErrors]; +export type PostCreateApprovalError = + PostCreateApprovalErrors[keyof PostCreateApprovalErrors]; -export type GetIndexTravelLetterRequestResponses = { +export type PostCreateApprovalResponses = { /** * Success */ - 200: ListTravelLettersResponse; + 200: TimeoffResponse; }; -export type GetIndexTravelLetterRequestResponse = - GetIndexTravelLetterRequestResponses[keyof GetIndexTravelLetterRequestResponses]; +export type PostCreateApprovalResponse = + PostCreateApprovalResponses[keyof PostCreateApprovalResponses]; -export type GetIndexBenefitRenewalRequestData = { +export type GetIndexCompanyData = { body?: never; headers: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * 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 Authorization Code flow. + * The refresh token needs to have been obtained through the Client Credentials flow. * */ Authorization: string; @@ -14294,22 +16908,14 @@ export type GetIndexBenefitRenewalRequestData = { path?: never; query?: { /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * External ID */ - page_size?: number; + external_id?: string; }; - url: '/v1/benefit-renewal-requests'; + url: '/api/eor/v1/companies'; }; -export type GetIndexBenefitRenewalRequestErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetIndexCompanyErrors = { /** * Unauthorized */ @@ -14322,85 +16928,118 @@ export type GetIndexBenefitRenewalRequestErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetIndexBenefitRenewalRequestError = - GetIndexBenefitRenewalRequestErrors[keyof GetIndexBenefitRenewalRequestErrors]; +export type GetIndexCompanyError = + GetIndexCompanyErrors[keyof GetIndexCompanyErrors]; -export type GetIndexBenefitRenewalRequestResponses = { +export type GetIndexCompanyResponses = { /** * Success */ - 200: BenefitRenewalRequestsListBenefitRenewalRequestResponse; + 200: CompaniesResponse; }; -export type GetIndexBenefitRenewalRequestResponse = - GetIndexBenefitRenewalRequestResponses[keyof GetIndexBenefitRenewalRequestResponses]; +export type GetIndexCompanyResponse = + GetIndexCompanyResponses[keyof GetIndexCompanyResponses]; -export type PostCreateWebhookCallbackData = { +export type PostCreateCompanyData = { /** - * WebhookCallback + * Create Company params */ - body?: CreateWebhookCallbackParams; + body?: CreateCompanyParams; headers: { /** - * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. + * 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 Authorization Code flow. + * The refresh token needs to have been obtained through the Client Credentials flow. * */ Authorization: string; }; path?: never; - query?: never; - url: '/v1/webhook-callbacks'; + 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: '/api/eor/v1/companies'; }; -export type PostCreateWebhookCallbackErrors = { +export type PostCreateCompanyErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; + /** + * Conflict + */ + 409: CompanyCreationConflictErrorResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostCreateWebhookCallbackError = - PostCreateWebhookCallbackErrors[keyof PostCreateWebhookCallbackErrors]; +export type PostCreateCompanyError = + PostCreateCompanyErrors[keyof PostCreateCompanyErrors]; -export type PostCreateWebhookCallbackResponses = { +export type PostCreateCompanyResponses = { /** - * Success + * Created */ - 200: WebhookCallbackResponse; + 201: CompanyCreationResponse; }; -export type PostCreateWebhookCallbackResponse = - PostCreateWebhookCallbackResponses[keyof PostCreateWebhookCallbackResponses]; +export type PostCreateCompanyResponse = + PostCreateCompanyResponses[keyof PostCreateCompanyResponses]; -export type PostApproveTimesheetData = { +export type GetIndexEmploymentCompanyStructureNodeData = { body?: never; path: { /** - * Timesheet ID + * Employment ID */ - timesheet_id: string; + employment_id: string; }; query?: never; - url: '/v1/timesheets/{timesheet_id}/approve'; + url: '/api/eor/v1/employments/{employment_id}/company-structure-nodes'; }; -export type PostApproveTimesheetErrors = { +export type GetIndexEmploymentCompanyStructureNodeErrors = { /** * Unauthorized */ @@ -14415,45 +17054,30 @@ export type PostApproveTimesheetErrors = { 422: UnprocessableEntityResponse; }; -export type PostApproveTimesheetError = - PostApproveTimesheetErrors[keyof PostApproveTimesheetErrors]; +export type GetIndexEmploymentCompanyStructureNodeError = + GetIndexEmploymentCompanyStructureNodeErrors[keyof GetIndexEmploymentCompanyStructureNodeErrors]; -export type PostApproveTimesheetResponses = { +export type GetIndexEmploymentCompanyStructureNodeResponses = { /** * Success */ - 200: MinimalTimesheetResponse; + 200: CompanyStructureNodesResponse; }; -export type PostApproveTimesheetResponse = - PostApproveTimesheetResponses[keyof PostApproveTimesheetResponses]; +export type GetIndexEmploymentCompanyStructureNodeResponse = + GetIndexEmploymentCompanyStructureNodeResponses[keyof GetIndexEmploymentCompanyStructureNodeResponses]; -export type GetShowPayslipData = { - 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; - }; +export type PostCreateProbationCompletionLetterData = { + /** + * Work Authorization Request + */ + body: CreateProbationCompletionLetterParams; + path?: never; query?: never; - url: '/v1/payslips/{id}'; + url: '/api/eor/v1/probation-completion-letter'; }; -export type GetShowPayslipErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostCreateProbationCompletionLetterErrors = { /** * Unauthorized */ @@ -14466,42 +17090,32 @@ export type GetShowPayslipErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetShowPayslipError = - GetShowPayslipErrors[keyof GetShowPayslipErrors]; +export type PostCreateProbationCompletionLetterError = + PostCreateProbationCompletionLetterErrors[keyof PostCreateProbationCompletionLetterErrors]; -export type GetShowPayslipResponses = { +export type PostCreateProbationCompletionLetterResponses = { /** * Success */ - 200: PayslipResponse; + 200: ProbationCompletionLetterResponse; }; -export type GetShowPayslipResponse = - GetShowPayslipResponses[keyof GetShowPayslipResponses]; +export type PostCreateProbationCompletionLetterResponse = + PostCreateProbationCompletionLetterResponses[keyof PostCreateProbationCompletionLetterResponses]; -export type GetIndexLeavePoliciesSummaryData = { - body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; +export type PostCreateEstimationPdfData = { + /** + * Estimate params + */ + body?: CostCalculatorEstimateParams; + path?: never; query?: never; - url: '/v1/leave-policies/summary/{employment_id}'; + url: '/api/eor/v1/cost-calculator/estimation-pdf'; }; -export type GetIndexLeavePoliciesSummaryErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostCreateEstimationPdfErrors = { /** * Not Found */ @@ -14512,44 +17126,38 @@ export type GetIndexLeavePoliciesSummaryErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexLeavePoliciesSummaryError = - GetIndexLeavePoliciesSummaryErrors[keyof GetIndexLeavePoliciesSummaryErrors]; +export type PostCreateEstimationPdfError = + PostCreateEstimationPdfErrors[keyof PostCreateEstimationPdfErrors]; -export type GetIndexLeavePoliciesSummaryResponses = { +export type PostCreateEstimationPdfResponses = { /** * Success */ - 200: ListLeavePoliciesSummaryResponse; + 200: CostCalculatorEstimatePdfResponse; }; -export type GetIndexLeavePoliciesSummaryResponse = - GetIndexLeavePoliciesSummaryResponses[keyof GetIndexLeavePoliciesSummaryResponses]; - -export type GetIndexCompanyDepartmentData = { - 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; - /** - * Number of items per page - */ - page_size?: number; - }; - url: '/v1/company-departments'; +export type PostCreateEstimationPdfResponse = + PostCreateEstimationPdfResponses[keyof PostCreateEstimationPdfResponses]; + +export type PostTokenOAuth2Token2Data = { + /** + * OAuth2Token + */ + body?: OAuth2TokenParams; + path?: never; + query?: never; + url: '/api/eor/auth/oauth2/token'; }; -export type GetIndexCompanyDepartmentErrors = { +export type PostTokenOAuth2Token2Errors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -14558,32 +17166,42 @@ export type GetIndexCompanyDepartmentErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetIndexCompanyDepartmentError = - GetIndexCompanyDepartmentErrors[keyof GetIndexCompanyDepartmentErrors]; +export type PostTokenOAuth2Token2Error = + PostTokenOAuth2Token2Errors[keyof PostTokenOAuth2Token2Errors]; -export type GetIndexCompanyDepartmentResponses = { +export type PostTokenOAuth2Token2Responses = { /** * Success */ - 200: ListCompanyDepartmentsPaginatedResponse; + 200: OAuth2Tokens; }; -export type GetIndexCompanyDepartmentResponse = - GetIndexCompanyDepartmentResponses[keyof GetIndexCompanyDepartmentResponses]; +export type PostTokenOAuth2Token2Response = + PostTokenOAuth2Token2Responses[keyof PostTokenOAuth2Token2Responses]; -export type PostCreateCompanyDepartmentData = { - /** - * Create Company Department request params - */ - body: CreateCompanyDepartmentParams; - path?: never; +export type GetShowEmployeeDocumentData = { + body?: never; + path: { + /** + * Document ID + */ + id: string; + }; query?: never; - url: '/v1/company-departments'; + url: '/api/eor/v1/employee/documents/{id}'; }; -export type PostCreateCompanyDepartmentErrors = { +export type GetShowEmployeeDocumentErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -14594,88 +17212,72 @@ export type PostCreateCompanyDepartmentErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateCompanyDepartmentError = - PostCreateCompanyDepartmentErrors[keyof PostCreateCompanyDepartmentErrors]; +export type GetShowEmployeeDocumentError = + GetShowEmployeeDocumentErrors[keyof GetShowEmployeeDocumentErrors]; -export type PostCreateCompanyDepartmentResponses = { +export type GetShowEmployeeDocumentResponses = { /** - * Created + * Success */ - 201: CompanyDepartmentCreatedResponse; + 200: DownloadDocumentResponse; }; -export type PostCreateCompanyDepartmentResponse = - PostCreateCompanyDepartmentResponses[keyof PostCreateCompanyDepartmentResponses]; +export type GetShowEmployeeDocumentResponse = + GetShowEmployeeDocumentResponses[keyof GetShowEmployeeDocumentResponses]; -export type PostDeclineCancellationRequestData = { +export type PostReplayWebhookEventData = { /** - * Timeoff + * WebhookEvent */ - body: DeclineTimeoffParams; - path: { - /** - * Time Off ID - */ - timeoff_id: string; - }; + body: ReplayWebhookEventsParams; + path?: never; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel-request/decline'; + url: '/api/eor/v1/webhook-events/replay'; }; -export type PostDeclineCancellationRequestErrors = { +export type PostReplayWebhookEventErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Conflict + * Not Found */ - 409: ConflictResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostDeclineCancellationRequestError = - PostDeclineCancellationRequestErrors[keyof PostDeclineCancellationRequestErrors]; +export type PostReplayWebhookEventError = + PostReplayWebhookEventErrors[keyof PostReplayWebhookEventErrors]; -export type PostDeclineCancellationRequestResponses = { +export type PostReplayWebhookEventResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostDeclineCancellationRequestResponse = - PostDeclineCancellationRequestResponses[keyof PostDeclineCancellationRequestResponses]; +export type PostReplayWebhookEventResponse = + PostReplayWebhookEventResponses[keyof PostReplayWebhookEventResponses]; -export type GetShowSchemaData = { - 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 PostTriggerWebhookCallbackData = { + /** + * Webhook Trigger Params + */ + body?: WebhookTriggerParams; + path?: never; + query?: never; + url: '/api/eor/v1/sandbox/webhook-callbacks/trigger'; }; -export type GetShowSchemaErrors = { +export type PostTriggerWebhookCallbackErrors = { /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -14686,81 +17288,72 @@ export type GetShowSchemaErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowSchemaError = GetShowSchemaErrors[keyof GetShowSchemaErrors]; +export type PostTriggerWebhookCallbackError = + PostTriggerWebhookCallbackErrors[keyof PostTriggerWebhookCallbackErrors]; -export type GetShowSchemaResponses = { +export type PostTriggerWebhookCallbackResponses = { /** * Success */ - 200: UnifiedEmploymentsBenefitOffersJsonSchemaResponse; + 200: SuccessResponse; }; -export type GetShowSchemaResponse = - GetShowSchemaResponses[keyof GetShowSchemaResponses]; +export type PostTriggerWebhookCallbackResponse = + PostTriggerWebhookCallbackResponses[keyof PostTriggerWebhookCallbackResponses]; -export type PostCreateEligibilityQuestionnaireData = { - /** - * Eligibility questionnaire submission - */ - body: SubmitEligibilityQuestionnaireRequest; - path?: never; - query?: { +export type GetShowBulkEmploymentData = { + body?: never; + path: { /** - * Version of the form schema + * Bulk employment job id */ - json_schema_version?: number | 'latest'; + job_id: string; }; - url: '/v1/contractors/eligibility-questionnaire'; + query?: never; + url: '/api/eor/v1/bulk-employment-jobs/{job_id}'; }; -export type PostCreateEligibilityQuestionnaireErrors = { +export type GetShowBulkEmploymentErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** * Forbidden */ 403: ForbiddenResponse; /** - * Conflict + * Not Found */ - 409: ConflictErrorResponse; + 404: NotFoundResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PostCreateEligibilityQuestionnaireError = - PostCreateEligibilityQuestionnaireErrors[keyof PostCreateEligibilityQuestionnaireErrors]; +export type GetShowBulkEmploymentError = + GetShowBulkEmploymentErrors[keyof GetShowBulkEmploymentErrors]; -export type PostCreateEligibilityQuestionnaireResponses = { +export type GetShowBulkEmploymentResponses = { /** - * Questionnaire submitted successfully + * Success */ - 201: EligibilityQuestionnaireResponse; + 200: BulkEmploymentImportJobResponse; }; -export type PostCreateEligibilityQuestionnaireResponse = - PostCreateEligibilityQuestionnaireResponses[keyof PostCreateEligibilityQuestionnaireResponses]; +export type GetShowBulkEmploymentResponse = + GetShowBulkEmploymentResponses[keyof GetShowBulkEmploymentResponses]; -export type GetIndexTimesheetData = { +export type GetIndexBulkEmploymentRowData = { body?: never; - path?: never; - query?: { - /** - * Filter timesheets by their status - */ - status?: TimesheetStatus; - /** - * Sort order - */ - order?: 'asc' | 'desc'; + path: { /** - * Field to sort by + * Bulk employment job id */ - sort_by?: 'submitted_at'; + job_id: string; + }; + query?: { /** * Starts fetching records after the given page */ @@ -14770,14 +17363,18 @@ export type GetIndexTimesheetData = { */ page_size?: number; }; - url: '/v1/timesheets'; + url: '/api/eor/v1/bulk-employment-jobs/{job_id}/rows'; }; -export type GetIndexTimesheetErrors = { +export type GetIndexBulkEmploymentRowErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -14785,103 +17382,62 @@ export type GetIndexTimesheetErrors = { /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetIndexTimesheetError = - GetIndexTimesheetErrors[keyof GetIndexTimesheetErrors]; +export type GetIndexBulkEmploymentRowError = + GetIndexBulkEmploymentRowErrors[keyof GetIndexBulkEmploymentRowErrors]; -export type GetIndexTimesheetResponses = { +export type GetIndexBulkEmploymentRowResponses = { /** * Success */ - 200: ListTimesheetsResponse; + 200: ImportJobRowsResponse; }; -export type GetIndexTimesheetResponse = - GetIndexTimesheetResponses[keyof GetIndexTimesheetResponses]; +export type GetIndexBulkEmploymentRowResponse = + GetIndexBulkEmploymentRowResponses[keyof GetIndexBulkEmploymentRowResponses]; -export type PostCreateLegalEntityCompanyData = { +export type PostGenerateMagicLinkData = { /** - * Create legal entity params + * Magic links generator body */ - body?: { - /** - * ISO 3166-1 alpha-3 country code - */ - country_code: string; - }; + body: MagicLinkParams; 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/sandbox/companies/{company_id}/legal-entities'; -}; - -export type PostCreateLegalEntityCompanyErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; + * 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: '/api/eor/v1/magic-link'; +}; + +export type PostGenerateMagicLinkErrors = { /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostCreateLegalEntityCompanyError = - PostCreateLegalEntityCompanyErrors[keyof PostCreateLegalEntityCompanyErrors]; +export type PostGenerateMagicLinkError = + PostGenerateMagicLinkErrors[keyof PostGenerateMagicLinkErrors]; -export type PostCreateLegalEntityCompanyResponses = { +export type PostGenerateMagicLinkResponses = { /** - * Legal entity created + * Success */ - 201: { - data?: { - /** - * Legal entity slug - */ - legal_entity_id?: string; - /** - * Legal entity name - */ - name?: string; - /** - * Legal entity status - */ - status?: string; - }; - }; + 200: MagicLinkResponse; }; -export type PostCreateLegalEntityCompanyResponse = - PostCreateLegalEntityCompanyResponses[keyof PostCreateLegalEntityCompanyResponses]; +export type PostGenerateMagicLinkResponse = + PostGenerateMagicLinkResponses[keyof PostGenerateMagicLinkResponses]; -export type GetShowEmploymentData = { +export type GetShowCompanyData = { body?: never; headers: { /** @@ -14894,60 +17450,55 @@ export type GetShowEmploymentData = { }; path: { /** - * Employment ID - */ - employment_id: string; - }; - query?: { - /** - * Wether files should be excluded + * Company ID */ - exclude_files?: boolean; + company_id: string; }; - url: '/v1/employments/{employment_id}'; + query?: never; + url: '/api/eor/v1/companies/{company_id}'; }; -export type GetShowEmploymentErrors = { +export type GetShowCompanyErrors = { /** * 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 GetShowEmploymentError = - GetShowEmploymentErrors[keyof GetShowEmploymentErrors]; +export type GetShowCompanyError = + GetShowCompanyErrors[keyof GetShowCompanyErrors]; -export type GetShowEmploymentResponses = { +export type GetShowCompanyResponses = { /** * Success */ - 200: EmploymentShowResponse; + 200: CompanyResponse; }; -export type GetShowEmploymentResponse = - GetShowEmploymentResponses[keyof GetShowEmploymentResponses]; +export type GetShowCompanyResponse = + GetShowCompanyResponses[keyof GetShowCompanyResponses]; -export type PatchUpdateEmployment2Data = { +export type PatchUpdateCompany2Data = { /** - * Employment params + * Update Company params */ - body?: EmploymentFullParams; + body?: UpdateCompanyParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -14959,100 +17510,65 @@ export type PatchUpdateEmployment2Data = { }; path: { /** - * Employment ID + * Company ID + * */ - employment_id: string; + company_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}'; + url: '/api/eor/v1/companies/{company_id}'; }; -export type PatchUpdateEmployment2Errors = { +export type PatchUpdateCompany2Errors = { /** * 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 PatchUpdateEmployment2Error = - PatchUpdateEmployment2Errors[keyof PatchUpdateEmployment2Errors]; +export type PatchUpdateCompany2Error = + PatchUpdateCompany2Errors[keyof PatchUpdateCompany2Errors]; -export type PatchUpdateEmployment2Responses = { +export type PatchUpdateCompany2Responses = { /** * Success */ - 200: EmploymentResponse; + 200: CompanyResponse; }; -export type PatchUpdateEmployment2Response = - PatchUpdateEmployment2Responses[keyof PatchUpdateEmployment2Responses]; +export type PatchUpdateCompany2Response = + PatchUpdateCompany2Responses[keyof PatchUpdateCompany2Responses]; -export type PatchUpdateEmploymentData = { +export type PatchUpdateCompanyData = { /** - * Employment params + * Update Company params */ - body?: EmploymentFullParams; + body?: UpdateCompanyParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -15064,169 +17580,116 @@ export type PatchUpdateEmploymentData = { }; path: { /** - * Employment ID + * Company ID + * */ - employment_id: string; + company_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}'; + url: '/api/eor/v1/companies/{company_id}'; }; -export type PatchUpdateEmploymentErrors = { +export type PatchUpdateCompanyErrors = { /** * 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 PatchUpdateEmploymentError = - PatchUpdateEmploymentErrors[keyof PatchUpdateEmploymentErrors]; +export type PatchUpdateCompanyError = + PatchUpdateCompanyErrors[keyof PatchUpdateCompanyErrors]; -export type PatchUpdateEmploymentResponses = { +export type PatchUpdateCompanyResponses = { /** * Success */ - 200: EmploymentResponse; + 200: CompanyResponse; }; -export type PatchUpdateEmploymentResponse = - PatchUpdateEmploymentResponses[keyof PatchUpdateEmploymentResponses]; +export type PatchUpdateCompanyResponse = + PatchUpdateCompanyResponses[keyof PatchUpdateCompanyResponses]; -export type GetListUsersScimData = { +export type GetShowCompanySchemaData = { body?: never; path?: never; - query?: { + query: { /** - * 1-based index of the first result + * Country code according to ISO 3-digit alphabetic codes. */ - startIndex?: number; + country_code: string; /** - * Maximum number of results per page + * Name of the desired form */ - count?: number; + form: 'address_details'; /** - * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + * Version of the form schema */ - filter?: string; + json_schema_version?: number | 'latest'; }; - url: '/v1/scim/v2/Users'; + url: '/api/eor/v1/companies/schema'; }; -export type GetListUsersScimErrors = { - /** - * Bad Request - */ - 400: IntegrationsScimErrorResponse; +export type GetShowCompanySchemaErrors = { /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; }; -export type GetListUsersScimError = - GetListUsersScimErrors[keyof GetListUsersScimErrors]; +export type GetShowCompanySchemaError = + GetShowCompanySchemaErrors[keyof GetShowCompanySchemaErrors]; -export type GetListUsersScimResponses = { +export type GetShowCompanySchemaResponses = { /** * Success */ - 200: IntegrationsScimUserListResponse; + 200: CompanyFormResponse; }; -export type GetListUsersScimResponse = - GetListUsersScimResponses[keyof GetListUsersScimResponses]; +export type GetShowCompanySchemaResponse = + GetShowCompanySchemaResponses[keyof GetShowCompanySchemaResponses]; -export type GetIndexPayrollCalendarData = { +export type GetIndexPricingPlanPartnerTemplateData = { 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}'; + path?: never; + query?: never; + url: '/api/eor/v1/pricing-plan-partner-templates'; }; -export type GetIndexPayrollCalendarErrors = { +export type GetIndexPricingPlanPartnerTemplateErrors = { /** * Unauthorized */ @@ -15241,36 +17704,41 @@ export type GetIndexPayrollCalendarErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexPayrollCalendarError = - GetIndexPayrollCalendarErrors[keyof GetIndexPayrollCalendarErrors]; +export type GetIndexPricingPlanPartnerTemplateError = + GetIndexPricingPlanPartnerTemplateErrors[keyof GetIndexPricingPlanPartnerTemplateErrors]; -export type GetIndexPayrollCalendarResponses = { +export type GetIndexPricingPlanPartnerTemplateResponses = { /** * Success */ - 200: PayrollCalendarsResponse; + 200: ListPricingPlanPartnerTemplatesResponse; }; -export type GetIndexPayrollCalendarResponse = - GetIndexPayrollCalendarResponses[keyof GetIndexPayrollCalendarResponses]; +export type GetIndexPricingPlanPartnerTemplateResponse = + GetIndexPricingPlanPartnerTemplateResponses[keyof GetIndexPricingPlanPartnerTemplateResponses]; -export type GetShowAdministrativeDetailsData = { +export type GetShowEngagementAgreementDetailsCountryData = { body?: never; path: { /** - * Company ID + * Country code according to ISO 3-digit alphabetic codes */ - company_id: UuidSlug; + country_code: string; + }; + query?: { /** - * Legal entity ID + * Version of the form schema */ - legal_entity_id: UuidSlug; + json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details'; + url: '/api/eor/v1/countries/{country_code}/engagement-agreement-details'; }; -export type GetShowAdministrativeDetailsErrors = { +export type GetShowEngagementAgreementDetailsCountryErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15279,47 +17747,42 @@ export type GetShowAdministrativeDetailsErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetShowAdministrativeDetailsError = - GetShowAdministrativeDetailsErrors[keyof GetShowAdministrativeDetailsErrors]; +export type GetShowEngagementAgreementDetailsCountryError = + GetShowEngagementAgreementDetailsCountryErrors[keyof GetShowEngagementAgreementDetailsCountryErrors]; -export type GetShowAdministrativeDetailsResponses = { +export type GetShowEngagementAgreementDetailsCountryResponses = { /** - * ShowLegalEntityAdministrativeDetailsResponse - * - * Country specific json schema driven administrative details for legal entities + * Success */ - 200: { - data: { - [key: string]: unknown; - }; - }; + 200: EngagementAgreementDetailsResponse; }; -export type GetShowAdministrativeDetailsResponse = - GetShowAdministrativeDetailsResponses[keyof GetShowAdministrativeDetailsResponses]; +export type GetShowEngagementAgreementDetailsCountryResponse = + GetShowEngagementAgreementDetailsCountryResponses[keyof GetShowEngagementAgreementDetailsCountryResponses]; -export type PutUpdateAdministrativeDetailsData = { - /** - * Legal entity administrative details params - */ - body?: AdministrativeDetailsParams; +export type GetIndexCompanyProductPriceData = { + 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'; + url: '/api/eor/v1/companies/{company_id}/product-prices'; }; -export type PutUpdateAdministrativeDetailsErrors = { +export type GetIndexCompanyProductPriceErrors = { /** * Unauthorized */ @@ -15328,97 +17791,83 @@ export type PutUpdateAdministrativeDetailsErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PutUpdateAdministrativeDetailsError = - PutUpdateAdministrativeDetailsErrors[keyof PutUpdateAdministrativeDetailsErrors]; +export type GetIndexCompanyProductPriceError = + GetIndexCompanyProductPriceErrors[keyof GetIndexCompanyProductPriceErrors]; -export type PutUpdateAdministrativeDetailsResponses = { +export type GetIndexCompanyProductPriceResponses = { /** - * ShowLegalEntityAdministrativeDetailsResponse - * - * Country specific json schema driven administrative details for legal entities + * Success */ - 200: { - data: { - [key: string]: unknown; - }; - }; + 200: ListProductPricesResponse; }; -export type PutUpdateAdministrativeDetailsResponse = - PutUpdateAdministrativeDetailsResponses[keyof PutUpdateAdministrativeDetailsResponses]; +export type GetIndexCompanyProductPriceResponse = + GetIndexCompanyProductPriceResponses[keyof GetIndexCompanyProductPriceResponses]; -export type GetShowRegionFieldData = { +export type PostCreateTokenCompanyTokenData = { body?: never; path: { /** - * Slug + * The ID of the company */ - slug: string; + company_id: string; }; query?: { /** - * If the premium benefits should be included in the response + * The scope of the token */ - include_premium_benefits?: boolean; + scope?: string; }; - url: '/v1/cost-calculator/regions/{slug}/fields'; + url: '/api/eor/v1/companies/{company_id}/create-token'; }; -export type GetShowRegionFieldErrors = { +export type PostCreateTokenCompanyTokenErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Internal Server Error + * Not Found */ - 500: InternalServerErrorResponse; + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetShowRegionFieldError = - GetShowRegionFieldErrors[keyof GetShowRegionFieldErrors]; +export type PostCreateTokenCompanyTokenError = + PostCreateTokenCompanyTokenErrors[keyof PostCreateTokenCompanyTokenErrors]; -export type GetShowRegionFieldResponses = { +export type PostCreateTokenCompanyTokenResponses = { /** * Success */ - 200: JsonSchemaResponse; + 200: CompanyTokenResponse; }; -export type GetShowRegionFieldResponse = - GetShowRegionFieldResponses[keyof GetShowRegionFieldResponses]; +export type PostCreateTokenCompanyTokenResponse = + PostCreateTokenCompanyTokenResponses[keyof PostCreateTokenCompanyTokenResponses]; -export type GetShowOffboardingData = { +export type GetGetIdentityVerificationDataIdentityVerificationData = { body?: never; path: { /** - * Offboarding request ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/offboardings/{id}'; + url: '/api/eor/v1/identity-verification/{employment_id}'; }; -export type GetShowOffboardingErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetGetIdentityVerificationDataIdentityVerificationErrors = { /** * Unauthorized */ @@ -15431,51 +17880,50 @@ export type GetShowOffboardingErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetShowOffboardingError = - GetShowOffboardingErrors[keyof GetShowOffboardingErrors]; +export type GetGetIdentityVerificationDataIdentityVerificationError = + GetGetIdentityVerificationDataIdentityVerificationErrors[keyof GetGetIdentityVerificationDataIdentityVerificationErrors]; -export type GetShowOffboardingResponses = { +export type GetGetIdentityVerificationDataIdentityVerificationResponses = { /** * Success */ - 200: OffboardingResponse; + 200: IdentityVerificationResponse; }; -export type GetShowOffboardingResponse = - GetShowOffboardingResponses[keyof GetShowOffboardingResponses]; +export type GetGetIdentityVerificationDataIdentityVerificationResponse = + GetGetIdentityVerificationDataIdentityVerificationResponses[keyof GetGetIdentityVerificationDataIdentityVerificationResponses]; -export type GetEmployeeDetailsPayrollRunData = { +export type GetDownloadByIdExpenseReceiptData = { body?: never; path: { /** - * Payroll run ID - */ - payroll_run_id: string; - }; - query?: { - /** - * 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/payroll-runs/{payroll_run_id}/employee-details'; + query?: never; + url: '/api/eor/v1/expenses/{expense_id}/receipts/{receipt_id}'; }; -export type GetEmployeeDetailsPayrollRunErrors = { +export type GetDownloadByIdExpenseReceiptErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -15484,79 +17932,79 @@ export type GetEmployeeDetailsPayrollRunErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetEmployeeDetailsPayrollRunError = - GetEmployeeDetailsPayrollRunErrors[keyof GetEmployeeDetailsPayrollRunErrors]; +export type GetDownloadByIdExpenseReceiptError = + GetDownloadByIdExpenseReceiptErrors[keyof GetDownloadByIdExpenseReceiptErrors]; -export type GetEmployeeDetailsPayrollRunResponses = { +export type GetDownloadByIdExpenseReceiptResponses = { /** * Success */ - 200: EmployeeDetailsResponse; + 200: GenericFile; }; -export type GetEmployeeDetailsPayrollRunResponse = - GetEmployeeDetailsPayrollRunResponses[keyof GetEmployeeDetailsPayrollRunResponses]; +export type GetDownloadByIdExpenseReceiptResponse = + GetDownloadByIdExpenseReceiptResponses[keyof GetDownloadByIdExpenseReceiptResponses]; -export type GetIndexBulkEmploymentRowData = { +export type GetListGroupsScimData = { body?: never; - path: { + path?: never; + query?: { /** - * Bulk employment job id + * 1-based index of the first result */ - job_id: string; - }; - 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/bulk-employment-jobs/{job_id}/rows'; + url: '/api/eor/v1/scim/v2/Groups'; }; -export type GetIndexBulkEmploymentRowErrors = { +export type GetListGroupsScimErrors = { /** * Bad Request */ - 400: BadRequestResponse; + 400: IntegrationsScimErrorResponse; + /** + * Unauthorized + */ + 401: IntegrationsScimErrorResponse; /** * Forbidden */ - 403: ForbiddenResponse; + 403: IntegrationsScimErrorResponse; /** * Not Found */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; + 404: IntegrationsScimErrorResponse; }; -export type GetIndexBulkEmploymentRowError = - GetIndexBulkEmploymentRowErrors[keyof GetIndexBulkEmploymentRowErrors]; +export type GetListGroupsScimError = + GetListGroupsScimErrors[keyof GetListGroupsScimErrors]; -export type GetIndexBulkEmploymentRowResponses = { +export type GetListGroupsScimResponses = { /** * Success */ - 200: ImportJobRowsResponse; + 200: IntegrationsScimGroupListResponse; }; -export type GetIndexBulkEmploymentRowResponse = - GetIndexBulkEmploymentRowResponses[keyof GetIndexBulkEmploymentRowResponses]; +export type GetListGroupsScimResponse = + GetListGroupsScimResponses[keyof GetListGroupsScimResponses]; -export type PostCreateEmploymentData = { - /** - * Employment params - */ - body?: EmploymentCreateParams; +export type GetShowExpenseData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -15566,12 +18014,17 @@ export type PostCreateEmploymentData = { */ Authorization: string; }; - path?: never; + path: { + /** + * Expense ID + */ + id: string; + }; query?: never; - url: '/v1/sandbox/employments'; + url: '/api/eor/v1/expenses/{id}'; }; -export type PostCreateEmploymentErrors = { +export type GetShowExpenseErrors = { /** * Bad Request */ @@ -15594,78 +18047,90 @@ export type PostCreateEmploymentErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateEmploymentError = - PostCreateEmploymentErrors[keyof PostCreateEmploymentErrors]; +export type GetShowExpenseError = + GetShowExpenseErrors[keyof GetShowExpenseErrors]; -export type PostCreateEmploymentResponses = { +export type GetShowExpenseResponses = { /** * Success */ - 201: EmploymentCreationResponse; + 200: ExpenseResponse; }; -export type PostCreateEmploymentResponse = - PostCreateEmploymentResponses[keyof PostCreateEmploymentResponses]; +export type GetShowExpenseResponse = + GetShowExpenseResponses[keyof GetShowExpenseResponses]; -export type PostCreateContractEligibilityData = { +export type PatchUpdateExpense2Data = { /** - * Contract Eligibility Create Parameters + * Expenses */ - body: CreateContractEligibilityParams; + body?: UpdateExpenseParams; path: { /** - * Employment ID + * Expense ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employments/{employment_id}/contract-eligibility'; + url: '/api/eor/v1/expenses/{id}'; }; -export type PostCreateContractEligibilityErrors = { +export type PatchUpdateExpense2Errors = { /** * 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 PostCreateContractEligibilityError = - PostCreateContractEligibilityErrors[keyof PostCreateContractEligibilityErrors]; +export type PatchUpdateExpense2Error = + PatchUpdateExpense2Errors[keyof PatchUpdateExpense2Errors]; -export type PostCreateContractEligibilityResponses = { +export type PatchUpdateExpense2Responses = { /** * Success */ - 200: SuccessResponse; + 200: ExpenseResponse; }; -export type PostCreateContractEligibilityResponse = - PostCreateContractEligibilityResponses[keyof PostCreateContractEligibilityResponses]; +export type PatchUpdateExpense2Response = + PatchUpdateExpense2Responses[keyof PatchUpdateExpense2Responses]; -export type GetSupportedCountryData = { - body?: never; - headers: { +export type PatchUpdateExpenseData = { + /** + * Expenses + */ + body?: UpdateExpenseParams; + 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. - * + * Expense ID */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/countries'; + url: '/api/eor/v1/expenses/{id}'; }; -export type GetSupportedCountryErrors = { +export type PatchUpdateExpenseErrors = { /** * Bad Request */ @@ -15678,6 +18143,10 @@ export type GetSupportedCountryErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -15688,86 +18157,83 @@ export type GetSupportedCountryErrors = { 429: TooManyRequestsResponse; }; -export type GetSupportedCountryError = - GetSupportedCountryErrors[keyof GetSupportedCountryErrors]; +export type PatchUpdateExpenseError = + PatchUpdateExpenseErrors[keyof PatchUpdateExpenseErrors]; -export type GetSupportedCountryResponses = { +export type PatchUpdateExpenseResponses = { /** * Success */ - 200: CountriesResponse; + 200: ExpenseResponse; }; -export type GetSupportedCountryResponse = - GetSupportedCountryResponses[keyof GetSupportedCountryResponses]; +export type PatchUpdateExpenseResponse = + PatchUpdateExpenseResponses[keyof PatchUpdateExpenseResponses]; -export type PostCreateTokenCompanyTokenData = { - body?: never; - path: { - /** - * The ID of the company - */ - company_id: string; - }; - query?: { +export type PostCreateBenefitRenewalRequestData = { + /** + * Benefit Renewal Request + */ + body: BenefitRenewalRequestsCreateBenefitRenewalRequest; + headers: { /** - * The scope of the token + * 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. + * */ - scope?: string; + Authorization: string; }; - url: '/v1/companies/{company_id}/create-token'; + path?: never; + query?: never; + url: '/api/eor/v1/sandbox/benefit-renewal-requests'; }; -export type PostCreateTokenCompanyTokenErrors = { +export type PostCreateBenefitRenewalRequestErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PostCreateTokenCompanyTokenError = - PostCreateTokenCompanyTokenErrors[keyof PostCreateTokenCompanyTokenErrors]; +export type PostCreateBenefitRenewalRequestError = + PostCreateBenefitRenewalRequestErrors[keyof PostCreateBenefitRenewalRequestErrors]; -export type PostCreateTokenCompanyTokenResponses = { +export type PostCreateBenefitRenewalRequestResponses = { /** * Success */ - 200: CompanyTokenResponse; + 200: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse; }; -export type PostCreateTokenCompanyTokenResponse = - PostCreateTokenCompanyTokenResponses[keyof PostCreateTokenCompanyTokenResponses]; +export type PostCreateBenefitRenewalRequestResponse = + PostCreateBenefitRenewalRequestResponses[keyof PostCreateBenefitRenewalRequestResponses]; -export type GetIndexCompanyLegalEntitiesData = { +export type GetIndexLeavePoliciesSummaryData = { body?: never; path: { /** - * Company ID - */ - company_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/companies/{company_id}/legal-entities'; + query?: never; + url: '/api/eor/v1/leave-policies/summary/{employment_id}'; }; -export type GetIndexCompanyLegalEntitiesErrors = { +export type GetIndexLeavePoliciesSummaryErrors = { /** * Unauthorized */ @@ -15776,89 +18242,45 @@ export type GetIndexCompanyLegalEntitiesErrors = { * Not Found */ 404: NotFoundResponse; -}; - -export type GetIndexCompanyLegalEntitiesError = - GetIndexCompanyLegalEntitiesErrors[keyof GetIndexCompanyLegalEntitiesErrors]; - -export type GetIndexCompanyLegalEntitiesResponses = { - /** - * Success - */ - 200: ListCompanyLegalEntitiesResponse; -}; - -export type GetIndexCompanyLegalEntitiesResponse = - GetIndexCompanyLegalEntitiesResponses[keyof GetIndexCompanyLegalEntitiesResponses]; - -export type PostCompleteOnboardingEmploymentData = { - /** - * Employment slug - */ - body?: CompleteOnboarding; - 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/ready'; -}; - -export type PostCompleteOnboardingEmploymentErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type PostCompleteOnboardingEmploymentError = - PostCompleteOnboardingEmploymentErrors[keyof PostCompleteOnboardingEmploymentErrors]; +export type GetIndexLeavePoliciesSummaryError = + GetIndexLeavePoliciesSummaryErrors[keyof GetIndexLeavePoliciesSummaryErrors]; -export type PostCompleteOnboardingEmploymentResponses = { +export type GetIndexLeavePoliciesSummaryResponses = { /** * Success */ - 200: EmploymentResponse; + 200: ListLeavePoliciesSummaryResponse; }; -export type PostCompleteOnboardingEmploymentResponse = - PostCompleteOnboardingEmploymentResponses[keyof PostCompleteOnboardingEmploymentResponses]; +export type GetIndexLeavePoliciesSummaryResponse = + GetIndexLeavePoliciesSummaryResponses[keyof GetIndexLeavePoliciesSummaryResponses]; -export type GetIndexLeavePoliciesDetailsData = { - body?: never; +export type PostCreateCancellationData = { + /** + * CancelTimeoff + */ + body: CancelTimeoffParams; path: { /** - * Employment ID + * Time Off ID */ - employment_id: string; + timeoff_id: string; }; query?: never; - url: '/v1/leave-policies/details/{employment_id}'; + url: '/api/eor/v1/timeoff/{timeoff_id}/cancel'; }; -export type GetIndexLeavePoliciesDetailsErrors = { +export type PostCreateCancellationErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -15871,89 +18293,80 @@ export type GetIndexLeavePoliciesDetailsErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetIndexLeavePoliciesDetailsError = - GetIndexLeavePoliciesDetailsErrors[keyof GetIndexLeavePoliciesDetailsErrors]; +export type PostCreateCancellationError = + PostCreateCancellationErrors[keyof PostCreateCancellationErrors]; -export type GetIndexLeavePoliciesDetailsResponses = { +export type PostCreateCancellationResponses = { /** * Success */ - 200: ListLeavePoliciesDetailsResponse; + 200: TimeoffResponse; }; -export type GetIndexLeavePoliciesDetailsResponse = - GetIndexLeavePoliciesDetailsResponses[keyof GetIndexLeavePoliciesDetailsResponses]; +export type PostCreateCancellationResponse = + PostCreateCancellationResponses[keyof PostCreateCancellationResponses]; -export type GetTimeoffTypesTimeoffData = { +export type GetShowHelpCenterArticleData = { 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). + * Help Center Article Zendesk ID */ - type?: TimeoffTypesEmploymentType; + id: number; }; - url: '/v1/timeoff/types'; + query?: never; + url: '/api/eor/v1/help-center-articles/{id}'; }; -export type GetTimeoffTypesTimeoffErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetShowHelpCenterArticleErrors = { /** * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetTimeoffTypesTimeoffError = - GetTimeoffTypesTimeoffErrors[keyof GetTimeoffTypesTimeoffErrors]; +export type GetShowHelpCenterArticleError = + GetShowHelpCenterArticleErrors[keyof GetShowHelpCenterArticleErrors]; -export type GetTimeoffTypesTimeoffResponses = { +export type GetShowHelpCenterArticleResponses = { /** * Success */ - 200: ListTimeoffTypesResponse; + 200: HelpCenterArticleResponse; }; -export type GetTimeoffTypesTimeoffResponse = - GetTimeoffTypesTimeoffResponses[keyof GetTimeoffTypesTimeoffResponses]; +export type GetShowHelpCenterArticleResponse = + GetShowHelpCenterArticleResponses[keyof GetShowHelpCenterArticleResponses]; -export type PostCreateEstimationCsvData = { +export type PostUploadEmployeeFileFileData = { /** - * Estimate params + * File */ - body?: CostCalculatorEstimateParams; + body: FileParams; + 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/cost-calculator/estimation-csv'; + url: '/api/eor/v1/documents'; }; -export type PostCreateEstimationCsvErrors = { +export type PostUploadEmployeeFileFileErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -15964,87 +18377,76 @@ export type PostCreateEstimationCsvErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateEstimationCsvError = - PostCreateEstimationCsvErrors[keyof PostCreateEstimationCsvErrors]; +export type PostUploadEmployeeFileFileError = + PostUploadEmployeeFileFileErrors[keyof PostUploadEmployeeFileFileErrors]; -export type PostCreateEstimationCsvResponses = { +export type PostUploadEmployeeFileFileResponses = { /** * Success */ - 200: CostCalculatorEstimateCsvResponse; + 200: UploadFileResponse; }; -export type PostCreateEstimationCsvResponse = - PostCreateEstimationCsvResponses[keyof PostCreateEstimationCsvResponses]; +export type PostUploadEmployeeFileFileResponse = + PostUploadEmployeeFileFileResponses[keyof PostUploadEmployeeFileFileResponses]; -export type GetListGroupsScimData = { +export type PostVerifyIdentityVerificationData = { 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: '/api/eor/v1/identity-verification/{employment_id}/verify'; }; -export type GetListGroupsScimErrors = { - /** - * Bad Request - */ - 400: IntegrationsScimErrorResponse; +export type PostVerifyIdentityVerificationErrors = { /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; }; -export type GetListGroupsScimError = - GetListGroupsScimErrors[keyof GetListGroupsScimErrors]; +export type PostVerifyIdentityVerificationError = + PostVerifyIdentityVerificationErrors[keyof PostVerifyIdentityVerificationErrors]; -export type GetListGroupsScimResponses = { +export type PostVerifyIdentityVerificationResponses = { /** * Success */ - 200: IntegrationsScimGroupListResponse; + 200: SuccessResponse; }; -export type GetListGroupsScimResponse = - GetListGroupsScimResponses[keyof GetListGroupsScimResponses]; +export type PostVerifyIdentityVerificationResponse = + PostVerifyIdentityVerificationResponses[keyof PostVerifyIdentityVerificationResponses]; -export type PostCreateContractDocumentData = { - /** - * CreateContractDocumentParams - */ - body: CreateContractDocument; - path: { +export type GetIndexEmploymentCustomFieldData = { + body?: never; + 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/contractors/employments/{employment_id}/contract-documents'; + url: '/api/eor/v1/custom-fields'; }; -export type PostCreateContractDocumentErrors = { +export type GetIndexEmploymentCustomFieldErrors = { /** * Unauthorized */ @@ -16059,30 +18461,30 @@ export type PostCreateContractDocumentErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateContractDocumentError = - PostCreateContractDocumentErrors[keyof PostCreateContractDocumentErrors]; +export type GetIndexEmploymentCustomFieldError = + GetIndexEmploymentCustomFieldErrors[keyof GetIndexEmploymentCustomFieldErrors]; -export type PostCreateContractDocumentResponses = { +export type GetIndexEmploymentCustomFieldResponses = { /** * Success */ - 200: CreateContractDocumentResponse; + 200: ListEmploymentCustomFieldsResponse; }; -export type PostCreateContractDocumentResponse = - PostCreateContractDocumentResponses[keyof PostCreateContractDocumentResponses]; +export type GetIndexEmploymentCustomFieldResponse = + GetIndexEmploymentCustomFieldResponses[keyof GetIndexEmploymentCustomFieldResponses]; -export type PostTriggerWebhookCallbackData = { +export type PostCreateEmploymentCustomFieldData = { /** - * Webhook Trigger Params + * Custom Field Definition Create Parameters */ - body?: WebhookTriggerParams; + body: CreateCustomFieldDefinitionParams; path?: never; query?: never; - url: '/v1/sandbox/webhook-callbacks/trigger'; + url: '/api/eor/v1/custom-fields'; }; -export type PostTriggerWebhookCallbackErrors = { +export type PostCreateEmploymentCustomFieldErrors = { /** * Unauthorized */ @@ -16097,21 +18499,24 @@ export type PostTriggerWebhookCallbackErrors = { 422: UnprocessableEntityResponse; }; -export type PostTriggerWebhookCallbackError = - PostTriggerWebhookCallbackErrors[keyof PostTriggerWebhookCallbackErrors]; +export type PostCreateEmploymentCustomFieldError = + PostCreateEmploymentCustomFieldErrors[keyof PostCreateEmploymentCustomFieldErrors]; -export type PostTriggerWebhookCallbackResponses = { +export type PostCreateEmploymentCustomFieldResponses = { /** * Success */ - 200: SuccessResponse; + 200: CreateEmploymentCustomFieldResponse; }; -export type PostTriggerWebhookCallbackResponse = - PostTriggerWebhookCallbackResponses[keyof PostTriggerWebhookCallbackResponses]; +export type PostCreateEmploymentCustomFieldResponse = + PostCreateEmploymentCustomFieldResponses[keyof PostCreateEmploymentCustomFieldResponses]; -export type GetDownloadPayslipPayslipData = { - body?: never; +export type PostCreateWebhookCallbackData = { + /** + * WebhookCallback + */ + body?: CreateWebhookCallbackParams; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -16121,21 +18526,12 @@ export type GetDownloadPayslipPayslipData = { */ Authorization: string; }; - path: { - /** - * Payslip ID - */ - payslip_id: string; - }; + path?: never; query?: never; - url: '/v1/payslips/{payslip_id}/pdf'; + url: '/api/eor/v1/webhook-callbacks'; }; -export type GetDownloadPayslipPayslipErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostCreateWebhookCallbackErrors = { /** * Unauthorized */ @@ -16148,36 +18544,38 @@ export type GetDownloadPayslipPayslipErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetDownloadPayslipPayslipError = - GetDownloadPayslipPayslipErrors[keyof GetDownloadPayslipPayslipErrors]; +export type PostCreateWebhookCallbackError = + PostCreateWebhookCallbackErrors[keyof PostCreateWebhookCallbackErrors]; -export type GetDownloadPayslipPayslipResponses = { +export type PostCreateWebhookCallbackResponses = { /** * Success */ - 200: PayslipDownloadResponse; + 200: WebhookCallbackResponse; }; -export type GetDownloadPayslipPayslipResponse = - GetDownloadPayslipPayslipResponses[keyof GetDownloadPayslipPayslipResponses]; +export type PostCreateWebhookCallbackResponse = + PostCreateWebhookCallbackResponses[keyof PostCreateWebhookCallbackResponses]; -export type PostConvertWithSpreadCurrencyConverterData = { - /** - * Convert currency parameters - */ - body: ConvertCurrencyParams; - path?: never; +export type PostApproveReservePaymentRiskReserveData = { + body?: never; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/currency-converter/effective'; + url: '/api/eor/v1/sandbox/employments/{employment_id}/approve-reserve-payment'; }; -export type PostConvertWithSpreadCurrencyConverterErrors = { +export type PostApproveReservePaymentRiskReserveErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -16190,43 +18588,33 @@ export type PostConvertWithSpreadCurrencyConverterErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PostConvertWithSpreadCurrencyConverterError = - PostConvertWithSpreadCurrencyConverterErrors[keyof PostConvertWithSpreadCurrencyConverterErrors]; +export type PostApproveReservePaymentRiskReserveError = + PostApproveReservePaymentRiskReserveErrors[keyof PostApproveReservePaymentRiskReserveErrors]; -export type PostConvertWithSpreadCurrencyConverterResponses = { +export type PostApproveReservePaymentRiskReserveResponses = { /** * Success */ - 200: ConvertCurrencyResponse; + 200: SuccessResponse; }; -export type PostConvertWithSpreadCurrencyConverterResponse = - PostConvertWithSpreadCurrencyConverterResponses[keyof PostConvertWithSpreadCurrencyConverterResponses]; +export type PostApproveReservePaymentRiskReserveResponse = + PostApproveReservePaymentRiskReserveResponses[keyof PostApproveReservePaymentRiskReserveResponses]; -export type GetShowTimeoffData = { +export type GetDetailsSsoConfigurationData = { 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: { - /** - * Timeoff ID - */ - id: string; - }; + path?: never; query?: never; - url: '/v1/timeoff/{id}'; + url: '/api/eor/v1/sso-configuration/details'; }; -export type GetShowTimeoffErrors = { +export type GetDetailsSsoConfigurationErrors = { /** * Bad Request */ @@ -16239,165 +18627,133 @@ export type GetShowTimeoffErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type GetShowTimeoffError = - GetShowTimeoffErrors[keyof GetShowTimeoffErrors]; +export type GetDetailsSsoConfigurationError = + GetDetailsSsoConfigurationErrors[keyof GetDetailsSsoConfigurationErrors]; -export type GetShowTimeoffResponses = { +export type GetDetailsSsoConfigurationResponses = { /** * Success */ - 200: TimeoffResponse; + 200: SsoConfigurationDetailsResponse; }; -export type GetShowTimeoffResponse = - GetShowTimeoffResponses[keyof GetShowTimeoffResponses]; +export type GetDetailsSsoConfigurationResponse = + GetDetailsSsoConfigurationResponses[keyof GetDetailsSsoConfigurationResponses]; -export type PatchUpdateTimeoff2Data = { +export type PostSignContractDocumentData = { /** - * UpdateTimeoff + * SignContractDocument */ - body: UpdateApprovedTimeoffParams; - headers: { + body: SignContractDocument; + 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; - }; - path: { + employment_id: string; /** - * Timeoff ID + * Document ID */ - id: string; + contract_document_id: string; }; query?: never; - url: '/v1/timeoff/{id}'; + url: '/api/eor/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign'; }; -export type PatchUpdateTimeoff2Errors = { +export type PostSignContractDocumentErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity + * Forbidden */ - 429: TooManyRequestsResponse; + 403: ForbiddenResponse; }; -export type PatchUpdateTimeoff2Error = - PatchUpdateTimeoff2Errors[keyof PatchUpdateTimeoff2Errors]; +export type PostSignContractDocumentError = + PostSignContractDocumentErrors[keyof PostSignContractDocumentErrors]; -export type PatchUpdateTimeoff2Responses = { +export type PostSignContractDocumentResponses = { /** * Success */ - 200: TimeoffResponse; + 200: SuccessResponse; }; -export type PatchUpdateTimeoff2Response = - PatchUpdateTimeoff2Responses[keyof PatchUpdateTimeoff2Responses]; +export type PostSignContractDocumentResponse = + PostSignContractDocumentResponses[keyof PostSignContractDocumentResponses]; -export type PatchUpdateTimeoffData = { - /** - * UpdateTimeoff - */ - body: UpdateApprovedTimeoffParams; - headers: { +export type GetListUsersScimData = { + 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. - * + * 1-based index of the first result */ - Authorization: string; - }; - path: { + startIndex?: number; /** - * Timeoff ID + * Maximum number of results per page */ - id: string; + count?: number; + /** + * Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) + */ + filter?: string; }; - query?: never; - url: '/v1/timeoff/{id}'; + url: '/api/eor/v1/scim/v2/Users'; }; -export type PatchUpdateTimeoffErrors = { +export type GetListUsersScimErrors = { /** * Bad Request */ - 400: BadRequestResponse; + 400: IntegrationsScimErrorResponse; /** * Unauthorized */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; + 401: IntegrationsScimErrorResponse; /** - * Unprocessable Entity + * Forbidden */ - 422: UnprocessableEntityResponse; + 403: IntegrationsScimErrorResponse; /** - * Unprocessable Entity + * Not Found */ - 429: TooManyRequestsResponse; + 404: IntegrationsScimErrorResponse; }; -export type PatchUpdateTimeoffError = - PatchUpdateTimeoffErrors[keyof PatchUpdateTimeoffErrors]; +export type GetListUsersScimError = + GetListUsersScimErrors[keyof GetListUsersScimErrors]; -export type PatchUpdateTimeoffResponses = { +export type GetListUsersScimResponses = { /** * Success */ - 200: TimeoffResponse; + 200: IntegrationsScimUserListResponse; }; -export type PatchUpdateTimeoffResponse = - PatchUpdateTimeoffResponses[keyof PatchUpdateTimeoffResponses]; +export type GetListUsersScimResponse = + GetListUsersScimResponses[keyof GetListUsersScimResponses]; -export type PostCreateDeclineData = { - /** - * DeclineTimeoff - */ - body: DeclineTimeoffParams; +export type GetShowResignationData = { + body?: never; path: { /** - * Time Off ID + * Offboarding request ID */ - timeoff_id: string; + offboarding_request_id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/decline'; + url: '/api/eor/v1/resignations/{offboarding_request_id}'; }; -export type PostCreateDeclineErrors = { +export type GetShowResignationErrors = { /** * Bad Request */ @@ -16420,44 +18776,41 @@ export type PostCreateDeclineErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateDeclineError = - PostCreateDeclineErrors[keyof PostCreateDeclineErrors]; +export type GetShowResignationError = + GetShowResignationErrors[keyof GetShowResignationErrors]; -export type PostCreateDeclineResponses = { +export type GetShowResignationResponses = { /** * Success */ - 200: TimeoffResponse; + 200: ResignationResponse; }; -export type PostCreateDeclineResponse = - PostCreateDeclineResponses[keyof PostCreateDeclineResponses]; +export type GetShowResignationResponse = + GetShowResignationResponses[keyof GetShowResignationResponses]; -export type PostAutomatableContractAmendmentData = { - /** - * Contract Amendment - */ - body?: CreateContractAmendmentParams; - headers: { +export type GetGetBreakdownBillingDocumentData = { + 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. - * + * The billing document's ID */ - Authorization: string; + billing_document_id: string; }; - path?: never; query?: { /** - * Version of the form schema + * Filters the results by the type of the billing breakdown item. */ - json_schema_version?: number | 'latest'; + type?: string; }; - url: '/v1/contract-amendments/automatable'; + url: '/api/eor/v1/billing-documents/{billing_document_id}/breakdown'; }; -export type PostAutomatableContractAmendmentErrors = { +export type GetGetBreakdownBillingDocumentErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -16470,26 +18823,30 @@ export type PostAutomatableContractAmendmentErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostAutomatableContractAmendmentError = - PostAutomatableContractAmendmentErrors[keyof PostAutomatableContractAmendmentErrors]; +export type GetGetBreakdownBillingDocumentError = + GetGetBreakdownBillingDocumentErrors[keyof GetGetBreakdownBillingDocumentErrors]; -export type PostAutomatableContractAmendmentResponses = { +export type GetGetBreakdownBillingDocumentResponses = { /** * Success */ - 200: ContractAmendmentAutomatableResponse; + 200: BillingDocumentBreakdownResponse; }; -export type PostAutomatableContractAmendmentResponse = - PostAutomatableContractAmendmentResponses[keyof PostAutomatableContractAmendmentResponses]; +export type GetGetBreakdownBillingDocumentResponse = + GetGetBreakdownBillingDocumentResponses[keyof GetGetBreakdownBillingDocumentResponses]; -export type PostCreateApprovalData = { +export type PostDeclineCancellationRequestData = { /** - * ApproveTimeoff + * Timeoff */ - body: ApproveTimeoffParams; + body: DeclineTimeoffParams; path: { /** * Time Off ID @@ -16497,22 +18854,18 @@ export type PostCreateApprovalData = { timeoff_id: string; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/approve'; + url: '/api/eor/v1/timeoff/{timeoff_id}/cancel-request/decline'; }; -export type PostCreateApprovalErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostDeclineCancellationRequestErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -16523,36 +18876,31 @@ export type PostCreateApprovalErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateApprovalError = - PostCreateApprovalErrors[keyof PostCreateApprovalErrors]; +export type PostDeclineCancellationRequestError = + PostDeclineCancellationRequestErrors[keyof PostDeclineCancellationRequestErrors]; -export type PostCreateApprovalResponses = { +export type PostDeclineCancellationRequestResponses = { /** * Success */ - 200: TimeoffResponse; + 200: SuccessResponse; }; -export type PostCreateApprovalResponse = - PostCreateApprovalResponses[keyof PostCreateApprovalResponses]; +export type PostDeclineCancellationRequestResponse = + PostDeclineCancellationRequestResponses[keyof PostDeclineCancellationRequestResponses]; -export type GetIndexEmploymentFileData = { +export type GetIndexEorPayrollCalendarData = { body?: never; - path: { - /** - * Employment ID - */ - employment_id: string; - }; + path?: never; query?: { /** - * Filter by file type (optional) + * Filter payroll calendars by country code */ - type?: string; + country_code?: string; /** - * Filter by file sub_type (optional) + * Filter payroll calendars by year */ - sub_type?: string; + year?: string; /** * Starts fetching records after the given page */ @@ -16562,10 +18910,10 @@ export type GetIndexEmploymentFileData = { */ page_size?: number; }; - url: '/v1/employments/{employment_id}/files'; + url: '/api/eor/v1/payroll-calendars'; }; -export type GetIndexEmploymentFileErrors = { +export type GetIndexEorPayrollCalendarErrors = { /** * Unauthorized */ @@ -16580,36 +18928,54 @@ export type GetIndexEmploymentFileErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexEmploymentFileError = - GetIndexEmploymentFileErrors[keyof GetIndexEmploymentFileErrors]; +export type GetIndexEorPayrollCalendarError = + GetIndexEorPayrollCalendarErrors[keyof GetIndexEorPayrollCalendarErrors]; -export type GetIndexEmploymentFileResponses = { +export type GetIndexEorPayrollCalendarResponses = { /** * Success */ - 200: ListFilesResponse; + 200: PayrollCalendarsEorResponse; }; -export type GetIndexEmploymentFileResponse = - GetIndexEmploymentFileResponses[keyof GetIndexEmploymentFileResponses]; +export type GetIndexEorPayrollCalendarResponse = + GetIndexEorPayrollCalendarResponses[keyof GetIndexEorPayrollCalendarResponses]; -export type GetIndexEmploymentCustomFieldData = { +export type GetPayDetailGphData = { body?: never; + headers?: { + /** + * The preferred language of the inquiring user in Workday + */ + accept_language?: string; + }; path?: never; - query?: { + query: { /** - * Starts fetching records after the given page + * The pay group ID for identifying the pay group at the vendor system */ - page?: number; + payGroupExternalId: string; /** - * Number of items per page + * The run type id provided in the paySummary API */ - page_size?: number; + 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/custom-fields'; + url: '/api/eor/v1/wd/gph/payDetail'; }; -export type GetIndexEmploymentCustomFieldErrors = { +export type GetPayDetailGphErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -16618,36 +18984,55 @@ export type GetIndexEmploymentCustomFieldErrors = { * Not Found */ 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; }; -export type GetIndexEmploymentCustomFieldError = - GetIndexEmploymentCustomFieldErrors[keyof GetIndexEmploymentCustomFieldErrors]; +export type GetPayDetailGphError = + GetPayDetailGphErrors[keyof GetPayDetailGphErrors]; -export type GetIndexEmploymentCustomFieldResponses = { +export type GetPayDetailGphResponses = { /** * Success */ - 200: ListEmploymentCustomFieldsResponse; + 200: PayDetailResponse; }; -export type GetIndexEmploymentCustomFieldResponse = - GetIndexEmploymentCustomFieldResponses[keyof GetIndexEmploymentCustomFieldResponses]; +export type GetPayDetailGphResponse = + GetPayDetailGphResponses[keyof GetPayDetailGphResponses]; -export type PostCreateEmploymentCustomFieldData = { - /** - * Custom Field Definition Create Parameters - */ - body: CreateCustomFieldDefinitionParams; +export type GetShowContractAmendmentSchemaData = { + 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: { + /** + * 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: '/api/eor/v1/contract-amendments/schema'; }; -export type PostCreateEmploymentCustomFieldErrors = { +export type GetShowContractAmendmentSchemaErrors = { /** * Unauthorized */ @@ -16662,71 +19047,57 @@ export type PostCreateEmploymentCustomFieldErrors = { 422: UnprocessableEntityResponse; }; -export type PostCreateEmploymentCustomFieldError = - PostCreateEmploymentCustomFieldErrors[keyof PostCreateEmploymentCustomFieldErrors]; +export type GetShowContractAmendmentSchemaError = + GetShowContractAmendmentSchemaErrors[keyof GetShowContractAmendmentSchemaErrors]; -export type PostCreateEmploymentCustomFieldResponses = { +export type GetShowContractAmendmentSchemaResponses = { /** * Success */ - 200: CreateEmploymentCustomFieldResponse; + 200: ContractAmendmentFormResponse; }; -export type PostCreateEmploymentCustomFieldResponse = - PostCreateEmploymentCustomFieldResponses[keyof PostCreateEmploymentCustomFieldResponses]; +export type GetShowContractAmendmentSchemaResponse = + GetShowContractAmendmentSchemaResponses[keyof GetShowContractAmendmentSchemaResponses]; -export type GetIndexCompanyCurrencyData = { +export type GetShowTestSchemaData = { body?: never; path?: never; - query?: never; - url: '/v1/company-currencies'; -}; - -export type GetIndexCompanyCurrencyErrors = { - /** - * Not Found - */ - 404: NotFoundResponse; + query?: { + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; + }; + url: '/api/eor/v1/test-schema'; }; -export type GetIndexCompanyCurrencyError = - GetIndexCompanyCurrencyErrors[keyof GetIndexCompanyCurrencyErrors]; - -export type GetIndexCompanyCurrencyResponses = { +export type GetShowTestSchemaResponses = { /** * Success */ - 200: CompanyCurrenciesResponse; + 200: CompanyFormResponse; }; -export type GetIndexCompanyCurrencyResponse = - GetIndexCompanyCurrencyResponses[keyof GetIndexCompanyCurrencyResponses]; +export type GetShowTestSchemaResponse = + GetShowTestSchemaResponses[keyof GetShowTestSchemaResponses]; -export type PatchUpdateEmployment4Data = { +export type PatchUpdateEmployeeTimeoff2Data = { /** - * Employment params + * UpdateTimeoff */ - 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: UpdateEmployeeTimeoffParams; path: { /** - * Employment ID + * Timeoff ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/sandbox/employments/{employment_id}'; + url: '/api/eor/v1/employee/timeoff/{id}'; }; -export type PatchUpdateEmployment4Errors = { +export type PatchUpdateEmployeeTimeoff2Errors = { /** * Bad Request */ @@ -16739,58 +19110,45 @@ export type PatchUpdateEmployment4Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PatchUpdateEmployment4Error = - PatchUpdateEmployment4Errors[keyof PatchUpdateEmployment4Errors]; +export type PatchUpdateEmployeeTimeoff2Error = + PatchUpdateEmployeeTimeoff2Errors[keyof PatchUpdateEmployeeTimeoff2Errors]; -export type PatchUpdateEmployment4Responses = { +export type PatchUpdateEmployeeTimeoff2Responses = { /** * Success */ - 200: EmploymentResponse; + 200: TimeoffResponse; }; -export type PatchUpdateEmployment4Response = - PatchUpdateEmployment4Responses[keyof PatchUpdateEmployment4Responses]; +export type PatchUpdateEmployeeTimeoff2Response = + PatchUpdateEmployeeTimeoff2Responses[keyof PatchUpdateEmployeeTimeoff2Responses]; -export type PatchUpdateEmployment3Data = { +export type PatchUpdateEmployeeTimeoffData = { /** - * Employment params + * UpdateTimeoff */ - 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: UpdateEmployeeTimeoffParams; path: { /** - * Employment ID + * Timeoff ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/sandbox/employments/{employment_id}'; + url: '/api/eor/v1/employee/timeoff/{id}'; }; -export type PatchUpdateEmployment3Errors = { +export type PatchUpdateEmployeeTimeoffErrors = { /** * Bad Request */ @@ -16803,99 +19161,99 @@ export type PatchUpdateEmployment3Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PatchUpdateEmployment3Error = - PatchUpdateEmployment3Errors[keyof PatchUpdateEmployment3Errors]; +export type PatchUpdateEmployeeTimeoffError = + PatchUpdateEmployeeTimeoffErrors[keyof PatchUpdateEmployeeTimeoffErrors]; -export type PatchUpdateEmployment3Responses = { +export type PatchUpdateEmployeeTimeoffResponses = { /** * Success */ - 200: EmploymentResponse; + 200: TimeoffResponse; }; -export type PatchUpdateEmployment3Response = - PatchUpdateEmployment3Responses[keyof PatchUpdateEmployment3Responses]; +export type PatchUpdateEmployeeTimeoffResponse = + PatchUpdateEmployeeTimeoffResponses[keyof PatchUpdateEmployeeTimeoffResponses]; -export type GetPendingChangesEmploymentContractData = { +export type GetGetGroupScimData = { 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 + * Group ID (slug) */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/employment-contracts/{employment_id}/pending-changes'; + url: '/api/eor/v1/scim/v2/Groups/{id}'; }; -export type GetPendingChangesEmploymentContractErrors = { +export type GetGetGroupScimErrors = { /** * Unauthorized */ - 401: UnauthorizedResponse; + 401: IntegrationsScimErrorResponse; /** * Forbidden */ - 403: ForbiddenResponse; + 403: IntegrationsScimErrorResponse; /** * Not Found */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; + 404: IntegrationsScimErrorResponse; }; -export type GetPendingChangesEmploymentContractError = - GetPendingChangesEmploymentContractErrors[keyof GetPendingChangesEmploymentContractErrors]; +export type GetGetGroupScimError = + GetGetGroupScimErrors[keyof GetGetGroupScimErrors]; -export type GetPendingChangesEmploymentContractResponses = { +export type GetGetGroupScimResponses = { /** * Success */ - 200: EmploymentContractPendingChangesResponse; + 200: IntegrationsScimGroup; }; -export type GetPendingChangesEmploymentContractResponse = - GetPendingChangesEmploymentContractResponses[keyof GetPendingChangesEmploymentContractResponses]; +export type GetGetGroupScimResponse = + GetGetGroupScimResponses[keyof GetGetGroupScimResponses]; -export type GetShowResignationData = { +export type GetShowLegalEntityFormCountryData = { body?: never; path: { /** - * Offboarding request ID + * Country code according to ISO 3-digit alphabetic codes + */ + country_code: string; + /** + * Name of the desired form */ - offboarding_request_id: string; + form: string; }; - query?: never; - url: '/v1/resignations/{offboarding_request_id}'; + 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: '/api/eor/v1/countries/{country_code}/legal_entity_forms/{form}'; }; -export type GetShowResignationErrors = { +export type GetShowLegalEntityFormCountryErrors = { /** * Bad Request */ @@ -16918,42 +19276,49 @@ export type GetShowResignationErrors = { 429: TooManyRequestsResponse; }; -export type GetShowResignationError = - GetShowResignationErrors[keyof GetShowResignationErrors]; +export type GetShowLegalEntityFormCountryError = + GetShowLegalEntityFormCountryErrors[keyof GetShowLegalEntityFormCountryErrors]; -export type GetShowResignationResponses = { +export type GetShowLegalEntityFormCountryResponses = { /** * Success */ - 200: ResignationResponse; + 200: CountryFormResponse; }; -export type GetShowResignationResponse = - GetShowResignationResponses[keyof GetShowResignationResponses]; +export type GetShowLegalEntityFormCountryResponse = + GetShowLegalEntityFormCountryResponses[keyof GetShowLegalEntityFormCountryResponses]; -export type PostUploadEmployeeFileFileData = { - /** - * File - */ - body: FileParams; +export type GetPendingChangesEmploymentContractData = { + 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. + * 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; + path: { + /** + * Employment ID + */ + employment_id: string; + }; query?: never; - url: '/v1/documents'; + url: '/api/eor/v1/employment-contracts/{employment_id}/pending-changes'; }; -export type PostUploadEmployeeFileFileErrors = { +export type GetPendingChangesEmploymentContractErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -16964,145 +19329,112 @@ export type PostUploadEmployeeFileFileErrors = { 422: UnprocessableEntityResponse; }; -export type PostUploadEmployeeFileFileError = - PostUploadEmployeeFileFileErrors[keyof PostUploadEmployeeFileFileErrors]; +export type GetPendingChangesEmploymentContractError = + GetPendingChangesEmploymentContractErrors[keyof GetPendingChangesEmploymentContractErrors]; -export type PostUploadEmployeeFileFileResponses = { +export type GetPendingChangesEmploymentContractResponses = { /** * Success */ - 200: UploadFileResponse; + 200: EmploymentContractPendingChangesResponse; }; -export type PostUploadEmployeeFileFileResponse = - PostUploadEmployeeFileFileResponses[keyof PostUploadEmployeeFileFileResponses]; +export type GetPendingChangesEmploymentContractResponse = + GetPendingChangesEmploymentContractResponses[keyof GetPendingChangesEmploymentContractResponses]; -export type PostInviteEmploymentInvitationData = { - 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; - }; +export type PostReportErrorsTelemetryData = { + /** + * SDK Error Report + */ + body: SdkErrorPayload; + path?: never; query?: never; - url: '/v1/employments/{employment_id}/invite'; + url: '/api/eor/v1/sdk/telemetry-errors'; }; -export type PostInviteEmploymentInvitationErrors = { +export type PostReportErrorsTelemetryErrors = { /** * Bad Request */ - 400: BadRequestResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; + 400: ErrorResponse; /** - * Unprocessable Entity + * Too Many Requests */ - 429: TooManyRequestsResponse; + 429: RateLimitResponse; }; -export type PostInviteEmploymentInvitationError = - PostInviteEmploymentInvitationErrors[keyof PostInviteEmploymentInvitationErrors]; +export type PostReportErrorsTelemetryError = + PostReportErrorsTelemetryErrors[keyof PostReportErrorsTelemetryErrors]; -export type PostInviteEmploymentInvitationResponses = { +export type PostReportErrorsTelemetryResponses = { /** - * Success + * No Content */ - 200: SuccessResponse; + 204: unknown; }; -export type PostInviteEmploymentInvitationResponse = - PostInviteEmploymentInvitationResponses[keyof PostInviteEmploymentInvitationResponses]; - -export type GetShowExpenseData = { +export type GetShowCompanyComplianceProfileData = { 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: { /** - * Expense ID + * Company ID */ - id: string; + company_id: UuidSlug; }; query?: never; - url: '/v1/expenses/{id}'; + url: '/api/eor/v1/companies/{company_id}/compliance-profile'; }; -export type GetShowExpenseErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowCompanyComplianceProfileErrors = { /** * 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 GetShowExpenseError = - GetShowExpenseErrors[keyof GetShowExpenseErrors]; +export type GetShowCompanyComplianceProfileError = + GetShowCompanyComplianceProfileErrors[keyof GetShowCompanyComplianceProfileErrors]; -export type GetShowExpenseResponses = { +export type GetShowCompanyComplianceProfileResponses = { /** * Success */ - 200: ExpenseResponse; + 200: CompanyComplianceProfileResponse; }; -export type GetShowExpenseResponse = - GetShowExpenseResponses[keyof GetShowExpenseResponses]; +export type GetShowCompanyComplianceProfileResponse = + GetShowCompanyComplianceProfileResponses[keyof GetShowCompanyComplianceProfileResponses]; -export type PatchUpdateExpense2Data = { - /** - * Expenses - */ - body?: UpdateExpenseParams; +export type GetShowPayslipData = { + 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: { /** - * Expense ID + * Payslip ID */ id: string; }; query?: never; - url: '/v1/expenses/{id}'; + url: '/api/eor/v1/payslips/{id}'; }; -export type PatchUpdateExpense2Errors = { +export type GetShowPayslipErrors = { /** * Bad Request */ @@ -17115,10 +19447,6 @@ export type PatchUpdateExpense2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ @@ -17129,96 +19457,104 @@ export type PatchUpdateExpense2Errors = { 429: TooManyRequestsResponse; }; -export type PatchUpdateExpense2Error = - PatchUpdateExpense2Errors[keyof PatchUpdateExpense2Errors]; +export type GetShowPayslipError = + GetShowPayslipErrors[keyof GetShowPayslipErrors]; -export type PatchUpdateExpense2Responses = { +export type GetShowPayslipResponses = { /** * Success */ - 200: ExpenseResponse; + 200: PayslipResponse; }; -export type PatchUpdateExpense2Response = - PatchUpdateExpense2Responses[keyof PatchUpdateExpense2Responses]; +export type GetShowPayslipResponse = + GetShowPayslipResponses[keyof GetShowPayslipResponses]; -export type PatchUpdateExpenseData = { - /** - * Expenses - */ - body?: UpdateExpenseParams; +export type PostApproveCancellationRequestData = { + body?: never; path: { /** - * Expense ID + * Time Off ID */ - id: string; + timeoff_id: string; }; query?: never; - url: '/v1/expenses/{id}'; + url: '/api/eor/v1/timeoff/{timeoff_id}/cancel-request/approve'; }; -export type PatchUpdateExpenseErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostApproveCancellationRequestErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; /** - * Too many requests + * Unprocessable Entity */ 429: TooManyRequestsResponse; }; -export type PatchUpdateExpenseError = - PatchUpdateExpenseErrors[keyof PatchUpdateExpenseErrors]; +export type PostApproveCancellationRequestError = + PostApproveCancellationRequestErrors[keyof PostApproveCancellationRequestErrors]; -export type PatchUpdateExpenseResponses = { +export type PostApproveCancellationRequestResponses = { /** * Success */ - 200: ExpenseResponse; + 200: SuccessResponse; }; -export type PatchUpdateExpenseResponse = - PatchUpdateExpenseResponses[keyof PatchUpdateExpenseResponses]; +export type PostApproveCancellationRequestResponse = + PostApproveCancellationRequestResponses[keyof PostApproveCancellationRequestResponses]; -export type GetShowBenefitRenewalRequestData = { +export type GetIndexWebhookEventData = { body?: never; - headers: { + path?: never; + query?: { + /** + * Filter by webhook event type + */ + event_type?: string; + /** + * Filter by delivery status (true = 200, false = 4xx/5xx) + */ + successfully_delivered?: boolean; /** - * 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. - * + * Filter by company ID */ - Authorization: string; - }; - path: { + company_id?: string; /** - * Benefit Renewal Request Id + * Filter by date before (ISO 8601 format) */ - benefit_renewal_request_id: UuidSlug; + 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; }; - query?: never; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; + url: '/api/eor/v1/webhook-events'; }; -export type GetShowBenefitRenewalRequestErrors = { +export type GetIndexWebhookEventErrors = { /** * Unauthorized */ @@ -17233,24 +19569,21 @@ export type GetShowBenefitRenewalRequestErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowBenefitRenewalRequestError = - GetShowBenefitRenewalRequestErrors[keyof GetShowBenefitRenewalRequestErrors]; +export type GetIndexWebhookEventError = + GetIndexWebhookEventErrors[keyof GetIndexWebhookEventErrors]; -export type GetShowBenefitRenewalRequestResponses = { +export type GetIndexWebhookEventResponses = { /** * Success */ - 200: BenefitRenewalRequestsBenefitRenewalRequestResponse; + 200: ListWebhookEventsResponse; }; -export type GetShowBenefitRenewalRequestResponse = - GetShowBenefitRenewalRequestResponses[keyof GetShowBenefitRenewalRequestResponses]; +export type GetIndexWebhookEventResponse = + GetIndexWebhookEventResponses[keyof GetIndexWebhookEventResponses]; -export type PostUpdateBenefitRenewalRequestData = { - /** - * Benefit Renewal Request Response - */ - body?: BenefitRenewalRequestsUpdateBenefitRenewalRequest; +export type GetTimeoffTypesTimeoffData = { + body?: never; headers: { /** * Requires a Company-scoped access token obtained through the Authorization Code flow or the Refresh Token flow. @@ -17260,26 +19593,29 @@ export type PostUpdateBenefitRenewalRequestData = { */ Authorization: string; }; - path: { - /** - * Benefit Renewal Request Id - */ - benefit_renewal_request_id: UuidSlug; - }; + path?: never; query?: { /** - * Version of the form schema + * Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types). */ - json_schema_version?: number | 'latest'; + type?: TimeoffTypesEmploymentType; }; - url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}'; + url: '/api/eor/v1/timeoff/types'; }; -export type PostUpdateBenefitRenewalRequestErrors = { +export type GetTimeoffTypesTimeoffErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ @@ -17290,32 +19626,41 @@ export type PostUpdateBenefitRenewalRequestErrors = { 429: TooManyRequestsResponse; }; -export type PostUpdateBenefitRenewalRequestError = - PostUpdateBenefitRenewalRequestErrors[keyof PostUpdateBenefitRenewalRequestErrors]; +export type GetTimeoffTypesTimeoffError = + GetTimeoffTypesTimeoffErrors[keyof GetTimeoffTypesTimeoffErrors]; -export type PostUpdateBenefitRenewalRequestResponses = { +export type GetTimeoffTypesTimeoffResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListTimeoffTypesResponse; }; -export type PostUpdateBenefitRenewalRequestResponse = - PostUpdateBenefitRenewalRequestResponses[keyof PostUpdateBenefitRenewalRequestResponses]; +export type GetTimeoffTypesTimeoffResponse = + GetTimeoffTypesTimeoffResponses[keyof GetTimeoffTypesTimeoffResponses]; -export type GetShowEmploymentOnboardingStepsData = { +export type GetIndexCompanyLegalEntitiesData = { body?: never; path: { /** - * Employment ID + * Company ID */ - employment_id: UuidSlug; + company_id: UuidSlug; }; - query?: never; - url: '/v1/employments/{employment_id}/onboarding-steps'; + query?: { + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; + }; + url: '/api/eor/v1/companies/{company_id}/legal-entities'; }; -export type GetShowEmploymentOnboardingStepsErrors = { +export type GetIndexCompanyLegalEntitiesErrors = { /** * Unauthorized */ @@ -17326,21 +19671,24 @@ export type GetShowEmploymentOnboardingStepsErrors = { 404: NotFoundResponse; }; -export type GetShowEmploymentOnboardingStepsError = - GetShowEmploymentOnboardingStepsErrors[keyof GetShowEmploymentOnboardingStepsErrors]; +export type GetIndexCompanyLegalEntitiesError = + GetIndexCompanyLegalEntitiesErrors[keyof GetIndexCompanyLegalEntitiesErrors]; -export type GetShowEmploymentOnboardingStepsResponses = { +export type GetIndexCompanyLegalEntitiesResponses = { /** * Success */ - 200: EmploymentOnboardingStepsResponse; + 200: ListCompanyLegalEntitiesResponse; }; -export type GetShowEmploymentOnboardingStepsResponse = - GetShowEmploymentOnboardingStepsResponses[keyof GetShowEmploymentOnboardingStepsResponses]; +export type GetIndexCompanyLegalEntitiesResponse = + GetIndexCompanyLegalEntitiesResponses[keyof GetIndexCompanyLegalEntitiesResponses]; -export type GetIndexEmploymentCompanyStructureNodeData = { - body?: never; +export type PostCreateContractEligibilityData = { + /** + * Contract Eligibility Create Parameters + */ + body: CreateContractEligibilityParams; path: { /** * Employment ID @@ -17348,38 +19696,38 @@ export type GetIndexEmploymentCompanyStructureNodeData = { employment_id: string; }; query?: never; - url: '/v1/employments/{employment_id}/company-structure-nodes'; + url: '/api/eor/v1/employments/{employment_id}/contract-eligibility'; }; -export type GetIndexEmploymentCompanyStructureNodeErrors = { +export type PostCreateContractEligibilityErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type GetIndexEmploymentCompanyStructureNodeError = - GetIndexEmploymentCompanyStructureNodeErrors[keyof GetIndexEmploymentCompanyStructureNodeErrors]; +export type PostCreateContractEligibilityError = + PostCreateContractEligibilityErrors[keyof PostCreateContractEligibilityErrors]; -export type GetIndexEmploymentCompanyStructureNodeResponses = { +export type PostCreateContractEligibilityResponses = { /** * Success */ - 200: CompanyStructureNodesResponse; + 200: SuccessResponse; }; -export type GetIndexEmploymentCompanyStructureNodeResponse = - GetIndexEmploymentCompanyStructureNodeResponses[keyof GetIndexEmploymentCompanyStructureNodeResponses]; +export type PostCreateContractEligibilityResponse = + PostCreateContractEligibilityResponses[keyof PostCreateContractEligibilityResponses]; -export type GetIndexEmploymentCustomFieldValueData = { +export type GetIndexContractorCurrencyData = { body?: never; path: { /** @@ -17389,122 +19737,82 @@ export type GetIndexEmploymentCustomFieldValueData = { }; query?: { /** - * Starts fetching records after the given page - */ - page?: number; - /** - * Number of items per page + * Restrict to currencies which payout is guaranteed (default: true) */ - page_size?: number; + restrict_to_guaranteed_pay_out_currencies?: boolean; }; - url: '/v1/employments/{employment_id}/custom-fields'; + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-currencies'; }; -export type GetIndexEmploymentCustomFieldValueErrors = { +export type GetIndexContractorCurrencyErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type GetIndexEmploymentCustomFieldValueError = - GetIndexEmploymentCustomFieldValueErrors[keyof GetIndexEmploymentCustomFieldValueErrors]; - -export type GetIndexEmploymentCustomFieldValueResponses = { - /** - * Success - */ - 200: ListEmploymentCustomFieldValuePaginatedResponse; -}; - -export type GetIndexEmploymentCustomFieldValueResponse = - GetIndexEmploymentCustomFieldValueResponses[keyof GetIndexEmploymentCustomFieldValueResponses]; - -export type PutValidateResignationData = { - /** - * ValidateResignation - */ - body: ValidateResignationRequestParams; - path: { - /** - * Offboarding request ID - */ - offboarding_request_id: string; - }; - query?: never; - url: '/v1/resignations/{offboarding_request_id}/validate'; -}; - -export type PutValidateResignationErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** * Not Found */ 404: NotFoundResponse; /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity + * Internal Server Error */ - 429: TooManyRequestsResponse; + 500: InternalServerErrorResponse; }; -export type PutValidateResignationError = - PutValidateResignationErrors[keyof PutValidateResignationErrors]; +export type GetIndexContractorCurrencyError = + GetIndexContractorCurrencyErrors[keyof GetIndexContractorCurrencyErrors]; -export type PutValidateResignationResponses = { +export type GetIndexContractorCurrencyResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractorCurrencyResponse; }; -export type PutValidateResignationResponse = - PutValidateResignationResponses[keyof PutValidateResignationResponses]; +export type GetIndexContractorCurrencyResponse = + GetIndexContractorCurrencyResponses[keyof GetIndexContractorCurrencyResponses]; -export type PutReassignDefaultEntityCompanyData = { +export type GetIndexPayslipData = { 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. - * + * 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 */ - Authorization: string; - }; - path: { + expected_payout_end_date?: string; /** - * Company ID + * Starts fetching records after the given page */ - company_id: string; + page?: number; /** - * Legal Entity ID to set as the new default + * Change the amount of records returned per page, defaults to 20, limited to 100 */ - legal_entity_id: string; + page_size?: number; }; - query?: never; - url: '/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}'; + url: '/api/eor/v1/payslips'; }; -export type PutReassignDefaultEntityCompanyErrors = { +export type GetIndexPayslipErrors = { /** * Bad Request */ @@ -17527,32 +19835,43 @@ export type PutReassignDefaultEntityCompanyErrors = { 429: TooManyRequestsResponse; }; -export type PutReassignDefaultEntityCompanyError = - PutReassignDefaultEntityCompanyErrors[keyof PutReassignDefaultEntityCompanyErrors]; +export type GetIndexPayslipError = + GetIndexPayslipErrors[keyof GetIndexPayslipErrors]; -export type PutReassignDefaultEntityCompanyResponses = { +export type GetIndexPayslipResponses = { /** * Success */ - 200: SuccessResponse; + 200: ListPayslipsResponse; }; -export type PutReassignDefaultEntityCompanyResponse = - PutReassignDefaultEntityCompanyResponses[keyof PutReassignDefaultEntityCompanyResponses]; +export type GetIndexPayslipResponse = + GetIndexPayslipResponses[keyof GetIndexPayslipResponses]; -export type GetIndexWebhookCallbackData = { - body?: never; - path: { +export type PostCreateEmploymentData = { + /** + * Employment params + */ + body?: EmploymentCreateParams; + 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: string; + Authorization: string; }; + path?: never; query?: never; - url: '/v1/companies/{company_id}/webhook-callbacks'; + url: '/api/eor/v1/sandbox/employments'; }; -export type GetIndexWebhookCallbackErrors = { +export type PostCreateEmploymentErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -17561,38 +19880,42 @@ export type GetIndexWebhookCallbackErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetIndexWebhookCallbackError = - GetIndexWebhookCallbackErrors[keyof GetIndexWebhookCallbackErrors]; +export type PostCreateEmploymentError = + PostCreateEmploymentErrors[keyof PostCreateEmploymentErrors]; -export type GetIndexWebhookCallbackResponses = { +export type PostCreateEmploymentResponses = { /** * Success */ - 200: ListWebhookCallbacksResponse; + 201: EmploymentCreationResponse; }; -export type GetIndexWebhookCallbackResponse = - GetIndexWebhookCallbackResponses[keyof GetIndexWebhookCallbackResponses]; +export type PostCreateEmploymentResponse = + PostCreateEmploymentResponses[keyof PostCreateEmploymentResponses]; -export type GetContractorEligibilityCompanyLegalEntitiesData = { +export type GetShowPayrollRunData = { body?: never; path: { /** - * Company ID - */ - company_id: UuidSlug; - /** - * Legal entity ID + * Payroll run ID */ - legal_entity_id: UuidSlug; + payroll_run_id: string; }; query?: never; - url: '/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility'; + url: '/api/eor/v1/payroll-runs/{payroll_run_id}'; }; -export type GetContractorEligibilityCompanyLegalEntitiesErrors = { +export type GetShowPayrollRunErrors = { /** * Unauthorized */ @@ -17601,38 +19924,42 @@ export type GetContractorEligibilityCompanyLegalEntitiesErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetContractorEligibilityCompanyLegalEntitiesError = - GetContractorEligibilityCompanyLegalEntitiesErrors[keyof GetContractorEligibilityCompanyLegalEntitiesErrors]; +export type GetShowPayrollRunError = + GetShowPayrollRunErrors[keyof GetShowPayrollRunErrors]; -export type GetContractorEligibilityCompanyLegalEntitiesResponses = { +export type GetShowPayrollRunResponses = { /** * Success */ - 200: ContractorEligibilityResponse; + 200: PayrollRunResponse; }; -export type GetContractorEligibilityCompanyLegalEntitiesResponse = - GetContractorEligibilityCompanyLegalEntitiesResponses[keyof GetContractorEligibilityCompanyLegalEntitiesResponses]; +export type GetShowPayrollRunResponse = + GetShowPayrollRunResponses[keyof GetShowPayrollRunResponses]; -export type GetShowEmploymentCustomFieldValueData = { +export type GetShowOffboardingData = { body?: never; path: { /** - * Custom field ID - */ - custom_field_id: string; - /** - * Employment ID + * Offboarding request ID */ - employment_id: string; + id: string; }; query?: never; - url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}'; + url: '/api/eor/v1/offboardings/{id}'; }; -export type GetShowEmploymentCustomFieldValueErrors = { +export type GetShowOffboardingErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; /** * Unauthorized */ @@ -17645,49 +19972,59 @@ export type GetShowEmploymentCustomFieldValueErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type GetShowEmploymentCustomFieldValueError = - GetShowEmploymentCustomFieldValueErrors[keyof GetShowEmploymentCustomFieldValueErrors]; +export type GetShowOffboardingError = + GetShowOffboardingErrors[keyof GetShowOffboardingErrors]; -export type GetShowEmploymentCustomFieldValueResponses = { +export type GetShowOffboardingResponses = { /** * Success */ - 200: EmploymentCustomFieldValueResponse; + 200: OffboardingResponse; }; -export type GetShowEmploymentCustomFieldValueResponse = - GetShowEmploymentCustomFieldValueResponses[keyof GetShowEmploymentCustomFieldValueResponses]; +export type GetShowOffboardingResponse = + GetShowOffboardingResponses[keyof GetShowOffboardingResponses]; -export type PatchUpdateEmploymentCustomFieldValue2Data = { - /** - * Custom Field Value Update Parameters - */ - body: UpdateEmploymentCustomFieldValueParams; - path: { +export type GetIndexExpenseData = { + body?: never; + headers: { /** - * Custom field 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. + * */ - custom_field_id: string; + Authorization: string; + }; + path?: never; + query?: { /** - * 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: '/api/eor/v1/expenses'; }; -export type PatchUpdateEmploymentCustomFieldValue2Errors = { +export type GetIndexExpenseErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -17696,49 +20033,53 @@ export type PatchUpdateEmploymentCustomFieldValue2Errors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; + /** + * Too many requests + */ + 429: TooManyRequestsResponse; }; -export type PatchUpdateEmploymentCustomFieldValue2Error = - PatchUpdateEmploymentCustomFieldValue2Errors[keyof PatchUpdateEmploymentCustomFieldValue2Errors]; +export type GetIndexExpenseError = + GetIndexExpenseErrors[keyof GetIndexExpenseErrors]; -export type PatchUpdateEmploymentCustomFieldValue2Responses = { +export type GetIndexExpenseResponses = { /** * Success */ - 200: EmploymentCustomFieldValueResponse; + 201: ListExpenseResponse; }; -export type PatchUpdateEmploymentCustomFieldValue2Response = - PatchUpdateEmploymentCustomFieldValue2Responses[keyof PatchUpdateEmploymentCustomFieldValue2Responses]; +export type GetIndexExpenseResponse = + GetIndexExpenseResponses[keyof GetIndexExpenseResponses]; -export type PatchUpdateEmploymentCustomFieldValueData = { +export type PostCreateExpenseData = { /** - * Custom Field Value Update Parameters + * Expenses */ - body: UpdateEmploymentCustomFieldValueParams; - path: { - /** - * Custom field ID - */ - custom_field_id: string; + body?: ParamsToCreateExpense; + 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: '/api/eor/v1/expenses'; }; -export type PatchUpdateEmploymentCustomFieldValueErrors = { +export type PostCreateExpenseErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -17747,63 +20088,36 @@ export type PatchUpdateEmploymentCustomFieldValueErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; -}; - -export type PatchUpdateEmploymentCustomFieldValueError = - PatchUpdateEmploymentCustomFieldValueErrors[keyof PatchUpdateEmploymentCustomFieldValueErrors]; - -export type PatchUpdateEmploymentCustomFieldValueResponses = { - /** - * Success - */ - 200: EmploymentCustomFieldValueResponse; -}; - -export type PatchUpdateEmploymentCustomFieldValueResponse = - PatchUpdateEmploymentCustomFieldValueResponses[keyof PatchUpdateEmploymentCustomFieldValueResponses]; - -export type GetShowCorTerminationRequestSubscriptionData = { - 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 GetShowCorTerminationRequestSubscriptionErrors = { - /** - * Forbidden - */ - 403: ForbiddenResponse; /** - * Not Found + * Too many requests */ - 404: NotFoundResponse; + 429: TooManyRequestsResponse; }; -export type GetShowCorTerminationRequestSubscriptionError = - GetShowCorTerminationRequestSubscriptionErrors[keyof GetShowCorTerminationRequestSubscriptionErrors]; - -export type GetShowCorTerminationRequestSubscriptionResponses = { +export type PostCreateExpenseError = + PostCreateExpenseErrors[keyof PostCreateExpenseErrors]; + +export type PostCreateExpenseResponses = { /** * Success */ - 200: CorTerminationRequestResponse; + 201: ExpenseResponse; }; -export type GetShowCorTerminationRequestSubscriptionResponse = - GetShowCorTerminationRequestSubscriptionResponses[keyof GetShowCorTerminationRequestSubscriptionResponses]; +export type PostCreateExpenseResponse = + PostCreateExpenseResponses[keyof PostCreateExpenseResponses]; -export type PostTerminateContractorOfRecordEmploymentSubscriptionData = { +export type PostInviteEmploymentInvitationData = { 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 @@ -17811,100 +20125,96 @@ export type PostTerminateContractorOfRecordEmploymentSubscriptionData = { employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/terminate-cor-employment'; + url: '/api/eor/v1/employments/{employment_id}/invite'; }; -export type PostTerminateContractorOfRecordEmploymentSubscriptionErrors = { +export type PostInviteEmploymentInvitationErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Conflict */ - 403: ForbiddenResponse; + 409: ConflictResponse; /** - * Not Found + * Unprocessable Entity */ - 404: NotFoundResponse; + 422: UnprocessableEntityResponse; /** * Unprocessable Entity */ - 422: UnprocessableEntityResponse; + 429: TooManyRequestsResponse; }; -export type PostTerminateContractorOfRecordEmploymentSubscriptionError = - PostTerminateContractorOfRecordEmploymentSubscriptionErrors[keyof PostTerminateContractorOfRecordEmploymentSubscriptionErrors]; +export type PostInviteEmploymentInvitationError = + PostInviteEmploymentInvitationErrors[keyof PostInviteEmploymentInvitationErrors]; -export type PostTerminateContractorOfRecordEmploymentSubscriptionResponses = { +export type PostInviteEmploymentInvitationResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostTerminateContractorOfRecordEmploymentSubscriptionResponse = - PostTerminateContractorOfRecordEmploymentSubscriptionResponses[keyof PostTerminateContractorOfRecordEmploymentSubscriptionResponses]; +export type PostInviteEmploymentInvitationResponse = + PostInviteEmploymentInvitationResponses[keyof PostInviteEmploymentInvitationResponses]; -export type PostSignContractDocumentData = { +export type PostCreateProbationExtensionData = { /** - * SignContractDocument + * ProbationExtension */ - body: SignContractDocument; - path: { - /** - * Employment ID - */ - employment_id: string; - /** - * Document ID - */ - contract_document_id: string; - }; + body: CreateProbationExtensionParams; + path?: never; query?: never; - url: '/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign'; + url: '/api/eor/v1/probation-extensions'; }; -export type PostSignContractDocumentErrors = { +export type PostCreateProbationExtensionErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type PostSignContractDocumentError = - PostSignContractDocumentErrors[keyof PostSignContractDocumentErrors]; +export type PostCreateProbationExtensionError = + PostCreateProbationExtensionErrors[keyof PostCreateProbationExtensionErrors]; -export type PostSignContractDocumentResponses = { +export type PostCreateProbationExtensionResponses = { /** * Success */ - 200: SuccessResponse; + 200: ProbationExtensionResponse; }; -export type PostSignContractDocumentResponse = - PostSignContractDocumentResponses[keyof PostSignContractDocumentResponses]; +export type PostCreateProbationExtensionResponse = + PostCreateProbationExtensionResponses[keyof PostCreateProbationExtensionResponses]; -export type GetCurrentIdentityData = { +export type PutApproveContractAmendmentData = { 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. - * + * Contract amendment request ID */ - Authorization: string; + contract_amendment_request_id: string; }; - path?: never; query?: never; - url: '/v1/identity/current'; + url: '/api/eor/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve'; }; -export type GetCurrentIdentityErrors = { +export type PutApproveContractAmendmentErrors = { /** * Bad Request */ @@ -17927,110 +20237,84 @@ export type GetCurrentIdentityErrors = { 429: TooManyRequestsResponse; }; -export type GetCurrentIdentityError = - GetCurrentIdentityErrors[keyof GetCurrentIdentityErrors]; +export type PutApproveContractAmendmentError = + PutApproveContractAmendmentErrors[keyof PutApproveContractAmendmentErrors]; -export type GetCurrentIdentityResponses = { +export type PutApproveContractAmendmentResponses = { /** * Success */ - 201: IdentityCurrentResponse; + 200: ContractAmendmentResponse; }; -export type GetCurrentIdentityResponse = - GetCurrentIdentityResponses[keyof GetCurrentIdentityResponses]; +export type PutApproveContractAmendmentResponse = + PutApproveContractAmendmentResponses[keyof PutApproveContractAmendmentResponses]; -export type DeleteDeleteIncentiveData = { +export type GetShowCompanyEmploymentOnboardingReservesStatusData = { 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. - * + * Company ID */ - Authorization: string; - }; - path: { + company_id: UuidSlug; /** - * Incentive ID + * Employment ID */ - id: string; + employment_id: UuidSlug; }; query?: never; - url: '/v1/incentives/{id}'; + url: '/api/eor/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status'; }; -export type DeleteDeleteIncentiveErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowCompanyEmploymentOnboardingReservesStatusErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity + * Forbidden */ - 422: UnprocessableEntityResponse; + 403: ForbiddenResponse; /** - * Too many requests + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type DeleteDeleteIncentiveError = - DeleteDeleteIncentiveErrors[keyof DeleteDeleteIncentiveErrors]; +export type GetShowCompanyEmploymentOnboardingReservesStatusError = + GetShowCompanyEmploymentOnboardingReservesStatusErrors[keyof GetShowCompanyEmploymentOnboardingReservesStatusErrors]; -export type DeleteDeleteIncentiveResponses = { +export type GetShowCompanyEmploymentOnboardingReservesStatusResponses = { /** * Success */ - 200: SuccessResponse; + 200: OnboardingReservesStatusResponse; }; -export type DeleteDeleteIncentiveResponse = - DeleteDeleteIncentiveResponses[keyof DeleteDeleteIncentiveResponses]; +export type GetShowCompanyEmploymentOnboardingReservesStatusResponse = + GetShowCompanyEmploymentOnboardingReservesStatusResponses[keyof GetShowCompanyEmploymentOnboardingReservesStatusResponses]; -export type GetShowIncentiveData = { +export type GetShowContractorInvoiceData = { 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 + * Resource unique identifier */ - id: string; + id: UuidSlug; }; query?: never; - url: '/v1/incentives/{id}'; + url: '/api/eor/v1/contractor-invoices/{id}'; }; -export type GetShowIncentiveErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowContractorInvoiceErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -18039,50 +20323,29 @@ export type GetShowIncentiveErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetShowIncentiveError = - GetShowIncentiveErrors[keyof GetShowIncentiveErrors]; +export type GetShowContractorInvoiceError = + GetShowContractorInvoiceErrors[keyof GetShowContractorInvoiceErrors]; -export type GetShowIncentiveResponses = { +export type GetShowContractorInvoiceResponses = { /** * Success */ - 200: IncentiveResponse; + 200: ContractorInvoiceResponse; }; -export type GetShowIncentiveResponse = - GetShowIncentiveResponses[keyof GetShowIncentiveResponses]; +export type GetShowContractorInvoiceResponse = + GetShowContractorInvoiceResponses[keyof GetShowContractorInvoiceResponses]; -export type PatchUpdateIncentive2Data = { - /** - * 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; - }; +export type GetPayProcessingFeatureGphData = { + body?: never; + path?: never; query?: never; - url: '/v1/incentives/{id}'; + url: '/api/eor/v1/wd/gph/payProcessingFeature'; }; -export type PatchUpdateIncentive2Errors = { +export type GetPayProcessingFeatureGphErrors = { /** * Bad Request */ @@ -18095,58 +20358,52 @@ export type PatchUpdateIncentive2Errors = { * Not Found */ 404: NotFoundResponse; - /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PatchUpdateIncentive2Error = - PatchUpdateIncentive2Errors[keyof PatchUpdateIncentive2Errors]; +export type GetPayProcessingFeatureGphError = + GetPayProcessingFeatureGphErrors[keyof GetPayProcessingFeatureGphErrors]; -export type PatchUpdateIncentive2Responses = { +export type GetPayProcessingFeatureGphResponses = { /** * Success */ - 200: IncentiveResponse; + 200: PayProcessingFeatureResponse; }; -export type PatchUpdateIncentive2Response = - PatchUpdateIncentive2Responses[keyof PatchUpdateIncentive2Responses]; +export type GetPayProcessingFeatureGphResponse = + GetPayProcessingFeatureGphResponses[keyof GetPayProcessingFeatureGphResponses]; -export type PatchUpdateIncentiveData = { - /** - * Incentive - */ - body?: UpdateIncentiveParams; - headers: { +export type GetPayProgressGphData = { + 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. - * + * The preferred language of the inquiring user in Workday */ - Authorization: string; + accept_language?: string; }; - path: { + path?: never; + query: { /** - * Incentive ID + * The pay group ID for identifying the pay group at the vendor system */ - id: string; + 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; }; - query?: never; - url: '/v1/incentives/{id}'; + url: '/api/eor/v1/wd/gph/payProgress'; }; -export type PatchUpdateIncentiveErrors = { +export type GetPayProgressGphErrors = { /** * Bad Request */ @@ -18159,107 +20416,141 @@ export type PatchUpdateIncentiveErrors = { * Not Found */ 404: NotFoundResponse; +}; + +export type GetPayProgressGphError = + GetPayProgressGphErrors[keyof GetPayProgressGphErrors]; + +export type GetPayProgressGphResponses = { /** - * Conflict - */ - 409: ConflictResponse; - /** - * Unprocessable Entity + * Success */ - 422: UnprocessableEntityResponse; + 200: PayProgressResponse; +}; + +export type GetPayProgressGphResponse = + GetPayProgressGphResponses[keyof GetPayProgressGphResponses]; + +export type GetIndexCompanyCurrencyData = { + body?: never; + path?: never; + query?: never; + url: '/api/eor/v1/company-currencies'; +}; + +export type GetIndexCompanyCurrencyErrors = { /** - * Too many requests + * Not Found */ - 429: TooManyRequestsResponse; + 404: NotFoundResponse; }; -export type PatchUpdateIncentiveError = - PatchUpdateIncentiveErrors[keyof PatchUpdateIncentiveErrors]; +export type GetIndexCompanyCurrencyError = + GetIndexCompanyCurrencyErrors[keyof GetIndexCompanyCurrencyErrors]; -export type PatchUpdateIncentiveResponses = { +export type GetIndexCompanyCurrencyResponses = { /** * Success */ - 200: IncentiveResponse; + 200: CompanyCurrenciesResponse; }; -export type PatchUpdateIncentiveResponse = - PatchUpdateIncentiveResponses[keyof PatchUpdateIncentiveResponses]; +export type GetIndexCompanyCurrencyResponse = + GetIndexCompanyCurrencyResponses[keyof GetIndexCompanyCurrencyResponses]; -export type GetShowEligibilityQuestionnaireData = { +export type GetShowSchemaData = { body?: never; - path?: never; - query: { + path: { /** - * Type of eligibility questionnaire + * Unique identifier of the employment */ - type: 'contractor_of_record'; + employment_id: UuidSlug; + }; + query?: { /** * Version of the form schema */ json_schema_version?: number | 'latest'; }; - url: '/v1/contractors/schemas/eligibility-questionnaire'; + url: '/api/eor/v1/employments/{employment_id}/benefit-offers/schema'; }; -export type GetShowEligibilityQuestionnaireErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type GetShowSchemaErrors = { /** * Forbidden */ 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; }; -export type GetShowEligibilityQuestionnaireError = - GetShowEligibilityQuestionnaireErrors[keyof GetShowEligibilityQuestionnaireErrors]; +export type GetShowSchemaError = GetShowSchemaErrors[keyof GetShowSchemaErrors]; -export type GetShowEligibilityQuestionnaireResponses = { +export type GetShowSchemaResponses = { /** * Success */ - 200: EligibilityQuestionnaireJsonSchemaResponse; + 200: UnifiedEmploymentsBenefitOffersJsonSchemaResponse; }; -export type GetShowEligibilityQuestionnaireResponse = - GetShowEligibilityQuestionnaireResponses[keyof GetShowEligibilityQuestionnaireResponses]; +export type GetShowSchemaResponse = + GetShowSchemaResponses[keyof GetShowSchemaResponses]; -export type GetIndexWorkAuthorizationRequestData = { +export type GetIndexScheduledContractorInvoiceData = { body?: never; path?: never; query?: { /** - * Filter results on the given status + * Filters contractor invoice schedules by start date greater than or equal to the value. */ - status?: - | 'pending' - | 'cancelled' - | 'declined_by_manager' - | 'declined_by_remote' - | 'approved_by_manager' - | 'approved_by_remote'; + start_date_from?: Date; /** - * Filter results on the given employment slug + * Filters contractor invoice schedules by start date less than or equal to the value. */ - employment_id?: string; + start_date_to?: Date; /** - * Filter results on the given employee name + * Filters contractor invoice schedules by next invoice date greater than or equal to the value. */ - employee_name?: string; + next_invoice_date_from?: Date; /** - * Sort order + * Filters contractor invoice schedules by next invoice date less than or equal to the value. */ - order?: 'asc' | 'desc'; + next_invoice_date_to?: Date; + /** + * Filters contractor invoice schedules by status matching the value. + */ + 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?: 'submitted_at'; + sort_by?: + | 'number' + | 'total_amount' + | 'next_invoice_at' + | 'start_date' + | 'nr_occurrences'; + /** + * Sort order + */ + order?: 'asc' | 'desc'; /** * Starts fetching records after the given page */ @@ -18269,10 +20560,113 @@ export type GetIndexWorkAuthorizationRequestData = { */ page_size?: number; }; - url: '/v1/work-authorization-requests'; + url: '/api/eor/v1/contractor-invoice-schedules'; }; -export type GetIndexWorkAuthorizationRequestErrors = { +export type GetIndexScheduledContractorInvoiceErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetIndexScheduledContractorInvoiceError = + GetIndexScheduledContractorInvoiceErrors[keyof GetIndexScheduledContractorInvoiceErrors]; + +export type GetIndexScheduledContractorInvoiceResponses = { + /** + * Success + */ + 200: ListContractorInvoiceSchedulesResponse; +}; + +export type GetIndexScheduledContractorInvoiceResponse = + GetIndexScheduledContractorInvoiceResponses[keyof GetIndexScheduledContractorInvoiceResponses]; + +export type PostBulkCreateScheduledContractorInvoiceData = { + /** + * Bulk creation payload + */ + body: BulkContractorInvoiceScheduleCreateParams; + path?: never; + query?: never; + url: '/api/eor/v1/contractor-invoice-schedules'; +}; + +export type PostBulkCreateScheduledContractorInvoiceErrors = { + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. + */ + 422: { + data: { + failures: Array; + successes: Array; + }; + }; +}; + +export type PostBulkCreateScheduledContractorInvoiceError = + PostBulkCreateScheduledContractorInvoiceErrors[keyof PostBulkCreateScheduledContractorInvoiceErrors]; + +export type PostBulkCreateScheduledContractorInvoiceResponses = { + /** + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. + */ + 201: { + data: { + failures: Array; + successes: Array; + }; + }; + /** + * BulkContractorInvoiceScheduleCreateResponse + * + * Response containing the lists of succeeded and failed schedules. + */ + 207: { + data: { + failures: Array; + successes: Array; + }; + }; +}; + +export type PostBulkCreateScheduledContractorInvoiceResponse = + PostBulkCreateScheduledContractorInvoiceResponses[keyof PostBulkCreateScheduledContractorInvoiceResponses]; + +export type GetShowWorkAuthorizationRequestData = { + body?: never; + path: { + /** + * work authorization request ID + */ + id: string; + }; + query?: never; + url: '/api/eor/v1/work-authorization-requests/{id}'; +}; + +export type GetShowWorkAuthorizationRequestErrors = { /** * Not Found */ @@ -18283,40 +20677,39 @@ export type GetIndexWorkAuthorizationRequestErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexWorkAuthorizationRequestError = - GetIndexWorkAuthorizationRequestErrors[keyof GetIndexWorkAuthorizationRequestErrors]; +export type GetShowWorkAuthorizationRequestError = + GetShowWorkAuthorizationRequestErrors[keyof GetShowWorkAuthorizationRequestErrors]; -export type GetIndexWorkAuthorizationRequestResponses = { +export type GetShowWorkAuthorizationRequestResponses = { /** * Success */ - 200: ListWorkAuthorizationRequestsResponse; + 200: WorkAuthorizationRequestResponse; }; -export type GetIndexWorkAuthorizationRequestResponse = - GetIndexWorkAuthorizationRequestResponses[keyof GetIndexWorkAuthorizationRequestResponses]; +export type GetShowWorkAuthorizationRequestResponse = + GetShowWorkAuthorizationRequestResponses[keyof GetShowWorkAuthorizationRequestResponses]; -export type GetShowBulkEmploymentData = { - body?: never; +export type PatchUpdateWorkAuthorizationRequest2Data = { + /** + * Work Authorization Request + */ + body: UpdateWorkAuthorizationRequestParams; path: { /** - * Bulk employment job id + * work authorization request ID */ - job_id: string; + id: string; }; query?: never; - url: '/v1/bulk-employment-jobs/{job_id}'; + url: '/api/eor/v1/work-authorization-requests/{id}'; }; -export type GetShowBulkEmploymentErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PatchUpdateWorkAuthorizationRequest2Errors = { /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ @@ -18324,39 +20717,42 @@ export type GetShowBulkEmploymentErrors = { /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type GetShowBulkEmploymentError = - GetShowBulkEmploymentErrors[keyof GetShowBulkEmploymentErrors]; +export type PatchUpdateWorkAuthorizationRequest2Error = + PatchUpdateWorkAuthorizationRequest2Errors[keyof PatchUpdateWorkAuthorizationRequest2Errors]; -export type GetShowBulkEmploymentResponses = { +export type PatchUpdateWorkAuthorizationRequest2Responses = { /** * Success */ - 200: BulkEmploymentImportJobResponse; + 200: WorkAuthorizationRequestResponse; }; -export type GetShowBulkEmploymentResponse = - GetShowBulkEmploymentResponses[keyof GetShowBulkEmploymentResponses]; +export type PatchUpdateWorkAuthorizationRequest2Response = + PatchUpdateWorkAuthorizationRequest2Responses[keyof PatchUpdateWorkAuthorizationRequest2Responses]; -export type GetIndexBenefitOffersCountrySummaryData = { - body?: never; - headers: { +export type PatchUpdateWorkAuthorizationRequestData = { + /** + * Work Authorization Request + */ + body: UpdateWorkAuthorizationRequestParams; + 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. - * + * work authorization request ID */ - Authorization: string; + id: string; }; - path?: never; query?: never; - url: '/v1/benefit-offers/country-summaries'; + url: '/api/eor/v1/work-authorization-requests/{id}'; }; -export type GetIndexBenefitOffersCountrySummaryErrors = { +export type PatchUpdateWorkAuthorizationRequestErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ @@ -18367,114 +20763,125 @@ export type GetIndexBenefitOffersCountrySummaryErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexBenefitOffersCountrySummaryError = - GetIndexBenefitOffersCountrySummaryErrors[keyof GetIndexBenefitOffersCountrySummaryErrors]; +export type PatchUpdateWorkAuthorizationRequestError = + PatchUpdateWorkAuthorizationRequestErrors[keyof PatchUpdateWorkAuthorizationRequestErrors]; -export type GetIndexBenefitOffersCountrySummaryResponses = { +export type PatchUpdateWorkAuthorizationRequestResponses = { /** * Success */ - 200: CountrySummariesResponse; + 200: WorkAuthorizationRequestResponse; }; -export type GetIndexBenefitOffersCountrySummaryResponse = - GetIndexBenefitOffersCountrySummaryResponses[keyof GetIndexBenefitOffersCountrySummaryResponses]; +export type PatchUpdateWorkAuthorizationRequestResponse = + PatchUpdateWorkAuthorizationRequestResponses[keyof PatchUpdateWorkAuthorizationRequestResponses]; -export type GetIndexBenefitOffersByEmploymentData = { - body?: never; - headers: { +export type PostCreateDeclineData = { + /** + * DeclineTimeoff + */ + 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/benefit-offers'; + url: '/api/eor/v1/timeoff/{timeoff_id}/decline'; }; -export type GetIndexBenefitOffersByEmploymentErrors = { +export type PostCreateDeclineErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type GetIndexBenefitOffersByEmploymentError = - GetIndexBenefitOffersByEmploymentErrors[keyof GetIndexBenefitOffersByEmploymentErrors]; +export type PostCreateDeclineError = + PostCreateDeclineErrors[keyof PostCreateDeclineErrors]; -export type GetIndexBenefitOffersByEmploymentResponses = { +export type PostCreateDeclineResponses = { /** * Success */ - 200: BenefitOfferByEmploymentResponse; + 200: TimeoffResponse; }; -export type GetIndexBenefitOffersByEmploymentResponse = - GetIndexBenefitOffersByEmploymentResponses[keyof GetIndexBenefitOffersByEmploymentResponses]; +export type PostCreateDeclineResponse = + PostCreateDeclineResponses[keyof PostCreateDeclineResponses]; -export type PutCancelContractAmendmentData = { +export type GetShowEligibilityQuestionnaireData = { body?: never; - path: { + path?: never; + query: { /** - * Contract amendment request ID + * Type of eligibility questionnaire */ - contract_amendment_request_id: string; + type: 'contractor_of_record'; + /** + * Version of the form schema + */ + json_schema_version?: number | 'latest'; }; - query?: never; - url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel'; + url: '/api/eor/v1/contractors/schemas/eligibility-questionnaire'; }; -export type PutCancelContractAmendmentErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowEligibilityQuestionnaireErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; /** - * Not Found + * Forbidden */ - 404: NotFoundResponse; + 403: ForbiddenResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PutCancelContractAmendmentError = - PutCancelContractAmendmentErrors[keyof PutCancelContractAmendmentErrors]; +export type GetShowEligibilityQuestionnaireError = + GetShowEligibilityQuestionnaireErrors[keyof GetShowEligibilityQuestionnaireErrors]; -export type PutCancelContractAmendmentResponses = { +export type GetShowEligibilityQuestionnaireResponses = { /** * Success */ - 200: SuccessResponse; + 200: EligibilityQuestionnaireJsonSchemaResponse; }; -export type PutCancelContractAmendmentResponse = - PutCancelContractAmendmentResponses[keyof PutCancelContractAmendmentResponses]; +export type GetShowEligibilityQuestionnaireResponse = + GetShowEligibilityQuestionnaireResponses[keyof GetShowEligibilityQuestionnaireResponses]; -export type PostCreateEmployeeTimeoffData = { +export type PostTokenOAuth2TokenData = { /** - * Timeoff + * OAuth2Token */ - body: CreateEmployeeTimeoffParams; + body?: OAuth2TokenParams; path?: never; query?: never; - url: '/v1/employee/timeoff'; + url: '/api/eor/oauth2/token'; }; -export type PostCreateEmployeeTimeoffErrors = { +export type PostTokenOAuth2TokenErrors = { /** * Bad Request */ @@ -18492,41 +20899,45 @@ export type PostCreateEmployeeTimeoffErrors = { */ 422: UnprocessableEntityResponse; /** - * Unprocessable Entity + * Too many requests */ 429: TooManyRequestsResponse; }; -export type PostCreateEmployeeTimeoffError = - PostCreateEmployeeTimeoffErrors[keyof PostCreateEmployeeTimeoffErrors]; +export type PostTokenOAuth2TokenError = + PostTokenOAuth2TokenErrors[keyof PostTokenOAuth2TokenErrors]; -export type PostCreateEmployeeTimeoffResponses = { +export type PostTokenOAuth2TokenResponses = { /** - * Created + * Success */ - 201: TimeoffResponse; + 200: OAuth2Tokens; }; -export type PostCreateEmployeeTimeoffResponse = - PostCreateEmployeeTimeoffResponses[keyof PostCreateEmployeeTimeoffResponses]; +export type PostTokenOAuth2TokenResponse = + PostTokenOAuth2TokenResponses[keyof PostTokenOAuth2TokenResponses]; -export type GetShowProbationExtensionData = { +export type DeleteDeleteContractorCorSubscriptionSubscriptionData = { body?: never; path: { /** - * Probation Extension Request ID + * Employment ID */ - id: string; + employment_id: string; }; query?: never; - url: '/v1/probation-extensions/{id}'; + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; }; -export type GetShowProbationExtensionErrors = { +export type DeleteDeleteContractorCorSubscriptionSubscriptionErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -18537,60 +20948,82 @@ export type GetShowProbationExtensionErrors = { 422: UnprocessableEntityResponse; }; -export type GetShowProbationExtensionError = - GetShowProbationExtensionErrors[keyof GetShowProbationExtensionErrors]; +export type DeleteDeleteContractorCorSubscriptionSubscriptionError = + DeleteDeleteContractorCorSubscriptionSubscriptionErrors[keyof DeleteDeleteContractorCorSubscriptionSubscriptionErrors]; -export type GetShowProbationExtensionResponses = { +export type DeleteDeleteContractorCorSubscriptionSubscriptionResponses = { /** - * Success + * No Content */ - 200: ProbationExtensionResponse; + 204: unknown; }; -export type GetShowProbationExtensionResponse = - GetShowProbationExtensionResponses[keyof GetShowProbationExtensionResponses]; - -export type GetIndexPayslipData = { +export type PostManageContractorCorSubscriptionSubscriptionData = { body?: never; - path?: never; - query?: { + path: { /** * 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; + employment_id: string; + }; + query?: never; + url: '/api/eor/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; +}; + +export type PostManageContractorCorSubscriptionSubscriptionErrors = { + /** + * Bad Request + */ + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; +}; + +export type PostManageContractorCorSubscriptionSubscriptionError = + PostManageContractorCorSubscriptionSubscriptionErrors[keyof PostManageContractorCorSubscriptionSubscriptionErrors]; + +export type PostManageContractorCorSubscriptionSubscriptionResponses = { + /** + * Created + */ + 201: SuccessResponse; +}; + +export type PostManageContractorCorSubscriptionSubscriptionResponse = + PostManageContractorCorSubscriptionSubscriptionResponses[keyof PostManageContractorCorSubscriptionSubscriptionResponses]; + +export type GetShowContractAmendmentData = { + body?: never; + 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: { /** - * Change the amount of records returned per page, defaults to 20, limited to 100 + * Contract amendment request ID */ - page_size?: number; + id: string; }; - url: '/v1/payslips'; + query?: never; + url: '/api/eor/v1/contract-amendments/{id}'; }; -export type GetIndexPayslipErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowContractAmendmentErrors = { /** * Unauthorized */ @@ -18603,54 +21036,38 @@ export type GetIndexPayslipErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetIndexPayslipError = - GetIndexPayslipErrors[keyof GetIndexPayslipErrors]; +export type GetShowContractAmendmentError = + GetShowContractAmendmentErrors[keyof GetShowContractAmendmentErrors]; -export type GetIndexPayslipResponses = { +export type GetShowContractAmendmentResponses = { /** * Success */ - 200: ListPayslipsResponse; + 200: ContractAmendmentResponse; }; -export type GetIndexPayslipResponse = - GetIndexPayslipResponses[keyof GetIndexPayslipResponses]; +export type GetShowContractAmendmentResponse = + GetShowContractAmendmentResponses[keyof GetShowContractAmendmentResponses]; -export type GetDownloadByIdExpenseReceiptData = { +export type PostDeclineIdentityVerificationData = { body?: never; path: { /** - * The expense ID - */ - expense_id: string; - /** - * The receipt ID + * Employment ID */ - receipt_id: string; + employment_id: string; }; query?: never; - url: '/v1/expenses/{expense_id}/receipts/{receipt_id}'; + url: '/api/eor/v1/identity-verification/{employment_id}/decline'; }; -export type GetDownloadByIdExpenseReceiptErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type PostDeclineIdentityVerificationErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; /** * Not Found */ @@ -18659,44 +21076,32 @@ export type GetDownloadByIdExpenseReceiptErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetDownloadByIdExpenseReceiptError = - GetDownloadByIdExpenseReceiptErrors[keyof GetDownloadByIdExpenseReceiptErrors]; +export type PostDeclineIdentityVerificationError = + PostDeclineIdentityVerificationErrors[keyof PostDeclineIdentityVerificationErrors]; -export type GetDownloadByIdExpenseReceiptResponses = { +export type PostDeclineIdentityVerificationResponses = { /** * Success */ - 200: GenericFile; + 200: SuccessResponse; }; -export type GetDownloadByIdExpenseReceiptResponse = - GetDownloadByIdExpenseReceiptResponses[keyof GetDownloadByIdExpenseReceiptResponses]; +export type PostDeclineIdentityVerificationResponse = + PostDeclineIdentityVerificationResponses[keyof PostDeclineIdentityVerificationResponses]; -export type PostTokenOAuth2TokenData = { +export type PostCreateEstimationCsvData = { /** - * OAuth2Token + * Estimate params */ - body?: OAuth2TokenParams; + body?: CostCalculatorEstimateParams; path?: never; query?: never; - url: '/auth/oauth2/token'; + url: '/api/eor/v1/cost-calculator/estimation-csv'; }; -export type PostTokenOAuth2TokenErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostCreateEstimationCsvErrors = { /** * Not Found */ @@ -18705,59 +21110,51 @@ export type PostTokenOAuth2TokenErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type PostTokenOAuth2TokenError = - PostTokenOAuth2TokenErrors[keyof PostTokenOAuth2TokenErrors]; +export type PostCreateEstimationCsvError = + PostCreateEstimationCsvErrors[keyof PostCreateEstimationCsvErrors]; -export type PostTokenOAuth2TokenResponses = { +export type PostCreateEstimationCsvResponses = { /** * Success */ - 200: OAuth2Tokens; + 200: CostCalculatorEstimateCsvResponse; }; -export type PostTokenOAuth2TokenResponse = - PostTokenOAuth2TokenResponses[keyof PostTokenOAuth2TokenResponses]; +export type PostCreateEstimationCsvResponse = + PostCreateEstimationCsvResponses[keyof PostCreateEstimationCsvResponses]; -export type GetShowLegalEntityFormCountryData = { +export type GetIndexBillingDocumentData = { body?: never; - path: { - /** - * Country code according to ISO 3-digit alphabetic codes - */ - country_code: string; + headers: { /** - * Name of the desired form + * 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. + * */ - form: string; + Authorization: string; }; + path?: never; query?: { /** - * Product type. Default value is global_payroll. + * The month for the billing documents (in ISO-8601 format) */ - product_type?: 'peo' | 'global_payroll' | 'e2e_payroll'; + period?: 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: '/api/eor/v1/billing-documents'; }; -export type GetShowLegalEntityFormCountryErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetIndexBillingDocumentErrors = { /** * Unauthorized */ @@ -18770,110 +21167,163 @@ export type GetShowLegalEntityFormCountryErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Unprocessable Entity - */ - 429: TooManyRequestsResponse; }; -export type GetShowLegalEntityFormCountryError = - GetShowLegalEntityFormCountryErrors[keyof GetShowLegalEntityFormCountryErrors]; +export type GetIndexBillingDocumentError = + GetIndexBillingDocumentErrors[keyof GetIndexBillingDocumentErrors]; -export type GetShowLegalEntityFormCountryResponses = { +export type GetIndexBillingDocumentResponses = { /** * Success */ - 200: CountryFormResponse; + 200: BillingDocumentsResponse; }; -export type GetShowLegalEntityFormCountryResponse = - GetShowLegalEntityFormCountryResponses[keyof GetShowLegalEntityFormCountryResponses]; +export type GetIndexBillingDocumentResponse = + GetIndexBillingDocumentResponses[keyof GetIndexBillingDocumentResponses]; -export type PostManageContractorPlusSubscriptionSubscriptionData = { - /** - * Manage Contractor Plus subscription params - */ - body: ManageContractorPlusSubscriptionOperationsParams; +export type GetShowBillingDocumentData = { + 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 + * The billing document's ID */ - employment_id: string; + billing_document_id: string; }; - query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-plus-subscription'; + query?: { + /** + * When true, includes billing document items whose type is not part of the standard set for the invoice type. + */ + include_unrecognized_types?: boolean; + }; + url: '/api/eor/v1/billing-documents/{billing_document_id}'; }; -export type PostManageContractorPlusSubscriptionSubscriptionErrors = { +export type GetShowBillingDocumentErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity + */ + 429: TooManyRequestsResponse; }; -export type PostManageContractorPlusSubscriptionSubscriptionError = - PostManageContractorPlusSubscriptionSubscriptionErrors[keyof PostManageContractorPlusSubscriptionSubscriptionErrors]; +export type GetShowBillingDocumentError = + GetShowBillingDocumentErrors[keyof GetShowBillingDocumentErrors]; -export type PostManageContractorPlusSubscriptionSubscriptionResponses = { +export type GetShowBillingDocumentResponses = { /** * Success */ - 200: SuccessResponse; + 200: BillingDocumentResponse; }; -export type PostManageContractorPlusSubscriptionSubscriptionResponse = - PostManageContractorPlusSubscriptionSubscriptionResponses[keyof PostManageContractorPlusSubscriptionSubscriptionResponses]; +export type GetShowBillingDocumentResponse = + GetShowBillingDocumentResponses[keyof GetShowBillingDocumentResponses]; -export type GetIndexTimeoffData = { +export type GetIndexEmployeeDocumentData = { 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?: { /** - * Only show time off for a specific employment + * Starts fetching records after the given page */ - employment_id?: string; + page?: number; /** - * Filter time off by its type + * Number of items per page */ - timeoff_type?: TimeoffType; + page_size?: number; /** - * Filter time off by its status + * Filter documents by their description or file name, accepts full and partial case insensitive matches */ - status?: TimeoffStatus; + 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'; - /** - * 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: '/v1/timeoff'; + url: '/api/eor/v1/employee/documents'; }; -export type GetIndexTimeoffErrors = { +export type GetIndexEmployeeDocumentErrors = { + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; +}; + +export type GetIndexEmployeeDocumentError = + GetIndexEmployeeDocumentErrors[keyof GetIndexEmployeeDocumentErrors]; + +export type GetIndexEmployeeDocumentResponses = { + /** + * Success + */ + 200: ListDocumentsResponse; +}; + +export type GetIndexEmployeeDocumentResponse = + GetIndexEmployeeDocumentResponses[keyof GetIndexEmployeeDocumentResponses]; + +export type PostCreateEmployeeTimeoffData = { + /** + * Timeoff + */ + body: CreateEmployeeTimeoffParams; + path?: never; + query?: never; + url: '/api/eor/v1/employee/timeoff'; +}; + +export type PostCreateEmployeeTimeoffErrors = { /** * Bad Request */ @@ -18896,51 +21346,47 @@ export type GetIndexTimeoffErrors = { 429: TooManyRequestsResponse; }; -export type GetIndexTimeoffError = - GetIndexTimeoffErrors[keyof GetIndexTimeoffErrors]; +export type PostCreateEmployeeTimeoffError = + PostCreateEmployeeTimeoffErrors[keyof PostCreateEmployeeTimeoffErrors]; -export type GetIndexTimeoffResponses = { +export type PostCreateEmployeeTimeoffResponses = { /** - * Success + * Created */ - 200: ListTimeoffResponse; + 201: TimeoffResponse; }; -export type GetIndexTimeoffResponse = - GetIndexTimeoffResponses[keyof GetIndexTimeoffResponses]; +export type PostCreateEmployeeTimeoffResponse = + PostCreateEmployeeTimeoffResponses[keyof PostCreateEmployeeTimeoffResponses]; -export type PostCreateTimeoffData = { +export type PutUpdateEmploymentPersonalDetailsData = { /** - * 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'; + url: '/api/eor/v1/employments/{employment_id}/personal_details'; }; -export type PostCreateTimeoffErrors = { +export type PutUpdateEmploymentPersonalDetailsErrors = { /** * Bad Request */ 400: BadRequestResponse; /** - * Unauthorized + * Forbidden */ - 401: UnauthorizedResponse; + 403: ForbiddenResponse; /** - * Not Found + * Conflict */ - 404: NotFoundResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -18951,40 +21397,32 @@ export type PostCreateTimeoffErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateTimeoffError = - PostCreateTimeoffErrors[keyof PostCreateTimeoffErrors]; +export type PutUpdateEmploymentPersonalDetailsError = + PutUpdateEmploymentPersonalDetailsErrors[keyof PutUpdateEmploymentPersonalDetailsErrors]; -export type PostCreateTimeoffResponses = { +export type PutUpdateEmploymentPersonalDetailsResponses = { /** - * Created + * Success */ - 201: TimeoffResponse; + 200: EmploymentResponse; }; -export type PostCreateTimeoffResponse = - PostCreateTimeoffResponses[keyof PostCreateTimeoffResponses]; +export type PutUpdateEmploymentPersonalDetailsResponse = + PutUpdateEmploymentPersonalDetailsResponses[keyof PutUpdateEmploymentPersonalDetailsResponses]; -export type GetIndexPayrollRunData = { +export type GetShowProbationExtensionData = { 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; + path: { /** - * Number of items per page + * Probation Extension Request ID */ - page_size?: number; + id: string; }; - url: '/v1/payroll-runs'; + query?: never; + url: '/api/eor/v1/probation-extensions/{id}'; }; -export type GetIndexPayrollRunErrors = { +export type GetShowProbationExtensionErrors = { /** * Unauthorized */ @@ -18999,93 +21437,83 @@ export type GetIndexPayrollRunErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexPayrollRunError = - GetIndexPayrollRunErrors[keyof GetIndexPayrollRunErrors]; +export type GetShowProbationExtensionError = + GetShowProbationExtensionErrors[keyof GetShowProbationExtensionErrors]; -export type GetIndexPayrollRunResponses = { +export type GetShowProbationExtensionResponses = { /** * Success */ - 200: ListPayrollRunResponse; + 200: ProbationExtensionResponse; }; -export type GetIndexPayrollRunResponse = - GetIndexPayrollRunResponses[keyof GetIndexPayrollRunResponses]; +export type GetShowProbationExtensionResponse = + GetShowProbationExtensionResponses[keyof GetShowProbationExtensionResponses]; -export type GetGetGroupScimData = { +export type GetShowFileData = { body?: never; path: { /** - * Group ID (slug) + * File ID */ id: string; }; query?: never; - url: '/v1/scim/v2/Groups/{id}'; + url: '/api/eor/v1/files/{id}'; }; -export type GetGetGroupScimErrors = { +export type GetShowFileErrors = { /** * Unauthorized */ - 401: IntegrationsScimErrorResponse; + 401: UnauthorizedResponse; /** - * Forbidden + * Not Found */ - 403: IntegrationsScimErrorResponse; + 404: NotFoundResponse; /** - * Not Found + * Unprocessable Entity */ - 404: IntegrationsScimErrorResponse; + 422: UnprocessableEntityResponse; }; -export type GetGetGroupScimError = - GetGetGroupScimErrors[keyof GetGetGroupScimErrors]; +export type GetShowFileError = GetShowFileErrors[keyof GetShowFileErrors]; -export type GetGetGroupScimResponses = { +export type GetShowFileResponses = { /** * Success */ - 200: IntegrationsScimGroup; + 200: DownloadFileResponse; }; -export type GetGetGroupScimResponse = - GetGetGroupScimResponses[keyof GetGetGroupScimResponses]; +export type GetShowFileResponse = + GetShowFileResponses[keyof GetShowFileResponses]; -export type GetIndexEmploymentContractData = { +export type GetIndexCompanyDepartmentData = { 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 + * Company ID */ - employment_id: string; + company_id: string; /** - * Only Active + * Paginate option. Default: true. When true, paginates response; otherwise, does not. */ - only_active?: boolean; + paginate?: boolean; + /** + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page + */ + page_size?: number; }; - url: '/v1/employment-contracts'; + url: '/api/eor/v1/company-departments'; }; -export type GetIndexEmploymentContractErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; +export type GetIndexCompanyDepartmentErrors = { /** * Not Found */ @@ -19096,34 +21524,30 @@ export type GetIndexEmploymentContractErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexEmploymentContractError = - GetIndexEmploymentContractErrors[keyof GetIndexEmploymentContractErrors]; +export type GetIndexCompanyDepartmentError = + GetIndexCompanyDepartmentErrors[keyof GetIndexCompanyDepartmentErrors]; -export type GetIndexEmploymentContractResponses = { +export type GetIndexCompanyDepartmentResponses = { /** * Success */ - 200: ListEmploymentContractResponse; + 200: ListCompanyDepartmentsPaginatedResponse; }; -export type GetIndexEmploymentContractResponse = - GetIndexEmploymentContractResponses[keyof GetIndexEmploymentContractResponses]; +export type GetIndexCompanyDepartmentResponse = + GetIndexCompanyDepartmentResponses[keyof GetIndexCompanyDepartmentResponses]; -export type PostConvertWithSpreadCurrencyConverter2Data = { +export type PostCreateCompanyDepartmentData = { /** - * Convert currency parameters + * Create Company Department request params */ - body: ConvertCurrencyParams; + body: CreateCompanyDepartmentParams; path?: never; query?: never; - url: '/v1/currency-converter'; + url: '/api/eor/v1/company-departments'; }; -export type PostConvertWithSpreadCurrencyConverter2Errors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; +export type PostCreateCompanyDepartmentErrors = { /** * Not Found */ @@ -19134,41 +21558,41 @@ export type PostConvertWithSpreadCurrencyConverter2Errors = { 422: UnprocessableEntityResponse; }; -export type PostConvertWithSpreadCurrencyConverter2Error = - PostConvertWithSpreadCurrencyConverter2Errors[keyof PostConvertWithSpreadCurrencyConverter2Errors]; +export type PostCreateCompanyDepartmentError = + PostCreateCompanyDepartmentErrors[keyof PostCreateCompanyDepartmentErrors]; -export type PostConvertWithSpreadCurrencyConverter2Responses = { +export type PostCreateCompanyDepartmentResponses = { /** - * Success + * Created */ - 200: ConvertCurrencyResponse; + 201: CompanyDepartmentCreatedResponse; }; -export type PostConvertWithSpreadCurrencyConverter2Response = - PostConvertWithSpreadCurrencyConverter2Responses[keyof PostConvertWithSpreadCurrencyConverter2Responses]; +export type PostCreateCompanyDepartmentResponse = + PostCreateCompanyDepartmentResponses[keyof PostCreateCompanyDepartmentResponses]; -export type GetIndexCompanyData = { +export type GetEmployeeDetailsPayrollRunData = { body?: never; - headers: { + path: { /** - * 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. - * + * Payroll run ID */ - Authorization: string; + payroll_run_id: string; }; - path?: never; query?: { /** - * External ID + * Starts fetching records after the given page + */ + page?: number; + /** + * Number of items per page */ - external_id?: string; + page_size?: number; }; - url: '/v1/companies'; + url: '/api/eor/v1/payroll-runs/{payroll_run_id}/employee-details'; }; -export type GetIndexCompanyErrors = { +export type GetEmployeeDetailsPayrollRunErrors = { /** * Unauthorized */ @@ -19183,68 +21607,46 @@ export type GetIndexCompanyErrors = { 422: UnprocessableEntityResponse; }; -export type GetIndexCompanyError = - GetIndexCompanyErrors[keyof GetIndexCompanyErrors]; +export type GetEmployeeDetailsPayrollRunError = + GetEmployeeDetailsPayrollRunErrors[keyof GetEmployeeDetailsPayrollRunErrors]; -export type GetIndexCompanyResponses = { +export type GetEmployeeDetailsPayrollRunResponses = { /** * Success */ - 200: CompaniesResponse; + 200: EmployeeDetailsResponse; }; -export type GetIndexCompanyResponse = - GetIndexCompanyResponses[keyof GetIndexCompanyResponses]; +export type GetEmployeeDetailsPayrollRunResponse = + GetEmployeeDetailsPayrollRunResponses[keyof GetEmployeeDetailsPayrollRunResponses]; -export type PostCreateCompanyData = { - /** - * Create Company params - */ - body?: CreateCompanyParams; +export type GetShowEmploymentData = { + 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 - * + * Employment ID */ - async?: boolean; + employment_id: string; + }; + query?: { /** - * Scope of the access token - * + * Wether files should be excluded */ - scope?: string; + exclude_files?: boolean; }; - url: '/v1/companies'; + url: '/api/eor/v1/employments/{employment_id}'; }; -export type PostCreateCompanyErrors = { +export type GetShowEmploymentErrors = { /** * Bad Request */ @@ -19256,7 +21658,7 @@ export type PostCreateCompanyErrors = { /** * Conflict */ - 409: CompanyCreationConflictErrorResponse; + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -19267,30 +21669,89 @@ export type PostCreateCompanyErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateCompanyError = - PostCreateCompanyErrors[keyof PostCreateCompanyErrors]; +export type GetShowEmploymentError = + GetShowEmploymentErrors[keyof GetShowEmploymentErrors]; -export type PostCreateCompanyResponses = { +export type GetShowEmploymentResponses = { /** - * Created + * Success */ - 201: CompanyCreationResponse; + 200: EmploymentShowResponse; }; -export type PostCreateCompanyResponse = - PostCreateCompanyResponses[keyof PostCreateCompanyResponses]; +export type GetShowEmploymentResponse = + GetShowEmploymentResponses[keyof GetShowEmploymentResponses]; -export type PostCreateBulkEmploymentData = { +export type PatchUpdateEmployment2Data = { /** - * Bulk employment params + * Employment params */ - body?: BulkEmploymentCreateParams; - path?: never; - query?: never; - url: '/v1/bulk-employment-jobs'; + 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; + }; + 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: '/api/eor/v1/employments/{employment_id}'; }; -export type PostCreateBulkEmploymentErrors = { +export type PatchUpdateEmployment2Errors = { /** * Bad Request */ @@ -19299,6 +21760,10 @@ export type PostCreateBulkEmploymentErrors = { * Forbidden */ 403: ForbiddenResponse; + /** + * Conflict + */ + 409: ConflictResponse; /** * Unprocessable Entity */ @@ -19309,136 +21774,141 @@ export type PostCreateBulkEmploymentErrors = { 429: TooManyRequestsResponse; }; -export type PostCreateBulkEmploymentError = - PostCreateBulkEmploymentErrors[keyof PostCreateBulkEmploymentErrors]; +export type PatchUpdateEmployment2Error = + PatchUpdateEmployment2Errors[keyof PatchUpdateEmployment2Errors]; -export type PostCreateBulkEmploymentResponses = { +export type PatchUpdateEmployment2Responses = { /** - * Accepted + * Success */ - 202: BulkEmploymentImportJobResponse; + 200: EmploymentResponse; }; -export type PostCreateBulkEmploymentResponse = - PostCreateBulkEmploymentResponses[keyof PostCreateBulkEmploymentResponses]; +export type PatchUpdateEmployment2Response = + PatchUpdateEmployment2Responses[keyof PatchUpdateEmployment2Responses]; -export type PostSendBackTimesheetData = { +export type PatchUpdateEmploymentData = { /** - * SendBackTimesheetParams + * Employment params */ - body?: SendBackTimesheetParams; + 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: { /** - * Timesheet ID + * Employment ID */ - timesheet_id: string; + employment_id: string; }; - query?: never; - url: '/v1/timesheets/{timesheet_id}/send-back'; -}; - -export type PostSendBackTimesheetErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Not Found - */ - 404: NotFoundResponse; - /** - * Unprocessable Entity - */ - 422: UnprocessableEntityResponse; -}; - -export type PostSendBackTimesheetError = - PostSendBackTimesheetErrors[keyof PostSendBackTimesheetErrors]; - -export type PostSendBackTimesheetResponses = { - /** - * Success - */ - 200: SentBackTimesheetResponse; -}; - -export type PostSendBackTimesheetResponse = - PostSendBackTimesheetResponses[keyof PostSendBackTimesheetResponses]; - -export type DeleteDeleteCompanyManagerData = { - body?: never; - headers: { + 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'; /** - * 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. - * + * Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ - Authorization: string; - }; - path: { + skip_benefits?: boolean; /** - * User ID + * Complementary action(s) to perform when creating an employment. */ - user_id: string; + actions?: string; }; - query?: never; - url: '/v1/company-managers/{user_id}'; + url: '/api/eor/v1/employments/{employment_id}'; }; -export type DeleteDeleteCompanyManagerErrors = { +export type PatchUpdateEmploymentErrors = { /** * 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 DeleteDeleteCompanyManagerError = - DeleteDeleteCompanyManagerErrors[keyof DeleteDeleteCompanyManagerErrors]; +export type PatchUpdateEmploymentError = + PatchUpdateEmploymentErrors[keyof PatchUpdateEmploymentErrors]; -export type DeleteDeleteCompanyManagerResponses = { +export type PatchUpdateEmploymentResponses = { /** * Success */ - 200: SuccessResponse; + 200: EmploymentResponse; }; -export type DeleteDeleteCompanyManagerResponse = - DeleteDeleteCompanyManagerResponses[keyof DeleteDeleteCompanyManagerResponses]; +export type PatchUpdateEmploymentResponse = + PatchUpdateEmploymentResponses[keyof PatchUpdateEmploymentResponses]; -export type GetShowCompanyManagerData = { +export type GetShowEmploymentCustomFieldValueData = { body?: never; path: { /** - * User ID + * Custom field ID */ - user_id: string; + custom_field_id: string; + /** + * Employment ID + */ + employment_id: string; }; query?: never; - url: '/v1/company-managers/{user_id}'; + url: '/api/eor/v1/custom-fields/{custom_field_id}/values/{employment_id}'; }; -export type GetShowCompanyManagerErrors = { - /** - * Bad Request - */ - 400: BadRequestResponse; +export type GetShowEmploymentCustomFieldValueErrors = { /** * Unauthorized */ @@ -19451,38 +21921,41 @@ export type GetShowCompanyManagerErrors = { * Unprocessable Entity */ 422: UnprocessableEntityResponse; - /** - * Too many requests - */ - 429: TooManyRequestsResponse; }; -export type GetShowCompanyManagerError = - GetShowCompanyManagerErrors[keyof GetShowCompanyManagerErrors]; +export type GetShowEmploymentCustomFieldValueError = + GetShowEmploymentCustomFieldValueErrors[keyof GetShowEmploymentCustomFieldValueErrors]; -export type GetShowCompanyManagerResponses = { +export type GetShowEmploymentCustomFieldValueResponses = { /** * Success */ - 200: CompanyManagerResponse; + 200: EmploymentCustomFieldValueResponse; }; -export type GetShowCompanyManagerResponse = - GetShowCompanyManagerResponses[keyof GetShowCompanyManagerResponses]; +export type GetShowEmploymentCustomFieldValueResponse = + GetShowEmploymentCustomFieldValueResponses[keyof GetShowEmploymentCustomFieldValueResponses]; -export type DeleteDeleteContractorCorSubscriptionSubscriptionData = { - body?: never; +export type PatchUpdateEmploymentCustomFieldValue2Data = { + /** + * Custom Field Value Update Parameters + */ + body: UpdateEmploymentCustomFieldValueParams; path: { + /** + * Custom field ID + */ + custom_field_id: string; /** * Employment ID */ employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; + url: '/api/eor/v1/custom-fields/{custom_field_id}/values/{employment_id}'; }; -export type DeleteDeleteContractorCorSubscriptionSubscriptionErrors = { +export type PatchUpdateEmploymentCustomFieldValue2Errors = { /** * Unauthorized */ @@ -19501,33 +21974,43 @@ export type DeleteDeleteContractorCorSubscriptionSubscriptionErrors = { 422: UnprocessableEntityResponse; }; -export type DeleteDeleteContractorCorSubscriptionSubscriptionError = - DeleteDeleteContractorCorSubscriptionSubscriptionErrors[keyof DeleteDeleteContractorCorSubscriptionSubscriptionErrors]; +export type PatchUpdateEmploymentCustomFieldValue2Error = + PatchUpdateEmploymentCustomFieldValue2Errors[keyof PatchUpdateEmploymentCustomFieldValue2Errors]; -export type DeleteDeleteContractorCorSubscriptionSubscriptionResponses = { +export type PatchUpdateEmploymentCustomFieldValue2Responses = { /** - * No Content + * Success */ - 204: unknown; + 200: EmploymentCustomFieldValueResponse; }; -export type PostManageContractorCorSubscriptionSubscriptionData = { - body?: never; +export type PatchUpdateEmploymentCustomFieldValue2Response = + PatchUpdateEmploymentCustomFieldValue2Responses[keyof PatchUpdateEmploymentCustomFieldValue2Responses]; + +export type PatchUpdateEmploymentCustomFieldValueData = { + /** + * Custom Field Value Update Parameters + */ + body: UpdateEmploymentCustomFieldValueParams; path: { + /** + * Custom field ID + */ + custom_field_id: string; /** * Employment ID */ employment_id: string; }; query?: never; - url: '/v1/contractors/employments/{employment_id}/contractor-cor-subscription'; + url: '/api/eor/v1/custom-fields/{custom_field_id}/values/{employment_id}'; }; -export type PostManageContractorCorSubscriptionSubscriptionErrors = { +export type PatchUpdateEmploymentCustomFieldValueErrors = { /** - * Bad Request + * Unauthorized */ - 400: BadRequestResponse; + 401: UnauthorizedResponse; /** * Forbidden */ @@ -19542,189 +22025,83 @@ export type PostManageContractorCorSubscriptionSubscriptionErrors = { 422: UnprocessableEntityResponse; }; -export type PostManageContractorCorSubscriptionSubscriptionError = - PostManageContractorCorSubscriptionSubscriptionErrors[keyof PostManageContractorCorSubscriptionSubscriptionErrors]; +export type PatchUpdateEmploymentCustomFieldValueError = + PatchUpdateEmploymentCustomFieldValueErrors[keyof PatchUpdateEmploymentCustomFieldValueErrors]; -export type PostManageContractorCorSubscriptionSubscriptionResponses = { +export type PatchUpdateEmploymentCustomFieldValueResponses = { /** - * Created + * Success */ - 201: SuccessResponse; + 200: EmploymentCustomFieldValueResponse; }; -export type PostManageContractorCorSubscriptionSubscriptionResponse = - PostManageContractorCorSubscriptionSubscriptionResponses[keyof PostManageContractorCorSubscriptionSubscriptionResponses]; +export type PatchUpdateEmploymentCustomFieldValueResponse = + PatchUpdateEmploymentCustomFieldValueResponses[keyof PatchUpdateEmploymentCustomFieldValueResponses]; -export type GetIndexScheduledContractorInvoiceData = { - body?: never; - path?: never; - query?: { - /** - * Filters contractor invoice schedules by start date greater than or equal to the value. - */ - start_date_from?: Date; - /** - * Filters contractor invoice schedules by start date less than or equal to the value. - */ - start_date_to?: Date; - /** - * Filters contractor invoice schedules by next invoice date greater than or equal to the value. - */ - next_invoice_date_from?: Date; - /** - * Filters contractor invoice schedules by next invoice date less than or equal to the value. - */ - next_invoice_date_to?: Date; - /** - * Filters contractor invoice schedules by status matching the value. - */ - 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; +export type PutValidateResignationData = { + /** + * ValidateResignation + */ + body: ValidateResignationRequestParams; + path: { /** - * Number of items per page + * Offboarding request ID */ - page_size?: number; + offboarding_request_id: string; }; - url: '/v1/contractor-invoice-schedules'; -}; - -export type GetIndexScheduledContractorInvoiceErrors = { - /** - * Unauthorized - */ - 401: UnauthorizedResponse; - /** - * Forbidden - */ - 403: ForbiddenResponse; - /** - * Not Found - */ - 404: NotFoundResponse; -}; - -export type GetIndexScheduledContractorInvoiceError = - GetIndexScheduledContractorInvoiceErrors[keyof GetIndexScheduledContractorInvoiceErrors]; - -export type GetIndexScheduledContractorInvoiceResponses = { - /** - * Success - */ - 200: ListContractorInvoiceSchedulesResponse; + query?: never; + url: '/api/eor/v1/resignations/{offboarding_request_id}/validate'; }; -export type GetIndexScheduledContractorInvoiceResponse = - GetIndexScheduledContractorInvoiceResponses[keyof GetIndexScheduledContractorInvoiceResponses]; - -export type PostBulkCreateScheduledContractorInvoiceData = { +export type PutValidateResignationErrors = { /** - * Bulk creation payload + * Bad Request */ - body: BulkContractorInvoiceScheduleCreateParams; - path?: never; - query?: never; - url: '/v1/contractor-invoice-schedules'; -}; - -export type PostBulkCreateScheduledContractorInvoiceErrors = { + 400: BadRequestResponse; /** - * Forbidden + * Unauthorized */ - 403: ForbiddenResponse; + 401: UnauthorizedResponse; /** * Not Found */ 404: NotFoundResponse; /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + * Unprocessable Entity */ - 422: { - data: { - failures: Array; - successes: Array; - }; - }; -}; - -export type PostBulkCreateScheduledContractorInvoiceError = - PostBulkCreateScheduledContractorInvoiceErrors[keyof PostBulkCreateScheduledContractorInvoiceErrors]; - -export type PostBulkCreateScheduledContractorInvoiceResponses = { - /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + 422: UnprocessableEntityResponse; + /** + * Unprocessable Entity */ - 201: { - data: { - failures: Array; - successes: Array; - }; - }; + 429: TooManyRequestsResponse; +}; + +export type PutValidateResignationError = + PutValidateResignationErrors[keyof PutValidateResignationErrors]; + +export type PutValidateResignationResponses = { /** - * BulkContractorInvoiceScheduleCreateResponse - * - * Response containing the lists of succeeded and failed schedules. + * Success */ - 207: { - data: { - failures: Array; - successes: Array; - }; - }; + 200: SuccessResponse; }; -export type PostBulkCreateScheduledContractorInvoiceResponse = - PostBulkCreateScheduledContractorInvoiceResponses[keyof PostBulkCreateScheduledContractorInvoiceResponses]; +export type PutValidateResignationResponse = + PutValidateResignationResponses[keyof PutValidateResignationResponses]; -export type GetGetBreakdownBillingDocumentData = { +export type GetShowScheduledContractorInvoiceData = { body?: never; path: { /** - * The billing document's ID - */ - billing_document_id: string; - }; - query?: { - /** - * Filters the results by the type of the billing breakdown item. + * Resource unique identifier */ - type?: string; + id: UuidSlug; }; - url: '/v1/billing-documents/{billing_document_id}/breakdown'; + query?: never; + url: '/api/eor/v1/contractor-invoice-schedules/{id}'; }; -export type GetGetBreakdownBillingDocumentErrors = { +export type GetShowScheduledContractorInvoiceErrors = { /** * Bad Request */ @@ -19733,6 +22110,10 @@ export type GetGetBreakdownBillingDocumentErrors = { * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -19747,65 +22128,39 @@ export type GetGetBreakdownBillingDocumentErrors = { 429: TooManyRequestsResponse; }; -export type GetGetBreakdownBillingDocumentError = - GetGetBreakdownBillingDocumentErrors[keyof GetGetBreakdownBillingDocumentErrors]; +export type GetShowScheduledContractorInvoiceError = + GetShowScheduledContractorInvoiceErrors[keyof GetShowScheduledContractorInvoiceErrors]; -export type GetGetBreakdownBillingDocumentResponses = { +export type GetShowScheduledContractorInvoiceResponses = { /** * Success */ - 200: BillingDocumentBreakdownResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type GetGetBreakdownBillingDocumentResponse = - GetGetBreakdownBillingDocumentResponses[keyof GetGetBreakdownBillingDocumentResponses]; +export type GetShowScheduledContractorInvoiceResponse = + GetShowScheduledContractorInvoiceResponses[keyof GetShowScheduledContractorInvoiceResponses]; -export type GetIndexEmployeeDocumentData = { - 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'; +export type PatchUpdateScheduledContractorInvoice2Data = { + /** + * Update parameters + */ + body: UpdateScheduleContractorInvoiceParams; + path: { /** - * Sort order + * Resource unique identifier */ - order?: 'asc' | 'desc'; + id: UuidSlug; }; - url: '/v1/employee/documents'; + query?: never; + url: '/api/eor/v1/contractor-invoice-schedules/{id}'; }; -export type GetIndexEmployeeDocumentErrors = { +export type PatchUpdateScheduledContractorInvoice2Errors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; /** * Forbidden */ @@ -19814,74 +22169,127 @@ export type GetIndexEmployeeDocumentErrors = { * Not Found */ 404: NotFoundResponse; + /** + * Unprocessable Entity + */ + 422: UnprocessableEntityResponse; }; -export type GetIndexEmployeeDocumentError = - GetIndexEmployeeDocumentErrors[keyof GetIndexEmployeeDocumentErrors]; +export type PatchUpdateScheduledContractorInvoice2Error = + PatchUpdateScheduledContractorInvoice2Errors[keyof PatchUpdateScheduledContractorInvoice2Errors]; -export type GetIndexEmployeeDocumentResponses = { +export type PatchUpdateScheduledContractorInvoice2Responses = { /** * Success */ - 200: ListDocumentsResponse; + 200: ContractorInvoiceScheduleResponse; }; -export type GetIndexEmployeeDocumentResponse = - GetIndexEmployeeDocumentResponses[keyof GetIndexEmployeeDocumentResponses]; +export type PatchUpdateScheduledContractorInvoice2Response = + PatchUpdateScheduledContractorInvoice2Responses[keyof PatchUpdateScheduledContractorInvoice2Responses]; -export type PostApproveCancellationRequestData = { - body?: never; +export type PatchUpdateScheduledContractorInvoiceData = { + /** + * Update parameters + */ + body: UpdateScheduleContractorInvoiceParams; path: { /** - * Time Off ID + * Resource unique identifier */ - timeoff_id: string; + id: UuidSlug; }; query?: never; - url: '/v1/timeoff/{timeoff_id}/cancel-request/approve'; + url: '/api/eor/v1/contractor-invoice-schedules/{id}'; }; -export type PostApproveCancellationRequestErrors = { +export type PatchUpdateScheduledContractorInvoiceErrors = { /** * Unauthorized */ 401: UnauthorizedResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ 422: UnprocessableEntityResponse; +}; + +export type PatchUpdateScheduledContractorInvoiceError = + PatchUpdateScheduledContractorInvoiceErrors[keyof PatchUpdateScheduledContractorInvoiceErrors]; + +export type PatchUpdateScheduledContractorInvoiceResponses = { + /** + * Success + */ + 200: ContractorInvoiceScheduleResponse; +}; + +export type PatchUpdateScheduledContractorInvoiceResponse = + PatchUpdateScheduledContractorInvoiceResponses[keyof PatchUpdateScheduledContractorInvoiceResponses]; + +export type PostCreateRiskReserveData = { + /** + * Risk Reserve + */ + body: CreateRiskReserveParams; + path?: never; + query?: never; + url: '/api/eor/v1/risk-reserve'; +}; + +export type PostCreateRiskReserveErrors = { + /** + * Unauthorized + */ + 401: UnauthorizedResponse; + /** + * Not Found + */ + 404: NotFoundResponse; /** * Unprocessable Entity */ - 429: TooManyRequestsResponse; + 422: UnprocessableEntityResponse; }; -export type PostApproveCancellationRequestError = - PostApproveCancellationRequestErrors[keyof PostApproveCancellationRequestErrors]; +export type PostCreateRiskReserveError = + PostCreateRiskReserveErrors[keyof PostCreateRiskReserveErrors]; -export type PostApproveCancellationRequestResponses = { +export type PostCreateRiskReserveResponses = { /** * Success */ 200: SuccessResponse; }; -export type PostApproveCancellationRequestResponse = - PostApproveCancellationRequestResponses[keyof PostApproveCancellationRequestResponses]; +export type PostCreateRiskReserveResponse = + PostCreateRiskReserveResponses[keyof PostCreateRiskReserveResponses]; -export type PostVerifyIdentityVerificationData = { +export type GetShowContractDocumentData = { body?: never; path: { /** * Employment ID */ employment_id: string; + /** + * Document ID + */ + id: string; }; query?: never; - url: '/v1/identity-verification/{employment_id}/verify'; + url: '/api/eor/v1/contractors/employments/{employment_id}/contract-documents/{id}'; }; -export type PostVerifyIdentityVerificationErrors = { +export type GetShowContractDocumentErrors = { /** * Unauthorized */ @@ -19896,45 +22304,40 @@ export type PostVerifyIdentityVerificationErrors = { 422: UnprocessableEntityResponse; }; -export type PostVerifyIdentityVerificationError = - PostVerifyIdentityVerificationErrors[keyof PostVerifyIdentityVerificationErrors]; +export type GetShowContractDocumentError = + GetShowContractDocumentErrors[keyof GetShowContractDocumentErrors]; -export type PostVerifyIdentityVerificationResponses = { +export type GetShowContractDocumentResponses = { /** * Success */ - 200: SuccessResponse; + 200: ContractDocumentResponse; }; -export type PostVerifyIdentityVerificationResponse = - PostVerifyIdentityVerificationResponses[keyof PostVerifyIdentityVerificationResponses]; +export type GetShowContractDocumentResponse = + GetShowContractDocumentResponses[keyof GetShowContractDocumentResponses]; -export type GetDownloadPdfBillingDocumentData = { +export type PostCreateCorTerminationRequestSubscriptionData = { 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 + * Employment ID */ - billing_document_id: string; + employment_id: string; }; query?: never; - url: '/v1/billing-documents/{billing_document_id}/pdf'; + url: '/api/eor/v1/contractors/employments/{employment_id}/cor-termination-requests'; }; -export type GetDownloadPdfBillingDocumentErrors = { +export type PostCreateCorTerminationRequestSubscriptionErrors = { /** - * Unauthorized + * Bad Request */ - 401: UnauthorizedResponse; + 400: BadRequestResponse; + /** + * Forbidden + */ + 403: ForbiddenResponse; /** * Not Found */ @@ -19945,15 +22348,15 @@ export type GetDownloadPdfBillingDocumentErrors = { 422: UnprocessableEntityResponse; }; -export type GetDownloadPdfBillingDocumentError = - GetDownloadPdfBillingDocumentErrors[keyof GetDownloadPdfBillingDocumentErrors]; +export type PostCreateCorTerminationRequestSubscriptionError = + PostCreateCorTerminationRequestSubscriptionErrors[keyof PostCreateCorTerminationRequestSubscriptionErrors]; -export type GetDownloadPdfBillingDocumentResponses = { +export type PostCreateCorTerminationRequestSubscriptionResponses = { /** - * Success + * Created */ - 200: GenericFile; + 201: CorTerminationRequestCreatedResponse; }; -export type GetDownloadPdfBillingDocumentResponse = - GetDownloadPdfBillingDocumentResponses[keyof GetDownloadPdfBillingDocumentResponses]; +export type PostCreateCorTerminationRequestSubscriptionResponse = + PostCreateCorTerminationRequestSubscriptionResponses[keyof PostCreateCorTerminationRequestSubscriptionResponses]; diff --git a/src/flows/Onboarding/api.ts b/src/flows/Onboarding/api.ts index 48d7e68bc..f75d4096f 100644 --- a/src/flows/Onboarding/api.ts +++ b/src/flows/Onboarding/api.ts @@ -9,7 +9,7 @@ import { getIndexBenefitOffer, getShowCompany, getShowCompanyEmploymentOnboardingReservesStatus, - getShowEmployment, + getShowEngagementAgreementDetailsCountry, getShowFormCountry, getShowSchema, patchUpdateEmployment2, @@ -40,37 +40,6 @@ import { import { createHeadlessForm } from '@/src/common/createHeadlessForm'; import { countriesOptions } from '@/src/common/api/countries'; -export const useEmployment = (employmentId: string | undefined) => { - const { client } = useClient(); - - return useQuery({ - queryKey: ['employment', employmentId], - retry: false, - enabled: !!employmentId, - select: ({ data }) => { - return data?.data.employment; - }, - queryFn: async () => { - const response = await getShowEmployment({ - client: client as Client, - headers: { - Authorization: ``, - }, - path: { - employment_id: employmentId as string, - }, - }); - - // If response status is 404 or other error, throw an error to trigger isError - if (response.error || !response.data) { - throw new Error('Failed to fetch employment data'); - } - - return response; - }, - }); -}; - export const useCompany = (companyId: string) => { const { client } = useClient(); return useQuery({ @@ -491,3 +460,26 @@ export const useEmploymentOnboardingReservesStatus = ( select: ({ data }) => data?.data?.status, }); }; + +export const useEngagementAgreementDetails = (countryCode: string) => { + const { client } = useClient(); + return useQuery({ + queryKey: ['engagement-agreement-details', countryCode], + retry: false, + enabled: !!countryCode, + queryFn: async () => { + const response = await getShowEngagementAgreementDetailsCountry({ + client: client as Client, + path: { + country_code: countryCode, + }, + }); + + if (response.error || !response.data) { + throw new Error('Failed to fetch engagement agreement details'); + } + + return response; + }, + }); +}; From 482b775dff4ee698258d04dccae75851e9927a8c Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Mon, 13 Apr 2026 12:40:45 +0200 Subject: [PATCH 02/10] fix datepicker issues --- example/api/routes.js | 6 ++ example/package-lock.json | 10 +-- src/components/ui/calendar.tsx | 6 +- src/environments.ts | 2 +- src/flows/Onboarding/api.ts | 15 +++- src/flows/Onboarding/hooks.tsx | 15 +++- src/styles/global.css | 122 +++++++++++++++++---------------- 7 files changed, 105 insertions(+), 71 deletions(-) diff --git a/example/api/routes.js b/example/api/routes.js index 54eab547b..9a94c487d 100644 --- a/example/api/routes.js +++ b/example/api/routes.js @@ -7,6 +7,12 @@ function setupRoutes(app) { app.get('/api/fetch-refresh-token', getToken); app.get('/api/fetch-company-manager', getCompanyManagerToken); app.use('/v1', createProxyMiddleware()); + + // To make proxy requests work in local + app.use('/api/eor/v1', (req, res, next) => { + req.originalUrl = req.originalUrl.replace('/api/eor', ''); + createProxyMiddleware()(req, res, next); + }); } module.exports = { setupRoutes }; diff --git a/example/package-lock.json b/example/package-lock.json index 496241538..02057021b 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -35,7 +35,7 @@ "name": "@remoteoss/remote-flows", "version": "1.24.1", "dependencies": { - "@hookform/resolvers": "^4.1.3", + "@hookform/resolvers": "^5.2.2", "@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-collapsible": "^1.1.12", "@radix-ui/react-dialog": "^1.1.15", @@ -51,7 +51,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", - "date-fns": "^3.6.0", + "date-fns": "^4.1.0", "dompurify": "^3.3.3", "lodash.capitalize": "^4.2.1", "lodash.get": "^4.4.2", @@ -61,11 +61,11 @@ "lodash.mergewith": "^4.6.2", "lodash.omit": "^4.5.0", "lodash.omitby": "^4.6.0", - "lucide-react": "^1.7.0", + "lucide-react": "^1.8.0", "postcss": "^8.5.9", - "react-day-picker": "^8.10.1", + "react-day-picker": "^9.14.0", "react-flagpack": "^2.0.6", - "react-hook-form": "^7.54.2", + "react-hook-form": "^7.72.1", "tailwind-merge": "^3.5.0", "tailwindcss": "^4.2.2", "tailwindcss-animate": "^1.0.7", diff --git a/src/components/ui/calendar.tsx b/src/components/ui/calendar.tsx index 9a0ce7f7e..60dfd0987 100644 --- a/src/components/ui/calendar.tsx +++ b/src/components/ui/calendar.tsx @@ -20,9 +20,9 @@ function Calendar({ months: 'flex flex-col sm:flex-row gap-4', month: 'flex flex-col gap-y-4', month_caption: 'flex h-8 w-full items-center justify-center relative', - caption_label: 'font-medium text-sm', - nav: 'flex items-center justify-between w-full', - month_grid: 'w-full border-collapse mt-4', + caption_label: 'font-medium text-sm mt-1', + nav: 'flex items-center justify-between absolute left-0 right-0 z-10', + month_grid: 'w-full border-collapse mt-1', weekdays: 'flex', weekday: 'text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]', diff --git a/src/environments.ts b/src/environments.ts index 8cc0952a4..ee695076d 100644 --- a/src/environments.ts +++ b/src/environments.ts @@ -6,7 +6,7 @@ export type Environment = | 'staging'; export const ENVIRONMENTS: Record = { - local: 'http://localhost:4000/api/eor', + local: 'http://localhost:4000', // when using openapi-ts locally remove /api/eor from the url partners: 'https://gateway.partners.remote-sandbox.com', production: 'https://gateway.remote.com', sandbox: 'https://gateway.remote-sandbox.com', diff --git a/src/flows/Onboarding/api.ts b/src/flows/Onboarding/api.ts index f75d4096f..ff79e2a82 100644 --- a/src/flows/Onboarding/api.ts +++ b/src/flows/Onboarding/api.ts @@ -461,8 +461,9 @@ export const useEmploymentOnboardingReservesStatus = ( }); }; -export const useEngagementAgreementDetails = (countryCode: string) => { +export const useEngagementAgreementDetailsSchema = (countryCode: string) => { const { client } = useClient(); + const fieldValues = {}; // TODO: Add variable later... return useQuery({ queryKey: ['engagement-agreement-details', countryCode], retry: false, @@ -481,5 +482,17 @@ export const useEngagementAgreementDetails = (countryCode: string) => { return response; }, + select: ({ data }) => { + const jsfSchema = data?.data?.schema || {}; + + return createHeadlessForm( + jsfSchema, + fieldValues, + {}, + /* { + jsfModify: options?.jsfModify?.engagement_agreement_details, // TODO: add later + }, */ + ); + }, }); }; diff --git a/src/flows/Onboarding/hooks.tsx b/src/flows/Onboarding/hooks.tsx index b7ee9d207..4f6d1591d 100644 --- a/src/flows/Onboarding/hooks.tsx +++ b/src/flows/Onboarding/hooks.tsx @@ -36,6 +36,7 @@ import { useUpdateBenefitsOffers, useUpdateEmployment, useUpsertContractEligibility, + useEngagementAgreementDetailsSchema, } from '@/src/flows/Onboarding/api'; import { JSFModify, JSONSchemaFormType } from '@/src/flows/types'; import { AnnualGrossSalary } from '@/src/flows/Onboarding/components/AnnualGrossSalary'; @@ -72,6 +73,7 @@ const getLoadingStates = ({ isLoadingBenefitOffers, isLoadingCompany, isLoadingCountries, + isLoadingEngagementAgreementDetails, employmentStatus, employmentId, currentStepName, @@ -85,6 +87,7 @@ const getLoadingStates = ({ isLoadingBenefitOffers: boolean; isLoadingCompany: boolean; isLoadingCountries: boolean; + isLoadingEngagementAgreementDetails: boolean; employmentStatus?: Employment['status']; employmentId?: string; currentStepName: string; @@ -98,7 +101,8 @@ const getLoadingStates = ({ isLoadingBenefitsOffersSchema || isLoadingBenefitOffers || isLoadingCompany || - isLoadingCountries; + isLoadingCountries || + isLoadingEngagementAgreementDetails; const isEmploymentReadOnly = employmentStatus && @@ -199,6 +203,13 @@ export const useOnboarding = ({ queryParams: { exclude_files: true }, }); + const { + data: engagementAgreementDetails, + isLoading: isLoadingEngagementAgreementDetails, + } = useEngagementAgreementDetailsSchema(internalCountryCode as string); + + console.log('engagementAgreementDetails', engagementAgreementDetails); + // if the employment is loaded, country code has not been set yet // we set the internal country code with the employment country code if (employmentId && employment?.country?.code && !internalCountryCode) { @@ -589,6 +600,7 @@ export const useOnboarding = ({ isLoadingBenefitsOffersSchema, isLoadingBenefitOffers, isLoadingCompany, + isLoadingEngagementAgreementDetails, isLoadingCountries, employmentId, employmentStatus: employmentStatus, @@ -604,6 +616,7 @@ export const useOnboarding = ({ isLoadingBenefitOffers, isLoadingCompany, isLoadingCountries, + isLoadingEngagementAgreementDetails, employmentId, employmentStatus, stepFields.basic_information, diff --git a/src/styles/global.css b/src/styles/global.css index 1a9c4486c..c6c22c3f9 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -107,93 +107,79 @@ /* React Day Picker v9 Styling */ - /* Base day button styling */ - .rdp-button { + /* Day button styling - the actual clickable button inside each day cell */ + .rdp-day_button { height: 2.25rem; width: 2.25rem; padding: 0; font-weight: 400; border-radius: 0.375rem; cursor: pointer; + background-color: transparent; + border: none; + transition: background-color 0.15s ease; + color: inherit; } - /* Hover state for non-disabled, non-selected days */ - .rdp-button:hover:not([disabled]):not([aria-selected='true']) { + /* Hover state for day buttons */ + .rdp-day_button:hover:not([disabled]) { background-color: var(--color-accent); color: var(--color-accent-foreground); } - /* Selected and today states (use same accent styling with bold weight for selected) */ - .rdp-button[aria-selected='true'], - .rdp-day_selected .rdp-button, - .rdp-day_today:not(.rdp-day_selected) .rdp-button { + /* Today state - accent background */ + .rdp-today .rdp-day_button { background-color: var(--color-accent); color: var(--color-accent-foreground); } - .rdp-button[aria-selected='true'], - .rdp-day_selected .rdp-button { + /* Selected state - the td has rdp-selected class and aria-selected attribute */ + .rdp-selected .rdp-day_button, + td[aria-selected='true'] .rdp-day_button { + background-color: var(--color-accent); + color: var(--color-accent-foreground); font-weight: 600; } - /* Disabled days */ - .rdp-button[disabled], - .rdp-day_disabled .rdp-button { - color: var(--color-muted-foreground); - opacity: 0.5; - cursor: not-allowed; - pointer-events: auto; + .rdp-selected .rdp-day_button:hover, + td[aria-selected='true'] .rdp-day_button:hover { + background-color: var(--color-accent); + color: var(--color-accent-foreground); } - /* Outside days (days from previous/next month) */ - .rdp-day_outside .rdp-button { + /* Disabled days */ + .rdp-day_button[disabled] { color: var(--color-muted-foreground); opacity: 0.5; + cursor: not-allowed; } - .rdp-day_outside.rdp-day_selected .rdp-button { - opacity: 0.3; + .rdp-day_button[disabled]:hover { + background-color: transparent; } - /* Weekday headers */ - .rdp-head_cell { - width: 2.25rem; - font-size: 0.75rem; - font-weight: 500; + /* Outside days (days from previous/next month) */ + .rdp-outside .rdp-day_button { color: var(--color-muted-foreground); - text-transform: uppercase; - letter-spacing: 0.05em; - padding-bottom: 0.5rem; - } - - /* Caption container - holds title and navigation buttons */ - .rdp-caption { - position: relative; - display: flex; - align-items: center; - justify-content: center; - padding: 0.5rem 0; - margin-bottom: 0.5rem; + opacity: 0.5; } - /* Caption title - absolutely centered */ - .rdp-caption > div[aria-live='polite'] { - position: absolute; - left: 50%; - transform: translateX(-50%); + .rdp-outside .rdp-day_button:hover:not([disabled]) { + background-color: var(--color-accent); + opacity: 0.7; } - /* Navigation container - use display: contents to not affect layout */ - .rdp-nav { - display: contents; + .rdp-outside.rdp-selected .rdp-day_button, + .rdp-outside[aria-selected='true'] .rdp-day_button { + opacity: 0.3; } - /* Navigation buttons - positioned at far left and right */ - .rdp-nav_button { - position: absolute; + /* Navigation buttons */ + .rdp-button_previous, + .rdp-button_next { height: 1.75rem; width: 1.75rem; - display: flex; + display: inline-flex; align-items: center; justify-content: center; background-color: transparent; @@ -203,24 +189,40 @@ opacity: 0.75; cursor: pointer; color: var(--color-foreground); + transition: + opacity 0.15s ease, + background-color 0.15s ease; + position: absolute; + z-index: 10; + top: 50%; + transform: translateY(-50%); } - .rdp-nav_button_previous { - left: 0; + .rdp-button_previous { + left: 1.45rem; + top: 16px; } - .rdp-nav_button_next { - right: 0; + .rdp-button_next { + right: 1.45rem; + top: 16px; } - .rdp-nav_button:hover { + .rdp-button_previous:hover:not([disabled]), + .rdp-button_next:hover:not([disabled]) { opacity: 1; background-color: var(--color-accent); } - /* Navigation icons - smaller chevrons */ - .rdp-nav_icon { - height: 0.75rem; - width: 0.75rem; + .rdp-button_previous:disabled, + .rdp-button_next:disabled { + opacity: 0.25; + cursor: not-allowed; + } + + /* Chevron icons inside navigation buttons */ + .rdp-chevron { + height: 0.875rem; + width: 0.875rem; } } From 1400da391b5d6308b84cfb166cbfa4807b45f70b Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Mon, 13 Apr 2026 13:29:22 +0200 Subject: [PATCH 03/10] add steps && dynamic navigation --- example/src/Onboarding.tsx | 57 +++++-- src/flows/ContractorOnboarding/hooks.tsx | 2 +- src/flows/Onboarding/OnboardingFlow.tsx | 2 + .../EngagementAgreementDetailsStep.tsx | 81 ++++++++++ src/flows/Onboarding/hooks.tsx | 149 +++++++++++++----- src/flows/Onboarding/types.ts | 3 + src/flows/Onboarding/utils.ts | 85 +++++++--- 7 files changed, 303 insertions(+), 76 deletions(-) create mode 100644 src/flows/Onboarding/components/EngagementAgreementDetailsStep.tsx diff --git a/example/src/Onboarding.tsx b/example/src/Onboarding.tsx index 3be3691f9..7dcddfca7 100644 --- a/example/src/Onboarding.tsx +++ b/example/src/Onboarding.tsx @@ -10,6 +10,7 @@ import { SelectCountrySuccess, SelectCountryFormPayload, NormalizedFieldError, + $TSFixMe, } from '@remoteoss/remote-flows'; import React, { useState } from 'react'; import { ReviewOnboardingStep } from './ReviewOnboardingStep'; @@ -35,13 +36,6 @@ export const InviteSection = ({ ); }; -const STEPS = [ - 'Select Country', - 'Basic Information', - 'Contract Details', - 'Benefits', - 'Review & Invite', -]; type MultiStepFormProps = { onboardingBag: OnboardingRenderProps['onboardingBag']; @@ -56,6 +50,7 @@ const MultiStepForm = ({ components, onboardingBag }: MultiStepFormProps) => { SubmitButton, BackButton, SelectCountryStep, + EngagementAgreementDetailsStep, } = components; const [errors, setErrors] = useState<{ apiError: string; @@ -125,6 +120,34 @@ const MultiStepForm = ({ components, onboardingBag }: MultiStepFormProps) => { ); + case 'engagement_agreement_details': + return ( + <> + {/* TODO: Add type later... => EngagementAgreementDetailsFormPayload */} + console.log('payload', payload)} + onSuccess={(data: EmploymentResponse) => console.log('data', data)} + onError={({ error, fieldErrors }) => + setErrors({ apiError: error.message, fieldErrors }) + } + /> + +
+ setErrors({ apiError: '', fieldErrors: [] })} + > + Previous Step + +
+ setErrors({ apiError: '', fieldErrors: [] })} + > + Continue + + + ); case 'contract_details': return ( <> @@ -213,7 +236,7 @@ const OnBoardingRender = ({ }: MultiStepFormProps) => { const currentStepIndex = onboardingBag.stepState.currentStep.index; - const stepTitle = STEPS[currentStepIndex]; + const stepTitle = onboardingBag.steps[currentStepIndex].label; if (onboardingBag.isLoading) { return

Loading...

; @@ -223,14 +246,16 @@ const OnBoardingRender = ({ <>
    - {STEPS.map((step, index) => ( -
  • - {step} -
  • - ))} + {onboardingBag.steps + .filter((step) => step.visible) + .map((step, index) => ( +
  • + {index + 1}. {step.label} +
  • + ))}
diff --git a/src/flows/ContractorOnboarding/hooks.tsx b/src/flows/ContractorOnboarding/hooks.tsx index 14af2ca34..9b0013dfc 100644 --- a/src/flows/ContractorOnboarding/hooks.tsx +++ b/src/flows/ContractorOnboarding/hooks.tsx @@ -1402,7 +1402,7 @@ export const useContractorOnboarding = ({ defaultLegalEntity, /** * Steps array - * @returns {Array<{name: string, index: number, label: string}>} + * @returns {Array<{name: string, index: number, visible: boolean, label: string}>} */ steps: stepsArray, }; diff --git a/src/flows/Onboarding/OnboardingFlow.tsx b/src/flows/Onboarding/OnboardingFlow.tsx index 18e067360..597a129f4 100644 --- a/src/flows/Onboarding/OnboardingFlow.tsx +++ b/src/flows/Onboarding/OnboardingFlow.tsx @@ -11,6 +11,7 @@ import { BenefitsStep } from '@/src/flows/Onboarding/components/BenefitsStep'; import { SelectCountryStep } from '@/src/flows/Onboarding/components/SelectCountryStep'; import { ReviewStep } from '@/src/flows/Onboarding/components/ReviewStep'; import { SaveDraftButton } from '@/src/flows/Onboarding/components/SaveDraftButton'; +import { EngagementAgreementDetailsStep } from '@/src/flows/Onboarding/components/EngagementAgreementDetailsStep'; export const OnboardingFlow = ({ employmentId, @@ -56,6 +57,7 @@ export const OnboardingFlow = ({ onboardingBag, components: { BasicInformationStep: BasicInformationStep, + EngagementAgreementDetailsStep: EngagementAgreementDetailsStep, ContractDetailsStep: ContractDetailsStep, BenefitsStep: BenefitsStep, SubmitButton: OnboardingSubmit, diff --git a/src/flows/Onboarding/components/EngagementAgreementDetailsStep.tsx b/src/flows/Onboarding/components/EngagementAgreementDetailsStep.tsx new file mode 100644 index 000000000..7203a9ce0 --- /dev/null +++ b/src/flows/Onboarding/components/EngagementAgreementDetailsStep.tsx @@ -0,0 +1,81 @@ +import { useOnboardingContext } from '@/src/flows/Onboarding/context'; +import { OnboardingForm } from '@/src/flows/Onboarding/components/OnboardingForm'; +import { $TSFixMe } from '@/src/types/remoteFlows'; +import { + /* normalizeFieldErrors, */ + NormalizedFieldError, +} from '@/src/lib/mutations'; + +type EngagementAgreementDetailsStepProps = { + /* + * The function is called when the form is submitted. It receives the form values as an argument. + */ + + // TODO: Add type later... EngagementAgreementDetailsFormPayload + onSubmit?: (payload: Record) => void | Promise; + /* + * The function is called when the form submission is successful. + */ + // TODO: Add type later... EngagementAgreementDetailsFormPayload + onSuccess?: (data: unknown) => void | Promise; + /* + * The function is called when an error occurs during form submission. + */ + onError?: ({ + error, + rawError, + fieldErrors, + }: { + error: Error; + rawError: Record; + fieldErrors: NormalizedFieldError[]; + }) => void; +}; + +export function EngagementAgreementDetailsStep({ + onSubmit, + onSuccess, + onError, +}: EngagementAgreementDetailsStepProps) { + const { onboardingBag } = useOnboardingContext(); + + const handleSubmit = async (payload: $TSFixMe) => { + try { + const parsedValues = await onboardingBag.parseFormValues(payload); + await onSubmit?.(parsedValues as Record); + const response = await onboardingBag.onSubmit(payload); + if (response?.data) { + await onSuccess?.(response?.data); + onboardingBag?.next(); + return; + } + // TODO: enable later... + /* if (response?.error) { + const normalizedFieldErrors = normalizeFieldErrors( + response?.fieldErrors || [], + onboardingBag.meta?.fields?.engagement_agreement_details, + ); + + onError?.({ + error: response?.error, + rawError: response?.rawError, + fieldErrors: normalizedFieldErrors, + }); + } */ + } catch (error: unknown) { + onError?.({ + error: error as Error, + rawError: error as Record, + fieldErrors: [], + }); + } + }; + + const initialValues = + onboardingBag.stepState.values?.engagement_agreement_details || + onboardingBag.initialValues.engagement_agreement_details; + + return ( + + ); +} diff --git a/src/flows/Onboarding/hooks.tsx b/src/flows/Onboarding/hooks.tsx index 4f6d1591d..d6ca9e6c0 100644 --- a/src/flows/Onboarding/hooks.tsx +++ b/src/flows/Onboarding/hooks.tsx @@ -11,8 +11,8 @@ import { getContractDetailsSchemaVersion, getBasicInformationSchemaVersion, reviewStepAllowedEmploymentStatus, - STEPS, - STEPS_WITHOUT_SELECT_COUNTRY, + buildSteps, + StepKeys, } from '@/src/flows/Onboarding/utils'; import { prettifyFormValues } from '@/src/lib/utils'; import { @@ -54,12 +54,10 @@ const jsonSchemaToEmployment: Partial< contract_details: 'contract_details', }; -const stepToFormSchemaMap: Record< - keyof typeof STEPS, - JSONSchemaFormType | null -> = { +const stepToFormSchemaMap: Record = { select_country: null, basic_information: 'employment_basic_information', + engagement_agreement_details: null, contract_details: 'contract_details', benefits: null, review: null, @@ -151,12 +149,43 @@ export const useOnboarding = ({ isUpdating: Boolean(employmentId), }, }); - const stepsToUse = skipSteps?.includes('select_country') - ? STEPS_WITHOUT_SELECT_COUNTRY - : STEPS; + + const [internalEmploymentId, setInternalEmploymentId] = useState< + string | undefined + >(employmentId); + const [internalCountryCode, setInternalCountryCode] = useState( + countryCode || null, + ); + const { + data: employment, + isLoading: isLoadingEmployment, + refetch: refetchEmployment, + } = useEmploymentQuery({ + employmentId: internalEmploymentId as string, + queryParams: { exclude_files: true }, + }); + + const { + data: engagementAgreementDetails, + isLoading: isLoadingEngagementAgreementDetails, + } = useEngagementAgreementDetailsSchema(internalCountryCode as string); + + const includeEngagementAgreementDetails = Boolean( + engagementAgreementDetails?.fields && + engagementAgreementDetails.fields.length > 0, + ); + + const { steps, stepsArray } = useMemo( + () => + buildSteps({ + includeSelectCountry: !skipSteps?.includes('select_country'), + includeEngagementAgreementDetails, + }), + [includeEngagementAgreementDetails, skipSteps], + ); const onStepChange = useCallback( - (step: Step) => { + (step: Step) => { updateErrorContext({ step: step.name, }); @@ -172,43 +201,21 @@ export const useOnboarding = ({ nextStep, goToStep, setStepValues, - } = useStepState( - stepsToUse as Record>, - onStepChange, - ); + } = useStepState(steps, onStepChange); const fieldsMetaRef = useRef<{ select_country: Meta; basic_information: Meta; + engagement_agreement_details: Meta; contract_details: Meta; benefits: Meta; }>({ select_country: {}, basic_information: {}, + engagement_agreement_details: {}, contract_details: {}, benefits: {}, }); - const [internalEmploymentId, setInternalEmploymentId] = useState< - string | undefined - >(employmentId); - const [internalCountryCode, setInternalCountryCode] = useState( - countryCode || null, - ); - const { - data: employment, - isLoading: isLoadingEmployment, - refetch: refetchEmployment, - } = useEmploymentQuery({ - employmentId: internalEmploymentId as string, - queryParams: { exclude_files: true }, - }); - - const { - data: engagementAgreementDetails, - isLoading: isLoadingEngagementAgreementDetails, - } = useEngagementAgreementDetailsSchema(internalCountryCode as string); - - console.log('engagementAgreementDetails', engagementAgreementDetails); // if the employment is loaded, country code has not been set yet // we set the internal country code with the employment country code @@ -457,7 +464,7 @@ export const useOnboarding = ({ const initialValuesBenefitOffers = useMemo(() => { if (stepState.currentStep.name === 'benefits') { const benefitsFormValues = { - ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step + ...stepState.values?.[stepState.currentStep.name as StepKeys], ...fieldValues, }; return mergeWith({}, benefitOffers, benefitsFormValues); @@ -470,10 +477,11 @@ export const useOnboarding = ({ fieldValues, ]); - const stepFields: Record = useMemo( + const stepFields: Record = useMemo( () => ({ select_country: selectCountryForm?.fields || [], basic_information: basicInformationForm?.fields || [], + engagement_agreement_details: engagementAgreementDetails?.fields || [], contract_details: contractDetailsForm?.fields || [], benefits: benefitOffersSchema?.fields || [], review: [], @@ -481,17 +489,20 @@ export const useOnboarding = ({ [ selectCountryForm?.fields, basicInformationForm?.fields, + engagementAgreementDetails?.fields, contractDetailsForm?.fields, benefitOffersSchema?.fields, ], ); const stepFieldsWithFlatFieldsets: Record< - keyof typeof STEPS, + StepKeys, JSFFieldset | null | undefined > = { select_country: null, basic_information: basicInformationForm?.meta['x-jsf-fieldsets'], + engagement_agreement_details: + engagementAgreementDetails?.meta['x-jsf-fieldsets'], contract_details: contractDetailsForm?.meta['x-jsf-fieldsets'], benefits: null, review: null, @@ -554,6 +565,18 @@ export const useOnboarding = ({ onboardingInitialValues, ]); + const engagementAgreementDetailsInitialValues = useMemo(() => { + // TODO: Check this later... + const initialValues = { + ...onboardingInitialValues, + }; + + return getInitialValues( + stepFields.engagement_agreement_details, + initialValues, + ); + }, [stepFields.engagement_agreement_details, onboardingInitialValues]); + const initialValues = useMemo(() => { if (employment) { return { @@ -564,6 +587,7 @@ export const useOnboarding = ({ stepFields['basic_information'], basicInformationInitialValues, ), + engagement_agreement_details: engagementAgreementDetailsInitialValues, contract_details: // if contract details is null, it means it has not been filled yet, so we can't enable the ack fields employment?.contract_details !== null @@ -578,12 +602,14 @@ export const useOnboarding = ({ return { select_country: selectCountryInitialValues, basic_information: basicInformationInitialValues, + engagement_agreement_details: engagementAgreementDetailsInitialValues, contract_details: contractDetailsInitialValues, benefits: benefitsInitialValues, }; }, [ selectCountryInitialValues, basicInformationInitialValues, + engagementAgreementDetailsInitialValues, contractDetailsInitialValues, benefitsInitialValues, employment, @@ -636,6 +662,10 @@ export const useOnboarding = ({ basicInformationInitialValues, stepFields.basic_information, ), + engagement_agreement_details: prettifyFormValues( + engagementAgreementDetailsInitialValues, + stepFields.engagement_agreement_details, + ), contract_details: prettifyFormValues( contractDetailsInitialValues, stepFields.contract_details, @@ -649,6 +679,7 @@ export const useOnboarding = ({ setStepValues({ select_country: selectCountryInitialValues, basic_information: basicInformationInitialValues, + engagement_agreement_details: engagementAgreementDetailsInitialValues, contract_details: contractDetailsInitialValues, benefits: benefitsInitialValues, review: {}, @@ -658,6 +689,7 @@ export const useOnboarding = ({ } }, [ basicInformationInitialValues, + engagementAgreementDetailsInitialValues, benefitsInitialValues, contractDetailsInitialValues, goToStep, @@ -665,6 +697,7 @@ export const useOnboarding = ({ selectCountryInitialValues, setStepValues, stepFields.basic_information, + stepFields.engagement_agreement_details, stepFields.benefits, stepFields.contract_details, stepFields.select_country, @@ -682,6 +715,19 @@ export const useOnboarding = ({ isPartialValidation: false, }); } + // TODO: Check this later... + if ( + engagementAgreementDetails && + stepState.currentStep.name === 'engagement_agreement_details' + ) { + return await parseJSFToValidate( + values, + engagementAgreementDetails?.fields, + { + isPartialValidation: false, + }, + ); + } if ( contractDetailsForm && @@ -770,6 +816,12 @@ export const useOnboarding = ({ return; } + case 'engagement_agreement_details': { + // For now, just proceed to next step without saving + // The engagement agreement details will be part of the employment data + // TODO: Add API call if needed to save engagement agreement details separately + return Promise.resolve({ data: {} }); + } case 'contract_details': { const payload: EmploymentFullParams = { contract_details: parsedValues, @@ -802,7 +854,7 @@ export const useOnboarding = ({ nextStep(); } - function goTo(step: keyof typeof STEPS) { + function goTo(step: StepKeys) { goToStep(step); } @@ -890,6 +942,19 @@ export const useOnboarding = ({ return basicInformationForm?.handleValidation(parsedValues); } + // TODO: Check this later... + if ( + engagementAgreementDetails && + stepState.currentStep.name === 'engagement_agreement_details' + ) { + const parsedValues = await parseJSFToValidate( + values, + engagementAgreementDetails?.fields, + { isPartialValidation: false }, + ); + return engagementAgreementDetails?.handleValidation(parsedValues); + } + if ( contractDetailsForm && stepState.currentStep.name === 'contract_details' @@ -972,5 +1037,11 @@ export const useOnboarding = ({ * @returns {boolean} */ canInvite, + + /** + * Steps array + * @returns {Array<{name: string, visible: boolean, index: number, label: string}>} + */ + steps: stepsArray, }; }; diff --git a/src/flows/Onboarding/types.ts b/src/flows/Onboarding/types.ts index 14d87b7d4..cd52b101f 100644 --- a/src/flows/Onboarding/types.ts +++ b/src/flows/Onboarding/types.ts @@ -13,6 +13,7 @@ import { FlowOptions, JSFModify } from '@/src/flows/types'; import { SelectCountryStep } from '@/src/flows/Onboarding/components/SelectCountryStep'; import { ReviewStep } from '@/src/flows/Onboarding/components/ReviewStep'; import { SaveDraftButton } from '@/src/flows/Onboarding/components/SaveDraftButton'; +import { EngagementAgreementDetailsStep } from '@/src/flows/Onboarding/components/EngagementAgreementDetailsStep'; export type OnboardingRenderProps = { /** @@ -25,6 +26,7 @@ export type OnboardingRenderProps = { * The components used in the onboarding flow. * This includes different steps, submit button, back button. * @see {@link BasicInformationStep} + * @see {@link EngagementAgreementDetailsStep} * @see {@link ContractDetailsStep} * @see {@link OnboardingSubmit} * @see {@link OnboardingBack} @@ -40,6 +42,7 @@ export type OnboardingRenderProps = { SubmitButton: typeof OnboardingSubmit; BackButton: typeof OnboardingBack; BasicInformationStep: typeof BasicInformationStep; + EngagementAgreementDetailsStep: typeof EngagementAgreementDetailsStep; OnboardingInvite: typeof OnboardingInvite; ContractDetailsStep: typeof ContractDetailsStep; BenefitsStep: typeof BenefitsStep; diff --git a/src/flows/Onboarding/utils.ts b/src/flows/Onboarding/utils.ts index 4cf726e70..022de5501 100644 --- a/src/flows/Onboarding/utils.ts +++ b/src/flows/Onboarding/utils.ts @@ -1,33 +1,78 @@ import { Employment, OnboardingFlowProps } from '@/src/flows/Onboarding/types'; import { Step } from '@/src/flows/useStepState'; -type StepKeys = +export type StepKeys = | 'select_country' | 'basic_information' + | 'engagement_agreement_details' | 'contract_details' | 'benefits' | 'review'; -export const STEPS: Record> = { - select_country: { - index: 0, - name: 'select_country', - }, - basic_information: { index: 1, name: 'basic_information' }, - contract_details: { index: 2, name: 'contract_details' }, - benefits: { index: 3, name: 'benefits' }, - review: { index: 4, name: 'review' }, -} as const; +type StepConfig = { + includeSelectCountry?: boolean; + includeEngagementAgreementDetails?: boolean; +}; + +export function buildSteps(config: StepConfig = {}) { + const stepDefinitions: Array<{ + name: StepKeys; + label: string; + visible: boolean; + }> = [ + { + name: 'select_country', + label: 'Select Country', + visible: Boolean(config?.includeSelectCountry), + }, + { + name: 'basic_information', + label: 'Basic Information', + visible: true, + }, + { + name: 'engagement_agreement_details', + label: 'Engagement Agreement Details', + visible: Boolean(config?.includeEngagementAgreementDetails), + }, + { + name: 'contract_details', + label: 'Contract Details', + visible: true, + }, + { + name: 'benefits', + label: 'Benefits', + visible: true, + }, + { + name: 'review', + label: 'Review', + visible: true, + }, + ]; + + const stepsArray = stepDefinitions.map((step, index) => ({ + name: step.name, + index, + label: step.label, + visible: step.visible, + })); + + const steps = stepsArray.reduce( + (acc, step) => { + acc[step.name] = { + index: step.index, + name: step.name, + visible: step.visible, + }; + return acc; + }, + {} as Record>, + ); -export const STEPS_WITHOUT_SELECT_COUNTRY: Record< - Exclude, - Step> -> = { - basic_information: { index: 0, name: 'basic_information' }, - contract_details: { index: 1, name: 'contract_details' }, - benefits: { index: 2, name: 'benefits' }, - review: { index: 3, name: 'review' }, -} as const; + return { steps, stepsArray }; +} /** * Array of employment statuses that are allowed to proceed to the review step. From 13a463c8a6b62aa2867c64ce6bbde6b01de47752 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Tue, 14 Apr 2026 14:08:21 +0200 Subject: [PATCH 04/10] fix fieldValues --- example/src/Onboarding.tsx | 12 +++--- src/flows/Onboarding/api.ts | 28 +++++++------ src/flows/Onboarding/hooks.tsx | 76 ++++++++++++++++++++++++++-------- src/flows/Onboarding/types.ts | 15 ++++--- 4 files changed, 89 insertions(+), 42 deletions(-) diff --git a/example/src/Onboarding.tsx b/example/src/Onboarding.tsx index 7dcddfca7..a521664cb 100644 --- a/example/src/Onboarding.tsx +++ b/example/src/Onboarding.tsx @@ -139,13 +139,13 @@ const MultiStepForm = ({ components, onboardingBag }: MultiStepFormProps) => { > Previous Step + setErrors({ apiError: '', fieldErrors: [] })} + > + Continue + - setErrors({ apiError: '', fieldErrors: [] })} - > - Continue - ); case 'contract_details': diff --git a/src/flows/Onboarding/api.ts b/src/flows/Onboarding/api.ts index ff79e2a82..d51484363 100644 --- a/src/flows/Onboarding/api.ts +++ b/src/flows/Onboarding/api.ts @@ -26,7 +26,10 @@ import { import { useClient } from '@/src/context'; import { selectCountryStepSchema } from '@/src/flows/Onboarding/json-schemas/selectCountryStep'; -import { OnboardingFlowProps } from '@/src/flows/Onboarding/types'; +import { + OnboardingFlowProps, + OnboardingJsfModify, +} from '@/src/flows/Onboarding/types'; import { JSONSchemaFormResultWithFieldsets, JSONSchemaFormType, @@ -461,13 +464,19 @@ export const useEmploymentOnboardingReservesStatus = ( }); }; -export const useEngagementAgreementDetailsSchema = (countryCode: string) => { +export const useEngagementAgreementDetailsSchema = ( + countryCode: string, + fieldValues: FieldValues, + options?: { + jsfModify?: OnboardingJsfModify; + queryOptions?: { enabled?: boolean }; + }, +) => { const { client } = useClient(); - const fieldValues = {}; // TODO: Add variable later... return useQuery({ queryKey: ['engagement-agreement-details', countryCode], retry: false, - enabled: !!countryCode, + enabled: options?.queryOptions?.enabled ?? !!countryCode, queryFn: async () => { const response = await getShowEngagementAgreementDetailsCountry({ client: client as Client, @@ -485,14 +494,9 @@ export const useEngagementAgreementDetailsSchema = (countryCode: string) => { select: ({ data }) => { const jsfSchema = data?.data?.schema || {}; - return createHeadlessForm( - jsfSchema, - fieldValues, - {}, - /* { - jsfModify: options?.jsfModify?.engagement_agreement_details, // TODO: add later - }, */ - ); + return createHeadlessForm(jsfSchema, fieldValues, { + jsfModify: options?.jsfModify?.engagement_agreement_details, + }); }, }); }; diff --git a/src/flows/Onboarding/hooks.tsx b/src/flows/Onboarding/hooks.tsx index d6ca9e6c0..de13bab4c 100644 --- a/src/flows/Onboarding/hooks.tsx +++ b/src/flows/Onboarding/hooks.tsx @@ -156,6 +156,12 @@ export const useOnboarding = ({ const [internalCountryCode, setInternalCountryCode] = useState( countryCode || null, ); + + const [ + includeEngagementAgreementDetails, + setIncludeEngagementAgreementDetails, + ] = useState(false); + const { data: employment, isLoading: isLoadingEmployment, @@ -165,16 +171,6 @@ export const useOnboarding = ({ queryParams: { exclude_files: true }, }); - const { - data: engagementAgreementDetails, - isLoading: isLoadingEngagementAgreementDetails, - } = useEngagementAgreementDetailsSchema(internalCountryCode as string); - - const includeEngagementAgreementDetails = Boolean( - engagementAgreementDetails?.fields && - engagementAgreementDetails.fields.length > 0, - ); - const { steps, stepsArray } = useMemo( () => buildSteps({ @@ -203,6 +199,49 @@ export const useOnboarding = ({ setStepValues, } = useStepState(steps, onStepChange); + const engagementAgreementDetailsFieldValues = useMemo(() => { + return { + // TODO: missing here data from the server if there's ANY + ...onboardingInitialValues, + ...stepState.values?.engagement_agreement_details, + ...fieldValues, + }; + }, [ + onboardingInitialValues, + stepState.values?.engagement_agreement_details, + fieldValues, + ]); + + const { + data: engagementAgreementDetailsSchema, + isLoading: isLoadingEngagementAgreementDetails, + } = useEngagementAgreementDetailsSchema( + internalCountryCode as string, + engagementAgreementDetailsFieldValues, + { + jsfModify: options?.jsfModify, + queryOptions: { + enabled: + !!internalCountryCode && + (stepState.currentStep.name === 'engagement_agreement_details' || + Boolean(employmentId)), + }, + }, + ); + + useEffect(() => { + const hasFields = Boolean( + engagementAgreementDetailsSchema?.fields && + engagementAgreementDetailsSchema.fields.length > 0, + ); + if (hasFields !== includeEngagementAgreementDetails) { + setIncludeEngagementAgreementDetails(hasFields); + } + }, [ + engagementAgreementDetailsSchema?.fields, + includeEngagementAgreementDetails, + ]); + const fieldsMetaRef = useRef<{ select_country: Meta; basic_information: Meta; @@ -481,7 +520,8 @@ export const useOnboarding = ({ () => ({ select_country: selectCountryForm?.fields || [], basic_information: basicInformationForm?.fields || [], - engagement_agreement_details: engagementAgreementDetails?.fields || [], + engagement_agreement_details: + engagementAgreementDetailsSchema?.fields || [], contract_details: contractDetailsForm?.fields || [], benefits: benefitOffersSchema?.fields || [], review: [], @@ -489,7 +529,7 @@ export const useOnboarding = ({ [ selectCountryForm?.fields, basicInformationForm?.fields, - engagementAgreementDetails?.fields, + engagementAgreementDetailsSchema?.fields, contractDetailsForm?.fields, benefitOffersSchema?.fields, ], @@ -502,7 +542,7 @@ export const useOnboarding = ({ select_country: null, basic_information: basicInformationForm?.meta['x-jsf-fieldsets'], engagement_agreement_details: - engagementAgreementDetails?.meta['x-jsf-fieldsets'], + engagementAgreementDetailsSchema?.meta['x-jsf-fieldsets'], contract_details: contractDetailsForm?.meta['x-jsf-fieldsets'], benefits: null, review: null, @@ -717,12 +757,12 @@ export const useOnboarding = ({ } // TODO: Check this later... if ( - engagementAgreementDetails && + engagementAgreementDetailsSchema && stepState.currentStep.name === 'engagement_agreement_details' ) { return await parseJSFToValidate( values, - engagementAgreementDetails?.fields, + engagementAgreementDetailsSchema?.fields, { isPartialValidation: false, }, @@ -944,15 +984,15 @@ export const useOnboarding = ({ // TODO: Check this later... if ( - engagementAgreementDetails && + engagementAgreementDetailsSchema && stepState.currentStep.name === 'engagement_agreement_details' ) { const parsedValues = await parseJSFToValidate( values, - engagementAgreementDetails?.fields, + engagementAgreementDetailsSchema?.fields, { isPartialValidation: false }, ); - return engagementAgreementDetails?.handleValidation(parsedValues); + return engagementAgreementDetailsSchema?.handleValidation(parsedValues); } if ( diff --git a/src/flows/Onboarding/types.ts b/src/flows/Onboarding/types.ts index cd52b101f..0dd636042 100644 --- a/src/flows/Onboarding/types.ts +++ b/src/flows/Onboarding/types.ts @@ -74,6 +74,14 @@ type CountryJsonSchemaVersion = { contract_details?: number | 'latest'; }; +export type OnboardingJsfModify = { + select_country?: JSFModify; + basic_information?: JSFModify; + engagement_agreement_details?: JSFModify; + contract_details?: JSFModify; + benefits?: JSFModify; +}; + export type OnboardingFlowProps = { /** * The country code to use for the onboarding. @@ -110,12 +118,7 @@ export type OnboardingFlowProps = { * The options to use for the onboarding. */ options?: Omit & { - jsfModify?: { - select_country?: JSFModify; - basic_information?: JSFModify; - contract_details?: JSFModify; - benefits?: JSFModify; - }; + jsfModify?: OnboardingJsfModify; /** * The json schema version to use for the onboarding. * These versions apply globally to all countries. From 467279a4c900d61e15828d061cae272a8199410d Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Wed, 15 Apr 2026 09:20:15 +0200 Subject: [PATCH 05/10] fix ts --- example/src/MagicLinkTest.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/src/MagicLinkTest.tsx b/example/src/MagicLinkTest.tsx index d83140609..7ea1fa674 100644 --- a/example/src/MagicLinkTest.tsx +++ b/example/src/MagicLinkTest.tsx @@ -21,7 +21,7 @@ const MagicLinkTestContent = () => { const [userId, setUserId] = useState(import.meta.env.VITE_USER_ID || ''); const [status, setStatus] = useState('idle'); const [errorMessage, setErrorMessage] = useState(''); - const timeoutRef = useRef(null); + const timeoutRef = useRef(null); useEffect(() => { return () => { @@ -49,7 +49,6 @@ const MagicLinkTestContent = () => { try { const response = await magicLink.mutateAsync({ path, - user_id: userId, }); if (response.data) { From e6716593e8406bebac66dd83a2be8116ae5b5344 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Wed, 15 Apr 2026 10:55:41 +0200 Subject: [PATCH 06/10] fix default fields --- src/components/form/useJSONSchemaForm.tsx | 67 +++++++++++++++++++ .../Onboarding/components/OnboardingForm.tsx | 31 ++------- 2 files changed, 73 insertions(+), 25 deletions(-) create mode 100644 src/components/form/useJSONSchemaForm.tsx diff --git a/src/components/form/useJSONSchemaForm.tsx b/src/components/form/useJSONSchemaForm.tsx new file mode 100644 index 000000000..cfe776338 --- /dev/null +++ b/src/components/form/useJSONSchemaForm.tsx @@ -0,0 +1,67 @@ +import { FieldValues, useForm, UseFormReturn } from 'react-hook-form'; +import { useEffect } from 'react'; +import { useJsonSchemasValidationFormResolver } from '@/src/components/form/validationResolver'; +import { $TSFixMe } from '@/src/types/remoteFlows'; +import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit'; + +type UseJsonSchemaFormOptions = { + handleValidation: (values: FieldValues) => Promise; + defaultValues: Record; + checkFieldUpdates: (values: FieldValues) => void; + initialValues?: Record; +}; +export function useJsonSchemaForm({ + handleValidation, + defaultValues, + checkFieldUpdates, + initialValues, +}: UseJsonSchemaFormOptions): UseFormReturn<$TSFixMe> { + const resolver = useJsonSchemasValidationFormResolver(handleValidation); + + const form = useForm({ + resolver, + defaultValues, + shouldUnregister: false, + mode: 'onBlur', + }); + // Watch form changes and trigger checkFieldUpdates + useEffect(() => { + const subscription = form.watch((values) => { + const compareAgainst = initialValues || defaultValues; + const hasChanged = Object.keys(values).some( + (key) => values[key] !== compareAgainst[key], + ); + + if (hasChanged) { + checkFieldUpdates(values); + } + }); + return () => subscription.unsubscribe(); + }, [form, checkFieldUpdates, defaultValues, initialValues]); + + // Fix for conditional fields: Fields inside JSON Schema if/then/else start with + // empty values ('') before their condition is met. Once active, their real defaults + // (e.g., working_days: ['monday', ...]) need to be applied without resetting the form. + useEffect(() => { + const currentValues = form.getValues(); + + Object.keys(defaultValues).forEach((fieldName) => { + const currentValue = currentValues[fieldName]; + const defaultValue = defaultValues[fieldName]; + const isEmpty = + currentValue === undefined || + currentValue === null || + currentValue === ''; + const hasDefault = + defaultValue !== undefined && + defaultValue !== null && + defaultValue !== ''; + + if (isEmpty && hasDefault && !form.formState.dirtyFields[fieldName]) { + form.setValue(fieldName, defaultValue, { shouldValidate: false }); + } + }); + }, [defaultValues, form]); + + return form; +} diff --git a/src/flows/Onboarding/components/OnboardingForm.tsx b/src/flows/Onboarding/components/OnboardingForm.tsx index cfcd34cdd..077b6f836 100644 --- a/src/flows/Onboarding/components/OnboardingForm.tsx +++ b/src/flows/Onboarding/components/OnboardingForm.tsx @@ -2,8 +2,6 @@ import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm'; import { Form } from '@/src/components/ui/form'; import { useEffect } from 'react'; import { useOnboardingContext } from '@/src/flows/Onboarding/context'; -import { useForm } from 'react-hook-form'; -import { useJsonSchemasValidationFormResolver } from '@/src/components/form/validationResolver'; import { JSFFields } from '@/src/types/remoteFlows'; import { BasicInformationFormPayload, @@ -12,6 +10,7 @@ import { } from '@/src/flows/Onboarding/types'; import { $TSFixMe, Components } from '@/src/types/remoteFlows'; import { normalizeFieldErrors } from '@/src/lib/mutations'; +import { useJsonSchemaForm } from '@/src/components/form/useJSONSchemaForm'; type OnboardingFormProps = { onSubmit: ( @@ -32,15 +31,11 @@ export function OnboardingForm({ }: OnboardingFormProps) { const { formId, onboardingBag } = useOnboardingContext(); - const resolver = useJsonSchemasValidationFormResolver( - onboardingBag.handleValidation, - ); - - const form = useForm({ - resolver, - defaultValues, - shouldUnregister: false, - mode: 'onBlur', + const form = useJsonSchemaForm({ + handleValidation: onboardingBag.handleValidation, + defaultValues: defaultValues || {}, + checkFieldUpdates: onboardingBag.checkFieldUpdates, + initialValues: onboardingBag.initialValues, }); useEffect(() => { @@ -52,20 +47,6 @@ export function OnboardingForm({ // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - useEffect(() => { - const subscription = form?.watch((values) => { - const isAnyFieldDirty = Object.keys(values).some( - (key) => - values[key as keyof unknown] !== defaultValues[key as keyof unknown], - ); - if (isAnyFieldDirty) { - onboardingBag?.checkFieldUpdates(values); - } - }); - return () => subscription?.unsubscribe(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - const handleSubmit = async ( values: Record, event?: React.BaseSyntheticEvent, From eb493f2250add929634864a9fcec428ff3637539 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Wed, 15 Apr 2026 11:56:16 +0200 Subject: [PATCH 07/10] fix textarea help center --- src/components/form/fields/default/TextAreaFieldDefault.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/form/fields/default/TextAreaFieldDefault.tsx b/src/components/form/fields/default/TextAreaFieldDefault.tsx index 45cc7d4d3..952995652 100644 --- a/src/components/form/fields/default/TextAreaFieldDefault.tsx +++ b/src/components/form/fields/default/TextAreaFieldDefault.tsx @@ -8,6 +8,7 @@ import { import { Textarea } from '@/src/components/ui/textarea'; import { cn } from '@/src/lib/utils'; import { FieldComponentProps } from '@/src/types/fields'; +import { HelpCenter } from '@/src/components/shared/zendesk-drawer/HelpCenter'; export function TextAreaFieldDefault({ field, @@ -40,7 +41,7 @@ export function TextAreaFieldDefault({
{description && ( - {description} + {description} )} {maxLength && ( From 97cfaf9445e24b92a33b0fb10180113585164dbd Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Wed, 15 Apr 2026 15:51:04 +0200 Subject: [PATCH 08/10] fix merge --- example/src/Onboarding.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/example/src/Onboarding.tsx b/example/src/Onboarding.tsx index b46e88558..88450b30b 100644 --- a/example/src/Onboarding.tsx +++ b/example/src/Onboarding.tsx @@ -244,12 +244,9 @@ const OnBoardingRender = ({ }: MultiStepFormProps) => { const currentStepIndex = onboardingBag.stepState.currentStep.index; -<<<<<<< HEAD -======= // When using dynamic_steps feature, you need to filter and use step.index for comparison // Otherwise, you can use the steps array directly with sequential indices //const stepTitle = STEPS[currentStepIndex]; ->>>>>>> main const stepTitle = onboardingBag.steps[currentStepIndex].label; if (onboardingBag.isLoading) { @@ -260,8 +257,6 @@ const OnBoardingRender = ({ <>
    -<<<<<<< HEAD -======= {/* {STEPS.map((step, index) => (
  • ))} */} ->>>>>>> main {onboardingBag.steps .filter((step) => step.visible) .map((step, index) => ( From 0c94f8bba80d9f6361e092880059383d52fed7fe Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Wed, 15 Apr 2026 15:52:22 +0200 Subject: [PATCH 09/10] fix magic link --- example/src/MagicLinkTest.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/example/src/MagicLinkTest.tsx b/example/src/MagicLinkTest.tsx index f90447735..a0bd5bc4d 100644 --- a/example/src/MagicLinkTest.tsx +++ b/example/src/MagicLinkTest.tsx @@ -49,6 +49,7 @@ const MagicLinkTestContent = () => { try { const response = await magicLink.mutateAsync({ path, + user_id: userId, }); if (response.data) { From 56b7e73d6c23b80432f6dd6ee6ebbc8bc717bcee Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Wed, 15 Apr 2026 15:53:38 +0200 Subject: [PATCH 10/10] fix conflicts --- src/flows/Onboarding/hooks.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/flows/Onboarding/hooks.tsx b/src/flows/Onboarding/hooks.tsx index fe502268b..101e33e07 100644 --- a/src/flows/Onboarding/hooks.tsx +++ b/src/flows/Onboarding/hooks.tsx @@ -150,7 +150,6 @@ export const useOnboarding = ({ }, }); -<<<<<<< HEAD const [internalEmploymentId, setInternalEmploymentId] = useState< string | undefined >(employmentId); @@ -179,7 +178,7 @@ export const useOnboarding = ({ buildSteps({ includeSelectCountry: !skipSteps?.includes('select_country'), includeEngagementAgreementDetails, - useDynamicSteps + useDynamicSteps, }), [includeEngagementAgreementDetails, skipSteps, useDynamicSteps], ); @@ -726,8 +725,6 @@ export const useOnboarding = ({ engagement_agreement_details: engagementAgreementDetailsInitialValues, contract_details: contractDetailsInitialValues, benefits: benefitsInitialValues, - // TODO: Fix later when we have the engagement agreement details form - engagement_agreement_details: {}, review: {}, });