diff --git a/.gitmodules b/.gitmodules index b3e72e9d6..aa65fb164 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,3 +128,8 @@ url = https://github.com/distilled-mirror/spec-mirror-modal.git ignore = dirty shallow = true +[submodule "packages/remote/specs/spec-mirror-remote"] + path = packages/remote/specs/spec-mirror-remote + url = https://github.com/distilled-mirror/spec-mirror-remote.git + ignore = dirty + shallow = true diff --git a/packages/remote/.generated-specs/remote.json b/packages/remote/.generated-specs/remote.json new file mode 100644 index 000000000..b4580bdd8 --- /dev/null +++ b/packages/remote/.generated-specs/remote.json @@ -0,0 +1,48247 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "UnreferencedShape", + "namespace": "*" + } + ] + }, + "shapes": { + "com.remote.api#OAuth2TokenParams": { + "type": "union", + "members": { + "AuthorizationCodeParams": { + "target": "com.remote.api#AuthorizationCodeParams" + }, + "ClientCredentialsParams": { + "target": "com.remote.api#ClientCredentialsParams" + }, + "RefreshTokenParams": { + "target": "com.remote.api#RefreshTokenParams" + }, + "AssertionTokenParams": { + "target": "com.remote.api#AssertionTokenParams" + } + }, + "traits": {} + }, + "com.remote.api#AuthorizationCodeParams": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The authorization code generated in Authorization Code flow", + "smithy.api#required": {} + } + }, + "grant_type": { + "target": "com.remote.api#AuthorizationCodeParamsGrantType", + "traits": { + "smithy.api#documentation": "The Authorization flow", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#AuthorizationCodeParamsGrantType": { + "type": "enum", + "members": { + "AUTHORIZATION_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authorization_code" + } + } + }, + "traits": { + "smithy.api#documentation": "The Authorization flow" + } + }, + "com.remote.api#ClientCredentialsParams": { + "type": "structure", + "members": { + "client_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The client id generated during registration", + "smithy.api#required": {} + } + }, + "grant_type": { + "target": "com.remote.api#ClientCredentialsParamsGrantType", + "traits": { + "smithy.api#documentation": "The Authorization flow", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ClientCredentialsParamsGrantType": { + "type": "enum", + "members": { + "CLIENT_CREDENTIALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "client_credentials" + } + } + }, + "traits": { + "smithy.api#documentation": "The Authorization flow" + } + }, + "com.remote.api#RefreshTokenParams": { + "type": "structure", + "members": { + "grant_type": { + "target": "com.remote.api#RefreshTokenParamsGrantType", + "traits": { + "smithy.api#documentation": "The Authorization flow", + "smithy.api#required": {} + } + }, + "refresh_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refresh token generated in the Authorization Code flow", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": {} + }, + "com.remote.api#RefreshTokenParamsGrantType": { + "type": "enum", + "members": { + "REFRESH_TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "refresh_token" + } + } + }, + "traits": { + "smithy.api#documentation": "The Authorization flow" + } + }, + "com.remote.api#AssertionTokenParams": { + "type": "structure", + "members": { + "assertion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The assertion token", + "smithy.api#required": {} + } + }, + "grant_type": { + "target": "com.remote.api#AssertionTokenParamsGrantType", + "traits": { + "smithy.api#documentation": "The Assertion flow grant type", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The assertion token is a JWT token that contains the following claims:\n\n- `sub`: The subject of the token, in one of the following formats:\n - `urn:remote-api:employment:` — mints an **employee-role** access token whose `sub` is the employment owner's user slug. Scopes are restricted to those valid for the employee role (e.g. `personal_detail:read`, `timeoff:write`).\n - `urn:remote-api:employee:employment:` — same as above; the recommended format for new integrations. Use this when issuing a token on behalf of an employee so they can submit their own onboarding data (e.g. `PUT /v1/employee/address`).\n - `urn:remote-api:company-manager:user:` — mints a **company_manager-role** access token. Scopes are restricted to those valid for the company-manager role.\n\n- `iss`: The issuer of the token, which is the client ID\n- `aud`: The audience of the token, which is the OAuth audience\n- `exp`: The expiration time of the token (max 10 minutes in the future)\n- `iat`: The issued at time of the token\n- `scope`: The scope of the token (space-separated). Optional. If omitted, the minted access token defaults to `all:write` for the subject's role. If provided, every scope must be valid for the subject's role or the assertion is rejected.\n\nThe assertion must be signed with the client secret (HS256).\n\n**Example — minting an employee token to submit a residential address:**\n\n```\nsub: urn:remote-api:employee:employment:emp_2t3h9\niss: \naud: \nexp: \niat: \nscope: address:write\n```\n\nThe resulting access token can be used at `PUT /v1/employee/address` to submit the address for that employment.\n" + } + }, + "com.remote.api#AssertionTokenParamsGrantType": { + "type": "enum", + "members": { + "URN_IETF_PARAMS_OAUTH_GRANT_TYPE_JWT_BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "urn:ietf:params:oauth:grant-type:jwt-bearer" + } + } + }, + "traits": { + "smithy.api#documentation": "The Assertion flow grant type" + } + }, + "com.remote.api#PostAuthOauth2TokenRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#OAuth2TokenParams", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#OAuth2Tokens": { + "type": "union", + "members": { + "AuthorizationCodeResponse": { + "target": "com.remote.api#AuthorizationCodeResponse" + }, + "ClientCredentialsResponse": { + "target": "com.remote.api#BaseTokenResponse" + }, + "RefreshTokenResponse": { + "target": "com.remote.api#RefreshTokenResponse" + } + }, + "traits": {} + }, + "com.remote.api#AuthorizationCodeResponse": { + "type": "structure", + "members": { + "access_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A JWT token.", + "smithy.api#sensitive": {} + } + }, + "expires_in": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of seconds until token is expired." + } + }, + "token_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the token. For now, always `Bearer`." + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the connected company." + } + }, + "refresh_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refresh token. This token must be stored and used for issuing new access tokens for managing the company's resources.", + "smithy.api#sensitive": {} + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the user who connected the company." + } + } + }, + "traits": {} + }, + "com.remote.api#BaseTokenResponse": { + "type": "structure", + "members": { + "access_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A JWT token.", + "smithy.api#sensitive": {} + } + }, + "expires_in": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of seconds until token is expired." + } + }, + "token_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the token. For now, always `Bearer`." + } + } + }, + "traits": {} + }, + "com.remote.api#RefreshTokenResponse": { + "type": "structure", + "members": { + "access_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A JWT token.", + "smithy.api#sensitive": {} + } + }, + "expires_in": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of seconds until token is expired." + } + }, + "token_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the token. For now, always `Bearer`." + } + }, + "refresh_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refresh token", + "smithy.api#sensitive": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostAuthOauth2TokenResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#OAuth2Tokens", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#PostAuthOauth2Token": { + "type": "operation", + "input": { + "target": "com.remote.api#PostAuthOauth2TokenRequest" + }, + "output": { + "target": "com.remote.api#PostAuthOauth2TokenResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/auth/oauth2/token", + "code": 200 + }, + "smithy.api#documentation": "Token\n\nEndpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows" + } + }, + "com.remote.api#BenefitOfferByEmploymentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BenefitOfferByEmploymentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BenefitOffersByEmployment": { + "type": "structure", + "members": { + "benefit_offers": { + "target": "com.remote.api#BenefitOffersByEmploymentBenefitOffersList", + "traits": { + "smithy.api#required": {} + } + }, + "costs": { + "target": "com.remote.api#Costs", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment": { + "target": "com.remote.api#BenefitOffersEmployment", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BenefitOffer": { + "type": "structure", + "members": { + "benefit_group": { + "target": "com.remote.api#BenefitGroup", + "traits": { + "smithy.api#required": {} + } + }, + "benefit_tier": { + "target": "com.remote.api#BenefitTier", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "benefits": { + "target": "com.remote.api#BenefitOfferBenefitsList", + "traits": { + "smithy.api#required": {} + } + }, + "costs": { + "target": "com.remote.api#Costs", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BenefitGroup": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit group.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the benefit category (e.g., \"Health\", \"Dental\", \"Life Insurance\").", + "smithy.api#required": {} + } + }, + "policy_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the policy period ends for this benefit group (ISO 8601 format). Benefits may need to be renewed after this date.", + "smithy.api#required": {} + } + }, + "policy_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the policy period begins for this benefit group (ISO 8601 format).", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#BenefitTier": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A detailed description of what this tier covers, including the types of benefits included.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit tier.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of this tier (e.g., \"Premium 2024 (Medical, Dental and Vision)\").", + "smithy.api#required": {} + } + }, + "providers": { + "target": "com.remote.api#BenefitTierProvidersList", + "traits": { + "smithy.api#documentation": "The insurance carriers or providers associated with this tier.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#BenefitProvider": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit provider.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the insurance carrier or benefit provider (e.g., \"Allianz\", \"Bupa\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#BenefitTierProvidersList": { + "type": "list", + "member": { + "target": "com.remote.api#BenefitProvider" + }, + "traits": { + "smithy.api#documentation": "The insurance carriers or providers associated with this tier." + } + }, + "com.remote.api#Benefit": { + "type": "structure", + "members": { + "costs": { + "target": "com.remote.api#Costs", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "coverage_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when benefit coverage ends (ISO 8601).", + "smithy.api#required": {} + } + }, + "coverage_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when benefit coverage begins (ISO 8601).", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the benefit (e.g., \"Health Insurance\", \"Dental Plan\").", + "smithy.api#required": {} + } + }, + "projected_costs": { + "target": "com.remote.api#Costs", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "provider": { + "target": "com.remote.api#BenefitProvider", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#BenefitStatus", + "traits": { + "smithy.api#documentation": "The enrollment status of this benefit for the employee.\n\n- `offered`: The benefit has been offered but the employee has not yet enrolled.\n- `enrolled`: The employee is actively enrolled in this benefit.\n- `waived`: The employee declined or opted out of this benefit.\n", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type/category of the benefit.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Benefits with status enrolled have their summed costs in costs.\nBenefits with status offered have their summed costs in projected_costs.\nBenefit-offers where the employer opted-out have benefit_tier: null in the response.\n" + } + }, + "com.remote.api#Costs": { + "type": "structure", + "members": { + "employee_cost": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The employee's portion of the benefit cost, in cents.", + "smithy.api#required": {} + } + }, + "employer_cost": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The employer's portion of the benefit cost, in cents.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The cost breakdown between employee and employer for a benefit. Amounts are in the company's billing currency, in cents." + } + }, + "com.remote.api#BenefitStatus": { + "type": "enum", + "members": { + "OFFERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offered" + } + }, + "ENROLLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enrolled" + } + }, + "WAIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "waived" + } + } + }, + "traits": { + "smithy.api#documentation": "The enrollment status of this benefit for the employee.\n\n- `offered`: The benefit has been offered but the employee has not yet enrolled.\n- `enrolled`: The employee is actively enrolled in this benefit.\n- `waived`: The employee declined or opted out of this benefit.\n" + } + }, + "com.remote.api#BenefitOfferBenefitsList": { + "type": "list", + "member": { + "target": "com.remote.api#Benefit" + }, + "traits": {} + }, + "com.remote.api#BenefitOffersByEmploymentBenefitOffersList": { + "type": "list", + "member": { + "target": "com.remote.api#BenefitOffer" + }, + "traits": {} + }, + "com.remote.api#BenefitOffersEmployment": { + "type": "structure", + "members": { + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "given_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's given (first) name. Null if not available.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's full name.", + "smithy.api#required": {} + } + }, + "surname": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's surname (last name). Null if not available.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A lightweight employment representation used in benefit offer listings." + } + }, + "com.remote.api#Country": { + "type": "structure", + "members": { + "alpha_2_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 alpha-2 country code (e.g., \"PT\").", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 alpha-3 country code (e.g., \"PRT\"). This is the primary code used across the Remote API.", + "smithy.api#required": {} + } + }, + "contractor_products_available": { + "target": "com.remote.api#CountryContractorProductsAvailableList", + "traits": { + "smithy.api#documentation": "Contractor product names available for this country" + } + }, + "country_subdivisions": { + "target": "com.remote.api#CountryCountrySubdivisionsList", + "traits": { + "smithy.api#documentation": "Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_agreement_preview_available": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether an Employment Agreement preview is available for this country." + } + }, + "eor_onboarding": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether EOR (Employer of Record) onboarding is available in this country." + } + }, + "locked_benefits": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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)." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The country's full English name.", + "smithy.api#required": {} + } + }, + "region": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The geographic region the country belongs to (e.g., \"Europe\", \"Asia\", \"Americas\")." + } + }, + "subregion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The geographic subregion (e.g., \"Southern Europe\", \"Southeast Asia\"). Null for some countries.", + "com.distilled.openapi#nullable": {} + } + }, + "supported_json_schemas": { + "target": "com.remote.api#CountrySupportedJsonSchemasList", + "traits": { + "smithy.api#documentation": "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." + } + } + }, + "traits": { + "smithy.api#documentation": "A supported country on Remote" + } + }, + "com.remote.api#CountryContractorProductsAvailableItem": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + }, + "PLUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "plus" + } + }, + "COR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cor" + } + } + }, + "traits": {} + }, + "com.remote.api#CountryContractorProductsAvailableList": { + "type": "list", + "member": { + "target": "com.remote.api#CountryContractorProductsAvailableItem" + }, + "traits": { + "smithy.api#documentation": "Contractor product names available for this country" + } + }, + "com.remote.api#CountrySubdivision": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-2 subdivision code (e.g., \"PT-11\" for Lisboa)." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The subdivision's name (e.g., \"Lisboa\", \"California\").", + "smithy.api#required": {} + } + }, + "subdivision_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of subdivision (e.g., \"District\", \"State\", \"Province\")." + } + } + }, + "traits": { + "smithy.api#documentation": "A subdivision of a supported country on Remote" + } + }, + "com.remote.api#CountryCountrySubdivisionsList": { + "type": "list", + "member": { + "target": "com.remote.api#CountrySubdivision" + }, + "traits": { + "smithy.api#documentation": "Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services." + } + }, + "com.remote.api#CountrySupportedJsonSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#BenefitOfferByEmploymentResponseDataBenefitOffersByEmploymentList": { + "type": "list", + "member": { + "target": "com.remote.api#BenefitOffersByEmployment" + }, + "traits": {} + }, + "com.remote.api#Currency": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "symbol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The type of money in general use in a particular country" + } + }, + "com.remote.api#BenefitOfferByEmploymentResponseData": { + "type": "structure", + "members": { + "benefit_offers_by_employment": { + "target": "com.remote.api#BenefitOfferByEmploymentResponseDataBenefitOffersByEmploymentList", + "traits": { + "smithy.api#required": {} + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company.", + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#Currency", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BenefitOffers": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#BenefitOfferByEmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/benefit-offers", + "code": 200 + }, + "smithy.api#documentation": "List Benefit Offers By Employment\n\nList benefit offers by employment.\n\n\n## Scopes" + } + }, + "com.remote.api#CountrySummariesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CountrySummariesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#CountrySummary": { + "type": "structure", + "members": { + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "employee_stats": { + "target": "com.remote.api#EmployeeStats", + "traits": { + "smithy.api#required": {} + } + }, + "offered_benefit_groups": { + "target": "com.remote.api#CountrySummaryOfferedBenefitGroupsList", + "traits": { + "smithy.api#documentation": "All benefit groups that have been offered to employees in this country.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#EmployeeStats": { + "type": "structure", + "members": { + "number_of_employees_enrolled": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of employees currently enrolled in this benefit. An enrolled employee has an active benefit record.", + "smithy.api#required": {} + } + }, + "number_of_employees_offered": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#OfferedBenefitGroup": { + "type": "structure", + "members": { + "benefit_group": { + "target": "com.remote.api#BenefitGroup", + "traits": { + "smithy.api#required": {} + } + }, + "employee_stats": { + "target": "com.remote.api#EmployeeStats", + "traits": { + "smithy.api#required": {} + } + }, + "offered_benefit_tiers": { + "target": "com.remote.api#OfferedBenefitGroupOfferedBenefitTiersList", + "traits": { + "smithy.api#documentation": "The individual tiers within this group that have been offered, each with their own enrollment statistics.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#OfferedBenefitTier": { + "type": "structure", + "members": { + "benefit_tier": { + "target": "com.remote.api#BenefitTier", + "traits": { + "smithy.api#required": {} + } + }, + "employee_stats": { + "target": "com.remote.api#EmployeeStats", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A benefit tier that has been offered to employees, combined with enrollment statistics for that tier." + } + }, + "com.remote.api#OfferedBenefitGroupOfferedBenefitTiersList": { + "type": "list", + "member": { + "target": "com.remote.api#OfferedBenefitTier" + }, + "traits": { + "smithy.api#documentation": "The individual tiers within this group that have been offered, each with their own enrollment statistics." + } + }, + "com.remote.api#CountrySummaryOfferedBenefitGroupsList": { + "type": "list", + "member": { + "target": "com.remote.api#OfferedBenefitGroup" + }, + "traits": { + "smithy.api#documentation": "All benefit groups that have been offered to employees in this country." + } + }, + "com.remote.api#CountrySummariesResponseDataCountrySummariesList": { + "type": "list", + "member": { + "target": "com.remote.api#CountrySummary" + }, + "traits": { + "smithy.api#documentation": "Benefit offering summaries for each country where the company has employees." + } + }, + "com.remote.api#CountrySummariesResponseData": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company these benefit summaries belong to.", + "smithy.api#required": {} + } + }, + "country_summaries": { + "target": "com.remote.api#CountrySummariesResponseDataCountrySummariesList", + "traits": { + "smithy.api#documentation": "Benefit offering summaries for each country where the company has employees.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BenefitOffersCountrySummaries": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#CountrySummariesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/benefit-offers/country-summaries", + "code": 200 + }, + "smithy.api#documentation": "List Benefit Offers\n\nList benefit offers for each country.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1BenefitRenewalRequestsRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BenefitRenewalRequestsListBenefitRenewalRequestResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BenefitRenewalRequestsListBenefitRenewalRequestResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many benefit_renewal_requests" + } + }, + "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequest": { + "type": "structure", + "members": { + "benefit_group": { + "target": "com.remote.api#BenefitRenewalRequestsMinimalBenefitGroup", + "traits": { + "smithy.api#required": {} + } + }, + "benefit_renewal_response": { + "target": "com.remote.api#BenefitRenewalRequestsMinimalBenefitRenewalResponse", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "coverage_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "coverage_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "current_benefit_tier": { + "target": "com.remote.api#NullableMinimalBenefitTier", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit renewal request.", + "smithy.api#required": {} + } + }, + "number_of_affected_employees": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of employees who will be affected by this benefit renewal.", + "smithy.api#required": {} + } + }, + "renewal_selection_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "renewal_selection_instructions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Instructions for the employer about the renewal process, available plans, and deadlines.", + "smithy.api#required": {} + } + }, + "renewal_selection_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BenefitRenewalRequestsMinimalBenefitGroup": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code for this benefit group.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit group.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the benefit group (e.g., \"Health\", \"Life Insurance\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A lightweight benefit group reference used in renewal requests." + } + }, + "com.remote.api#BenefitRenewalRequestsMinimalBenefitRenewalResponse": { + "type": "structure", + "members": { + "benefit_tier": { + "target": "com.remote.api#NullableMinimalBenefitTier", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#NullableMinimalBenefitTier": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of what this tier includes.", + "smithy.api#required": {} + } + }, + "display_cost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable cost estimate for this tier (e.g., \"~$100\"). Null if cost is not available.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit tier.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the benefit tier (e.g., \"Premium\", \"Standard\").", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BenefitRenewalRequestsListBenefitRenewalRequestResponseDataBenefitRenewalRequestsList": { + "type": "list", + "member": { + "target": "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequest" + }, + "traits": {} + }, + "com.remote.api#BenefitRenewalRequestsListBenefitRenewalRequestResponseData": { + "type": "structure", + "members": { + "benefit_renewal_requests": { + "target": "com.remote.api#BenefitRenewalRequestsListBenefitRenewalRequestResponseDataBenefitRenewalRequestsList" + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BenefitRenewalRequests": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BenefitRenewalRequestsRequest" + }, + "output": { + "target": "com.remote.api#BenefitRenewalRequestsListBenefitRenewalRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/benefit-renewal-requests", + "code": 200 + }, + "smithy.api#documentation": "List Benefit Renewal Requests\n\nList Benefit Renewal Requests for each country.\n\n## Scopes" + } + }, + "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest": { + "type": "structure", + "members": { + "benefit_renewal_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Benefit Renewal Request Id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequestResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequestResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Benefit Renewal Request Response" + } + }, + "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequestResponseData": { + "type": "structure", + "members": { + "benefit_renewal_request": { + "target": "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequest", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest" + }, + "output": { + "target": "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/benefit-renewal-requests/{benefit_renewal_request_id}", + "code": 200 + }, + "smithy.api#documentation": "Show Benefit Renewal Request\n\nShow Benefit Renewal Request details.\n\n## Scopes" + } + }, + "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest": { + "type": "structure", + "members": { + "benefit_renewal_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Benefit Renewal Request Id" + } + }, + "json_schema_version": { + "target": "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#SuccessResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#SuccessResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A generic success response returned by operations that don't produce a specific resource (e.g., updates, deletes)." + } + }, + "com.remote.api#SuccessResponseData": { + "type": "structure", + "members": { + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The result status. Always `\"ok\"` for successful operations." + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestId": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/benefit-renewal-requests/{benefit_renewal_request_id}", + "code": 200 + }, + "smithy.api#documentation": "Updates a Benefit Renewal Request Response\n\nUpdates a Benefit Renewal Request with the given response.\n\n## Scopes" + } + }, + "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest": { + "type": "structure", + "members": { + "benefit_renewal_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Benefit Renewal Request Id" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequestFormResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#documentation": "Benefit Renewal Request Form Response, an object with required and optional fields, its descriptions and suggested presentation.\n" + } + }, + "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest" + }, + "output": { + "target": "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequestFormResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema", + "code": 200 + }, + "smithy.api#documentation": "Show benefit renewal request schema\n\nReturns the json schema of the `benefit_renewal_request` form for a specific request.\nThis endpoint requires a company access token, as forms are dependent on certain\nproperties of companies and their current employments.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1BillingDocumentsRequest": { + "type": "structure", + "members": { + "period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "period", + "smithy.api#documentation": "The month for the billing documents (in ISO-8601 format)" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BillingDocumentsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BillingDocumentsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a list of billing documents" + } + }, + "com.remote.api#BillingDocumentsResponseDataBillingDocumentsItemBillingDocumentType": { + "type": "enum", + "members": { + "RECONCILIATION_INVOICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reconciliation_invoice" + } + }, + "PREFUNDING_INVOICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "prefunding_invoice" + } + }, + "SUPPLEMENTAL_SERVICE_INVOICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "supplemental_service_invoice" + } + }, + "RECONCILIATION_CREDIT_NOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reconciliation_credit_note" + } + } + }, + "traits": {} + }, + "com.remote.api#BillingDocumentsResponseDataBillingDocumentsItem": { + "type": "structure", + "members": { + "bill_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The entity issuing the billing document. Null if not applicable.", + "com.distilled.openapi#nullable": {} + } + }, + "billing_document_period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The billing period in YYYY-MM format." + } + }, + "billing_document_type": { + "target": "com.remote.api#BillingDocumentsResponseDataBillingDocumentsItemBillingDocumentType" + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the billing document." + } + } + }, + "traits": {} + }, + "com.remote.api#BillingDocumentsResponseDataBillingDocumentsList": { + "type": "list", + "member": { + "target": "com.remote.api#BillingDocumentsResponseDataBillingDocumentsItem" + }, + "traits": {} + }, + "com.remote.api#BillingDocumentsResponseData": { + "type": "structure", + "members": { + "billing_documents": { + "target": "com.remote.api#BillingDocumentsResponseDataBillingDocumentsList", + "traits": { + "smithy.api#required": {} + } + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages", + "smithy.api#required": {} + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records returned counting all pages", + "smithy.api#required": {} + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BillingDocuments": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BillingDocumentsRequest" + }, + "output": { + "target": "com.remote.api#BillingDocumentsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/billing-documents", + "code": 200 + }, + "smithy.api#documentation": "List Billing Documents\n\nList billing documents for a company\n\n## Scopes" + } + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentIdRequest": { + "type": "structure", + "members": { + "billing_document_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The billing document's ID" + } + }, + "include_unrecognized_types": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_unrecognized_types", + "smithy.api#documentation": "When true, includes billing document items whose type is not part of the standard set for the invoice type." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BillingDocumentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BillingDocumentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information of a billing document" + } + }, + "com.remote.api#BillingDocument": { + "type": "structure", + "members": { + "billing_document_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code of the billing document.", + "smithy.api#required": {} + } + }, + "billing_document_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The human-readable document number (e.g., invoice number).", + "smithy.api#required": {} + } + }, + "billing_document_period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The billing period this document covers, in YYYY-MM format.", + "smithy.api#required": {} + } + }, + "billing_document_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of billing document.\n\n- `reconciliation_invoice`: A regular invoice reconciling payroll costs for the period.\n- `prefunding_invoice`: An invoice for advance funding of payroll before it is processed.\n- `supplemental_service_invoice`: An invoice for additional services beyond standard payroll.\n- `reconciliation_credit_note`: A credit note adjusting a previous reconciliation invoice.\n", + "smithy.api#required": {} + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company this billing document belongs to.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the billing document.", + "smithy.api#required": {} + } + }, + "issued_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the billing document was issued (ISO 8601 date format).", + "smithy.api#required": {} + } + }, + "items": { + "target": "com.remote.api#BillingDocumentItemsList", + "traits": { + "smithy.api#documentation": "The line items that make up this billing document.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total amount of the billing document, in cents.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A billing document (invoice or credit note) issued to a company by Remote for employment management services." + } + }, + "com.remote.api#BillingDocumentAmountItem": { + "type": "structure", + "members": { + "billing_document_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount for this line item in the billing document currency, in cents.", + "smithy.api#required": {} + } + }, + "billing_document_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code of the billing document.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment this line item relates to. Null for company-level charges.", + "com.distilled.openapi#nullable": {} + } + }, + "source_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The original amount in the source (local) currency, in cents. May differ from billing_document_amount due to currency conversion." + } + }, + "source_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code of the source (local) currency. Null if same as billing document currency.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The cost category for this line item (e.g., \"base_salary\", \"allowances\", \"bonuses\", \"deductions\", \"taxes\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A line item on a billing document, representing a specific cost category (e.g., base salary, allowances, taxes) for an employment." + } + }, + "com.remote.api#BillingDocumentItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#BillingDocumentAmountItem" + }, + "traits": { + "smithy.api#documentation": "The line items that make up this billing document." + } + }, + "com.remote.api#BillingDocumentResponseData": { + "type": "structure", + "members": { + "billing_document": { + "target": "com.remote.api#BillingDocument", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentIdRequest" + }, + "output": { + "target": "com.remote.api#BillingDocumentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/billing-documents/{billing_document_id}", + "code": 200 + }, + "smithy.api#documentation": "Show Billing Document\n\nShows a billing document details.\n\nPlease contact api-support@remote.com to request access to this endpoint.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentIdBreakdownRequest": { + "type": "structure", + "members": { + "billing_document_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The billing document's ID" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Filters the results by the type of the billing breakdown item. Matched exactly against the `type` field of\nthe returned items, so unrecognised values yield an empty list. Card spend is reported as `Card expenses`,\nseparately from payroll-reimbursed `Expenses`.\n" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BillingDocumentBreakdownResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BillingDocumentBreakdownResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a billing document breakdown" + } + }, + "com.remote.api#BillingDocumentBreakdownItem": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Country code according to ISO 3166-1 3-digit alphabetic codes. May be null for legal-entity-wide lines.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable description of this cost item.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier in UUID v4 format for the employment this cost belongs to. May be null for legal-entity-wide lines that apply to the whole legal entity rather than a single employment.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "fx_rate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The foreign exchange rate applied to convert from the source currency to the invoice currency.", + "smithy.api#required": {} + } + }, + "invoice_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Invoice amount in cents", + "smithy.api#required": {} + } + }, + "invoice_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "invoice_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The invoice number associated with this breakdown item.", + "smithy.api#required": {} + } + }, + "invoice_period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The invoice period in YYYY-MM format.", + "smithy.api#required": {} + } + }, + "source_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Source amount in cents", + "smithy.api#required": {} + } + }, + "source_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The cost category (e.g., \"Base Salary\", \"Employer Contributions\", \"Benefits\").", + "smithy.api#required": {} + } + }, + "variance_from_invoice": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable note about any variance between the breakdown amount and the invoiced amount, typically due to FX rounding.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "variance_from_invoice_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Variance from invoice amount in cents", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Item in a billing document breakdown" + } + }, + "com.remote.api#BillingDocumentBreakdownResponseDataBillingDocumentBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#BillingDocumentBreakdownItem" + }, + "traits": {} + }, + "com.remote.api#BillingDocumentBreakdownResponseData": { + "type": "structure", + "members": { + "billing_document_breakdown": { + "target": "com.remote.api#BillingDocumentBreakdownResponseDataBillingDocumentBreakdownList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentIdBreakdown": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentIdBreakdownRequest" + }, + "output": { + "target": "com.remote.api#BillingDocumentBreakdownResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/billing-documents/{billing_document_id}/breakdown", + "code": 200 + }, + "smithy.api#documentation": "Get Billing Document Breakdown\n\nGet billing document breakdown\n\n## Scopes" + } + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentIdPdfRequest": { + "type": "structure", + "members": { + "billing_document_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The billing document's ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentIdPdfResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#GetV1BillingDocumentsBillingDocumentIdPdf": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentIdPdfRequest" + }, + "output": { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentIdPdfResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/billing-documents/{billing_document_id}/pdf", + "code": 200 + }, + "smithy.api#documentation": "Download a billing document PDF\n\nDownloads a billing document PDF\n\n## Scopes" + } + }, + "com.remote.api#BulkEmploymentEmployeePayload": { + "type": "structure", + "members": { + "activate_global_payroll": { + "target": "smithy.api#Boolean" + }, + "send_invitation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Per-employee override for onboarding invitations. Takes precedence over the batch-level `send_invitation` value when present." + } + } + }, + "traits": { + "smithy.api#documentation": "Employee payload. The nested fields must match the employment schema for the selected country. `activate_global_payroll` is currently supported only for Serbia (SRB) and is controlled by the `bulk_gp_product_activation` feature flag." + } + }, + "com.remote.api#PostV1BulkEmploymentJobsRequestEmployeesList": { + "type": "list", + "member": { + "target": "com.remote.api#BulkEmploymentEmployeePayload" + }, + "traits": {} + }, + "com.remote.api#PostV1BulkEmploymentJobsRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "employees": { + "target": "com.remote.api#PostV1BulkEmploymentJobsRequestEmployeesList", + "traits": { + "smithy.api#required": {} + } + }, + "send_invitation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Batch default for onboarding invitations. Each employee can override it with their own `send_invitation` value. Defaults to `false` when omitted." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1BulkEmploymentJobs": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1BulkEmploymentJobsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/bulk-employment-jobs", + "code": 200 + }, + "smithy.api#documentation": "Create bulk employment job\n\nCreates a job to bulk-create employments for multiple employees at once. Each employee payload must match the employment schema for the selected country.\n\n## Scopes" + } + }, + "com.remote.api#GetV1BulkEmploymentJobsJobIdRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Bulk employment job id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BulkEmploymentImportJobResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BulkEmploymentImportJob", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJob": { + "type": "structure", + "members": { + "column_mapping": { + "target": "com.remote.api#BulkEmploymentImportJobColumnMapping", + "traits": { + "smithy.api#documentation": "The column mapping for the import job. For times when imported data columns do not match the schema fields and\nneed to be manually mapped to the correct schema fields.\n", + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name to be displayed for the user interface" + } + }, + "errors": { + "target": "com.remote.api#BulkEmploymentImportJobErrorsList" + }, + "failed_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of rows that failed to be processed", + "smithy.api#required": {} + } + }, + "finished_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "imported_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of rows that have been imported in previous submission stages" + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "inserted_by": { + "target": "com.remote.api#BulkEmploymentImportJobInsertedBy", + "traits": { + "smithy.api#documentation": "Someone registered in Remote using a unique email address.", + "smithy.api#required": {} + } + }, + "legal_entity": { + "target": "com.remote.api#BulkEmploymentImportJobLegalEntity", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "metadata": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The metadata for the import job", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "processed_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of processed rows, regardless of success or failure", + "smithy.api#required": {} + } + }, + "stage": { + "target": "com.remote.api#BulkEmploymentImportJobStage", + "traits": { + "smithy.api#documentation": " The stage of the import job.\n * `creation` - The import job is in the creation stage, which means the rows are being created.\n * `column_mapping` - The import job is in the column mapping stage, which means the CSV headers are being mapped to JSON schema fields.\n * `validation` - The import job is in the validation stage, which means the rows are being validated.\n * `submission` - The import job is in the submission stage, which means the rows are being submitted.\n", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#BulkEmploymentImportJobStatus", + "traits": { + "smithy.api#documentation": " * `draft` - **Deprecated**, the import job data has been uploaded and the job created, but not yet started\n * `uploaded` - **Deprecated**, replaced by the `draft` status\n * `in_progress` - Data is actively being imported\n * `finished` - The import job has finished processing\n * `failed` - The import job has failed completely, nothing has been imported\n", + "smithy.api#required": {} + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of rows to import", + "smithy.api#required": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJobColumnMappingAutoMappedColumnsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "The column names that have been automatically mapped by Tiger (rawr!) and maybe also by AI." + } + }, + "com.remote.api#BulkEmploymentImportJobColumnMappingSourceColumnsItem": { + "type": "structure", + "members": { + "index": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The index of the data column in the file", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the data column", + "smithy.api#required": {} + } + }, + "sample_data": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A sample data value from the data column", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJobColumnMappingSourceColumnsList": { + "type": "list", + "member": { + "target": "com.remote.api#BulkEmploymentImportJobColumnMappingSourceColumnsItem" + }, + "traits": { + "smithy.api#documentation": "The data columns to map to" + } + }, + "com.remote.api#BulkEmploymentImportJobColumnMapping": { + "type": "structure", + "members": { + "auto_mapped_columns": { + "target": "com.remote.api#BulkEmploymentImportJobColumnMappingAutoMappedColumnsList", + "traits": { + "smithy.api#documentation": "The column names that have been automatically mapped by Tiger (rawr!) and maybe also by AI." + } + }, + "mapping": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The map of schema fields paths to data columns", + "smithy.api#required": {} + } + }, + "source_columns": { + "target": "com.remote.api#BulkEmploymentImportJobColumnMappingSourceColumnsList", + "traits": { + "smithy.api#documentation": "The data columns to map to", + "smithy.api#required": {} + } + }, + "unmapped_column_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of columns that have not been mapped", + "smithy.api#required": {} + } + }, + "unmapped_required_field_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of required schema field paths that have not been mapped", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The column mapping for the import job. For times when imported data columns do not match the schema fields and\nneed to be manually mapped to the correct schema fields.\n" + } + }, + "com.remote.api#BulkEmploymentImportJobErrorsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#MinimalUser": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email used for authentication. It may be hidden in case no permission is given to see sensible data.", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "personal_details": { + "target": "com.remote.api#PersonalDetails", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "profile_picture": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#MinimalUserStatus" + } + }, + "traits": {} + }, + "com.remote.api#PersonalDetails": { + "type": "structure", + "members": { + "birthdate": { + "target": "smithy.api#String" + }, + "full_preferred_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "gender": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "gender_description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "given_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_us_person": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "mobile_number": { + "target": "smithy.api#String" + }, + "nationality": { + "target": "com.remote.api#PersonalDetailsNationalityList" + }, + "preferred_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "preferred_pronouns": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "recovery_number": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "redacted_fields": { + "target": "com.remote.api#PersonalDetailsRedactedFieldsList", + "traits": { + "smithy.api#documentation": "Names of fields redacted because the caller lacks the required attribute permission" + } + }, + "sex": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "surname": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "title": { + "target": "com.remote.api#PersonalDetailsTitle", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Personal details for a user, includes sensitive information" + } + }, + "com.remote.api#PersonalDetailsNationalityList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#PersonalDetailsRedactedFieldsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Names of fields redacted because the caller lacks the required attribute permission" + } + }, + "com.remote.api#PersonalDetailsTitle": { + "type": "enum", + "members": { + "MR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mr" + } + }, + "MRS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mrs" + } + }, + "MISS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "miss" + } + }, + "MS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ms" + } + }, + "MX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mx" + } + } + }, + "traits": {} + }, + "com.remote.api#MinimalUserStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "DRAFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "draft" + } + }, + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created" + } + }, + "INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "initiated" + } + } + }, + "traits": {} + }, + "com.remote.api#AccountsAccount": { + "type": "structure", + "members": { + "login_email": { + "target": "com.remote.api#Email", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "login_synced_with": { + "target": "com.remote.api#AccountsLoginSyncedWith", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "personal_email": { + "target": "com.remote.api#AccountsAccountPersonalEmail", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#AccountsAccountStatus" + } + }, + "traits": { + "smithy.api#documentation": "An Account" + } + }, + "com.remote.api#Email": { + "type": "structure", + "members": { + "address": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "confirmed_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "login_synced": { + "target": "smithy.api#Boolean" + }, + "status": { + "target": "com.remote.api#EmailStatus" + }, + "type": { + "target": "com.remote.api#EmailType" + }, + "unconfirmed_address": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmailStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "CONFIRMED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "confirmed" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + } + }, + "traits": {} + }, + "com.remote.api#EmailType": { + "type": "enum", + "members": { + "LOGIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "login" + } + }, + "PERSONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "personal" + } + }, + "WORK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work" + } + } + }, + "traits": {} + }, + "com.remote.api#AccountsLoginSyncedWith": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "PERSONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "personal" + } + }, + "WORK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work" + } + } + }, + "traits": { + "smithy.api#documentation": "Indicates which email type the account login is synchronized with." + } + }, + "com.remote.api#AccountsAccountPersonalEmail": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Email": { + "target": "com.remote.api#Email" + } + }, + "traits": {} + }, + "com.remote.api#AccountsAccountStatus": { + "type": "enum", + "members": { + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + }, + "LOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "locked" + } + } + }, + "traits": {} + }, + "com.remote.api#AccountsAssignedRoles": { + "type": "list", + "member": { + "target": "com.remote.api#AccountsAssignedRolesItem" + }, + "traits": {} + }, + "com.remote.api#AccountsAssignedRolesItemDataScope": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "EMPLOYMENT_ENTITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_entities" + } + }, + "EXTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "external" + } + }, + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "RPS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rps" + } + }, + "SECONDARY_REPORTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "secondary_reports" + } + }, + "DIRECT_REPORTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "direct_reports" + } + }, + "ASSIGNED_BILLING_LEGAL_ENTITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "assigned_billing_legal_entities" + } + }, + "EMPLOYMENT_COUNTRIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_countries" + } + }, + "EMPLOYMENT_DEPARTMENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_departments" + } + }, + "DIRECT_AND_INDIRECT_REPORTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "direct_and_indirect_reports" + } + }, + "EMPLOYMENT_COMPANY_STRUCTURE_NODES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_company_structure_nodes" + } + }, + "ONBOARDING_REPORTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "onboarding_reports" + } + } + }, + "traits": {} + }, + "com.remote.api#AccountsAssignedRolesItemType": { + "type": "enum", + "members": { + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom" + } + }, + "TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "template" + } + }, + "OWNER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "owner" + } + } + }, + "traits": {} + }, + "com.remote.api#AccountsAssignedRolesItem": { + "type": "structure", + "members": { + "data_scope": { + "target": "com.remote.api#AccountsAssignedRolesItemDataScope" + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#AccountsAssignedRolesItemType" + } + }, + "traits": {} + }, + "com.remote.api#AccountUserIntegrationUser": { + "type": "structure", + "members": { + "external_user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "integration": { + "target": "com.remote.api#AccountUserIntegrationUserIntegration", + "traits": { + "smithy.api#required": {} + } + }, + "role": { + "target": "com.remote.api#AccountUserIntegrationUserRole", + "traits": { + "smithy.api#documentation": "Whether this mapping represents a synced employee or a company admin", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#AccountUserIntegrationUserIntegration": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#AccountUserIntegrationUserRole": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": { + "smithy.api#documentation": "Whether this mapping represents a synced employee or a company admin" + } + }, + "com.remote.api#BulkEmploymentImportJobInsertedByCase1IntegrationUsersList": { + "type": "list", + "member": { + "target": "com.remote.api#AccountUserIntegrationUser" + }, + "traits": {} + }, + "com.remote.api#AccountsMinimalCompanyAdmin": { + "type": "structure", + "members": { + "job_title": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJobInsertedByCase1Role": { + "type": "enum", + "members": { + "ADMIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "admin" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + }, + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "FREELANCER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "freelancer" + } + }, + "SERVICE_PROVIDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "service_provider" + } + }, + "CANDIDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "candidate" + } + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJobInsertedByCase1": { + "type": "structure", + "members": { + "account": { + "target": "com.remote.api#AccountsAccount", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "assigned_roles": { + "target": "com.remote.api#AccountsAssignedRoles", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "integration_users": { + "target": "com.remote.api#BulkEmploymentImportJobInsertedByCase1IntegrationUsersList" + }, + "invited_by": { + "target": "com.remote.api#AccountsMinimalCompanyAdmin", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "login_synced_with": { + "target": "com.remote.api#AccountsLoginSyncedWith", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "raw_email": { + "target": "smithy.api#String" + }, + "role": { + "target": "com.remote.api#BulkEmploymentImportJobInsertedByCase1Role" + }, + "signup_source": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJobInsertedBy": { + "type": "union", + "members": { + "MinimalUser": { + "target": "com.remote.api#MinimalUser" + }, + "Case1": { + "target": "com.remote.api#BulkEmploymentImportJobInsertedByCase1" + } + }, + "traits": { + "smithy.api#documentation": "Someone registered in Remote using a unique email address." + } + }, + "com.remote.api#BulkEmploymentImportJobLegalEntity": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#BulkEmploymentImportJobStage": { + "type": "enum", + "members": { + "CREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "creation" + } + }, + "COLUMN_MAPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "column_mapping" + } + }, + "VALIDATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "validation" + } + }, + "SUBMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submission" + } + } + }, + "traits": { + "smithy.api#documentation": " The stage of the import job.\n * `creation` - The import job is in the creation stage, which means the rows are being created.\n * `column_mapping` - The import job is in the column mapping stage, which means the CSV headers are being mapped to JSON schema fields.\n * `validation` - The import job is in the validation stage, which means the rows are being validated.\n * `submission` - The import job is in the submission stage, which means the rows are being submitted.\n" + } + }, + "com.remote.api#BulkEmploymentImportJobStatus": { + "type": "enum", + "members": { + "DRAFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "draft" + } + }, + "UPLOADED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uploaded" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "FINISHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "finished" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + } + }, + "traits": { + "smithy.api#documentation": " * `draft` - **Deprecated**, the import job data has been uploaded and the job created, but not yet started\n * `uploaded` - **Deprecated**, replaced by the `draft` status\n * `in_progress` - Data is actively being imported\n * `finished` - The import job has finished processing\n * `failed` - The import job has failed completely, nothing has been imported\n" + } + }, + "com.remote.api#GetV1BulkEmploymentJobsJobId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BulkEmploymentJobsJobIdRequest" + }, + "output": { + "target": "com.remote.api#BulkEmploymentImportJobResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/bulk-employment-jobs/{job_id}", + "code": 200 + }, + "smithy.api#documentation": "Show bulk employment job\n\n## Scopes" + } + }, + "com.remote.api#GetV1BulkEmploymentJobsJobIdRowsRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Bulk employment job id" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ImportJobRowsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ImportJobRowsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataCountsByColumnValue": { + "type": "structure", + "members": { + "error": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "valid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataCountsByColumnMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.remote.api#ImportJobRowsResponseDataCountsByColumnValue" + }, + "traits": { + "smithy.api#documentation": "Per-column error and valid row counts across all rows, keyed by the column's field path" + } + }, + "com.remote.api#ImportJobRowsResponseDataCountsByStatus": { + "type": "structure", + "members": { + "deleted": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "error": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "imported": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "pending": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "retryable": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "skipped": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "successful": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "unprocessable": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataOrderedRowsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.remote.api#ImportJobRow": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ImportDataRow", + "traits": { + "smithy.api#required": {} + } + }, + "errors": { + "target": "com.remote.api#ImportJobRowErrorsMap", + "traits": { + "smithy.api#documentation": "Fields with their error messages", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.remote.api#ImportJobRowMetadata", + "traits": { + "smithy.api#documentation": "Row metadata. For login-email-selection-enabled imports (e.g. EOR bulk invite), each reviewed row carries a `login_email_signals` object with the per-row login-email review signals." + } + }, + "row_error_details": { + "target": "com.remote.api#ImportJobRowRowErrorDetails" + }, + "row_errors": { + "target": "smithy.api#Document" + }, + "row_number": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ImportJobRowStatus" + }, + "submission_errors": { + "target": "com.remote.api#ImportJobRowSubmissionErrorsList" + } + }, + "traits": {} + }, + "com.remote.api#ImportDataRow": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowErrorsValueCase0List": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "An array of error messages for the given field" + } + }, + "com.remote.api#ImportJobRowErrorsValue": { + "type": "union", + "members": { + "Case0": { + "target": "com.remote.api#ImportJobRowErrorsValueCase0List" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowErrorsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.remote.api#ImportJobRowErrorsValue" + }, + "traits": { + "smithy.api#documentation": "Fields with their error messages" + } + }, + "com.remote.api#ImportJobRowMetadataLoginEmailSignalsPersonal": { + "type": "structure", + "members": { + "registered": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowMetadataLoginEmailSignalsWork": { + "type": "structure", + "members": { + "registered": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowMetadataLoginEmailSignals": { + "type": "structure", + "members": { + "personal": { + "target": "com.remote.api#ImportJobRowMetadataLoginEmailSignalsPersonal" + }, + "sso_enforced": { + "target": "smithy.api#Boolean" + }, + "work": { + "target": "com.remote.api#ImportJobRowMetadataLoginEmailSignalsWork" + } + }, + "traits": { + "smithy.api#documentation": "Per-row review-step signals for login email selection, present only when the feature is enabled. `sso_enforced` reflects whether SSO login is enforced for the row's category. `personal` and `work` report, for each provided email, whether it is already registered on another account." + } + }, + "com.remote.api#ImportJobRowMetadata": { + "type": "structure", + "members": { + "login_email_signals": { + "target": "com.remote.api#ImportJobRowMetadataLoginEmailSignals", + "traits": { + "smithy.api#documentation": "Per-row review-step signals for login email selection, present only when the feature is enabled. `sso_enforced` reflects whether SSO login is enforced for the row's category. `personal` and `work` report, for each provided email, whether it is already registered on another account." + } + } + }, + "traits": { + "smithy.api#documentation": "Row metadata. For login-email-selection-enabled imports (e.g. EOR bulk invite), each reviewed row carries a `login_email_signals` object with the per-row login-email review signals." + } + }, + "com.remote.api#ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowRowErrorDetailsAmbiguousItem": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "created_by": { + "target": "com.remote.api#ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employee_identifier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "occurrence": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "pay_item": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowRowErrorDetailsAmbiguousList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRowRowErrorDetailsAmbiguousItem" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowRowErrorDetails": { + "type": "structure", + "members": { + "ambiguous": { + "target": "com.remote.api#ImportJobRowRowErrorDetailsAmbiguousList" + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowStatus": { + "type": "enum", + "members": { + "SUCCESSFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "successful" + } + }, + "IMPORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "imported" + } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "error" + } + }, + "UNPROCESSABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unprocessable" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + }, + "SKIPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "skipped" + } + }, + "RETRYABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retryable" + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowError": { + "type": "structure", + "members": { + "error": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "field_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "messages": { + "target": "com.remote.api#ImportJobRowErrorMessagesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowErrorMessagesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowSubmissionErrorsList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRowError" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsFailuresList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsImportedList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsPendingList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsRetryableList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsSkippedList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsSuccessesList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRowsUnprocessableList": { + "type": "list", + "member": { + "target": "com.remote.api#ImportJobRow" + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseDataRows": { + "type": "structure", + "members": { + "failures": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsFailuresList", + "traits": { + "smithy.api#required": {} + } + }, + "imported": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsImportedList", + "traits": { + "smithy.api#required": {} + } + }, + "pending": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsPendingList", + "traits": { + "smithy.api#required": {} + } + }, + "retryable": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsRetryableList", + "traits": { + "smithy.api#required": {} + } + }, + "skipped": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsSkippedList", + "traits": { + "smithy.api#required": {} + } + }, + "successes": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsSuccessesList", + "traits": { + "smithy.api#required": {} + } + }, + "unprocessable": { + "target": "com.remote.api#ImportJobRowsResponseDataRowsUnprocessableList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ImportJobRowsResponseData": { + "type": "structure", + "members": { + "counts_by_column": { + "target": "com.remote.api#ImportJobRowsResponseDataCountsByColumnMap", + "traits": { + "smithy.api#documentation": "Per-column error and valid row counts across all rows, keyed by the column's field path" + } + }, + "counts_by_status": { + "target": "com.remote.api#ImportJobRowsResponseDataCountsByStatus", + "traits": { + "smithy.api#required": {} + } + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "ordered_rows": { + "target": "com.remote.api#ImportJobRowsResponseDataOrderedRowsList" + }, + "rows": { + "target": "com.remote.api#ImportJobRowsResponseDataRows", + "traits": { + "smithy.api#required": {} + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1BulkEmploymentJobsJobIdRows": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1BulkEmploymentJobsJobIdRowsRequest" + }, + "output": { + "target": "com.remote.api#ImportJobRowsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/bulk-employment-jobs/{job_id}/rows", + "code": 200 + }, + "smithy.api#documentation": "List bulk employment rows\n\nReturns 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.\n\n## Scopes" + } + }, + "com.remote.api#PostV1CancelOnboardingEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "async": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "async", + "smithy.api#documentation": "Whether the request should be performed async\n" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1CancelOnboardingEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CancelOnboardingEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/cancel-onboarding/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Cancel onboarding\n\nCancel onboarding.\n\nRequirements for the cancellation to succeed:\n\n* Employment has to be in `invited`, `created`, `created_awaiting_reserve`, `created_reserve_paid`, `pre_hire` status\n* Employee must not have signed the employment contract\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesRequest": { + "type": "structure", + "members": { + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "external_id", + "smithy.api#documentation": "External ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompaniesResponse": { + "type": "structure", + "members": { + "companies": { + "target": "com.remote.api#CompaniesResponseCompaniesList" + } + }, + "traits": { + "smithy.api#documentation": "Shows a list of companies" + } + }, + "com.remote.api#Company": { + "type": "structure", + "members": { + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `address_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n", + "smithy.api#required": {} + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `bank_account_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "company_owner_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email address of the company owner who administers the Remote account.", + "smithy.api#required": {} + } + }, + "company_owner_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The full name of the company owner. Cannot be changed after company creation." + } + }, + "company_owner_user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company owner's user account on Remote.", + "smithy.api#required": {} + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code where the company is registered.", + "smithy.api#required": {} + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the company was created on Remote.", + "smithy.api#required": {} + } + }, + "default_legal_entity_credit_risk_status": { + "target": "com.remote.api#CompanyDefaultLegalEntityCreditRiskStatus", + "traits": { + "smithy.api#documentation": "The credit risk status of the company default legal entity.\n- `not_started`: The credit risk assessment has not started yet.\n- `ready`: The credit risk assessment is ready to be started.\n- `in_progress`: The automated credit risk assessment is in progress.\n- `referred`: The credit risk assessment has been referred to a human reviewer.\n- `fail`: The credit risk assessment has failed and the company will be archived.\n- `deposit_required`: The company default legal entity requires a deposit before onboarding new employees.\n- `no_deposit_required`: The company default legal entity does not require a deposit before onboarding new employees.\n", + "smithy.api#required": {} + } + }, + "desired_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code the company prefers for billing and invoicing (e.g., \"USD\", \"EUR\").", + "smithy.api#required": {} + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for this company in a non-Remote system. Null if not set.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company's registered name. Can only be changed while the company is in `pending` status.", + "smithy.api#required": {} + } + }, + "phone_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company's contact phone number." + } + }, + "registration_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company's business registration number. Null if not provided. Can only be set while the company is in `pending` status.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#CompanyStatus", + "traits": { + "smithy.api#documentation": "The company status determines what a company is allowed to do:\n- `pending`: The company has been created and the company owner invited. Remote is waiting for the company owner to complete onboarding.\n- `review`: The company is under review. In rare occasions, a company may not automatically get created in `active` status because Remote needs to\n manually review the company that was created. The company will become `active` once the review is completed and no further action is necessary\n through the Remote API.\n- `active`: The company owner has completed onboarding and the company is ready to employ.\n- `archived`: The company is no longer active on the Remote platform and no changes can be made to the company.\n", + "smithy.api#required": {} + } + }, + "tax_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company's tax identification number. Null if not provided. Can only be set while the company is in `pending` status.", + "com.distilled.openapi#nullable": {} + } + }, + "terms_of_service_accepted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the company owner accepted Remote's Terms of Service.", + "smithy.api#required": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the company record was last updated.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyDefaultLegalEntityCreditRiskStatus": { + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_started" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ready" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referred" + } + }, + "FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fail" + } + }, + "DEPOSIT_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deposit_required" + } + }, + "NO_DEPOSIT_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no_deposit_required" + } + } + }, + "traits": { + "smithy.api#documentation": "The credit risk status of the company default legal entity.\n- `not_started`: The credit risk assessment has not started yet.\n- `ready`: The credit risk assessment is ready to be started.\n- `in_progress`: The automated credit risk assessment is in progress.\n- `referred`: The credit risk assessment has been referred to a human reviewer.\n- `fail`: The credit risk assessment has failed and the company will be archived.\n- `deposit_required`: The company default legal entity requires a deposit before onboarding new employees.\n- `no_deposit_required`: The company default legal entity does not require a deposit before onboarding new employees.\n" + } + }, + "com.remote.api#CompanyStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "review" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "archived" + } + } + }, + "traits": { + "smithy.api#documentation": "The company status determines what a company is allowed to do:\n- `pending`: The company has been created and the company owner invited. Remote is waiting for the company owner to complete onboarding.\n- `review`: The company is under review. In rare occasions, a company may not automatically get created in `active` status because Remote needs to\n manually review the company that was created. The company will become `active` once the review is completed and no further action is necessary\n through the Remote API.\n- `active`: The company owner has completed onboarding and the company is ready to employ.\n- `archived`: The company is no longer active on the Remote platform and no changes can be made to the company.\n" + } + }, + "com.remote.api#CompaniesResponseCompaniesList": { + "type": "list", + "member": { + "target": "com.remote.api#Company" + }, + "traits": {} + }, + "com.remote.api#GetV1Companies": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesRequest" + }, + "output": { + "target": "com.remote.api#CompaniesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies", + "code": 200 + }, + "smithy.api#documentation": "List all companies\n\nList 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.\n\n## Scopes" + } + }, + "com.remote.api#PostV1CompaniesRequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1CompaniesRequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1CompaniesRequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1CompaniesRequestDesiredCurrency": { + "type": "enum", + "members": { + "AUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUD" + } + }, + "CAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAD" + } + }, + "CHF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHF" + } + }, + "DKK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DKK" + } + }, + "EUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EUR" + } + }, + "GBP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GBP" + } + }, + "JPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JPY" + } + }, + "NOK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOK" + } + }, + "NZD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NZD" + } + }, + "SEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEK" + } + }, + "SGD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SGD" + } + }, + "USD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USD" + } + } + }, + "traits": { + "smithy.api#documentation": "Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country." + } + }, + "com.remote.api#PostV1CompaniesRequest": { + "type": "structure", + "members": { + "address_details_json_schema_version": { + "target": "com.remote.api#PostV1CompaniesRequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "action": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "action", + "smithy.api#documentation": "Complementary action(s) to perform when creating a company:\n\n- `get_oauth_access_tokens` returns the user's access and refresh tokens\n- `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)\n\nIf `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)\n" + } + }, + "async": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "async", + "smithy.api#documentation": "Whether the request should be performed async\n" + } + }, + "scope": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "scope", + "smithy.api#documentation": "Scope of the access token\n" + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `address_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `bank_account_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "company_owner_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company owner email.\n\nThis value cannot be changed once set.\n", + "smithy.api#required": {} + } + }, + "company_owner_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company owner name.\n\nThis value cannot be changed from the Remote API once set.\n", + "smithy.api#required": {} + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "3-letter country code of the country the company address is located in.\n\nFor a list of countries supported through the Remote API, make a call to the [list countries endpoint](#tag/Countries/operation/get_supported_country). This endpoint will also include the 3-letter country codes you can use for this field.\n", + "smithy.api#required": {} + } + }, + "desired_currency": { + "target": "com.remote.api#PostV1CompaniesRequestDesiredCurrency", + "traits": { + "smithy.api#documentation": "Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country.", + "smithy.api#required": {} + } + }, + "email_domain": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The domain of the company. Use this field to specify the company domain name when it's different from the domain in the company owner's email." + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the company as represented in the external partner system." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company name", + "smithy.api#required": {} + } + }, + "phone_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A phone number the company can be contacted with." + } + }, + "registration_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company registration number. This field or `tax_number` (but not both) should be submitted." + } + }, + "tax_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The tax identifier of the company. This field or `registration_number` (but not both) should be submitted." + } + }, + "terms_of_service_accepted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date and time the Terms of Service were accepted. To ensure users read the most recent version of Remote's Terms of Service, their action cannot have been done more than fifteen minutes ago. The UTC offset must be included in the ISO 8601 format: `YYYY-MM-DD HOURS:MINUTES:SECONDSZ`", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyCreationResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyCreationResponseData" + } + }, + "traits": {} + }, + "com.remote.api#CompanyResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Shows a company" + } + }, + "com.remote.api#CompanyResponseData": { + "type": "structure", + "members": { + "company": { + "target": "com.remote.api#Company" + } + }, + "traits": {} + }, + "com.remote.api#CompanyWithTokensResponse": { + "type": "structure", + "members": { + "company": { + "target": "com.remote.api#Company" + }, + "tokens": { + "target": "com.remote.api#OAuth2Tokens" + } + }, + "traits": { + "smithy.api#documentation": "Shows a company with its refresh and access tokens. Please contact Remote if you need the tokens when creating a company." + } + }, + "com.remote.api#CompanyCreationResponseData": { + "type": "union", + "members": { + "CompanyResponse": { + "target": "com.remote.api#CompanyResponse" + }, + "CompanyWithTokensResponse": { + "target": "com.remote.api#CompanyWithTokensResponse" + } + }, + "traits": {} + }, + "com.remote.api#PostV1Companies": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CompaniesRequest" + }, + "output": { + "target": "com.remote.api#CompanyCreationResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/companies", + "code": 200 + }, + "smithy.api#documentation": "Create a company\n\nCreates a new company.\n\n ### Creating a company with only the required request body parameters\n When you call this endpoint and omit all the optional parameters in the request body,\n the following resources get created upon a successful response:\n * A new company with status `pending`.\n * A company owner for the new company with status `initiated`.\n\n See the [update a company endpoint](#tag/Companies/operation/patch_update_company) for\n more details on how to get your company and its owner to `active` status.\n\n If you'd like to create a company and its owner with `active` status in a single request,\n please provide the optional `address_details` parameter as well.\n\n ### Accepting the Terms of Service\n\n A required step for creating a company in Remote is to accept our Terms of Service (ToS).\n\n Company managers need to be aware of our Terms of Service and Privacy Policy,\n hence **it's the responsibility of our partners to advise and ensure company managers read\n and accept the ToS**. The terms have to be accepted only once, before creating a company,\n and the Remote API will collect the acceptance timestamp as its confirmation.\n\n To ensure users read the most recent version of Remote's Terms of Service, their **acceptance\n must be done within the last fifteen minutes prior the company creation action**.\n\n To retrieve this information, partners can provide an element with any text and a description\n explaining that by performing that action they are accepting Remote's Term of Service. For\n instance, the partner can add a checkbox or a \"Create Remote Account\" button followed by a\n description saying \"By creating an account, you agree to\n [Remote's Terms of Service](https://remote.com/terms-of-service). Also see Remote's\n [Privacy Policy](https://remote.com/privacy-policy)\".\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesSchemaRequestForm": { + "type": "enum", + "members": { + "ADDRESS_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "address_details" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesSchemaRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1CompaniesSchemaRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1CompaniesSchemaRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesSchemaRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "country_code", + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3-digit alphabetic codes." + } + }, + "form": { + "target": "com.remote.api#GetV1CompaniesSchemaRequestForm", + "traits": { + "smithy.api#httpQuery": "form", + "smithy.api#required": {}, + "smithy.api#documentation": "Name of the desired form" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1CompaniesSchemaRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyFormResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#documentation": "Object with required and optional fields, its descriptions and suggested presentation" + } + }, + "com.remote.api#GetV1CompaniesSchema": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesSchemaRequest" + }, + "output": { + "target": "com.remote.api#CompanyFormResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/schema", + "code": 200 + }, + "smithy.api#documentation": "Show form schema\n\nReturns the json schema of the requested company form.\nCurrently only supports the `address_details` form.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1CompaniesCompanyId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdRequest" + }, + "output": { + "target": "com.remote.api#CompanyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}", + "code": 200 + }, + "smithy.api#documentation": "Show a company\n\nGiven an ID, shows a company.\n\nIf the used access token was issued by the OAuth 2.0 Authorization Code flow,\nthen only the associated company can be accessed through the endpoint.\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CompaniesCompanyIdRequestDesiredCurrency": { + "type": "enum", + "members": { + "AUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUD" + } + }, + "CAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAD" + } + }, + "CHF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHF" + } + }, + "DKK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DKK" + } + }, + "EUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EUR" + } + }, + "GBP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GBP" + } + }, + "JPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JPY" + } + }, + "NOK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOK" + } + }, + "NZD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NZD" + } + }, + "SEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEK" + } + }, + "SGD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SGD" + } + }, + "USD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USD" + } + } + }, + "traits": { + "smithy.api#documentation": "Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country.\n\nThis field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it.\n" + } + }, + "com.remote.api#PatchV1CompaniesCompanyIdRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID\n" + } + }, + "address_details_json_schema_version": { + "target": "com.remote.api#PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `address_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `bank_account_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Country of company address" + } + }, + "desired_currency": { + "target": "com.remote.api#PatchV1CompaniesCompanyIdRequestDesiredCurrency", + "traits": { + "smithy.api#documentation": "Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country.\n\nThis field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it.\n" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it.\n" + } + }, + "phone_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A phone number the company can be contacted with." + } + }, + "registration_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company registration number. This field or tax_number (but not both) should be submitted.\n\nThis field is only accepted if company is in status `pending`.\n" + } + }, + "tax_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": " The tax identifier of the company. This field or registration_number (but not both) should be submitted.\n\n This field is only accepted if company is in status `pending`.\n" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1CompaniesCompanyId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1CompaniesCompanyIdRequest" + }, + "output": { + "target": "com.remote.api#CompanyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/companies/{company_id}", + "code": 200 + }, + "smithy.api#documentation": "Update a company\n\nGiven an ID and a request object with new information, updates a company.\n\n### Getting a company and its owner to `active` status\nIf you created a company using the\n[create a company endpoint](#tag/Companies/operation/post_create_company) without all the required\nrequest body parameters, you can use this endpoint to provide the missing data. Once the company\nand its owner have all the necessary data, both their statuses will be set to `active` and the company\nonboarding will be marked as \"completed\".\n\nThe following constitutes a company with \"all the necessary data\":\n* Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the\n[show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters\nare required).\n* Company `tax_number` or `registration_number` is not nil\n* Company `name` is not nil (already required when creating the company)\n* Company has a `desired_currency` in their bank account (already required when creating the company)\n* Company has accepted terms of service (already required when creating the company)\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CompaniesCompanyId2RequestDesiredCurrency": { + "type": "enum", + "members": { + "AUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUD" + } + }, + "CAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAD" + } + }, + "CHF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHF" + } + }, + "DKK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DKK" + } + }, + "EUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EUR" + } + }, + "GBP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GBP" + } + }, + "JPY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JPY" + } + }, + "NOK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOK" + } + }, + "NZD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NZD" + } + }, + "SEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEK" + } + }, + "SGD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SGD" + } + }, + "USD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USD" + } + } + }, + "traits": { + "smithy.api#documentation": "Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country.\n\nThis field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it.\n" + } + }, + "com.remote.api#PatchV1CompaniesCompanyId2Request": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID\n" + } + }, + "address_details_json_schema_version": { + "target": "com.remote.api#PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `address_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).\nUse the desired country and `bank_account_details` as the form name for the placeholders.\nThe response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification.\n" + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Country of company address" + } + }, + "desired_currency": { + "target": "com.remote.api#PatchV1CompaniesCompanyId2RequestDesiredCurrency", + "traits": { + "smithy.api#documentation": "Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country.\n\nThis field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it.\n" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it.\n" + } + }, + "phone_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A phone number the company can be contacted with." + } + }, + "registration_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company registration number. This field or tax_number (but not both) should be submitted.\n\nThis field is only accepted if company is in status `pending`.\n" + } + }, + "tax_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": " The tax identifier of the company. This field or registration_number (but not both) should be submitted.\n\n This field is only accepted if company is in status `pending`.\n" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1CompaniesCompanyId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1CompaniesCompanyId2Request" + }, + "output": { + "target": "com.remote.api#CompanyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/companies/{company_id}", + "code": 200 + }, + "smithy.api#documentation": "Update a company\n\nGiven an ID and a request object with new information, updates a company.\n\n### Getting a company and its owner to `active` status\nIf you created a company using the\n[create a company endpoint](#tag/Companies/operation/post_create_company) without all the required\nrequest body parameters, you can use this endpoint to provide the missing data. Once the company\nand its owner have all the necessary data, both their statuses will be set to `active` and the company\nonboarding will be marked as \"completed\".\n\nThe following constitutes a company with \"all the necessary data\":\n* Complete `address`, with valid `address`, `postal_code`, `country` and `state` parameters (Varies by country. Use the\n[show form schema endpoint](#tag/Countries/operation/get_show_form_country) to see which address parameters\nare required).\n* Company `tax_number` or `registration_number` is not nil\n* Company `name` is not nil (already required when creating the company)\n* Company has a `desired_currency` in their bank account (already required when creating the company)\n* Company has accepted terms of service (already required when creating the company)\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdActionsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyActionsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyActionsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Lists a company's pending actions" + } + }, + "com.remote.api#CompanyAction": { + "type": "structure", + "members": { + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The legal entity that needs Remote Payments setup. Present only for setup_remote_payments actions.", + "com.distilled.openapi#nullable": {} + } + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the action must be completed.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#CompanyActionType", + "traits": { + "smithy.api#documentation": "The action the company still needs to complete.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A pending company-level action (e.g. for Contractor Management Review-step banners)." + } + }, + "com.remote.api#CompanyActionType": { + "type": "enum", + "members": { + "VERIFY_COMPANY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "verify_company" + } + }, + "SETUP_REMOTE_PAYMENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "setup_remote_payments" + } + } + }, + "traits": { + "smithy.api#documentation": "The action the company still needs to complete." + } + }, + "com.remote.api#CompanyActionsResponseDataActionsList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyAction" + }, + "traits": {} + }, + "com.remote.api#CompanyActionsResponseData": { + "type": "structure", + "members": { + "actions": { + "target": "com.remote.api#CompanyActionsResponseDataActionsList" + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdActions": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdActionsRequest" + }, + "output": { + "target": "com.remote.api#CompanyActionsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/actions", + "code": 200 + }, + "smithy.api#documentation": "List a company's pending actions\n\nGiven a company ID, returns the company-level actions still pending for the company — for\nexample company verification and Remote Payments setup. The list can be empty or contain one\nor more actions; `setup_remote_payments` is returned once per legal entity that needs it.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdComplianceProfileRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyComplianceProfileResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyComplianceProfileResponseData" + } + }, + "traits": {} + }, + "com.remote.api#CompanyComplianceProfile": { + "type": "structure", + "members": { + "credit_risk_status": { + "target": "com.remote.api#CompanyComplianceProfileCreditRiskStatus", + "traits": { + "smithy.api#documentation": "Credit risk status of the LegalEntity", + "smithy.api#required": {} + } + }, + "kyb_status": { + "target": "com.remote.api#CompanyComplianceProfileKybStatus", + "traits": { + "smithy.api#documentation": "Status of the LegalEntity's internal KYB/BOC process", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyComplianceProfileCreditRiskStatus": { + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_started" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ready" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referred" + } + }, + "FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fail" + } + }, + "DEPOSIT_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deposit_required" + } + }, + "NO_DEPOSIT_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no_deposit_required" + } + } + }, + "traits": { + "smithy.api#documentation": "Credit risk status of the LegalEntity" + } + }, + "com.remote.api#CompanyComplianceProfileKybStatus": { + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_started" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ready" + } + }, + "REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referred" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "PASS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pass" + } + }, + "FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fail" + } + }, + "UNRESPONSIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unresponsive" + } + } + }, + "traits": { + "smithy.api#documentation": "Status of the LegalEntity's internal KYB/BOC process" + } + }, + "com.remote.api#CompanyComplianceProfileResponseData": { + "type": "structure", + "members": { + "compliance_profile": { + "target": "com.remote.api#CompanyComplianceProfile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdComplianceProfile": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdComplianceProfileRequest" + }, + "output": { + "target": "com.remote.api#CompanyComplianceProfileResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/compliance-profile", + "code": 200 + }, + "smithy.api#documentation": "Get Company Compliance Profile\n\nReturns the KYB and credit risk status for the company's default legal entity.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1CompaniesCompanyIdCreateTokenRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The ID of the company" + } + }, + "scope": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "scope", + "smithy.api#documentation": "The scope of the token" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyTokenResponse": { + "type": "structure", + "members": { + "access_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The OAuth2 access token (JWT). Include this in the `Authorization: Bearer ` header for API requests.", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "expires_in": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of seconds until the access token expires.", + "smithy.api#required": {} + } + }, + "refresh_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refresh token used to obtain a new access token when the current one expires.", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#PostV1CompaniesCompanyIdCreateToken": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CompaniesCompanyIdCreateTokenRequest" + }, + "output": { + "target": "com.remote.api#CompanyTokenResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/companies/{company_id}/create-token", + "code": 200 + }, + "smithy.api#documentation": "Create a new token for a company\n\nCreates new tokens for a given company" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#OnboardingReservesStatusResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#OnboardingReservesStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#OnboardingReservesStatus": { + "type": "structure", + "members": { + "policies": { + "target": "com.remote.api#OnboardingReservesStatusPoliciesList", + "traits": { + "smithy.api#documentation": "List of applicable onboarding reserves policies", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#OnboardingReservesStatusStatus", + "traits": { + "smithy.api#documentation": "Onboarding reserves status (same as credit risk status but takes onboarding reserves policies into account)", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#OnboardingReservesStatusPoliciesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "List of applicable onboarding reserves policies" + } + }, + "com.remote.api#OnboardingReservesStatusStatus": { + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_started" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ready" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referred" + } + }, + "FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fail" + } + }, + "DEPOSIT_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deposit_required" + } + }, + "NO_DEPOSIT_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no_deposit_required" + } + } + }, + "traits": { + "smithy.api#documentation": "Onboarding reserves status (same as credit risk status but takes onboarding reserves policies into account)" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest" + }, + "output": { + "target": "com.remote.api#OnboardingReservesStatusResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status", + "code": 200 + }, + "smithy.api#documentation": "Get Onboarding Reserves Status for Employment\n\nReturns the onboarding reserves status for a specific employment.\n\nThe status is the same as the credit risk status but takes the onboarding reserves policies into account.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListCompanyLegalEntitiesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListCompanyLegalEntitiesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many legal_entities" + } + }, + "com.remote.api#CompanyLegalEntity": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 3166-1 alpha-3 country code (e.g., 'USA', 'GBR', 'DEU')", + "com.distilled.openapi#nullable": {} + } + }, + "global_payroll_enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether Global Payroll services are enabled for this legal entity.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Company slug", + "smithy.api#required": {} + } + }, + "is_default": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates if this is the default legal entity for the company" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The registered name of the legal entity.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ListCompanyLegalEntitiesResponseDataLegalEntitiesList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyLegalEntity" + }, + "traits": {} + }, + "com.remote.api#ListCompanyLegalEntitiesResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "legal_entities": { + "target": "com.remote.api#ListCompanyLegalEntitiesResponseDataLegalEntitiesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntities": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesRequest" + }, + "output": { + "target": "com.remote.api#ListCompanyLegalEntitiesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/legal-entities", + "code": 200 + }, + "smithy.api#documentation": "List Company Legal Entities\n\nLists all active legal entities for the authorized company specified in the request.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal entity ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest" + }, + "output": { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details", + "code": 200 + }, + "smithy.api#documentation": "Show Legal Entity Administrative details\n\nShow administrative details of legal entity for the authorized company specified in the request.\n\n\n## Scopes" + } + }, + "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequestProductType": { + "type": "enum", + "members": { + "PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "peo" + } + }, + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + }, + "E2E_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "e2e_payroll" + } + } + }, + "traits": {} + }, + "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal entity ID" + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. As its properties may vary depending on the country,\nyou must query the `Show legal entity administrative details form schema` endpoint\npassing the country code and `administrative_details` as path parameters.\n", + "smithy.api#required": {} + } + }, + "product_type": { + "target": "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequestProductType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest" + }, + "output": { + "target": "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details", + "code": 200 + }, + "smithy.api#documentation": "Update Legal Entity Administrative details\n\nUpdate administrative details of legal entity for the authorized company specified in the request.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal entity ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorEligibilityResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorEligibilityResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsCorList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsPlusList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsStandardList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons": { + "type": "structure", + "members": { + "cor": { + "target": "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsCorList", + "traits": { + "smithy.api#required": {} + } + }, + "plus": { + "target": "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsPlusList", + "traits": { + "smithy.api#required": {} + } + }, + "standard": { + "target": "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsStandardList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Per-product lists of reasons why the legal entity is ineligible. Empty list means eligible." + } + }, + "com.remote.api#ContractorEligibilityResponseDataContractorEligibility": { + "type": "structure", + "members": { + "cor": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "ineligibility_reasons": { + "target": "com.remote.api#ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons", + "traits": { + "smithy.api#documentation": "Per-product lists of reasons why the legal entity is ineligible. Empty list means eligible.", + "smithy.api#required": {} + } + }, + "plus": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "standard": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Which contractor products the legal entity can use (standard, plus, cor)." + } + }, + "com.remote.api#ContractorEligibilityResponseDataCorSupportedCountryCodesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "ISO 3166-1 alpha-3 country codes where COR is supported for this legal entity. Empty when not COR-eligible." + } + }, + "com.remote.api#ContractorEligibilityResponseData": { + "type": "structure", + "members": { + "contractor_eligibility": { + "target": "com.remote.api#ContractorEligibilityResponseDataContractorEligibility", + "traits": { + "smithy.api#documentation": "Which contractor products the legal entity can use (standard, plus, cor).", + "smithy.api#required": {} + } + }, + "cor_supported_country_codes": { + "target": "com.remote.api#ContractorEligibilityResponseDataCorSupportedCountryCodesList", + "traits": { + "smithy.api#documentation": "ISO 3166-1 alpha-3 country codes where COR is supported for this legal entity. Empty when not COR-eligible.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest" + }, + "output": { + "target": "com.remote.api#ContractorEligibilityResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility", + "code": 200 + }, + "smithy.api#documentation": "Show contractor eligibility and COR-supported countries for legal entity\n\nReturns which contractor products (standard, plus, cor) the legal entity is eligible to use,\nand the list of country codes where COR is supported for this legal entity.\nCOR-supported countries exclude sanctioned and signup-prevented countries and apply entity rules (same-country, local-to-local).\nWhen the legal entity is not COR-eligible, `cor_supported_country_codes` is an empty list.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal entity ID" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListPayCodesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListPayCodesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many pay_codes" + } + }, + "com.remote.api#PayCode": { + "type": "structure", + "members": { + "category": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Pay element category (e.g. time_and_attendance, bonus)", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Code to use in the `code` field of POST /v1/pay-items/bulk", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Description of the pay code", + "com.distilled.openapi#nullable": {} + } + }, + "external_import_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Customer-specific code used for bulk import mapping", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable name of the pay code", + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for this pay code", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "How the `amount` field on POST /v1/pay-items/bulk must be encoded for this pay code:\n`amount` in cents, `percentage` in basis points, `unit` as a raw count, `hours` as a whole number of hours, `duration` in seconds.\n", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ListPayCodesResponseDataPayCodesList": { + "type": "list", + "member": { + "target": "com.remote.api#PayCode" + }, + "traits": {} + }, + "com.remote.api#ListPayCodesResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "pay_codes": { + "target": "com.remote.api#ListPayCodesResponseDataPayCodesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodes": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest" + }, + "output": { + "target": "com.remote.api#ListPayCodesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/pay-codes", + "code": 200 + }, + "smithy.api#documentation": "List Pay Codes\n\nLists pay codes available for a legal entity.\nPay codes represent the allowed pay element types that can be submitted via `POST /v1/pay-items/bulk`.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdPricingPlansRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListCompanyPricingPlansResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListCompanyPricingPlansResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Company pricing plans" + } + }, + "com.remote.api#PricingPlan": { + "type": "structure", + "members": { + "base_price": { + "target": "com.remote.api#Price", + "traits": { + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the pricing plan.", + "smithy.api#required": {} + } + }, + "price": { + "target": "com.remote.api#Price", + "traits": { + "smithy.api#required": {} + } + }, + "product": { + "target": "com.remote.api#Product", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The pricing plan type (e.g., \"termed\" for fixed-term, \"evergreen\" for ongoing).", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A pricing plan assigned to a company, defining the product, billing frequency, and cost." + } + }, + "com.remote.api#Price": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents", + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A monetary amount with its currency, used for pricing plan costs." + } + }, + "com.remote.api#CurrencyDefinition": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "symbol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Currency object without a UUID identifier" + } + }, + "com.remote.api#Product": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the product." + } + }, + "features": { + "target": "com.remote.api#ProductFeaturesList", + "traits": { + "smithy.api#documentation": "Features included in this product tier." + } + }, + "frequency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The billing frequency (e.g., \"monthly\", \"annually\").", + "smithy.api#required": {} + } + }, + "identifier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique machine-readable identifier for this product." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The full product name (e.g., \"EOR Monthly\").", + "smithy.api#required": {} + } + }, + "short_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A short display name for the product (e.g., \"EOR\")." + } + }, + "tier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The product tier (e.g., \"standard\", \"premium\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A Remote product offering (e.g., EOR, Contractor Management) with its tier and billing frequency." + } + }, + "com.remote.api#ProductFeaturesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Features included in this product tier." + } + }, + "com.remote.api#ListCompanyPricingPlansResponseDataPricingPlansList": { + "type": "list", + "member": { + "target": "com.remote.api#PricingPlan" + }, + "traits": {} + }, + "com.remote.api#ListCompanyPricingPlansResponseData": { + "type": "structure", + "members": { + "pricing_plans": { + "target": "com.remote.api#ListCompanyPricingPlansResponseDataPricingPlansList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdPricingPlans": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdPricingPlansRequest" + }, + "output": { + "target": "com.remote.api#ListCompanyPricingPlansResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/pricing-plans", + "code": 200 + }, + "smithy.api#documentation": "List pricing plans\n\nList all pricing plans for a company.\nCurrently the endpoint only returns the pricing plans for the EOR monthly product and the contractor products (Standard, Plus and COR).\n\n\n## Scopes" + } + }, + "com.remote.api#CreatePricingPlanParams": { + "type": "union", + "members": { + "CreatePricingPlanWithoutPartnerTemplateParams": { + "target": "com.remote.api#CreatePricingPlanWithoutPartnerTemplateParams" + }, + "CreatePricingPlanWithPartnerTemplateParams": { + "target": "com.remote.api#CreatePricingPlanWithPartnerTemplateParams" + } + }, + "traits": { + "smithy.api#documentation": "Parameters for creating a pricing plan" + } + }, + "com.remote.api#CreatePricingPlanWithoutPartnerTemplateParams": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount in cents", + "smithy.api#required": {} + } + }, + "currency_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code", + "smithy.api#required": {} + } + }, + "product_price_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The product price ID", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Parameters for creating a pricing plan without a partner template" + } + }, + "com.remote.api#CreatePricingPlanWithPartnerTemplateParams": { + "type": "structure", + "members": { + "pricing_plan_partner_template_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The pricing plan partner template ID", + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The start date of the pricing plan" + } + } + }, + "traits": { + "smithy.api#documentation": "Parameters for creating a pricing plan with a partner template" + } + }, + "com.remote.api#PostV1CompaniesCompanyIdPricingPlansRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "body": { + "target": "com.remote.api#CreatePricingPlanParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CreatePricingPlanResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CreatePricingPlanResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response for creating a pricing plan" + } + }, + "com.remote.api#CreatePricingPlanResponseData": { + "type": "structure", + "members": { + "pricing_plan": { + "target": "com.remote.api#PricingPlan", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CompaniesCompanyIdPricingPlans": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CompaniesCompanyIdPricingPlansRequest" + }, + "output": { + "target": "com.remote.api#CreatePricingPlanResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/companies/{company_id}/pricing-plans", + "code": 200 + }, + "smithy.api#documentation": "Create a pricing plan for a company\n\nCreate a pricing plan for a company, in order to do that we have 2 ways:\n\n1. Create a pricing plan from a partner template\n2. Create a pricing plan from a product price\n\nThe pricing plan is always created in the company's desired currency.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdProductPricesRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListProductPricesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListProductPricesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ProductPrice": { + "type": "structure", + "members": { + "base_price": { + "target": "com.remote.api#Price", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The product price id", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The product price name", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ListProductPricesResponseDataProductPricesList": { + "type": "list", + "member": { + "target": "com.remote.api#ProductPrice" + }, + "traits": {} + }, + "com.remote.api#ListProductPricesResponseData": { + "type": "structure", + "members": { + "product_prices": { + "target": "com.remote.api#ListProductPricesResponseDataProductPricesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdProductPrices": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdProductPricesRequest" + }, + "output": { + "target": "com.remote.api#ListProductPricesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/product-prices", + "code": 200 + }, + "smithy.api#documentation": "Show product prices in the company's desired currency\n\nlist product prices in the company's desired currency.\nthe endpoint currently only returns the product prices for the EOR monthly product and the contractor products (Standard, Plus and COR).\nthe product prices are then used to create a pricing plan for the company.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompaniesCompanyIdWebhookCallbacksRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListWebhookCallbacksResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListWebhookCallbacksResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#WebhookCallback": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the webhook callback.", + "smithy.api#required": {} + } + }, + "signing_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This key will be used to sign the signature provided with webhook requests we\nsend to the `url` you provided for this webhook callback.\n\nThe webhook signature will be included in a custom header, `X-Remote-Signature`.\nYou can use this signature to verify that requests are coming from Remote and\nnot some unauthorized third-party.\n" + } + }, + "subscribe_to_all_events": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, this callback is subscribed to all current and future event types. `subscribed_events` then lists every currently supported event." + } + }, + "subscribed_events": { + "target": "com.remote.api#WebhookCallbackSubscribedEventsList" + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The HTTPS URL where Remote will send webhook event payloads.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A registered webhook callback endpoint. Remote sends HTTP POST requests to the configured URL when subscribed events occur." + } + }, + "com.remote.api#WebhookCallbackSubscribedEventsItem": { + "type": "enum", + "members": { + "BACKGROUND_CHECK_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "background_check.status.updated" + } + }, + "BENEFIT_RENEWAL_REQUEST_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "benefit_renewal_request.created" + } + }, + "BILLING_DOCUMENT_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "billing_document.issued" + } + }, + "COMPANY_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.activated" + } + }, + "COMPANY_MANAGER_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_created" + } + }, + "COMPANY_MANAGER_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_deleted" + } + }, + "COMPANY_MANAGER_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_updated" + } + }, + "COMPANY_OWNER_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.owner_changed" + } + }, + "COMPANY_ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.archived" + } + }, + "COMPANY_EOR_HIRING_ADDITIONAL_INFORMATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.additional_information_required" + } + }, + "COMPANY_EOR_HIRING_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_NO_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.no_reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.referred" + } + }, + "COMPANY_EOR_HIRING_VERIFICATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.verification_completed" + } + }, + "COMPANY_PARTNER_OFFBOARDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.partner_offboarded" + } + }, + "COMPANY_PRICING_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.pricing_plan.updated" + } + }, + "CONTRACT_AMENDMENT_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.canceled" + } + }, + "CONTRACT_AMENDMENT_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.deleted" + } + }, + "CONTRACT_AMENDMENT_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.done" + } + }, + "CONTRACT_AMENDMENT_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.review_started" + } + }, + "CONTRACT_AMENDMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.submitted" + } + }, + "CONTRACT_TERMINATION_DATE_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract.termination_date_reached" + } + }, + "CONTRACT_DOCUMENT_STATUS_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_document.status.changed" + } + }, + "CONTRACTOR_INVOICE_EMPLOYER_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.employer_paid" + } + }, + "CONTRACTOR_INVOICE_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.issued" + } + }, + "CONTRACTOR_INVOICE_PAID_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.paid_out" + } + }, + "CONTRACTOR_INVOICE_PAYMENT_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.payment_initiated" + } + }, + "CUSTOM_FIELD_VALUE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_field.value_updated" + } + }, + "EMPLOYMENT_BENEFITS_SELECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.benefits.selected" + } + }, + "EMPLOYMENT_COMPANY_STRUCTURE_NODE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_company_structure_node.updated" + } + }, + "EMPLOYMENT_CONTRACT_ACTIVE_CONTRACT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.active_contract_updated" + } + }, + "EMPLOYMENT_CONTRACT_ADJUSTED_DURING_ONBOARDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.adjusted_during_onboarding" + } + }, + "EMPLOYMENT_ACCOUNT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.account.updated" + } + }, + "EMPLOYMENT_ADMINISTRATIVE_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.administrative_details.updated" + } + }, + "EMPLOYMENT_BASIC_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_basic_information.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_MANAGEMENT_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_management_plan.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.cancelled" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.executed" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.initiated" + } + }, + "EMPLOYMENT_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.details.updated" + } + }, + "EMPLOYMENT_EMPLOYMENT_AGREEMENT_AVAILABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.employment_agreement.available" + } + }, + "EMPLOYMENT_COR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.invoice_created" + } + }, + "EMPLOYMENT_EOR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.invoice_created" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_NO_LONGER_ELIGIBLE_FOR_ONBOARDING_CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.no_longer_eligible_for_onboarding_cancellation" + } + }, + "EMPLOYMENT_ONBOARDING_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding_task.completed" + } + }, + "EMPLOYMENT_ONBOARDING_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.cancelled" + } + }, + "EMPLOYMENT_ONBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.completed" + } + }, + "EMPLOYMENT_ONBOARDING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.started" + } + }, + "EMPLOYMENT_PERSONAL_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.personal_information.updated" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.cancelled" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.completed" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.submitted" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_ENDING_REMINDER_SENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation.period_ending_reminder_sent" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.cancelled" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.completed" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.submitted" + } + }, + "EMPLOYMENT_START_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.start_date.changed" + } + }, + "EMPLOYMENT_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.status.updated" + } + }, + "EMPLOYMENT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.updated" + } + }, + "EMPLOYMENT_USER_STATUS_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.activated" + } + }, + "EMPLOYMENT_USER_STATUS_DEACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.deactivated" + } + }, + "EMPLOYMENT_USER_STATUS_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.initiated" + } + }, + "EMPLOYMENT_USER_STATUS_INVITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.invited" + } + }, + "EMPLOYMENT_WORK_EMAIL_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.work_email.updated" + } + }, + "EXPENSE_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.approved" + } + }, + "EXPENSE_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.declined" + } + }, + "EXPENSE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.deleted" + } + }, + "EXPENSE_REIMBURSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.reimbursed" + } + }, + "EXPENSE_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.submitted" + } + }, + "EXPENSE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.updated" + } + }, + "IDENTITY_VERIFICATION_VERIFICATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "identity_verification.verification_required" + } + }, + "INCENTIVE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.created" + } + }, + "INCENTIVE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.deleted" + } + }, + "INCENTIVE_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.paid" + } + }, + "INCENTIVE_PROCESSING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.processing_started" + } + }, + "INCENTIVE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.updated" + } + }, + "OFFBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.completed" + } + }, + "OFFBOARDING_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.deleted" + } + }, + "OFFBOARDING_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.done" + } + }, + "OFFBOARDING_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.review_started" + } + }, + "OFFBOARDING_SUBMITTED_TO_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted_to_payroll" + } + }, + "OFFBOARDING_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted" + } + }, + "PAYSLIP_RELEASED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payslip.released" + } + }, + "SSO_CONFIGURATION_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.disabled" + } + }, + "SSO_CONFIGURATION_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.enabled" + } + }, + "SSO_CONFIGURATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.updated" + } + }, + "TIMEOFF_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.approved" + } + }, + "TIMEOFF_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.canceled" + } + }, + "TIMEOFF_CANCELLATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.cancellation_requested" + } + }, + "TIMEOFF_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.date_changed" + } + }, + "TIMEOFF_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.declined" + } + }, + "TIMEOFF_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.requested" + } + }, + "TIMEOFF_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.started" + } + }, + "TIMEOFF_TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.taken" + } + }, + "TIMEOFF_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.updated" + } + }, + "TIMESHEET_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.submitted" + } + }, + "TIMESHEET_IN_CALIBRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.in_calibration" + } + }, + "TRAVEL_LETTER_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_manager" + } + }, + "TRAVEL_LETTER_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_remote" + } + }, + "TRAVEL_LETTER_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_manager" + } + }, + "TRAVEL_LETTER_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_remote" + } + }, + "TRAVEL_LETTER_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.requested" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_manager" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_remote" + } + }, + "WORK_AUTHORIZATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.cancelled" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_manager" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_remote" + } + }, + "WORK_AUTHORIZATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.requested" + } + } + }, + "traits": { + "smithy.api#documentation": "The setting to be enabled." + } + }, + "com.remote.api#WebhookCallbackSubscribedEventsList": { + "type": "list", + "member": { + "target": "com.remote.api#WebhookCallbackSubscribedEventsItem" + }, + "traits": {} + }, + "com.remote.api#ListWebhookCallbacksResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#WebhookCallback" + }, + "traits": {} + }, + "com.remote.api#GetV1CompaniesCompanyIdWebhookCallbacks": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompaniesCompanyIdWebhookCallbacksRequest" + }, + "output": { + "target": "com.remote.api#ListWebhookCallbacksResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/companies/{company_id}/webhook-callbacks", + "code": 200 + }, + "smithy.api#documentation": "List Webhook Callbacks\n\nList callbacks for a given company\n\n## Scopes" + } + }, + "com.remote.api#CompanyCurrenciesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyCurrenciesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Company currencies" + } + }, + "com.remote.api#CompanyCurrency": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code (e.g., \"USD\", \"EUR\").", + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A URL-friendly identifier for the currency (e.g., \"usd\", \"eur\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A currency available for use by a company on the Remote platform." + } + }, + "com.remote.api#CompanyCurrenciesResponseDataCompanyCurrenciesList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyCurrency" + }, + "traits": {} + }, + "com.remote.api#CompanyCurrenciesResponseData": { + "type": "structure", + "members": { + "company_currencies": { + "target": "com.remote.api#CompanyCurrenciesResponseDataCompanyCurrenciesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompanyCurrencies": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#CompanyCurrenciesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/company-currencies", + "code": 200 + }, + "smithy.api#documentation": "List company supported currencies\n\nList company supported currencies\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompanyDepartmentsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "company_id", + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "paginate": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "paginate", + "smithy.api#documentation": "Paginate option. Default: true. When true, paginates response; otherwise, does not." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListCompanyDepartmentsPaginatedResponse": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "data": { + "target": "com.remote.api#ListCompanyDepartmentsPaginatedResponseData", + "traits": { + "smithy.api#required": {} + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyDepartment": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company this department belongs to.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the department.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the department (e.g., \"Marketing\", \"Engineering\").", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ListCompanyDepartmentsPaginatedResponseDataCompanyDepartmentsList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyDepartment" + }, + "traits": {} + }, + "com.remote.api#ListCompanyDepartmentsPaginatedResponseData": { + "type": "structure", + "members": { + "company_departments": { + "target": "com.remote.api#ListCompanyDepartmentsPaginatedResponseDataCompanyDepartmentsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompanyDepartments": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompanyDepartmentsRequest" + }, + "output": { + "target": "com.remote.api#ListCompanyDepartmentsPaginatedResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/company-departments", + "code": 200 + }, + "smithy.api#documentation": "List Company Departments\n\nLists all departments for the authorized company specified in the request.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1CompanyDepartmentsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Company ID. Required in all cases, whether the API credentials have access to multiple companies or just one.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the company department. May be non-unique and limited to 255 characters, maximum.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyDepartmentCreatedResponse": { + "type": "structure", + "members": { + "company_department": { + "target": "com.remote.api#CompanyDepartment" + } + }, + "traits": {} + }, + "com.remote.api#PostV1CompanyDepartments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CompanyDepartmentsRequest" + }, + "output": { + "target": "com.remote.api#CompanyDepartmentCreatedResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/company-departments", + "code": 200 + }, + "smithy.api#documentation": "Create New Department\n\nCreates 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).\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompanyManagersRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "company_id", + "smithy.api#documentation": "A Company ID to filter the results (only applicable for Integration Partners)." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyManagersResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyManagersResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many company_managers" + } + }, + "com.remote.api#CompanyManager": { + "type": "structure", + "members": { + "billing_contacts": { + "target": "com.remote.api#CompanyManagerBillingContactsList", + "traits": { + "smithy.api#documentation": "The legal entities this manager is a billing contact for.", + "smithy.api#required": {} + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Company ID", + "smithy.api#required": {} + } + }, + "role": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Company Manager role.", + "smithy.api#required": {} + } + }, + "user_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User Email", + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User ID", + "smithy.api#required": {} + } + }, + "user_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User's name", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyManagerBillingContactStatus": { + "type": "structure", + "members": { + "is_pending_primary_billing_contact": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this manager will become the primary billing contact once they have an active login", + "smithy.api#required": {} + } + }, + "is_primary_billing_contact": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this manager is the primary billing contact for the legal entity", + "smithy.api#required": {} + } + }, + "legal_entity_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Slug of the legal entity", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyManagerBillingContactsList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyManagerBillingContactStatus" + }, + "traits": { + "smithy.api#documentation": "The legal entities this manager is a billing contact for." + } + }, + "com.remote.api#CompanyManagersResponseDataCompanyManagersList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyManager" + }, + "traits": {} + }, + "com.remote.api#CompanyManagersResponseData": { + "type": "structure", + "members": { + "company_managers": { + "target": "com.remote.api#CompanyManagersResponseDataCompanyManagersList" + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompanyManagers": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompanyManagersRequest" + }, + "output": { + "target": "com.remote.api#CompanyManagersResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/company-managers", + "code": 200 + }, + "smithy.api#documentation": "List Company Managers\n\nList all company managers of an integration. If filtered by the company_id param,\nit lists only company managers belonging to the specified company.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1CompanyManagersRequest": { + "type": "structure", + "members": { + "actions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "actions", + "smithy.api#documentation": "Complementary action(s) to perform when creating a company manager:\n\n- `no_invite` skips the email invitation step\n" + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Company ID. Required if the access token can access multiple companies. Optional otherwise." + } + }, + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The work email of the company manager", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the company manager", + "smithy.api#required": {} + } + }, + "role": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The role assigned for the new manager. The value should be one of the following:\n\n- `admin`: an Admin can manage most of the resources in remote.\n- `onboarding_manager`: an Onboarding Manager can add, see and manage new hires.\n- `people_manager`: a People Manager can view employee profiles of the team members they manage and approve and decline time off and expenses for their employees.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyManagerData": { + "type": "structure", + "members": { + "company_manager": { + "target": "com.remote.api#CompanyManager", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CompanyManagers": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CompanyManagersRequest" + }, + "output": { + "target": "com.remote.api#CompanyManagerData" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/company-managers", + "code": 200 + }, + "smithy.api#documentation": "Create and invite a Company Manager\n\nCreate a Company Manager and sends the invitation email for signing in to the Remote Platform.\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompanyManagersUserIdRequest": { + "type": "structure", + "members": { + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "User ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyManagerResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyManagerData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompanyManagersUserId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompanyManagersUserIdRequest" + }, + "output": { + "target": "com.remote.api#CompanyManagerResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/company-managers/{user_id}", + "code": 200 + }, + "smithy.api#documentation": "Show company manager user\n\nShows a single company manager user\n\n## Scopes" + } + }, + "com.remote.api#CompanyManagerBillingContact": { + "type": "structure", + "members": { + "is_primary_billing_contact": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this manager is the primary billing contact for the legal entity", + "smithy.api#required": {} + } + }, + "legal_entity_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Slug of the legal entity", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CompanyManagersUserIdRequestBillingContactForList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyManagerBillingContact" + }, + "traits": { + "smithy.api#documentation": "The legal entities to assign or unassign this manager as billing contact for." + } + }, + "com.remote.api#PatchV1CompanyManagersUserIdRequest": { + "type": "structure", + "members": { + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "User ID" + } + }, + "billing_contact_for": { + "target": "com.remote.api#PatchV1CompanyManagersUserIdRequestBillingContactForList", + "traits": { + "smithy.api#documentation": "The legal entities to assign or unassign this manager as billing contact for.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1CompanyManagersUserId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1CompanyManagersUserIdRequest" + }, + "output": { + "target": "com.remote.api#CompanyManagerResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/company-managers/{user_id}", + "code": 200 + }, + "smithy.api#documentation": "Update a Company Manager's billing contact assignment\n\nAssigns or unassigns a Company Manager as the billing contact (primary or additional)\nfor one or more legal entities.\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1CompanyManagersUserId2RequestBillingContactForList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyManagerBillingContact" + }, + "traits": { + "smithy.api#documentation": "The legal entities to assign or unassign this manager as billing contact for." + } + }, + "com.remote.api#PatchV1CompanyManagersUserId2Request": { + "type": "structure", + "members": { + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "User ID" + } + }, + "billing_contact_for": { + "target": "com.remote.api#PatchV1CompanyManagersUserId2RequestBillingContactForList", + "traits": { + "smithy.api#documentation": "The legal entities to assign or unassign this manager as billing contact for.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1CompanyManagersUserId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1CompanyManagersUserId2Request" + }, + "output": { + "target": "com.remote.api#CompanyManagerResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/company-managers/{user_id}", + "code": 200 + }, + "smithy.api#documentation": "Update a Company Manager's billing contact assignment\n\nAssigns or unassigns a Company Manager as the billing contact (primary or additional)\nfor one or more legal entities.\n\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1CompanyManagersUserIdRequest": { + "type": "structure", + "members": { + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "User ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1CompanyManagersUserId": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1CompanyManagersUserIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/company-managers/{user_id}", + "code": 200 + }, + "smithy.api#documentation": "Deletes a Company Manager user\n\nDeletes a Company Manager user\n\n## Scopes" + } + }, + "com.remote.api#GetV1CompanyCompanyIdCostCenterAllocationsRequestStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scheduled" + } + }, + "EXPIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expired" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompanyCompanyIdCostCenterAllocationsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "status": { + "target": "com.remote.api#GetV1CompanyCompanyIdCostCenterAllocationsRequestStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filters allocations by status. When omitted, allocations of every status are returned." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListCompanyCostCenterAllocationsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListCompanyCostCenterAllocationsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many employments" + } + }, + "com.remote.api#EmploymentWithCostCenterAllocations": { + "type": "structure", + "members": { + "bill_to_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the legal entity this employment is billed to.", + "com.distilled.openapi#nullable": {} + } + }, + "cost_center_allocations": { + "target": "com.remote.api#EmploymentWithCostCenterAllocationsCostCenterAllocationsList", + "traits": { + "smithy.api#documentation": "The cost center allocations for this employment.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the employment.", + "smithy.api#required": {} + } + }, + "engaged_by_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the legal entity that employs this employment.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An employment under the company with its cost center allocations." + } + }, + "com.remote.api#CostCenterAllocation": { + "type": "structure", + "members": { + "cost_center": { + "target": "com.remote.api#CostCenter", + "traits": { + "smithy.api#required": {} + } + }, + "effective_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date the allocation becomes effective.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "effective_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date the allocation stops being effective.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the cost center allocation.", + "smithy.api#required": {} + } + }, + "percentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Percentage of the employment's cost allocated to this cost center (0-100).", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#CostCenterAllocationStatus", + "traits": { + "smithy.api#documentation": "Allocation status, derived from the effective period.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A cost center allocation for an employment, including the allocated percentage and effective period." + } + }, + "com.remote.api#CostCenter": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Cost center code. Typically used as the join key to an external general ledger.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Cost center name.", + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the cost center.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The cost center an employment is allocated to." + } + }, + "com.remote.api#CostCenterAllocationStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scheduled" + } + }, + "EXPIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expired" + } + } + }, + "traits": { + "smithy.api#documentation": "Allocation status, derived from the effective period." + } + }, + "com.remote.api#EmploymentWithCostCenterAllocationsCostCenterAllocationsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCenterAllocation" + }, + "traits": { + "smithy.api#documentation": "The cost center allocations for this employment." + } + }, + "com.remote.api#ListCompanyCostCenterAllocationsResponseDataEmploymentsList": { + "type": "list", + "member": { + "target": "com.remote.api#EmploymentWithCostCenterAllocations" + }, + "traits": {} + }, + "com.remote.api#ListCompanyCostCenterAllocationsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "employments": { + "target": "com.remote.api#ListCompanyCostCenterAllocationsResponseDataEmploymentsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CompanyCompanyIdCostCenterAllocations": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CompanyCompanyIdCostCenterAllocationsRequest" + }, + "output": { + "target": "com.remote.api#ListCompanyCostCenterAllocationsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/company/{company_id}/cost-center-allocations", + "code": 200 + }, + "smithy.api#documentation": "List cost center allocations for a company\n\nLists all employments under a company with their cost center allocations, grouped by employment.\nEach entry includes the employment's legal entity IDs and the list of cost center allocations\nassigned to it, with each allocation's cost center, allocated percentage, and effective period.\nEmployments with no cost center allocations are included with an empty list.\n\nUse the `status` query parameter to return only `active`, `scheduled`, or `expired` allocations.\nWhen omitted, all allocations are returned.\n\n\n## Scopes" + } + }, + "com.remote.api#ContractAmendmentStatus": { + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "done" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of a contract amendment request.\n\n- `submitted`: The amendment has been submitted and is awaiting Remote's review.\n- `in_review`: Remote is reviewing the amendment for compliance and feasibility.\n- `done`: The amendment has been approved and applied to the contract.\n- `canceled`: The amendment request was canceled before completion.\n- `deleted`: The amendment request was deleted.\n" + } + }, + "com.remote.api#GetV1ContractAmendmentsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Employment ID" + } + }, + "status": { + "target": "com.remote.api#ContractAmendmentStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Contract Amendment status" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListContractAmendmentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListContractAmendmentResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many contract_amendments" + } + }, + "com.remote.api#MinimalContractAmendment": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the contract amendment.", + "smithy.api#required": {} + } + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The current job title from the employment's contract." + } + }, + "reason_for_change": { + "target": "com.remote.api#MinimalContractAmendmentReasonForChange", + "traits": { + "smithy.api#required": {} + } + }, + "requested_by": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the user who submitted the amendment request.", + "smithy.api#required": {} + } + }, + "requested_effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the amendment changes should take effect.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractAmendmentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the amendment was submitted.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A lightweight contract amendment representation used in list responses." + } + }, + "com.remote.api#MinimalContractAmendmentReasonForChange": { + "type": "enum", + "members": { + "ANNUAL_PAY_ADJUSTMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "annual_pay_adjustment" + } + }, + "COUNTRY_RULE_CHANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "country_rule_change" + } + }, + "ERROR_CORRECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "error_correction" + } + }, + "JOB_CHANGE_REEVALUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "job_change_reevaluation" + } + }, + "PROMOTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "promotion" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + }, + "traits": {} + }, + "com.remote.api#ListContractAmendmentResponseDataContractAmendmentsList": { + "type": "list", + "member": { + "target": "com.remote.api#MinimalContractAmendment" + }, + "traits": {} + }, + "com.remote.api#ListContractAmendmentResponseData": { + "type": "structure", + "members": { + "contract_amendments": { + "target": "com.remote.api#ListContractAmendmentResponseDataContractAmendmentsList" + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractAmendments": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractAmendmentsRequest" + }, + "output": { + "target": "com.remote.api#ListContractAmendmentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contract-amendments", + "code": 200 + }, + "smithy.api#documentation": "List Contract Amendment\n\nList Contract Amendment requests.\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractAmendmentsRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1ContractAmendmentsRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1ContractAmendmentsRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractAmendmentsRequest": { + "type": "structure", + "members": { + "json_schema_version": { + "target": "com.remote.api#PostV1ContractAmendmentsRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + }, + "amendment_contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The contract ID of the contract that needs to be amended.", + "smithy.api#required": {} + } + }, + "contract_amendment": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract amendment informations. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Contract-Amendments/operation/post_show_form_contract_amendment_schema) endpoint\n passing the country code, `contract_amendment` and the employment ID as request body.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employment ID that is related to the contract amendment request.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractAmendmentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractAmendmentResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Contract Amendment response" + } + }, + "com.remote.api#ContractAmendment": { + "type": "structure", + "members": { + "amendment_contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the contract being amended. Null if no specific contract was targeted.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "changes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Describes all the changes requested for the contract and contract details with all their previous and current values.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the contract amendment.", + "smithy.api#required": {} + } + }, + "request_details": { + "target": "com.remote.api#RequestDetails", + "traits": { + "smithy.api#required": {} + } + }, + "requested_by": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the user who submitted the amendment.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractAmendmentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the amendment was submitted.", + "smithy.api#required": {} + } + }, + "zendesk_ticket_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A link to the support ticket associated with this amendment, if one was created. Null otherwise.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A full contract amendment record, including the requested changes with their previous and current values." + } + }, + "com.remote.api#RequestDetails": { + "type": "structure", + "members": { + "additional_comments": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "effective_date": { + "target": "smithy.api#String" + }, + "reason_for_change": { + "target": "com.remote.api#RequestDetailsReasonForChange", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "reason_for_change_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This is filled when the reason_for_change is 'other'.", + "com.distilled.openapi#nullable": {} + } + }, + "salary_decrease_details": { + "target": "com.remote.api#SalaryDecreaseDetails", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The details of the requested changes for the contract amendment." + } + }, + "com.remote.api#RequestDetailsReasonForChange": { + "type": "enum", + "members": { + "ANNUAL_PAY_ADJUSTMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "annual_pay_adjustment" + } + }, + "COUNTRY_RULE_CHANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "country_rule_change" + } + }, + "ERROR_CORRECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "error_correction" + } + }, + "JOB_CHANGE_REEVALUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "job_change_reevaluation" + } + }, + "PROMOTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "promotion" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + }, + "traits": {} + }, + "com.remote.api#SalaryDecreaseDetails": { + "type": "structure", + "members": { + "salary_decrease_reason": { + "target": "com.remote.api#SalaryDecreaseDetailsSalaryDecreaseReason" + }, + "salary_decrease_reason_description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "was_employee_informed": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "The details of the salary decrease request if there is one" + } + }, + "com.remote.api#SalaryDecreaseDetailsSalaryDecreaseReason": { + "type": "enum", + "members": { + "CHANGE_IN_WORKING_HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "change_in_working_hours" + } + }, + "TRADE_SALARY_FOR_EQUITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "trade_salary_for_equity" + } + }, + "ERROR_IN_INITIAL_SALARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "error_in_initial_salary" + } + }, + "ROLE_CHANGE_OR_DEMOTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "role_change_or_demotion" + } + }, + "COMPENSATION_RESTRUCTURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "compensation_restructure" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + }, + "traits": {} + }, + "com.remote.api#ContractAmendmentResponseData": { + "type": "structure", + "members": { + "contract_amendment": { + "target": "com.remote.api#ContractAmendment", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractAmendments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractAmendmentsRequest" + }, + "output": { + "target": "com.remote.api#ContractAmendmentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contract-amendments", + "code": 200 + }, + "smithy.api#documentation": "Create Contract Amendment\n\nCreates a Contract Amendment request.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractAmendmentsAutomatableRequest": { + "type": "structure", + "members": { + "json_schema_version": { + "target": "com.remote.api#PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + }, + "amendment_contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The contract ID of the contract that needs to be amended.", + "smithy.api#required": {} + } + }, + "contract_amendment": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract amendment informations. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Contract-Amendments/operation/post_show_form_contract_amendment_schema) endpoint\n passing the country code, `contract_amendment` and the employment ID as request body.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employment ID that is related to the contract amendment request.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractAmendmentAutomatableResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractAmendmentAutomatableResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Contract Amendment Automatable response" + } + }, + "com.remote.api#ContractAmendmentAutomatableResponseData": { + "type": "structure", + "members": { + "automatable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, it means that the contract amendment request is automatable." + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The message to explain how the contract amendment request will be processed depending if it is automatable or not." + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractAmendmentsAutomatable": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractAmendmentsAutomatableRequest" + }, + "output": { + "target": "com.remote.api#ContractAmendmentAutomatableResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contract-amendments/automatable", + "code": 200 + }, + "smithy.api#documentation": "Automatable Contract Amendment\n\nCheck if a contract amendment request is automatable.\nIf the contract amendment request is automatable, then after submission, it will instantly amend the employee's contract\nand send them an updated document.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractAmendmentsSchemaRequestForm": { + "type": "enum", + "members": { + "CONTRACT_AMENDMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractAmendmentsSchemaRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1ContractAmendmentsSchemaRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1ContractAmendmentsSchemaRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractAmendmentsSchemaRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#required": {}, + "smithy.api#documentation": "The ID of the employment concerned by the contract amendment request." + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "country_code", + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3-digit alphabetic codes." + } + }, + "form": { + "target": "com.remote.api#GetV1ContractAmendmentsSchemaRequestForm", + "traits": { + "smithy.api#httpQuery": "form", + "smithy.api#documentation": "Name of the desired form" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1ContractAmendmentsSchemaRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractAmendmentFormResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#documentation": "Object with required and optional fields, its descriptions and suggested presentation" + } + }, + "com.remote.api#GetV1ContractAmendmentsSchema": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractAmendmentsSchemaRequest" + }, + "output": { + "target": "com.remote.api#ContractAmendmentFormResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contract-amendments/schema", + "code": 200 + }, + "smithy.api#documentation": "Show form schema\n\nReturns the json schema of the `contract_amendment` form for a specific employment.\nThis endpoint requires a company access token, as forms are dependent on certain\nproperties of companies and their current employments.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractAmendmentsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Contract amendment request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ContractAmendmentsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractAmendmentsIdRequest" + }, + "output": { + "target": "com.remote.api#ContractAmendmentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contract-amendments/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Contract Amendment\n\nShow a single Contract Amendment request.\n\n## Scopes" + } + }, + "com.remote.api#ContractorInvoiceScheduleStatusFilter": { + "type": "enum", + "members": { + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "PENDING_COMPANY_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_company_action" + } + }, + "PENDING_CONTRACTOR_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_contractor_action" + } + }, + "GENERATION_FAILED_UNRELATED_TO_WITHDRAWAL_METHOD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "generation_failed_unrelated_to_withdrawal_method" + } + } + }, + "traits": { + "smithy.api#documentation": "Status to filter contractor invoice schedules by.\n\nSkipped schedules (`deleted`) are always excluded from listings, so `deleted` is not a valid filter value here\n— see `ContractorInvoiceScheduleStatus` for the full set of states a schedule can report.\n\n- `active`: Once an invoice is generated, and a withdrawal method has been set, then it's set to active.\n- `processing`: Ephemeral status indicating that we are currently attempting to generate a contractor invoice from the scheduled contractor invoice.\n- `pending_company_action`: Company needs to trigger some actions related to payment configuration.\n- `pending_contractor_action`: When schedule is blocked by contractor onboarding or invoice generation failed due to withdrawal methods issues that needs contractor action.\n- `generation_failed_unrelated_to_withdrawal_method`: Generation failed for any other reason.\n- `completed`: Number of generated contractor invoices has been reached.\n- `inactive`: Does not create any further contractor invoices but it's still possible for the employer to activate it again.\n" + } + }, + "com.remote.api#ContractorInvoiceSchedulePeriodicity": { + "type": "enum", + "members": { + "BI_WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_weekly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + }, + "SEMI_MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "semi_monthly" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines how often contractor invoices will be generated.\n\n- `bi_weekly`: Invoices will be generated every other week, on the given day of the week based on the start date.\n- `monthly`: Invoices will be generated once a month.\n- `semi_monthly`: Invoices will be generated at fixed dates twice a month (with 14 days of difference between each other), depending on the start date.\n In months with just 30 days, if `start_date` is set to the 31st day, then generation occurs in the last of day of the month.\n- `weekly`: Invoices will be generated each week.\n" + } + }, + "com.remote.api#GetV1ContractorInvoiceSchedulesRequestSortBy": { + "type": "enum", + "members": { + "NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number" + } + }, + "TOTAL_AMOUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "total_amount" + } + }, + "NEXT_INVOICE_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "next_invoice_at" + } + }, + "START_DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "start_date" + } + }, + "NR_OCCURRENCES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nr_occurrences" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoiceSchedulesRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoiceSchedulesRequest": { + "type": "structure", + "members": { + "start_date_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start_date_from", + "smithy.api#documentation": "Filters contractor invoice schedules by start date greater than or equal to the value." + } + }, + "start_date_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start_date_to", + "smithy.api#documentation": "Filters contractor invoice schedules by start date less than or equal to the value." + } + }, + "next_invoice_date_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "next_invoice_date_from", + "smithy.api#documentation": "Filters contractor invoice schedules by next invoice date greater than or equal to the value." + } + }, + "next_invoice_date_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "next_invoice_date_to", + "smithy.api#documentation": "Filters contractor invoice schedules by next invoice date less than or equal to the value." + } + }, + "status": { + "target": "com.remote.api#ContractorInvoiceScheduleStatusFilter", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filters contractor invoice schedules by status matching the value." + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filters contractor invoice schedules by employment id matching the value." + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity", + "traits": { + "smithy.api#httpQuery": "periodicity", + "smithy.api#documentation": "Filters contractor invoice schedules by periodicity matching the value." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "currency", + "smithy.api#documentation": "Filters contractor invoice schedules by currency matching the value." + } + }, + "sort_by": { + "target": "com.remote.api#GetV1ContractorInvoiceSchedulesRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "order": { + "target": "com.remote.api#GetV1ContractorInvoiceSchedulesRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListContractorInvoiceSchedulesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListContractorInvoiceSchedulesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Paginated response schema listing all Contractor Invoice Schedules." + } + }, + "com.remote.api#ContractorInvoiceSchedule": { + "type": "structure", + "members": { + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment identifier.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule identifier.", + "smithy.api#required": {} + } + }, + "items": { + "target": "com.remote.api#ContractorInvoiceScheduleItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount.", + "smithy.api#required": {} + } + }, + "next_invoice_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date time which next invoice will be generated.", + "com.distilled.openapi#nullable": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note.", + "com.distilled.openapi#nullable": {} + } + }, + "nr_occurrences": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of remaining invoices that should be generated.", + "com.distilled.openapi#nullable": {} + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier.", + "com.distilled.openapi#nullable": {} + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date which invoices generation will start.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractorInvoiceScheduleStatus", + "traits": { + "smithy.api#required": {} + } + }, + "total_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Overall amount that is calculated by summing all invoice items.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor Invoice Schedule." + } + }, + "com.remote.api#ContractorInvoiceScheduleItem": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount, in cents.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Describes invoice item intent.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Line Item schema for a Contractor Invoice Schedule" + } + }, + "com.remote.api#ContractorInvoiceScheduleItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#ContractorInvoiceScheduleStatus": { + "type": "enum", + "members": { + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "PENDING_COMPANY_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_company_action" + } + }, + "PENDING_CONTRACTOR_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_contractor_action" + } + }, + "GENERATION_FAILED_UNRELATED_TO_WITHDRAWAL_METHOD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "generation_failed_unrelated_to_withdrawal_method" + } + } + }, + "traits": { + "smithy.api#documentation": "Current record state.\n\n- `active`: Once an invoice is generated, and a withdrawal method has been set, then it's set to active.\n- `processing`: Ephemeral status indicating that we are currently attempting to generate a contractor invoice from the scheduled contractor invoice.\n- `pending_company_action`: Company needs to trigger some actions related to payment configuration.\n- `pending_contractor_action`: When schedule is blocked by contractor onboarding or invoice generation failed due to withdrawal methods issues that needs contractor action.\n- `generation_failed_unrelated_to_withdrawal_method`: Generation failed for any other reason.\n- `completed`: Number of generated contractor invoices has been reached.\n- `inactive`: Does not create any further contractor invoices but it's still possible for the employer to activate it again.\n- `deleted`: The schedule was cancelled and will not generate any further contractor invoices.\n" + } + }, + "com.remote.api#ListContractorInvoiceSchedulesResponseDataContractorInvoiceSchedulesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceSchedule" + }, + "traits": {} + }, + "com.remote.api#ListContractorInvoiceSchedulesResponseData": { + "type": "structure", + "members": { + "contractor_invoice_schedules": { + "target": "com.remote.api#ListContractorInvoiceSchedulesResponseDataContractorInvoiceSchedulesList" + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoiceSchedules": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorInvoiceSchedulesRequest" + }, + "output": { + "target": "com.remote.api#ListContractorInvoiceSchedulesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractor-invoice-schedules", + "code": 200 + }, + "smithy.api#documentation": "List Contractor Invoice Schedules\n\nLists Contractor Invoice Schedule records.\n\n## Scopes" + } + }, + "com.remote.api#ContractorInvoiceScheduleCreateParams": { + "type": "structure", + "members": { + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment identifier", + "smithy.api#required": {} + } + }, + "items": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateParamsItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount.", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note." + } + }, + "nr_occurrences": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of invoices that should be generated during schedule lifetime." + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier." + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the first contractor invoice generation.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Payload shape used to create invoice schedules." + } + }, + "com.remote.api#ContractorInvoiceScheduleCreateParamsItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#PostV1ContractorInvoiceSchedulesRequestContractorInvoiceSchedulesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateParams" + }, + "traits": { + "smithy.api#documentation": "List of invoice schedules payload." + } + }, + "com.remote.api#PostV1ContractorInvoiceSchedulesRequest": { + "type": "structure", + "members": { + "contractor_invoice_schedules": { + "target": "com.remote.api#PostV1ContractorInvoiceSchedulesRequestContractorInvoiceSchedulesList", + "traits": { + "smithy.api#documentation": "List of invoice schedules payload.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailure": { + "type": "structure", + "members": { + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment identifier", + "smithy.api#required": {} + } + }, + "errors": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrors", + "traits": { + "smithy.api#required": {} + } + }, + "items": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount.", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note." + } + }, + "nr_occurrences": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of invoices that should be generated during schedule lifetime." + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier." + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the first contractor invoice generation.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Set of invoice schedule attributes with failed validation." + } + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsCurrencyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsEmploymentIdList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemAmountList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemDescriptionList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItem": { + "type": "structure", + "members": { + "amount": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemAmountList" + }, + "description": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemDescriptionList" + } + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItem" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsNoteList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsNrOccurrencesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsNumberList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsPeriodicityList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsStartDateList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrors": { + "type": "structure", + "members": { + "currency": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsCurrencyList" + }, + "employment_id": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsEmploymentIdList" + }, + "items": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsItemsList" + }, + "note": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsNoteList" + }, + "nr_occurrences": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsNrOccurrencesList" + }, + "number": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsNumberList" + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsPeriodicityList" + }, + "start_date": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureErrorsStartDateList" + } + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseFailureItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#PostV1ContractorInvoiceSchedulesResponseDataFailuresList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseFailure" + }, + "traits": {} + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseSuccess": { + "type": "structure", + "members": { + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment identifier", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "items": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseSuccessItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount.", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note." + } + }, + "nr_occurrences": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of invoices that should be generated during schedule lifetime." + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier." + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the first contractor invoice generation.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Set of invoice schedule attributes that were successfully created." + } + }, + "com.remote.api#ContractorInvoiceScheduleCreateResponseSuccessItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#PostV1ContractorInvoiceSchedulesResponseDataSuccessesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleCreateResponseSuccess" + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorInvoiceSchedulesResponseData": { + "type": "structure", + "members": { + "failures": { + "target": "com.remote.api#PostV1ContractorInvoiceSchedulesResponseDataFailuresList", + "traits": { + "smithy.api#required": {} + } + }, + "successes": { + "target": "com.remote.api#PostV1ContractorInvoiceSchedulesResponseDataSuccessesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorInvoiceSchedulesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#PostV1ContractorInvoiceSchedulesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#PostV1ContractorInvoiceSchedules": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorInvoiceSchedulesRequest" + }, + "output": { + "target": "com.remote.api#PostV1ContractorInvoiceSchedulesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractor-invoice-schedules", + "code": 200 + }, + "smithy.api#documentation": "Create Contractor Invoice Schedules\n\nCreates many invoice schedules records.\nIt's supposed to return two lists: one containing created records, and another one containing the schedules that failed to be inserted.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorInvoiceSchedulesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Resource unique identifier" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorInvoiceScheduleResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorInvoiceScheduleResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response schema to show a Contractor Invoice Schedule" + } + }, + "com.remote.api#ContractorInvoiceScheduleResponseData": { + "type": "structure", + "members": { + "contractor_invoice_schedule": { + "target": "com.remote.api#ContractorInvoiceSchedule", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoiceSchedulesId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorInvoiceSchedulesIdRequest" + }, + "output": { + "target": "com.remote.api#ContractorInvoiceScheduleResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractor-invoice-schedules/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Contractor Invoice Schedule\n\nShows a single Contractor Invoice Schedule record\n\n## Scopes" + } + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesIdRequestItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesIdRequestStatus": { + "type": "enum", + "members": { + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Resource unique identifier" + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "items": { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesIdRequestItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note.", + "com.distilled.openapi#nullable": {} + } + }, + "nr_occurrences": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of remaining invoices that should be generated.", + "com.distilled.openapi#nullable": {} + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier.", + "com.distilled.openapi#nullable": {} + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity" + }, + "start_date": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesIdRequestStatus" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesIdRequest" + }, + "output": { + "target": "com.remote.api#ContractorInvoiceScheduleResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/contractor-invoice-schedules/{id}", + "code": 200 + }, + "smithy.api#documentation": "Updates Contractor Invoice Schedule\n\nUpdates a contractor invoice schedule record\n\n## Scopes" + } + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesId2RequestItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesId2RequestStatus": { + "type": "enum", + "members": { + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Resource unique identifier" + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "items": { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesId2RequestItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note.", + "com.distilled.openapi#nullable": {} + } + }, + "nr_occurrences": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of remaining invoices that should be generated.", + "com.distilled.openapi#nullable": {} + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier.", + "com.distilled.openapi#nullable": {} + } + }, + "periodicity": { + "target": "com.remote.api#ContractorInvoiceSchedulePeriodicity" + }, + "start_date": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesId2RequestStatus" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1ContractorInvoiceSchedulesId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesId2Request" + }, + "output": { + "target": "com.remote.api#ContractorInvoiceScheduleResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/contractor-invoice-schedules/{id}", + "code": 200 + }, + "smithy.api#documentation": "Updates Contractor Invoice Schedule\n\nUpdates a contractor invoice schedule record\n\n## Scopes" + } + }, + "com.remote.api#ContractorInvoiceStatus": { + "type": "enum", + "members": { + "ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "issued" + } + }, + "DRAFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "draft" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "PENDING_PAYMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_payment" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "EXTERNALLY_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "externally_paid" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + }, + "REJECTED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected_by_remote" + } + }, + "BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "blocked" + } + }, + "COMPLIANCE_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "compliance_review" + } + }, + "COMPLIANCE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "compliance_failed" + } + }, + "PAY_OUT_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pay_out_scheduled" + } + }, + "ENQUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enqueued" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "MANUAL_PAYOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "manual_payout" + } + }, + "PAID_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paid_out" + } + }, + "PAY_OUT_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pay_out_failed" + } + }, + "FUNDS_RETURNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "funds_returned" + } + } + }, + "traits": { + "smithy.api#documentation": "Current record state.\n\n- `enqueued`: An outstanding payment is enqueued to complete the invoice payment.\n- `externally_paid`: The invoice was paid outside the platform and the employer reported that the contractor was paid.\n- `issued`: This invoice has been uploaded by the contractor.\n- `in_review`: This invoice has been uploaded by the contractor and is in the process of review by Remote. This is only expected for Contractor of Record invoices.\n- `paid_out`: This invoice has been paid out to contractor. This is the final expected stage of a contractor invoice.\n- `pay_out_failed`: There were issues paying out to the contractor. This is usually caused by a balance issue, an issue with the contractor's bank account, or another type error that comes from payment partner.\n- `pending_payment`: An outstanding payment has been created for this invoice and is awaiting the company payment before payout begins.\n- `processing`: The invoice is being processed for pay out. This status should only exist for a few seconds.\n- `rejected`: This invoice has been rejected by the the company or Remote support team, when requested by customers. It cannot be rejected if it's already paid.\n- `rejected_by_remote`: This invoice has been rejected by Remote during the Contractor of Record approval process.\n- `funds_returned`: A pay out was successfully attempted for the invoice, but the funds were rejected by the contractor's bank, either due to incorrect details or some other reason.\n- `manual_payout`: The invoice is not supported by our automated systems and must instead be manually paid by internal Remote teams.\n- `blocked`: The invoice is marked as blocked. It will not be paid out.\n" + } + }, + "com.remote.api#GetV1ContractorInvoicesRequestSortBy": { + "type": "enum", + "members": { + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date" + } + }, + "DUE_DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "due_date" + } + }, + "APPROVED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_at" + } + }, + "PAID_OUT_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paid_out_at" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoicesRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoicesRequest": { + "type": "structure", + "members": { + "status": { + "target": "com.remote.api#ContractorInvoiceStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filters contractor invoices by status matching the value." + } + }, + "contractor_invoice_schedule_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "contractor_invoice_schedule_id", + "smithy.api#documentation": "Filters contractor invoices by invoice schedule ID matching the value." + } + }, + "date_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "date_from", + "smithy.api#documentation": "Filters contractor invoices by date greater than or equal to the value." + } + }, + "date_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "date_to", + "smithy.api#documentation": "Filters contractor invoices by date less than or equal to the value." + } + }, + "due_date_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "due_date_from", + "smithy.api#documentation": "Filters contractor invoices by due date greater than or equal to the value." + } + }, + "due_date_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "due_date_to", + "smithy.api#documentation": "Filters contractor invoices by due date less than or equal to the value." + } + }, + "approved_date_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "approved_date_from", + "smithy.api#documentation": "Filters contractor invoices by approved date greater than or equal to the value." + } + }, + "approved_date_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "approved_date_to", + "smithy.api#documentation": "Filters contractor invoices by approved date less than or equal to the value." + } + }, + "paid_out_date_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "paid_out_date_from", + "smithy.api#documentation": "Filters contractor invoices by paid out date greater than or equal to the value." + } + }, + "paid_out_date_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "paid_out_date_to", + "smithy.api#documentation": "Filters contractor invoices by paid out date less than or equal to the value." + } + }, + "sort_by": { + "target": "com.remote.api#GetV1ContractorInvoicesRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "order": { + "target": "com.remote.api#GetV1ContractorInvoicesRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListContractorInvoicesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListContractorInvoicesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Paginated response schema listing all Contractor Invoices." + } + }, + "com.remote.api#ContractorInvoice": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Overall amount that is calculated by summing all invoice items.", + "smithy.api#required": {} + } + }, + "approved_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The datetime which contractor invoice has been approved and it's pending for payment.", + "com.distilled.openapi#nullable": {} + } + }, + "contractor_invoice_schedule_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice schedule that might have generated contractor invoice.", + "com.distilled.openapi#nullable": {} + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The issuance date specified by a contractor.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined description.", + "com.distilled.openapi#nullable": {} + } + }, + "due_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The payment deadline chosen by the contractor while creating an invoice.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment identifier associated with the contractor invoice." + } + }, + "fx_rate": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The guaranteed FX rate applied for the payment. Only present for guaranteed payout invoices.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Contractor Invoice identifier.", + "smithy.api#required": {} + } + }, + "items": { + "target": "com.remote.api#ContractorInvoiceItemsList", + "traits": { + "smithy.api#documentation": "Invoice line items.", + "smithy.api#required": {} + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier.", + "com.distilled.openapi#nullable": {} + } + }, + "paid_out_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date and time which invoice was paid to contractor.", + "com.distilled.openapi#nullable": {} + } + }, + "pay_out_method": { + "target": "com.remote.api#ContractorInvoicePayOutMethod", + "traits": { + "smithy.api#documentation": "Payment method used for the payout: local (e.g. bank transfer), swift (SHA), or swift_our (OUR). Only present for guaranteed payout invoices.", + "com.distilled.openapi#nullable": {} + } + }, + "processing_fee": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "SWIFT fee amount in cents. Only present when pay_out_method is swift or swift_our.", + "com.distilled.openapi#nullable": {} + } + }, + "processing_fee_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Currency code of the SWIFT fee. Only present when processing_fee is set.", + "com.distilled.openapi#nullable": {} + } + }, + "processing_fee_payer": { + "target": "com.remote.api#ContractorInvoiceProcessingFeePayer", + "traits": { + "smithy.api#documentation": "Entity responsible for paying the SWIFT fee. Only present when processing_fee is set.", + "com.distilled.openapi#nullable": {} + } + }, + "source_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount the company needs to pay (pay in amount).", + "smithy.api#required": {} + } + }, + "source_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#ContractorInvoiceStatus", + "traits": { + "smithy.api#required": {} + } + }, + "target_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount the contractor receives (pay out amount). Can be null if pay out is not guaranteed.", + "com.distilled.openapi#nullable": {} + } + }, + "target_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor Invoice" + } + }, + "com.remote.api#ContractorInvoiceItem": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount, in cents.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Describes invoice item intent.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#ContractorInvoiceItemType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Line Item schema for a Contractor Invoice." + } + }, + "com.remote.api#ContractorInvoiceItemType": { + "type": "enum", + "members": { + "MANUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "manual" + } + }, + "TIME_TRACKING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "time_tracking" + } + }, + "EXPENSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense" + } + } + }, + "traits": { + "smithy.api#documentation": "Current types.\n\n- `manual`: Item manually entered when creating invoice.\n- `time_tracking`: Item generated by time tracking.\n- `expense`: Item that represents an expense included in the invoice.\n" + } + }, + "com.remote.api#ContractorInvoiceItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceItem" + }, + "traits": { + "smithy.api#documentation": "Invoice line items." + } + }, + "com.remote.api#ContractorInvoicePayOutMethod": { + "type": "enum", + "members": { + "LOCAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "local" + } + }, + "SWIFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "swift" + } + }, + "SWIFT_OUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "swift_our" + } + } + }, + "traits": { + "smithy.api#documentation": "Payment method used for the payout: local (e.g. bank transfer), swift (SHA), or swift_our (OUR). Only present for guaranteed payout invoices." + } + }, + "com.remote.api#ContractorInvoiceProcessingFeePayer": { + "type": "enum", + "members": { + "COMPANY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + } + }, + "traits": { + "smithy.api#documentation": "Entity responsible for paying the SWIFT fee. Only present when processing_fee is set." + } + }, + "com.remote.api#ListContractorInvoicesResponseDataContractorInvoicesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoice" + }, + "traits": {} + }, + "com.remote.api#ListContractorInvoicesResponseData": { + "type": "structure", + "members": { + "contractor_invoices": { + "target": "com.remote.api#ListContractorInvoicesResponseDataContractorInvoicesList" + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoices": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorInvoicesRequest" + }, + "output": { + "target": "com.remote.api#ListContractorInvoicesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractor-invoices", + "code": 200 + }, + "smithy.api#documentation": "List Contractor Invoices\n\nLists Contractor Invoice records.\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorInvoicesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Resource unique identifier" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorInvoiceResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorInvoiceResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response schema to show a Contractor Invoice" + } + }, + "com.remote.api#ContractorInvoiceResponseData": { + "type": "structure", + "members": { + "contractor_invoice": { + "target": "com.remote.api#ContractorInvoice", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorInvoicesId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorInvoicesIdRequest" + }, + "output": { + "target": "com.remote.api#ContractorInvoiceResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractor-invoices/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Contractor Invoice\n\nShows a single Contractor Invoice record.\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsCorTerminationRequestsRequestStatus": { + "type": "enum", + "members": { + "INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "initiated" + } + }, + "EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "executed" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsCorTerminationRequestsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter termination requests by employment ID." + } + }, + "status": { + "target": "com.remote.api#GetV1ContractorsCorTerminationRequestsRequestStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter termination requests by status." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IndexCorTerminationRequestsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IndexCorTerminationRequestsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many termination_requests" + } + }, + "com.remote.api#CorTerminationRequest": { + "type": "structure", + "members": { + "cancelled_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp of when the termination was cancelled. Null if not cancelled.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_deactivation_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date on which the contractor employment will be deactivated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifier of the employment being terminated.", + "smithy.api#required": {} + } + }, + "executed_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp of when the termination was executed. Null if not yet executed.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the termination request.", + "smithy.api#required": {} + } + }, + "initiated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp of when the termination request was initiated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#CorTerminationRequestStatus", + "traits": { + "smithy.api#documentation": "Current status of the termination request.", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the termination was initiated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CorTerminationRequestStatus": { + "type": "enum", + "members": { + "INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "initiated" + } + }, + "EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "executed" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + } + }, + "traits": { + "smithy.api#documentation": "Current status of the termination request." + } + }, + "com.remote.api#IndexCorTerminationRequestsResponseDataTerminationRequestsList": { + "type": "list", + "member": { + "target": "com.remote.api#CorTerminationRequest" + }, + "traits": {} + }, + "com.remote.api#IndexCorTerminationRequestsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "termination_requests": { + "target": "com.remote.api#IndexCorTerminationRequestsResponseDataTerminationRequestsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsCorTerminationRequests": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsCorTerminationRequestsRequest" + }, + "output": { + "target": "com.remote.api#IndexCorTerminationRequestsResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/cor-termination-requests", + "code": 200 + }, + "smithy.api#documentation": "List contractor of record (COR) termination requests\n\nLists Contractor of Record termination requests for your company,\noptionally filtered by employment and status.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestResponsesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Responses to the questionnaire questions" + } + }, + "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestType": { + "type": "enum", + "members": { + "CONTRACTOR_OF_RECORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_of_record" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequest": { + "type": "structure", + "members": { + "json_schema_version": { + "target": "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + }, + "employment_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The slug/ID of the employment", + "smithy.api#required": {} + } + }, + "responses": { + "target": "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestResponsesMap", + "traits": { + "smithy.api#documentation": "Responses to the questionnaire questions", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequestType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EligibilityQuestionnaireResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EligibilityQuestionnaire", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EligibilityQuestionnaire": { + "type": "structure", + "members": { + "is_blocking": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the questionnaire blocks further progress if failed", + "smithy.api#required": {} + } + }, + "questions": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The questions in the questionnaire", + "smithy.api#required": {} + } + }, + "responses": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The responses to the questionnaire", + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#EligibilityQuestionnaireType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EligibilityQuestionnaireType": { + "type": "enum", + "members": { + "CONTRACTOR_OF_RECORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_of_record" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEligibilityQuestionnaire": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEligibilityQuestionnaireRequest" + }, + "output": { + "target": "com.remote.api#EligibilityQuestionnaireResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/eligibility-questionnaire", + "code": 200 + }, + "smithy.api#documentation": "Submit eligibility questionnaire\n\nSubmits an eligibility questionnaire for a contractor employment.\n\nThe questionnaire determines if the contractor is eligible for certain products or features.\nThe responses are validated against the JSON schema for the questionnaire type.\n\n**Requirements:**\n- Employment must be of type `contractor`\n- Employment must be in `created` status\n- Responses must conform to the questionnaire JSON schema\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "contract_document": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": " Contract document parameters. Its properties may vary depending on the country.\n", + "smithy.api#required": {} + } + }, + "skip_ai_checks": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, skips AI-based compliance checks (e.g. services and deliverables classification). Defaults to false." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CreateContractDocumentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CreateContractDocumentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contract document response" + } + }, + "com.remote.api#ContractDocument": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the contract document.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractorContractDocumentStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A contract document for a contractor employment, tracking its signing status." + } + }, + "com.remote.api#ContractorContractDocumentStatus": { + "type": "enum", + "members": { + "DRAFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "draft" + } + }, + "AWAITING_SIGNATURES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "awaiting_signatures" + } + }, + "FINISHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "finished" + } + } + }, + "traits": { + "smithy.api#documentation": "The signing status of a contract document.\n\n- `draft`: The document is being prepared and has not been sent for signing.\n- `awaiting_signatures`: The document has been sent and is waiting for one or more parties to sign.\n- `finished`: All required signatures have been collected and the contract is fully executed.\n" + } + }, + "com.remote.api#CreateContractDocumentResponseData": { + "type": "structure", + "members": { + "contract_document": { + "target": "com.remote.api#ContractDocument", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocuments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest" + }, + "output": { + "target": "com.remote.api#CreateContractDocumentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/employments/{employment_id}/contract-documents", + "code": 200 + }, + "smithy.api#documentation": "Create a contract document for a contractor\n\nCreate a contract document for a contractor.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "contract_document_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Document ID" + } + }, + "signature": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signer's full legal name as their electronic signature.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign", + "code": 200 + }, + "smithy.api#documentation": "Sign a document for a contractor\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Document ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractDocumentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractDocumentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Return a base64 encoded contract document" + } + }, + "com.remote.api#Signatory": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Email address of the signatory", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Full name of the signatory", + "com.distilled.openapi#nullable": {} + } + }, + "signature": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Signature image as a data URI (e.g. `data:image/png;base64,...`), null if not yet signed", + "com.distilled.openapi#nullable": {} + } + }, + "signature_method": { + "target": "com.remote.api#SignatorySignatureMethod", + "traits": { + "smithy.api#documentation": "Signing method used by this signatory" + } + }, + "signature_type": { + "target": "com.remote.api#SignatorySignatureType", + "traits": { + "smithy.api#documentation": "Legal signature level applied when signing" + } + }, + "signed_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when the signatory signed the document, null if not yet signed", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#SignatoryStatus", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#SignatoryType", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User identifier for internal signatories, null for external signatories", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A signatory on a contract document. For company and employee signatories, `user_id` is provided. For other signatory types, `user_id` is null." + } + }, + "com.remote.api#SignatorySignatureMethod": { + "type": "enum", + "members": { + "IN_PLATFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_platform" + } + }, + "DOCUSIGN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "docusign" + } + } + }, + "traits": { + "smithy.api#documentation": "Signing method used by this signatory" + } + }, + "com.remote.api#SignatorySignatureType": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + }, + "QES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "qes" + } + }, + "AES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aes" + } + }, + "SES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ses" + } + } + }, + "traits": { + "smithy.api#documentation": "Legal signature level applied when signing" + } + }, + "com.remote.api#SignatoryStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "SIGNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "signed" + } + }, + "UNASSIGNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unassigned" + } + } + }, + "traits": { + "smithy.api#documentation": "Current signing status of this signatory" + } + }, + "com.remote.api#SignatoryType": { + "type": "enum", + "members": { + "COMPANY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company" + } + }, + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "ADMIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "admin" + } + }, + "EXTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "external" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknown" + } + } + }, + "traits": { + "smithy.api#documentation": "The role of this signatory in the contract signing process" + } + }, + "com.remote.api#ContractDocumentResponseDataContractDocumentSignatoriesList": { + "type": "list", + "member": { + "target": "com.remote.api#Signatory" + }, + "traits": {} + }, + "com.remote.api#ContractDocumentResponseDataContractDocument": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "signatories": { + "target": "com.remote.api#ContractDocumentResponseDataContractDocumentSignatoriesList", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractorContractDocumentStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ContractDocumentResponseData": { + "type": "structure", + "members": { + "contract_document": { + "target": "com.remote.api#ContractDocumentResponseDataContractDocument", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractDocumentsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest" + }, + "output": { + "target": "com.remote.api#ContractDocumentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/employments/{employment_id}/contract-documents/{id}", + "code": 200 + }, + "smithy.api#documentation": "Return a base64 encoded version of the contract document\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscription": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/employments/{employment_id}/contractor-cor-subscription", + "code": 200 + }, + "smithy.api#documentation": "Create contractor of record subscription intent\n\nAssigns Contractor of Record subscription in pending state to employment.\nOnce risk analysis is performed, subscription may start upon contract signing,\nor might be denied.\n\nRequires a non-blocking eligibility questionnaire to be submitted before creating the subscription intent.\n\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/contractors/employments/{employment_id}/contractor-cor-subscription", + "code": 200 + }, + "smithy.api#documentation": "Delete contractor of record subscription intent\n\nDeletes Contractor of Record subscription intent.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "restrict_to_guaranteed_pay_out_currencies": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "restrict_to_guaranteed_pay_out_currencies", + "smithy.api#documentation": "Restrict to currencies which payout is guaranteed (default: true)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorCurrencyResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorCurrencyResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for listing contractor currencies" + } + }, + "com.remote.api#ContractorCurrencyItem": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "source": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ContractorCurrencyResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorCurrencyItem" + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorCurrencies": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest" + }, + "output": { + "target": "com.remote.api#ContractorCurrencyResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/employments/{employment_id}/contractor-currencies", + "code": 200 + }, + "smithy.api#documentation": "List all currencies for the contractor\n\nThe currencies are listed in the following order:\n1. billing currency of the company\n2. currencies of contractor’s existing withdrawal methods\n3. currency of the contractor’s country\n4. the rest, alphabetical.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequestOperation": { + "type": "enum", + "members": { + "UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "upgrade" + } + }, + "DOWNGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "downgrade" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "operation": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequestOperation", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/employments/{employment_id}/contractor-plus-subscription", + "code": 200 + }, + "smithy.api#documentation": "Manage contractor plus subscription\n\nEndpoint that can be used to upgrade, assign or downgrade a contractor's subscription.\nThis can be used when company admins desire to assign someone to the Contractor Plus plan,\nbut also to change the contractor's subscription between Plus and Standard.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorSubscriptionSummariesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorSubscriptionSummariesResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Summaries of contractor subscriptions" + } + }, + "com.remote.api#ContractorSubscriptionsSummary": { + "type": "structure", + "members": { + "company_product": { + "target": "com.remote.api#ContractorSubscriptionsSummaryCompanyProduct", + "traits": { + "smithy.api#required": {} + } + }, + "company_product_discount": { + "target": "com.remote.api#ContractorSubscriptionsSummaryCompanyProductDiscount", + "traits": { + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#Currency", + "traits": { + "smithy.api#required": {} + } + }, + "eligibility_questionnaire": { + "target": "com.remote.api#EligibilityQuestionnaire" + }, + "is_termination_fees_enabled": { + "target": "smithy.api#Boolean" + }, + "price": { + "target": "com.remote.api#ContractorSubscriptionsSummaryPrice", + "traits": { + "smithy.api#required": {} + } + }, + "product": { + "target": "com.remote.api#Product", + "traits": { + "smithy.api#required": {} + } + }, + "total_amount": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "total_discount": { + "target": "smithy.api#Double" + }, + "total_in_advance": { + "target": "smithy.api#Double" + }, + "total_prorated": { + "target": "smithy.api#Double" + } + }, + "traits": {} + }, + "com.remote.api#ContractorSubscriptionsSummaryCompanyProduct": { + "type": "structure", + "members": { + "slug": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#ContractorSubscriptionsSummaryCompanyProductDiscount": { + "type": "structure", + "members": { + "expiration_date": { + "target": "smithy.api#String" + }, + "percent": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#ContractorSubscriptionsSummaryPrice": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer" + }, + "final_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The price after applying the company discount, in cents" + } + } + }, + "traits": {} + }, + "com.remote.api#ContractorSubscriptionSummariesResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorSubscriptionsSummary" + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptions": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest" + }, + "output": { + "target": "com.remote.api#ContractorSubscriptionSummariesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/employments/{employment_id}/contractor-subscriptions", + "code": 200 + }, + "smithy.api#documentation": "List contractor subscriptions\n\nEndpoint that can be used to list contractor subscriptions.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CorTerminationRequestCreatedResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CorTerminationRequestCreatedResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CorTerminationRequestCreatedResponseDataStatus": { + "type": "enum", + "members": { + "INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "initiated" + } + }, + "EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "executed" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + } + }, + "traits": { + "smithy.api#documentation": "Current status of the termination request." + } + }, + "com.remote.api#CorTerminationRequestCreatedResponseData": { + "type": "structure", + "members": { + "employment_deactivation_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date on which the contractor employment will be deactivated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the termination request.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#CorTerminationRequestCreatedResponseDataStatus", + "traits": { + "smithy.api#documentation": "Current status of the termination request.", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the termination was initiated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequests": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest" + }, + "output": { + "target": "com.remote.api#CorTerminationRequestCreatedResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/employments/{employment_id}/cor-termination-requests", + "code": 200 + }, + "smithy.api#documentation": "Create a contractor of record (COR) termination request\n\nInitiates a termination request for a Contractor of Record employment.\nWhen a termination request is sent, a stop work order is issued and the contractor remains active until a final invoice is paid or waived.\nCurrently, only Contractor of Record employments can be terminated.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "termination_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Termination Request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CorTerminationRequestResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CorTerminationRequest", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest" + }, + "output": { + "target": "com.remote.api#CorTerminationRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}", + "code": 200 + }, + "smithy.api#documentation": "Show a contractor of record (COR) termination request\n\nRetrieves a Contractor of Record termination request by ID.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdRatesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Contractor employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListContractorRatesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListContractorRatesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response listing the rates configured for a contractor." + } + }, + "com.remote.api#ContractorRate": { + "type": "structure", + "members": { + "amount": { + "target": "com.remote.api#MoneyResponse", + "traits": { + "smithy.api#required": {} + } + }, + "contract_expiration_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expiration date of the contractor's active contract (or the last active one for ended engagements). This is not a termination date. Null for an open-ended contract, and when the contractor has no contract on record.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "contract_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date the contractor started working under their active contract (or the last active one for ended engagements). This is the work start date, which can precede the date the contract became effective. Null when the contractor has no contract on record.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the rate.", + "smithy.api#required": {} + } + }, + "pay_frequency": { + "target": "com.remote.api#ContractorRatePayFrequency", + "traits": { + "smithy.api#documentation": "How often the contractor is paid. Always null for `one_off` rates.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#ContractorRateType", + "traits": { + "smithy.api#documentation": "The unit the amount is paid per.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A rate configured for a contractor, with the dates of the contract it is paid under.\n\n`type` discriminates the payment mode: `one_off` is a single payment on completion of\nservices; any other value is paid per pay period, where `type` is the calculation unit and\n`pay_frequency` the invoicing cadence.\n\n`type` and `pay_frequency` are open enums: new values may be added, so treat an unrecognised\nvalue as opaque rather than an error.\n" + } + }, + "com.remote.api#MoneyResponse": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#CurrencyWithoutSlug", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Monetary amount and currency. `amount` is a decimal string in the major unit, e.g. 109.87." + } + }, + "com.remote.api#CurrencyWithoutSlug": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "symbol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Currency structure without the slug, eg: built from ex_money" + } + }, + "com.remote.api#ContractorRatePayFrequency": { + "type": "enum", + "members": { + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "BI_WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_weekly" + } + }, + "SEMI_MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "semi_monthly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + } + }, + "traits": { + "smithy.api#documentation": "How often the contractor is paid. Always null for `one_off` rates." + } + }, + "com.remote.api#ContractorRateType": { + "type": "enum", + "members": { + "HOURLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hourly" + } + }, + "DAILY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + }, + "ONE_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "one_off" + } + } + }, + "traits": { + "smithy.api#documentation": "The unit the amount is paid per." + } + }, + "com.remote.api#ListContractorRatesResponseDataRatesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorRate" + }, + "traits": {} + }, + "com.remote.api#ListContractorRatesResponseData": { + "type": "structure", + "members": { + "rates": { + "target": "com.remote.api#ListContractorRatesResponseDataRatesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdRates": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdRatesRequest" + }, + "output": { + "target": "com.remote.api#ListContractorRatesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/employments/{employment_id}/rates", + "code": 200 + }, + "smithy.api#documentation": "List the rates of a contractor\n\nLists the rates configured for a contractor, whatever the origin of their contract: rates agreed\nthrough a Remote-managed services agreement and statement of work, and rates recorded by the\ncompany on its own paper, are returned in the same shape.\n\nWhat the response contains:\n\n- The **configured** rate — not amounts that were scheduled, invoiced, or paid.\n- **Effective** rates only. Terms of a statement of work that has not been signed yet are not included.\n- The stored rate, even when the contractor's contract has already expired.\n\n`contract_start_date` and `contract_expiration_date` describe the contract the rate is paid under,\nnot where the rate came from. `type` and `pay_frequency` are open enums, so treat an unrecognised\nvalue as opaque rather than an error. See the field descriptions for how each is derived.\n\nA contractor with no rate, and an employment that is not a contractor, both return an empty list.\n\n\n## Scopes" + } + }, + "com.remote.api#ContractorTimeTrackingParams": { + "type": "structure", + "members": { + "clock_in": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "clock_out": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional free-text notes about this time entry, such as project or task details.", + "com.distilled.openapi#nullable": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#ContractorTimeTrackingParamsType", + "traits": { + "smithy.api#documentation": "The category of time being tracked. Contractors are restricted to `regular_hours`, `on_call`, or `break`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Parameters for a single time tracking entry on a contractor timesheet. Allowed `type` values are restricted to the contractor subset." + } + }, + "com.remote.api#ContractorTimeTrackingParamsType": { + "type": "enum", + "members": { + "REGULAR_HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "regular_hours" + } + }, + "ON_CALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "on_call" + } + }, + "BREAK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "break" + } + } + }, + "traits": { + "smithy.api#documentation": "The category of time being tracked. Contractors are restricted to `regular_hours`, `on_call`, or `break`." + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequestTimeTrackingsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorTimeTrackingParams" + }, + "traits": { + "smithy.api#documentation": "One or more time tracking entries to include in the timesheet." + } + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Contractor employment ID" + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "time_trackings": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequestTimeTrackingsList", + "traits": { + "smithy.api#documentation": "One or more time tracking entries to include in the timesheet.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorTimesheetResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorTimesheetResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response returned after creating a contractor timesheet." + } + }, + "com.remote.api#ContractorTimesheet": { + "type": "structure", + "members": { + "break_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional notes attached to the timesheet.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "on_call_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "regular_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp the timesheet was submitted.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "time_trackings": { + "target": "com.remote.api#ContractorTimesheetTimeTrackingsList", + "traits": { + "smithy.api#documentation": "The individual time tracking entries that make up this timesheet.", + "smithy.api#required": {} + } + }, + "total_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A contractor timesheet, returned by the contractor create endpoint. Only contains fields relevant to the contractor flow — EOR-only fields (overtime, night/weekend/holiday hours, approval flag) are not included." + } + }, + "com.remote.api#HoursAndMinutes": { + "type": "structure", + "members": { + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of whole hours." + } + }, + "minutes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of remaining minutes (0-59)." + } + } + }, + "traits": { + "smithy.api#documentation": "A duration expressed as hours and minutes." + } + }, + "com.remote.api#ContractorTimeTracking": { + "type": "structure", + "members": { + "clock_in": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "clock_out": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional notes about this entry.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "total_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#ContractorTimeTrackingType", + "traits": { + "smithy.api#documentation": "The category of time being tracked. One of `regular_hours`, `on_call`, `break`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A single time tracking entry on a contractor timesheet." + } + }, + "com.remote.api#ContractorTimeTrackingType": { + "type": "enum", + "members": { + "REGULAR_HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "regular_hours" + } + }, + "ON_CALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "on_call" + } + }, + "BREAK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "break" + } + } + }, + "traits": { + "smithy.api#documentation": "The category of time being tracked. One of `regular_hours`, `on_call`, `break`." + } + }, + "com.remote.api#ContractorTimesheetTimeTrackingsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorTimeTracking" + }, + "traits": { + "smithy.api#documentation": "The individual time tracking entries that make up this timesheet." + } + }, + "com.remote.api#ContractorTimesheetResponseData": { + "type": "structure", + "members": { + "timesheet": { + "target": "com.remote.api#ContractorTimesheet", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdTimesheets": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest" + }, + "output": { + "target": "com.remote.api#ContractorTimesheetResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/contractors/employments/{employment_id}/timesheets", + "code": 200 + }, + "smithy.api#documentation": "Create a contractor timesheet\n\nCreates a timesheet on behalf of a contractor employment.\n\nThe submitted hours are immediately available to the contractor in the Remote UI for\nself-serve invoice creation (Invoices → Create invoice → \"Use Time Tracking\").\n\nThis endpoint is restricted to contractor employments. Calls against EOR or Global Payroll\nemployments are rejected with `422`.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequestType": { + "type": "enum", + "members": { + "CONTRACTOR_OF_RECORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_of_record" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequestType", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#required": {}, + "smithy.api#documentation": "Type of eligibility questionnaire" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EligibilityQuestionnaireJSONSchemaResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EligibilityQuestionnaireJSONSchemaResponseData" + } + }, + "traits": { + "smithy.api#documentation": "JSON Schema definition for eligibility questionnaire" + } + }, + "com.remote.api#EligibilityQuestionnaireJSONSchemaResponseData": { + "type": "structure", + "members": { + "permissions": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Permissions related to the schema" + } + }, + "schema": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The JSON Schema definition" + } + }, + "version": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The version of the JSON Schema" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaire": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaireRequest" + }, + "output": { + "target": "com.remote.api#EligibilityQuestionnaireJSONSchemaResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/contractors/schemas/eligibility-questionnaire", + "code": 200 + }, + "smithy.api#documentation": "Get eligibility questionnaire schema\n\nReturns the JSON schema for the eligibility questionnaire by type.\n\nThe schema defines the structure and validation rules for the questionnaire responses.\nSupports versioning to allow for schema evolution while maintaining backwards compatibility.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CostCalculatorCountriesRequest": { + "type": "structure", + "members": { + "include_premium_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_premium_benefits", + "smithy.api#documentation": "If the premium benefits should be included in the response" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CostCalculatorListCountryResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CostCalculatorListCountryResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorCountryLevelRegion": { + "type": "structure", + "members": { + "availability": { + "target": "com.remote.api#CostCalculatorCountryAvailability", + "traits": { + "smithy.api#required": {} + } + }, + "child_regions": { + "target": "com.remote.api#CostCalculatorCountryLevelRegionChildRegionsList", + "traits": { + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#Currency", + "traits": { + "smithy.api#required": {} + } + }, + "has_additional_fields": { + "target": "smithy.api#Boolean" + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "original_country_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "region_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A supported country on Remote" + } + }, + "com.remote.api#CostCalculatorCountryAvailability": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "COMING_SOON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coming_soon" + } + } + }, + "traits": { + "smithy.api#documentation": "- active: country is ready to onboard employee\n- coming_soon: country is in process of getting ready\n" + } + }, + "com.remote.api#MinimalRegion": { + "type": "structure", + "members": { + "child_regions": { + "target": "com.remote.api#MinimalRegionChildRegionsList" + }, + "code": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#RegionStatus", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#MinimalRegionChildRegionsList": { + "type": "list", + "member": { + "target": "com.remote.api#MinimalRegion" + }, + "traits": {} + }, + "com.remote.api#RegionStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorCountryLevelRegionChildRegionsList": { + "type": "list", + "member": { + "target": "com.remote.api#MinimalRegion" + }, + "traits": {} + }, + "com.remote.api#CostCalculatorListCountryResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCountryLevelRegion" + }, + "traits": {} + }, + "com.remote.api#GetV1CostCalculatorCountries": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CostCalculatorCountriesRequest" + }, + "output": { + "target": "com.remote.api#CostCalculatorListCountryResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/cost-calculator/countries", + "code": 200 + }, + "smithy.api#documentation": "List countries for Cost Calculator\n\nLists countries available for cost calculation" + } + }, + "com.remote.api#CostCalculatorEmploymentParam": { + "type": "structure", + "members": { + "age": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The employee's age. Used in some countries to calculate age-dependent benefits or contributions." + } + }, + "annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual gross salary in the region's local currency, in cents. Provide this OR `annual_total_cost`, not both." + } + }, + "annual_gross_salary_in_employer_currency": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "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_total_cost": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "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_in_employer_currency": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The target total annual cost in the employer's preferred currency, in cents." + } + }, + "benefits": { + "target": "com.remote.api#CostCalculatorEmploymentParamBenefitsList", + "traits": { + "smithy.api#documentation": "Specific benefit selections to include in the estimate." + } + }, + "discount": { + "target": "com.remote.api#CostCalculatorDiscount" + }, + "employment_term": { + "target": "com.remote.api#EmploymentTermType" + }, + "region_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (slug) of the region/country for this employment. Required.", + "smithy.api#required": {} + } + }, + "regional_to_employer_exchange_rate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A custom exchange rate from the regional currency to the employer currency. If not provided, the current market rate is used." + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional label for this employment in the estimate (e.g., the job title or role name)." + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#CostCalculatorBenefitParam": { + "type": "structure", + "members": { + "benefit_group_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (slug) of the benefit group to include in the estimate.", + "smithy.api#required": {} + } + }, + "benefit_tier_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (slug) of the benefit tier within the group. Determines the level of coverage and cost.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorEmploymentParamBenefitsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorBenefitParam" + }, + "traits": { + "smithy.api#documentation": "Specific benefit selections to include in the estimate." + } + }, + "com.remote.api#CostCalculatorDiscount": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The fixed discount amount in cents. Mutually exclusive with `percent`." + } + }, + "months": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of months the discount applies to (1-12). Defaults to 12." + } + }, + "percent": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The discount as a decimal fraction (e.g., 0.1 for 10%). Mutually exclusive with `amount`." + } + }, + "quoted_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The originally quoted amount before discount, in cents." + } + }, + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable label for the discount (e.g., \"10% Discount\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for applying a discount to a cost estimate. Provide either an `amount` or `percent` — not both." + } + }, + "com.remote.api#EmploymentTermType": { + "type": "enum", + "members": { + "FIXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fixed" + } + }, + "INDEFINITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indefinite" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CostCalculatorEstimationRequestEmploymentsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorEmploymentParam" + }, + "traits": { + "smithy.api#documentation": "One or more employments to estimate costs for." + } + }, + "com.remote.api#PostV1CostCalculatorEstimationRequest": { + "type": "structure", + "members": { + "company_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company name, used for labeling in PDF/CSV exports." + } + }, + "employer_currency_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code for the employer's preferred currency (e.g., \"USD\"). All costs will be converted to this currency.", + "smithy.api#required": {} + } + }, + "employments": { + "target": "com.remote.api#PostV1CostCalculatorEstimationRequestEmploymentsList", + "traits": { + "smithy.api#documentation": "One or more employments to estimate costs for.", + "smithy.api#required": {} + } + }, + "global_discount": { + "target": "com.remote.api#CostCalculatorDiscount" + }, + "include_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include benefit costs in the estimate. Defaults to false if not provided." + } + }, + "include_cost_breakdowns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include detailed cost breakdowns (individual contributions, benefits, etc.) in the response." + } + }, + "include_management_fee": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include Remote's management fee in the total cost calculation." + } + }, + "include_premium_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include premium benefit options in the estimate." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CostCalculatorEstimateResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CostCalculatorEstimateResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorEmployment": { + "type": "structure", + "members": { + "country": { + "target": "com.remote.api#MinimalCountry", + "traits": { + "smithy.api#required": {} + } + }, + "country_benefits_details_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A link to Remote's guide on benefits available in this country. Null if not available.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "country_guide_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A link to Remote's country hiring guide. Null if not available.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employer_currency_costs": { + "target": "com.remote.api#CostCalculatorCosts", + "traits": { + "smithy.api#required": {} + } + }, + "has_extra_statutory_payment": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this country has extra statutory payments (e.g., 13th month salary in the Philippines).", + "smithy.api#required": {} + } + }, + "has_fringe_benefits_tax": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this country has a fringe benefits tax on employer-paid benefit premiums (e.g. New Zealand)." + } + }, + "minimum_onboarding_time": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The minimum number of business days required to onboard an employee in this country. Null if not determined.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "region": { + "target": "com.remote.api#MinimalRegion", + "traits": { + "smithy.api#required": {} + } + }, + "regional_currency_costs": { + "target": "com.remote.api#CostCalculatorCosts", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A cost estimate for a single employment, including costs in both the regional (local) currency and the employer's preferred currency." + } + }, + "com.remote.api#MinimalCountry": { + "type": "structure", + "members": { + "alpha_2_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 alpha-2 country code (e.g., \"PT\", \"US\", \"GB\").", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 alpha-3 country code (e.g., \"PRT\", \"USA\", \"GBR\"). This is the primary code used across the Remote API.", + "smithy.api#required": {} + } + }, + "features": { + "target": "com.remote.api#MinimalCountryFeaturesList", + "traits": { + "smithy.api#documentation": "Feature flags indicating which Remote services are available in this country." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The country's full English name.", + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique URL-friendly identifier for the country.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A lightweight country representation with basic identification fields." + } + }, + "com.remote.api#MinimalCountryFeaturesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Feature flags indicating which Remote services are available in this country." + } + }, + "com.remote.api#CostCalculatorCosts": { + "type": "structure", + "members": { + "annual_benefits_breakdown": { + "target": "com.remote.api#CostCalculatorCostsAnnualBenefitsBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all annual benefit costs" + } + }, + "annual_benefits_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual benefits total that a company must pay for this employment" + } + }, + "annual_contributions_breakdown": { + "target": "com.remote.api#CostCalculatorCostsAnnualContributionsBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all annual employer contribution costs" + } + }, + "annual_contributions_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual contributions that a company must pay for this employment", + "smithy.api#required": {} + } + }, + "annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual gross salary that the employee is going to earn", + "smithy.api#required": {} + } + }, + "annual_indirect_tax": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual indirect tax that a company must pay for this employment" + } + }, + "annual_management_fee": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual management fees" + } + }, + "annual_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual gross salary + annual contributions + annual fee (monthly fee * 12) + extra statutory payments if applicable", + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#Currency", + "traits": { + "smithy.api#required": {} + } + }, + "discount": { + "target": "com.remote.api#CostCalculatorDiscountResponse" + }, + "extra_statutory_payments_breakdown": { + "target": "com.remote.api#CostCalculatorCostsExtraStatutoryPaymentsBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all annual extra statutory payment costs" + } + }, + "extra_statutory_payments_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "13th month salary, this happens for countries such as Philippines", + "smithy.api#required": {} + } + }, + "fringe_benefits_tax_breakdown": { + "target": "com.remote.api#CostCalculatorCostsFringeBenefitsTaxBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all annual fringe benefits tax costs" + } + }, + "fringe_benefits_tax_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Estimated tax on employer-paid benefit premiums (e.g. New Zealand FBT)" + } + }, + "monthly_benefits_breakdown": { + "target": "com.remote.api#CostCalculatorCostsMonthlyBenefitsBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all monthly benefit costs" + } + }, + "monthly_benefits_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The benefits total that the company pays monthly" + } + }, + "monthly_contributions_breakdown": { + "target": "com.remote.api#CostCalculatorCostsMonthlyContributionsBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all monthly employer contribution costs" + } + }, + "monthly_contributions_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The contributions that the company pays monthly", + "smithy.api#required": {} + } + }, + "monthly_fringe_benefits_tax_breakdown": { + "target": "com.remote.api#CostCalculatorCostsMonthlyFringeBenefitsTaxBreakdownList", + "traits": { + "smithy.api#documentation": "The list of all monthly fringe benefits tax costs" + } + }, + "monthly_fringe_benefits_tax_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Monthly estimated tax on employer-paid benefit premiums (e.g. New Zealand FBT)" + } + }, + "monthly_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The gross monthly salary for the Employee", + "smithy.api#required": {} + } + }, + "monthly_indirect_tax": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The monthly indirect tax that a company must pay for this employment" + } + }, + "monthly_management_fee": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The monthly management fees" + } + }, + "monthly_tce": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Monthly gross salary + monthly contributions (doesn't include fee)", + "smithy.api#required": {} + } + }, + "monthly_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Monthly gross salary + monthly contributions + monthly fee", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorCost": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The cost amount in cents.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable explanation of how this cost is calculated or what it covers.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of this cost item (e.g., \"Health Insurance\", \"Social Security\").", + "smithy.api#required": {} + } + }, + "zendesk_article_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the related help article, if available.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "zendesk_article_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A link to a help article with more information about this cost, if available.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A single cost line item within a cost breakdown (e.g., a specific employer contribution, benefit, or statutory payment)." + } + }, + "com.remote.api#CostCalculatorCostsAnnualBenefitsBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all annual benefit costs" + } + }, + "com.remote.api#CostCalculatorCostsAnnualContributionsBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all annual employer contribution costs" + } + }, + "com.remote.api#CostCalculatorDiscountResponse": { + "type": "structure", + "members": { + "annual_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The annual discount amount in cents.", + "smithy.api#required": {} + } + }, + "monthly_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The monthly discount amount in cents.", + "smithy.api#required": {} + } + }, + "months": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of months the discount applies to.", + "smithy.api#required": {} + } + }, + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable label for the discount.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The discount applied to a cost estimate, showing the annual and monthly savings." + } + }, + "com.remote.api#CostCalculatorCostsExtraStatutoryPaymentsBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all annual extra statutory payment costs" + } + }, + "com.remote.api#CostCalculatorCostsFringeBenefitsTaxBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all annual fringe benefits tax costs" + } + }, + "com.remote.api#CostCalculatorCostsMonthlyBenefitsBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all monthly benefit costs" + } + }, + "com.remote.api#CostCalculatorCostsMonthlyContributionsBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all monthly employer contribution costs" + } + }, + "com.remote.api#CostCalculatorCostsMonthlyFringeBenefitsTaxBreakdownList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorCost" + }, + "traits": { + "smithy.api#documentation": "The list of all monthly fringe benefits tax costs" + } + }, + "com.remote.api#CostCalculatorEstimateResponseDataEmploymentsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorEmployment" + }, + "traits": {} + }, + "com.remote.api#CostCalculatorEstimateResponseData": { + "type": "structure", + "members": { + "employments": { + "target": "com.remote.api#CostCalculatorEstimateResponseDataEmploymentsList" + } + }, + "traits": {} + }, + "com.remote.api#PostV1CostCalculatorEstimation": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CostCalculatorEstimationRequest" + }, + "output": { + "target": "com.remote.api#CostCalculatorEstimateResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/cost-calculator/estimation", + "code": 200 + }, + "smithy.api#documentation": "Creates a cost estimation of employments" + } + }, + "com.remote.api#PostV1CostCalculatorEstimationCsvRequestEmploymentsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorEmploymentParam" + }, + "traits": { + "smithy.api#documentation": "One or more employments to estimate costs for." + } + }, + "com.remote.api#PostV1CostCalculatorEstimationCsvRequest": { + "type": "structure", + "members": { + "company_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company name, used for labeling in PDF/CSV exports." + } + }, + "employer_currency_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code for the employer's preferred currency (e.g., \"USD\"). All costs will be converted to this currency.", + "smithy.api#required": {} + } + }, + "employments": { + "target": "com.remote.api#PostV1CostCalculatorEstimationCsvRequestEmploymentsList", + "traits": { + "smithy.api#documentation": "One or more employments to estimate costs for.", + "smithy.api#required": {} + } + }, + "global_discount": { + "target": "com.remote.api#CostCalculatorDiscount" + }, + "include_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include benefit costs in the estimate. Defaults to false if not provided." + } + }, + "include_cost_breakdowns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include detailed cost breakdowns (individual contributions, benefits, etc.) in the response." + } + }, + "include_management_fee": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include Remote's management fee in the total cost calculation." + } + }, + "include_premium_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include premium benefit options in the estimate." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CostCalculatorEstimateCSVResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CostCalculatorEstimateCSVResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorEstimateCSVResponseData": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CostCalculatorEstimationCsv": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CostCalculatorEstimationCsvRequest" + }, + "output": { + "target": "com.remote.api#CostCalculatorEstimateCSVResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/cost-calculator/estimation-csv", + "code": 200 + }, + "smithy.api#documentation": "Creates a CSV cost estimation of employments\n\nCreates CSV cost estimation of employments" + } + }, + "com.remote.api#PostV1CostCalculatorEstimationPdfRequestEmploymentsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCalculatorEmploymentParam" + }, + "traits": { + "smithy.api#documentation": "One or more employments to estimate costs for." + } + }, + "com.remote.api#PostV1CostCalculatorEstimationPdfRequest": { + "type": "structure", + "members": { + "company_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The company name, used for labeling in PDF/CSV exports." + } + }, + "employer_currency_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code for the employer's preferred currency (e.g., \"USD\"). All costs will be converted to this currency.", + "smithy.api#required": {} + } + }, + "employments": { + "target": "com.remote.api#PostV1CostCalculatorEstimationPdfRequestEmploymentsList", + "traits": { + "smithy.api#documentation": "One or more employments to estimate costs for.", + "smithy.api#required": {} + } + }, + "global_discount": { + "target": "com.remote.api#CostCalculatorDiscount" + }, + "include_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include benefit costs in the estimate. Defaults to false if not provided." + } + }, + "include_cost_breakdowns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include detailed cost breakdowns (individual contributions, benefits, etc.) in the response." + } + }, + "include_management_fee": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include Remote's management fee in the total cost calculation." + } + }, + "include_premium_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include premium benefit options in the estimate." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CostCalculatorEstimatePDFResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CostCalculatorEstimatePDFResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CostCalculatorEstimatePDFResponseData": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CostCalculatorEstimationPdf": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CostCalculatorEstimationPdfRequest" + }, + "output": { + "target": "com.remote.api#CostCalculatorEstimatePDFResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/cost-calculator/estimation-pdf", + "code": 200 + }, + "smithy.api#documentation": "Creates PDF cost estimation of employments\n\nCreates a PDF cost estimation of employments based on the provided parameters." + } + }, + "com.remote.api#GetV1CostCalculatorRegionsSlugFieldsRequest": { + "type": "structure", + "members": { + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Slug" + } + }, + "include_premium_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_premium_benefits", + "smithy.api#documentation": "If the premium benefits should be included in the response" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#JSONSchemaResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#JSONSchemaResponseData", + "traits": { + "smithy.api#documentation": "JSON Schema" + } + } + }, + "traits": { + "smithy.api#documentation": "JSON Schema Response" + } + }, + "com.remote.api#JSONSchemaResponseDataSchemaPropertiesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.remote.api#JSONSchemaResponseDataSchemaRequiredList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#JSONSchemaResponseDataSchemaXJsfOrderList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#JSONSchemaResponseDataSchema": { + "type": "structure", + "members": { + "properties": { + "target": "com.remote.api#JSONSchemaResponseDataSchemaPropertiesMap", + "traits": { + "smithy.api#required": {} + } + }, + "required": { + "target": "com.remote.api#JSONSchemaResponseDataSchemaRequiredList" + }, + "x_jsf_order": { + "target": "com.remote.api#JSONSchemaResponseDataSchemaXJsfOrderList", + "traits": { + "smithy.api#jsonName": "x-jsf-order" + } + } + }, + "traits": {} + }, + "com.remote.api#JSONSchemaResponseData": { + "type": "structure", + "members": { + "schema": { + "target": "com.remote.api#JSONSchemaResponseDataSchema" + }, + "version": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#documentation": "JSON Schema" + } + }, + "com.remote.api#GetV1CostCalculatorRegionsSlugFields": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CostCalculatorRegionsSlugFieldsRequest" + }, + "output": { + "target": "com.remote.api#JSONSchemaResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/cost-calculator/regions/{slug}/fields", + "code": 200 + }, + "smithy.api#documentation": "Show region fields\n\nReturns required fields JSON Schema for a given region. These are required in order to calculate\n the cost of employment for the region. These fields are based on employer contributions that are associated\n with the region or any of it's parent regions." + } + }, + "com.remote.api#CountriesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CountriesResponseDataList" + } + }, + "traits": { + "smithy.api#documentation": "List of countries supported by Remote API" + } + }, + "com.remote.api#CountriesResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#Country" + }, + "traits": {} + }, + "com.remote.api#GetV1Countries": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#CountriesResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/countries", + "code": 200 + }, + "smithy.api#documentation": "List countries\n\nReturns the countries supported by Remote API, alphabetically ordered.\nThe supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema.\nThe countries present in the list are the ones where creating a company is allowed.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1CountriesCountryCodeContractorContractDetailsRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3-digit alphabetic codes" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Employment ID" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorContractDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorContractDetailsResponseData", + "traits": { + "smithy.api#documentation": "Contractor contract details response data" + } + } + }, + "traits": { + "smithy.api#documentation": "Response for contractor contract details" + } + }, + "com.remote.api#ContractorContractDetailsResponseDataSchemaMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Contract details schema object with variable fields based on country" + } + }, + "com.remote.api#ContractorContractDetailsResponseData": { + "type": "structure", + "members": { + "schema": { + "target": "com.remote.api#ContractorContractDetailsResponseDataSchemaMap", + "traits": { + "smithy.api#documentation": "Contract details schema object with variable fields based on country", + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "JSON schema version number", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor contract details response data" + } + }, + "com.remote.api#GetV1CountriesCountryCodeContractorContractDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CountriesCountryCodeContractorContractDetailsRequest" + }, + "output": { + "target": "com.remote.api#ContractorContractDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/countries/{country_code}/contractor-contract-details", + "code": 200 + }, + "smithy.api#documentation": "Show contractor contract details\n\nReturns the contract details JSON Schema for contractors given a country\n\n## Scopes" + } + }, + "com.remote.api#GetV1CountriesCountryCodeEngagementAgreementDetailsRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3-digit alphabetic codes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EngagementAgreementDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EngagementAgreementDetailsResponseData", + "traits": { + "smithy.api#documentation": "Engagement agreement details response data" + } + } + }, + "traits": { + "smithy.api#documentation": "Response for engagement agreement details" + } + }, + "com.remote.api#EngagementAgreementDetailsResponseDataSchemaMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Engagement agreement details schema object with variable fields based on country" + } + }, + "com.remote.api#EngagementAgreementDetailsResponseData": { + "type": "structure", + "members": { + "schema": { + "target": "com.remote.api#EngagementAgreementDetailsResponseDataSchemaMap", + "traits": { + "smithy.api#documentation": "Engagement agreement details schema object with variable fields based on country", + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "JSON schema version number", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Engagement agreement details response data" + } + }, + "com.remote.api#GetV1CountriesCountryCodeEngagementAgreementDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CountriesCountryCodeEngagementAgreementDetailsRequest" + }, + "output": { + "target": "com.remote.api#EngagementAgreementDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/countries/{country_code}/engagement-agreement-details", + "code": 200 + }, + "smithy.api#documentation": "Show engagement agreement details\n\nReturns the engagement agreement details JSON Schema for a country. Only DEU country is supported for now.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CountriesCountryCodeHolidaysYearRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3166-1 3-digit alphabetic codes" + } + }, + "year": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Year for the holidays" + } + }, + "country_subdivision_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "country_subdivision_code", + "smithy.api#documentation": "Country subdivision code according to ISO 3166-2 codes" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#HolidaysResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#HolidaysResponseDataList" + } + }, + "traits": { + "smithy.api#documentation": "Holidays response" + } + }, + "com.remote.api#Holiday": { + "type": "structure", + "members": { + "day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the holiday", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the holiday", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Notes about the holiday", + "com.distilled.openapi#nullable": {} + } + }, + "observed_day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date when the holiday is observed", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#HolidaysResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#Holiday" + }, + "traits": {} + }, + "com.remote.api#GetV1CountriesCountryCodeHolidaysYear": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CountriesCountryCodeHolidaysYearRequest" + }, + "output": { + "target": "com.remote.api#HolidaysResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/countries/{country_code}/holidays/{year}", + "code": 200 + }, + "smithy.api#documentation": "List all holidays of a country\n\nList all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision.\n\n## Scopes" + } + }, + "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequestProductType": { + "type": "enum", + "members": { + "PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "peo" + } + }, + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + }, + "E2E_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "e2e_payroll" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3-digit alphabetic codes" + } + }, + "form": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Name of the desired form" + } + }, + "product_type": { + "target": "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequestProductType", + "traits": { + "smithy.api#httpQuery": "product_type", + "smithy.api#documentation": "Product type. Default value is global_payroll." + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "legal_entity_id", + "smithy.api#documentation": "Legal entity id for admistrative_details of e2e payroll products in GBR" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CountryFormResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#documentation": "Object with required and optional fields, its descriptions and suggested presentation" + } + }, + "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsForm": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsFormRequest" + }, + "output": { + "target": "com.remote.api#CountryFormResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/countries/{country_code}/legal_entity_forms/{form}", + "code": 200 + }, + "smithy.api#documentation": "Show legal entity administrative details form schema\n\nReturns the json schema of a supported form. Possible form names are:\n```\n- administrative_details\n```\n\nMost forms require a company access token, as they are dependent on certain\nproperties of companies and their current employments.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1CountriesCountryCodeFormRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1CountriesCountryCodeFormRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1CountriesCountryCodeFormRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1CountriesCountryCodeFormRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Country code according to ISO 3-digit alphabetic codes" + } + }, + "form": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Name of the desired form" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Required for `contract_amendment` and `global_payroll_state_taxes` forms" + } + }, + "jurisdiction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "jurisdiction", + "smithy.api#documentation": "Two-letter US state code. Required for `global_payroll_state_taxes` (e.g. `NY`)." + } + }, + "only_for_testing_include_scheduled_benefit_groups": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "only_for_testing_include_scheduled_benefit_groups", + "smithy.api#documentation": "FOR TESTING PURPOSES ONLY: Include scheduled benefit groups." + } + }, + "skip_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip_benefits", + "smithy.api#documentation": "Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API." + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1CountriesCountryCodeFormRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1CountriesCountryCodeForm": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CountriesCountryCodeFormRequest" + }, + "output": { + "target": "com.remote.api#CountryFormResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/countries/{country_code}/{form}", + "code": 200 + }, + "smithy.api#documentation": "Show form schema\n\nReturns the json schema of a supported form. Possible form names are:\n```\n- address_details \n- administrative_details \n- bank_account_details \n- employment_basic_information \n- contractor_basic_information \n- contractor_contract_details \n- billing_address_details \n- contract_details \n- emergency_contact \n- emergency_contact_details \n- employment_document_details \n- engagement_agreement_details \n- personal_details \n- pricing_plan_details \n- company_basic_information \n- global_payroll_administrative_details \n- global_payroll_bank_account_details \n- global_payroll_basic_information \n- global_payroll_contract_details \n- global_payroll_federal_taxes \n- global_payroll_state_taxes \n- global_payroll_personal_details \n- benefit_renewal_request \n- hris_personal_details \n\n```\n\nMost forms require a company access token, as they are dependent on certain\nproperties of companies and their current employments. However, the `address_details`\nand `company_basic_information` forms can be accessed using client_credentials\nauthentication (without a company).\n\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1CurrencyConverterEffective2Request": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount to convert in cents", + "smithy.api#required": {} + } + }, + "source_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code to convert from", + "smithy.api#required": {} + } + }, + "target_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code to convert to", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ConvertCurrencyResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ConvertCurrencyResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The response from the currency converter" + } + }, + "com.remote.api#ConvertCurrency": { + "type": "structure", + "members": { + "exchange_rate": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The exchange rate used to convert the amount", + "smithy.api#required": {} + } + }, + "source_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount in cents in the source currency", + "smithy.api#required": {} + } + }, + "source_currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {} + } + }, + "target_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount in cents in the target currency", + "smithy.api#required": {} + } + }, + "target_currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The response from the currency converter" + } + }, + "com.remote.api#ConvertCurrencyResponseData": { + "type": "structure", + "members": { + "conversion_data": { + "target": "com.remote.api#ConvertCurrency", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CurrencyConverterEffective2": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CurrencyConverterEffective2Request" + }, + "output": { + "target": "com.remote.api#ConvertCurrencyResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/currency-converter", + "code": 200 + }, + "smithy.api#documentation": "Convert currency using dynamic rates\n\nConvert currency using the rates Remote applies during employment creation and invoicing.\n\n## Scopes" + } + }, + "com.remote.api#PostV1CurrencyConverterEffectiveRequest": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount to convert in cents", + "smithy.api#required": {} + } + }, + "source_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code to convert from", + "smithy.api#required": {} + } + }, + "target_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code to convert to", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1CurrencyConverterEffective": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CurrencyConverterEffectiveRequest" + }, + "output": { + "target": "com.remote.api#ConvertCurrencyResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/currency-converter/effective", + "code": 200 + }, + "smithy.api#documentation": "Convert currency using dynamic rates\n\nConvert currency using the rates Remote applies during employment creation and invoicing.\n\n## Scopes" + } + }, + "com.remote.api#PostV1CurrencyConverterRawRequest": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount to convert in cents", + "smithy.api#required": {} + } + }, + "source_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code to convert from", + "smithy.api#required": {} + } + }, + "target_currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency code to convert to", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1CurrencyConverterRaw": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CurrencyConverterRawRequest" + }, + "output": { + "target": "com.remote.api#ConvertCurrencyResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/currency-converter/raw", + "code": 200 + }, + "smithy.api#documentation": "Convert currency using flat rates\n\nConvert currency using FX rates used in Remote’s estimation tools.\n These rates are not guaranteed to match final onboarding or contract rates.\n\n## Scopes" + } + }, + "com.remote.api#GetV1CustomFieldsRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListEmploymentCustomFieldsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListEmploymentCustomFieldsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many custom_fields" + } + }, + "com.remote.api#EmploymentCustomField": { + "type": "structure", + "members": { + "data_entry_access": { + "target": "com.remote.api#CustomFieldDataEntryAccess", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the custom field definition.", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The display name of the custom field (e.g., \"Internal ID\", \"T-Shirt Size\").", + "smithy.api#required": {} + } + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this custom field is required for all employments in the company.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#CustomFieldDataType", + "traits": { + "smithy.api#required": {} + } + }, + "visibility_scope": { + "target": "com.remote.api#CustomFieldVisibilityScope", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#CustomFieldDataEntryAccess": { + "type": "enum", + "members": { + "COMPANY_ADMIN_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company_admin_only" + } + }, + "EMPLOYEE_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee_only" + } + }, + "EVERYONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "everyone" + } + } + }, + "traits": { + "smithy.api#documentation": "Who can enter or edit values for this custom field. Controls which users see the field as editable vs read-only." + } + }, + "com.remote.api#CustomFieldDataType": { + "type": "enum", + "members": { + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string" + } + }, + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + }, + "INTEGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "integer" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "boolean" + } + }, + "PERCENTAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "percentage" + } + }, + "DECIMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "decimal" + } + }, + "LINK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "link" + } + }, + "CURRENCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "currency" + } + }, + "SINGLE_SELECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "single_select" + } + } + }, + "traits": { + "smithy.api#documentation": "The datatype of the custom field" + } + }, + "com.remote.api#CustomFieldVisibilityScope": { + "type": "enum", + "members": { + "COMPANY_ADMIN_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company_admin_only" + } + }, + "EVERYONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "everyone" + } + } + }, + "traits": { + "smithy.api#documentation": "Who can see this custom field and its values. Controls visibility across different user roles." + } + }, + "com.remote.api#ListEmploymentCustomFieldsResponseDataCustomFieldsList": { + "type": "list", + "member": { + "target": "com.remote.api#EmploymentCustomField" + }, + "traits": {} + }, + "com.remote.api#ListEmploymentCustomFieldsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "custom_fields": { + "target": "com.remote.api#ListEmploymentCustomFieldsResponseDataCustomFieldsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CustomFields": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CustomFieldsRequest" + }, + "output": { + "target": "com.remote.api#ListEmploymentCustomFieldsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/custom-fields", + "code": 200 + }, + "smithy.api#documentation": "Lists custom fields definitions\n\nReturns custom fields definitions\n\n## Scopes" + } + }, + "com.remote.api#CreateCustomFieldDefinitionParams": { + "type": "union", + "members": { + "CreateGeneralCustomFieldDefinitionParams": { + "target": "com.remote.api#CreateGeneralCustomFieldDefinitionParams" + }, + "CreateSingleSelectCustomFieldDefinitionParams": { + "target": "com.remote.api#CreateSingleSelectCustomFieldDefinitionParams" + }, + "CreateCurrencyCustomFieldDefinitionParams": { + "target": "com.remote.api#CreateCurrencyCustomFieldDefinitionParams" + } + }, + "traits": { + "smithy.api#documentation": "Schema for creating a custom field definition" + } + }, + "com.remote.api#CreateGeneralCustomFieldDefinitionParams": { + "type": "structure", + "members": { + "data_entry_access": { + "target": "com.remote.api#CustomFieldDataEntryAccess", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#CustomFieldSimpleDataType", + "traits": { + "smithy.api#required": {} + } + }, + "visibility_scope": { + "target": "com.remote.api#CustomFieldVisibilityScope", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for creating a general custom field definition" + } + }, + "com.remote.api#CustomFieldSimpleDataType": { + "type": "enum", + "members": { + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string" + } + }, + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + }, + "INTEGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "integer" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "boolean" + } + }, + "PERCENTAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "percentage" + } + }, + "DECIMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "decimal" + } + }, + "LINK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "link" + } + } + }, + "traits": { + "smithy.api#documentation": "The datatype of the custom field" + } + }, + "com.remote.api#CreateSingleSelectCustomFieldDefinitionParams": { + "type": "structure", + "members": { + "data_entry_access": { + "target": "com.remote.api#CustomFieldDataEntryAccess", + "traits": { + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.remote.api#SingleSelectMetadata", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#CreateSingleSelectCustomFieldDefinitionParamsType", + "traits": { + "smithy.api#required": {} + } + }, + "visibility_scope": { + "target": "com.remote.api#CustomFieldVisibilityScope", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for creating a single select custom field definition" + } + }, + "com.remote.api#SingleSelectMetadata": { + "type": "structure", + "members": { + "options": { + "target": "com.remote.api#SingleSelectMetadataOptionsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The metadata for a single select custom field" + } + }, + "com.remote.api#SingleSelectMetadataOptionsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#CreateSingleSelectCustomFieldDefinitionParamsType": { + "type": "enum", + "members": { + "SINGLE_SELECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "single_select" + } + } + }, + "traits": {} + }, + "com.remote.api#CreateCurrencyCustomFieldDefinitionParams": { + "type": "structure", + "members": { + "data_entry_access": { + "target": "com.remote.api#CustomFieldDataEntryAccess", + "traits": { + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.remote.api#CreateCurrencyCustomFieldDefinitionParamsMetadata", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#CreateCurrencyCustomFieldDefinitionParamsType", + "traits": { + "smithy.api#required": {} + } + }, + "visibility_scope": { + "target": "com.remote.api#CustomFieldVisibilityScope", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for creating a currency custom field definition" + } + }, + "com.remote.api#CreateCurrencyCustomFieldDefinitionParamsMetadata": { + "type": "structure", + "members": { + "currency": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CreateCurrencyCustomFieldDefinitionParamsType": { + "type": "enum", + "members": { + "CURRENCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "currency" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CustomFieldsRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#CreateCustomFieldDefinitionParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CreateEmploymentCustomFieldResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CreateEmploymentCustomFieldResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response returned after successfully creating a new custom field definition." + } + }, + "com.remote.api#CreateEmploymentCustomFieldResponseData": { + "type": "structure", + "members": { + "custom_field": { + "target": "com.remote.api#EmploymentCustomField", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1CustomFields": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1CustomFieldsRequest" + }, + "output": { + "target": "com.remote.api#CreateEmploymentCustomFieldResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/custom-fields", + "code": 200 + }, + "smithy.api#documentation": "Create Custom Field Definition\n\nCreates a new custom field definition.\n\n## Scopes" + } + }, + "com.remote.api#GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest": { + "type": "structure", + "members": { + "custom_field_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Custom field ID" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentCustomFieldValueResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentCustomFieldValueResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a single custom field value for an employment." + } + }, + "com.remote.api#EmploymentCustomFieldValue": { + "type": "structure", + "members": { + "custom_field_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the custom field definition this value belongs to.", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.remote.api#EmploymentCustomFieldValueValue", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The value of a custom field for a specific employment. The type of `value` depends on the custom field's data type." + } + }, + "com.remote.api#EmploymentCustomFieldValueJsonValue": { + "type": "structure", + "members": { + "selected_option": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the selected option.", + "smithy.api#required": {} + } + }, + "selected_option_label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The human-readable label of the selected option (e.g., \"XL\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The value for a single-select custom field, containing both the option ID and its human-readable label." + } + }, + "com.remote.api#EmploymentCustomFieldValueValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Integer" + }, + "Case2": { + "target": "smithy.api#Boolean" + }, + "Case3": { + "target": "smithy.api#Double" + }, + "EmploymentCustomFieldValueJsonValue": { + "target": "com.remote.api#EmploymentCustomFieldValueJsonValue" + } + }, + "traits": {} + }, + "com.remote.api#EmploymentCustomFieldValueResponseData": { + "type": "structure", + "members": { + "custom_field_value": { + "target": "com.remote.api#EmploymentCustomFieldValue", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1CustomFieldsCustomFieldIdValuesEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#EmploymentCustomFieldValueResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/custom-fields/{custom_field_id}/values/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Show a custom field value\n\nReturns a custom field value for a given employment\n\n## Scopes" + } + }, + "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequestValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Integer" + }, + "Case3": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest": { + "type": "structure", + "members": { + "custom_field_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Custom field ID" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "value": { + "target": "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequestValue", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#EmploymentCustomFieldValueResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/custom-fields/{custom_field_id}/values/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update a Custom Field Value\n\nUpdates a custom field value for a given employment.\n\n## Scopes" + } + }, + "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2RequestValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Integer" + }, + "Case3": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request": { + "type": "structure", + "members": { + "custom_field_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Custom field ID" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "value": { + "target": "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2RequestValue", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request" + }, + "output": { + "target": "com.remote.api#EmploymentCustomFieldValueResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/custom-fields/{custom_field_id}/values/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update a Custom Field Value\n\nUpdates a custom field value for a given employment.\n\n## Scopes" + } + }, + "com.remote.api#GetV1DirectOffboardingsRequestEmploymentModel": { + "type": "enum", + "members": { + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1DirectOffboardingsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter by employment ID" + } + }, + "employment_model": { + "target": "com.remote.api#GetV1DirectOffboardingsRequestEmploymentModel", + "traits": { + "smithy.api#httpQuery": "employment_model", + "smithy.api#documentation": "Filter by employment model. Currently only 'global_payroll' is supported." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListDirectOffboardingResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListDirectOffboardingResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many direct_offboardings" + } + }, + "com.remote.api#DirectOffboarding": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment being offboarded.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the offboarding.", + "smithy.api#required": {} + } + }, + "is_confidential_termination": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the termination is confidential.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "last_working_day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last working day of the employee.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#DirectOffboardingStatus", + "traits": { + "smithy.api#documentation": "The current status of the offboarding.", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date when the employment terminates.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#DirectOffboardingType", + "traits": { + "smithy.api#documentation": "The type of offboarding.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A Global Payroll employment's offboarding record." + } + }, + "com.remote.api#DirectOffboardingStatus": { + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + }, + "PENDING_PAYMENT_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_payment_details" + } + }, + "PENDING_PAYMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_payment" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the offboarding." + } + }, + "com.remote.api#DirectOffboardingType": { + "type": "enum", + "members": { + "TERMINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "termination" + } + }, + "RESIGNATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "resignation" + } + }, + "MUTUAL_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mutual_agreement" + } + }, + "RETIREMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retirement" + } + }, + "END_OF_CONTRACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_contract" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of offboarding." + } + }, + "com.remote.api#ListDirectOffboardingResponseDataDirectOffboardingsList": { + "type": "list", + "member": { + "target": "com.remote.api#DirectOffboarding" + }, + "traits": {} + }, + "com.remote.api#ListDirectOffboardingResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "direct_offboardings": { + "target": "com.remote.api#ListDirectOffboardingResponseDataDirectOffboardingsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1DirectOffboardings": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1DirectOffboardingsRequest" + }, + "output": { + "target": "com.remote.api#ListDirectOffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/direct-offboardings", + "code": 200 + }, + "smithy.api#documentation": "List Direct Offboardings\n\nLists offboardings for global payroll employments, optionally filtered by employment ID.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1DocumentsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment to attach this file to.", + "smithy.api#required": {} + } + }, + "file": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file content, base64-encoded.", + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A more specific classification within the type (e.g., \"ir_35\" for a UK contractor tax determination)." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the file (e.g., \"contract\", \"id\", \"tax_form\")." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#UploadFileResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#UploadFileResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response returned after successfully uploading a file." + } + }, + "com.remote.api#File": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the file.", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name including extension (e.g., \"id.pdf\", \"contract.pdf\").", + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the file (e.g., \"id\", \"contract\", \"tax_form\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A file associated with an employment, such as a contract, tax form, or identity document." + } + }, + "com.remote.api#UploadFileResponseData": { + "type": "structure", + "members": { + "file": { + "target": "com.remote.api#File", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1Documents": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1DocumentsRequest" + }, + "output": { + "target": "com.remote.api#UploadFileResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/documents", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "Upload file\n\nUploads a file associated with a specified employment.\n\nPlease contact api-support@remote.com to request access to this endpoint.\n\n\n## Scopes", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.remote.api#GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeAddressRequest": { + "type": "structure", + "members": { + "address_details_json_schema_version": { + "target": "com.remote.api#GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentDetailsOnlyResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentDetailsOnlyResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing only the updated details struct plus base employment fields (id, status, type, updated_at, user_status). Exactly one of the details properties is present per response." + } + }, + "com.remote.api#EmploymentDetailsOnlyResponseDataEmploymentBankAccountDetailsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.remote.api#EmploymentDetailsOnlyResponseDataEmploymentContractOrigin": { + "type": "enum", + "members": { + "REMOTE_CONTRACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_contract" + } + }, + "CUSTOM_REMOTE_CONTRACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_remote_contract" + } + }, + "PROVIDED_BY_CUSTOMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "provided_by_customer" + } + } + }, + "traits": { + "smithy.api#documentation": "Origin of the employment contract. Returned by the basic information endpoint." + } + }, + "com.remote.api#EmploymentStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created" + } + }, + "PRE_HIRE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pre_hire" + } + }, + "CREATED_AWAITING_RESERVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created_awaiting_reserve" + } + }, + "CREATED_RESERVE_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created_reserve_paid" + } + }, + "INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "initiated" + } + }, + "INVITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invited" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "review" + } + }, + "JOB_TITLE_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "job_title_review" + } + }, + "PENDING_POST_SELF_ENROLLMENT_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_post_self_enrollment_actions" + } + }, + "OFFBOARDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding" + } + }, + "ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "archived" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the employment record.\n\n- `active`: The employee is fully onboarded and actively working.\n- `created`: The employment has been created but onboarding has not started.\n- `pre_hire`: A pre-hire employment record, created before formal onboarding begins.\n- `created_awaiting_reserve`: The employment is created but waiting for a risk reserve deposit to be paid.\n- `created_reserve_paid`: The risk reserve has been paid and the employment can proceed with onboarding.\n- `initiated`: Onboarding has been started by the employer.\n- `invited`: The employee has been invited to complete their self-enrollment on Remote.\n- `pending`: The employment is pending review or further action before it can become active.\n- `review`: The employment is under review by Remote (e.g., contract or compliance review).\n- `archived`: The employment has been terminated or offboarded.\n- `deleted`: The employment record has been deleted.\n" + } + }, + "com.remote.api#EmploymentDetailsOnlyResponseDataEmploymentType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "DIRECT_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "direct_employee" + } + }, + "GLOBAL_PAYROLL_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll_employee" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of employment." + } + }, + "com.remote.api#UserStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created" + } + }, + "INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "initiated" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + } + }, + "traits": { + "smithy.api#documentation": "The status of the user account associated with this employment.\n\n- `active`: The user account is active and the user can log in.\n- `created`: The user account has been created but not yet activated.\n- `initiated`: The user has been invited but has not completed registration.\n- `cancelled`: The user account was cancelled before activation.\n- `inactive`: The user account has been deactivated (e.g., after offboarding).\n- `deleted`: The user account has been deleted.\n" + } + }, + "com.remote.api#EmploymentDetailsOnlyResponseDataEmployment": { + "type": "structure", + "members": { + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. Its properties may vary depending on the country. Null if the employee has not submitted their address yet.", + "com.distilled.openapi#nullable": {} + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. Its properties may vary depending on the country." + } + }, + "bank_account_details": { + "target": "com.remote.api#EmploymentDetailsOnlyResponseDataEmploymentBankAccountDetailsList" + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Basic information. Its properties may vary depending on the country.\n\nWhen present, `login_email` indicates which address the employee logs in with:\n`\"personal\"` or `\"work\"`.\n" + } + }, + "billing_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Billing address information. Its properties may vary depending on the country." + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract details information. Its properties may vary depending on the country." + } + }, + "contract_origin": { + "target": "com.remote.api#EmploymentDetailsOnlyResponseDataEmploymentContractOrigin", + "traits": { + "smithy.api#documentation": "Origin of the employment contract. Returned by the basic information endpoint.", + "com.distilled.openapi#nullable": {} + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. Its properties may vary depending on the country. Null if the employee has not submitted their emergency contact yet.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Personal details information. Its properties may vary depending on the country. Null if the employee has not submitted their personal details yet.", + "com.distilled.openapi#nullable": {} + } + }, + "pricing_plan_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Pricing plan information." + } + }, + "status": { + "target": "com.remote.api#EmploymentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#EmploymentDetailsOnlyResponseDataEmploymentType", + "traits": { + "smithy.api#documentation": "The type of employment.", + "smithy.api#required": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this employment record was last updated.", + "smithy.api#required": {} + } + }, + "user_status": { + "target": "com.remote.api#UserStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentDetailsOnlyResponseData": { + "type": "structure", + "members": { + "employment": { + "target": "com.remote.api#EmploymentDetailsOnlyResponseDataEmployment" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeAddress": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeAddressRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/address", + "code": 200 + }, + "smithy.api#documentation": "Show employee address\n\nReturns the authenticated employee's residential address.\n\nThe employment is derived from the access token's subject — there is no\nemployment id in the path.\n\nThis endpoint requires country-specific data. The exact required fields vary depending on which\ncountry the authenticated employee's employment is in. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV1EmployeeAddressRequest": { + "type": "structure", + "members": { + "address_details_json_schema_version": { + "target": "com.remote.api#PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `address_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmployeeAddress": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmployeeAddressRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/address", + "code": 200 + }, + "smithy.api#documentation": "Update employee address\n\nUpdates the authenticated employee's residential address.\n\nThe employment is derived from the access token's subject — there is no\nemployment id in the path. The token must be an employee-role token\n(typically obtained via the OAuth2 assertion grant with subject\n`urn:remote-api:employee:employment:`).\n\nThis endpoint requires country-specific data. The exact required fields vary depending on which\ncountry the authenticated employee's employment is in. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeBankAccountRequest": { + "type": "structure", + "members": { + "bank_account_details_json_schema_version": { + "target": "com.remote.api#GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1EmployeeBankAccount": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeBankAccountRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/bank-account", + "code": 200 + }, + "smithy.api#documentation": "Show employee bank account\n\nReturns the authenticated employee's bank account details.\n\nThis endpoint requires and returns country-specific data. The exact fields vary depending on which\ncountry the authenticated employee's employment is in. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV1EmployeeBankAccountRequest": { + "type": "structure", + "members": { + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Bank account information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `bank_account_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmployeeBankAccount": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmployeeBankAccountRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/bank-account", + "code": 200 + }, + "smithy.api#documentation": "Update employee bank account\n\nUpserts the authenticated employee's bank account details.\n\nThis endpoint requires and returns country-specific data. The exact fields vary depending on which\ncountry the authenticated employee's employment is in. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeCurrent": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/current", + "code": 200 + }, + "smithy.api#documentation": "Get employee token identity\n\nReturns user and company information for the authenticated employee." + } + }, + "com.remote.api#GetV1EmployeeDocumentsRequestSortBy": { + "type": "enum", + "members": { + "DESCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "description" + } + }, + "DOCUMENT_SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document_source" + } + }, + "INSERTED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inserted_at" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "type" + } + }, + "UPLOADED_BY_ROLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uploaded_by_role" + } + }, + "RELATED_TO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "related_to" + } + }, + "SUB_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sub_type" + } + }, + "UPLOADED_BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uploaded_by" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeDocumentsRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeDocumentsRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "name", + "smithy.api#documentation": "Filter documents by their description or file name, accepts full and partial case insensitive matches" + } + }, + "inserted_after": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "inserted_after", + "smithy.api#documentation": "Filters the results that were uploaded on or after a given date" + } + }, + "inserted_before": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "inserted_before", + "smithy.api#documentation": "Filters the results that were uploaded before a given date" + } + }, + "sort_by": { + "target": "com.remote.api#GetV1EmployeeDocumentsRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "order": { + "target": "com.remote.api#GetV1EmployeeDocumentsRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListDocumentsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListDocumentsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many documents" + } + }, + "com.remote.api#ListDocumentsResponseDataDocumentsList": { + "type": "list", + "member": { + "target": "com.remote.api#File" + }, + "traits": {} + }, + "com.remote.api#ListDocumentsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "documents": { + "target": "com.remote.api#ListDocumentsResponseDataDocumentsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeDocuments": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeDocumentsRequest" + }, + "output": { + "target": "com.remote.api#ListDocumentsResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/documents", + "code": 200 + }, + "smithy.api#documentation": "Indexes all the documents for the employee\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmployeeDocumentsRequest": { + "type": "structure", + "members": { + "file": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file content, base64-encoded.", + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A more specific classification within the type." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the file (e.g., \"id\", \"tax_form\")." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmployeeDocuments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmployeeDocumentsRequest" + }, + "output": { + "target": "com.remote.api#UploadFileResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employee/documents", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "Upload employee file\n\nUploads a file owned by the authenticated employee, for example\nidentity documents or tax forms.\n\n\n## Scopes", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.remote.api#GetV1EmployeeDocumentsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Document ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DownloadDocumentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#DownloadDocumentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a document's metadata and its base64-encoded content for download." + } + }, + "com.remote.api#DownloadDocumentResponseDataDocument": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The document content, base64-encoded." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the document." + } + }, + "inserted_at": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name including extension." + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A more specific classification of the document. Null if no sub-type applies.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the document." + } + } + }, + "traits": {} + }, + "com.remote.api#DownloadDocumentResponseData": { + "type": "structure", + "members": { + "document": { + "target": "com.remote.api#DownloadDocumentResponseDataDocument" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeDocumentsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeDocumentsIdRequest" + }, + "output": { + "target": "com.remote.api#DownloadDocumentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/documents/{id}", + "code": 200 + }, + "smithy.api#documentation": "Download a document for the employee\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeEmergencyContactRequest": { + "type": "structure", + "members": { + "emergency_contact_details_json_schema_version": { + "target": "com.remote.api#GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "emergency_contact_details_json_schema_version", + "smithy.api#documentation": "Version of the emergency_contact_details form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1EmployeeEmergencyContact": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeEmergencyContactRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/emergency-contact", + "code": 200 + }, + "smithy.api#documentation": "Show employee emergency contact\n\nReturns the authenticated employee's emergency contact.\n\nThe employment is derived from the access token's subject — there is no\nemployment id in the path.\n\nThis endpoint requires country-specific data. The exact required fields vary depending on which\ncountry the authenticated employee's employment is in. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV1EmployeeEmergencyContactRequest": { + "type": "structure", + "members": { + "emergency_contact_details_json_schema_version": { + "target": "com.remote.api#PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "emergency_contact_details_json_schema_version", + "smithy.api#documentation": "Version of the emergency_contact_details form schema" + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `emergency_contact_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmployeeEmergencyContact": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmployeeEmergencyContactRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/emergency-contact", + "code": 200 + }, + "smithy.api#documentation": "Update employee emergency contact\n\nUpdates the authenticated employee's emergency contact.\n\nThe employment is derived from the access token's subject — there is no\nemployment id in the path. The token must be an employee-role token\n(typically obtained via the OAuth2 assertion grant with subject\n`urn:remote-api:employee:employment:`).\n\nThis endpoint requires country-specific data. The exact required fields vary depending on which\ncountry the authenticated employee's employment is in. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeExpenseCategoriesRequest": { + "type": "structure", + "members": { + "include_parents": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_parents", + "smithy.api#documentation": "Include parent (non-selectable) categories in addition to selectable leaves" + } + }, + "expense_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "expense_id", + "smithy.api#documentation": "Expense ID (slug) whose category should be included in the result, even if it is not selectable by default" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListExpenseCategoriesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListExpenseCategoriesResponseDataList" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a flat list of expense categories. Parent categories have is_selectable: false, while leaf categories have is_selectable: true. Child categories include parent_slug information." + } + }, + "com.remote.api#ExpenseCategoryNode": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Category code (e.g., 'travel.flights')" + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Category description", + "com.distilled.openapi#nullable": {} + } + }, + "instructions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Instructions for using this category", + "com.distilled.openapi#nullable": {} + } + }, + "is_selectable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this category can be selected" + } + }, + "parent": { + "target": "com.remote.api#ExpenseCategoryNodeParent", + "traits": { + "smithy.api#documentation": "Parent category information if this is a child category", + "com.distilled.openapi#nullable": {} + } + }, + "prompt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Prompt for user guidance", + "com.distilled.openapi#nullable": {} + } + }, + "scope": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Category scope (global, country, company, legal_entity)" + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the category" + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Category status (active, inactive)" + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable category name" + } + } + }, + "traits": { + "smithy.api#documentation": "A single expense category in the flat list structure" + } + }, + "com.remote.api#ExpenseCategoryNodeParent": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Parent category code" + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Parent category slug" + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Parent category title" + } + } + }, + "traits": { + "smithy.api#documentation": "Parent category information if this is a child category" + } + }, + "com.remote.api#ListExpenseCategoriesResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#ExpenseCategoryNode" + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeExpenseCategories": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeExpenseCategoriesRequest" + }, + "output": { + "target": "com.remote.api#ListExpenseCategoriesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/expense-categories", + "code": 200 + }, + "smithy.api#documentation": "List expense categories for the authenticated employee\n\nReturns the flat list of expense categories applicable to the current employee. Only active categories are returned, filtered by the employee's country / legal-entity visibility rules. Leaf nodes have `is_selectable: true`; parent nodes are excluded unless `include_parents=true`.\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeExpenses": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/expenses", + "code": 200 + }, + "smithy.api#documentation": "List expenses for the authenticated employee\n\nReturns a paginated list of expenses belonging to the current employee.\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmployeeExpensesRequestCategory": { + "type": "enum", + "members": { + "CAR_RENTAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_rental" + } + }, + "COWORKING_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking_office" + } + }, + "EDUCATION_TRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "education_training" + } + }, + "ENTERTAINMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "entertainment" + } + }, + "FLIGHT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flight" + } + }, + "FUEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fuel" + } + }, + "GIFTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gifts" + } + }, + "INSURANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "insurance" + } + }, + "LODGING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lodging" + } + }, + "MEALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meals" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PARKING_TOLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parking_toll" + } + }, + "SUBSCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "subscription" + } + }, + "TECH_EQUIPMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tech_equipment" + } + }, + "TELECOMMUNICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "telecommunication" + } + }, + "TRANSPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transport" + } + }, + "UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "utilities" + } + }, + "VACCINATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vaccination_testing" + } + }, + "VISA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "visa" + } + }, + "WELLNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wellness" + } + }, + "COWORKING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking" + } + }, + "HOME_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "home_office" + } + }, + "PHONE_UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_utilities" + } + }, + "TRAVEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel" + } + } + }, + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated).
\nNote: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future.\n" + } + }, + "com.remote.api#Base64File": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The content in base64 encoding.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "All the params needed upload a base64 file." + } + }, + "com.remote.api#PostV1EmployeeExpensesRequestReceiptsList": { + "type": "list", + "member": { + "target": "com.remote.api#Base64File" + }, + "traits": {} + }, + "com.remote.api#PostV1EmployeeExpensesRequest": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The expense amount in the specified currency, in cents.", + "smithy.api#required": {} + } + }, + "category": { + "target": "com.remote.api#PostV1EmployeeExpensesRequestCategory", + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated).
\nNote: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future.\n", + "com.distilled.openapi#nullable": {} + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": " The three-letter code for the expense currency.
\n Examples: `\"USD\"`, `\"EUR\"`, `\"CAD\"`\n", + "smithy.api#required": {} + } + }, + "expense_category_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Slug of the expense category from the hierarchical categories system (recommended). Takes precedence over legacy category field.", + "com.distilled.openapi#nullable": {} + } + }, + "expense_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the purchase, which must be in the past", + "smithy.api#required": {} + } + }, + "receipt": { + "target": "com.remote.api#Base64File" + }, + "receipts": { + "target": "com.remote.api#PostV1EmployeeExpensesRequestReceiptsList" + }, + "tax_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The tax portion of the expense amount, in cents. Use 0 if no tax applies." + } + }, + "timezone": { + "target": "smithy.api#String" + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A short description of the expense (e.g., \"New keyboard\", \"Team dinner\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmployeeExpenses": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmployeeExpensesRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employee/expenses", + "code": 200 + }, + "smithy.api#documentation": "Create an expense for the authenticated employee\n\nCreates a new expense record for the current employee.\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmployeeFederalTaxesRequest": { + "type": "structure", + "members": { + "federal_taxes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Federal taxes params. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `global_payroll_federal_taxes` as path parameters.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmployeeFederalTaxes": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmployeeFederalTaxesRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/federal-taxes", + "code": 200 + }, + "smithy.api#documentation": "Submit employee federal taxes\n\nSubmits the authenticated employee's US federal tax (W-4) details.\n\nAvailable for US Global Payroll employees once they reach the\npost-enrollment state. Calls made before then return a 404.\n\nThis endpoint requires country-specific data. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_federal_taxes`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeIncentives": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/incentives", + "code": 200 + }, + "smithy.api#documentation": "List incentives for the authenticated employee\n\nReturns all incentives for the authenticated employee.\n\n## Scopes" + } + }, + "com.remote.api#ListLeavePoliciesDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListLeavePoliciesDetailsResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response schema for listing leave policies details" + } + }, + "com.remote.api#LeavePolicyDetails": { + "type": "structure", + "members": { + "custom": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "leave_policy_variant_id": { + "target": "com.remote.api#LeavePolicyDetailsLeavePolicyVariantId", + "traits": { + "smithy.api#documentation": "The ID of the leave policy variant", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "uses_accrual_as_balance": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether leave balance is determined by accruals" + } + } + }, + "traits": { + "smithy.api#documentation": "Leave Policy Details" + } + }, + "com.remote.api#LeavePolicyDetailsLeavePolicyVariantIdCase1": { + "type": "enum", + "members": { + "TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "time_off" + } + }, + "SICK_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sick_leave" + } + }, + "PUBLIC_HOLIDAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public_holiday" + } + }, + "UNPAID_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unpaid_leave" + } + }, + "EXTENDED_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "extended_leave" + } + }, + "IN_LIEU_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_lieu_time" + } + }, + "MATERNITY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "maternity_leave" + } + }, + "PATERNITY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paternity_leave" + } + }, + "PARENTAL_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parental_leave" + } + }, + "BEREAVEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bereavement" + } + }, + "MILITARY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "military_leave" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PAID_TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paid_time_off" + } + }, + "CUSTOM_COMPANY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_company_leave" + } + }, + "RTT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rtt" + } + }, + "CASUAL_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "casual_leave" + } + }, + "ROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rol" + } + }, + "EX_FESTIVITA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ex_festivita" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicyDetailsLeavePolicyVariantId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.remote.api#LeavePolicyDetailsLeavePolicyVariantIdCase1" + } + }, + "traits": { + "smithy.api#documentation": "The ID of the leave policy variant" + } + }, + "com.remote.api#ListLeavePoliciesDetailsResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#LeavePolicyDetails" + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeLeavePolicies": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#ListLeavePoliciesDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/leave-policies", + "code": 200 + }, + "smithy.api#documentation": "List Employee Leave Policies\n\nList the leave policies for the current employee\n\n## Scopes" + } + }, + "com.remote.api#ListLeavePoliciesSummaryResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListLeavePoliciesSummaryResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response schema for listing leave policies summary" + } + }, + "com.remote.api#LeavePolicySummary": { + "type": "structure", + "members": { + "annual_balance": { + "target": "com.remote.api#LeavePolicySummaryAnnualBalance", + "traits": { + "smithy.api#documentation": "The annual balance represents the balance for the current entitlement period.\nUnlike the regular balance, it does not account for accrued value and only considers the annual entitlement as the basis for calculations.\n", + "smithy.api#required": {} + } + }, + "annual_entitlement": { + "target": "com.remote.api#LeavePolicySummaryAnnualEntitlement", + "traits": { + "smithy.api#documentation": "The annual entitlement represents what an employee is entitled to in the current entitlement period.\nIt does not account for any accrued value.\n", + "smithy.api#required": {} + } + }, + "balance": { + "target": "com.remote.api#LeavePolicySummaryBalance", + "traits": { + "smithy.api#documentation": "The balance is the entitlement minus the taken timeoff (i.e 10 entitlement - 3 taken = 7 balance)", + "smithy.api#required": {} + } + }, + "booked": { + "target": "com.remote.api#LeavePolicySummaryBooked", + "traits": { + "smithy.api#documentation": "Includes all upcoming requested time off.", + "smithy.api#required": {} + } + }, + "current_entitlement": { + "target": "com.remote.api#LeavePolicySummaryCurrentEntitlement", + "traits": { + "smithy.api#documentation": "The current entitlement is the accrued time entitled for the employee plus any other extra entitlements (such as carryover).", + "smithy.api#required": {} + } + }, + "leave_policy": { + "target": "com.remote.api#EmployeeLeavePolicy", + "traits": { + "smithy.api#required": {} + } + }, + "pending_approval": { + "target": "com.remote.api#LeavePolicySummaryPendingApproval", + "traits": { + "smithy.api#documentation": "Includes requested timeoffs (not approved) in the past or in the future.", + "smithy.api#required": {} + } + }, + "taken": { + "target": "com.remote.api#LeavePolicySummaryTaken", + "traits": { + "smithy.api#documentation": "Includes all time off (past and future, pending or approved).", + "smithy.api#required": {} + } + }, + "upcoming_approved": { + "target": "com.remote.api#LeavePolicySummaryUpcomingApproved", + "traits": { + "smithy.api#documentation": "Includes all upcoming approved time off.", + "smithy.api#required": {} + } + }, + "upcoming_requested": { + "target": "com.remote.api#LeavePolicySummaryUpcomingRequested", + "traits": { + "smithy.api#documentation": "Includes all upcoming requested time off.", + "smithy.api#required": {} + } + }, + "used": { + "target": "com.remote.api#LeavePolicySummaryUsed", + "traits": { + "smithy.api#documentation": "Includes only approved time off in the past.", + "smithy.api#required": {} + } + }, + "working_hours_per_day": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Leave Policy Summary" + } + }, + "com.remote.api#UnlimitedDaysandHoursResponse": { + "type": "structure", + "members": { + "type": { + "target": "com.remote.api#UnlimitedDaysandHoursResponseType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#UnlimitedDaysandHoursResponseType": { + "type": "enum", + "members": { + "UNLIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unlimited" + } + } + }, + "traits": {} + }, + "com.remote.api#LimitedDaysandHoursResponse": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LimitedDaysandHoursResponseType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes requested timeoffs (not approved) in the past or in the future." + } + }, + "com.remote.api#LimitedDaysandHoursResponseType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryAnnualBalance": { + "type": "union", + "members": { + "UnlimitedDaysandHoursResponse": { + "target": "com.remote.api#UnlimitedDaysandHoursResponse" + }, + "LimitedDaysandHoursResponse": { + "target": "com.remote.api#LimitedDaysandHoursResponse" + } + }, + "traits": { + "smithy.api#documentation": "The annual balance represents the balance for the current entitlement period.\nUnlike the regular balance, it does not account for accrued value and only considers the annual entitlement as the basis for calculations.\n" + } + }, + "com.remote.api#LeavePolicySummaryAnnualEntitlement": { + "type": "union", + "members": { + "UnlimitedDaysandHoursResponse": { + "target": "com.remote.api#UnlimitedDaysandHoursResponse" + }, + "LimitedDaysandHoursResponse": { + "target": "com.remote.api#LimitedDaysandHoursResponse" + } + }, + "traits": { + "smithy.api#documentation": "The annual entitlement represents what an employee is entitled to in the current entitlement period.\nIt does not account for any accrued value.\n" + } + }, + "com.remote.api#LeavePolicySummaryBalance": { + "type": "union", + "members": { + "UnlimitedDaysandHoursResponse": { + "target": "com.remote.api#UnlimitedDaysandHoursResponse" + }, + "LimitedDaysandHoursResponse": { + "target": "com.remote.api#LimitedDaysandHoursResponse" + } + }, + "traits": { + "smithy.api#documentation": "The balance is the entitlement minus the taken timeoff (i.e 10 entitlement - 3 taken = 7 balance)" + } + }, + "com.remote.api#LeavePolicySummaryBookedType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryBooked": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LeavePolicySummaryBookedType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes all upcoming requested time off." + } + }, + "com.remote.api#LeavePolicySummaryCurrentEntitlement": { + "type": "union", + "members": { + "UnlimitedDaysandHoursResponse": { + "target": "com.remote.api#UnlimitedDaysandHoursResponse" + }, + "LimitedDaysandHoursResponse": { + "target": "com.remote.api#LimitedDaysandHoursResponse" + } + }, + "traits": { + "smithy.api#documentation": "The current entitlement is the accrued time entitled for the employee plus any other extra entitlements (such as carryover)." + } + }, + "com.remote.api#EmployeeLeavePolicy": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "leave_policy_variant_id": { + "target": "com.remote.api#EmployeeLeavePolicyLeavePolicyVariantId", + "traits": { + "smithy.api#documentation": "The ID of the leave policy variant", + "smithy.api#required": {} + } + }, + "leave_type": { + "target": "com.remote.api#TimeoffType", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "unit": { + "target": "com.remote.api#EmployeeLeavePolicyUnit", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Leave Policy abstraction representation for the employee" + } + }, + "com.remote.api#EmployeeLeavePolicyLeavePolicyVariantIdCase1": { + "type": "enum", + "members": { + "TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "time_off" + } + }, + "SICK_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sick_leave" + } + }, + "PUBLIC_HOLIDAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public_holiday" + } + }, + "UNPAID_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unpaid_leave" + } + }, + "EXTENDED_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "extended_leave" + } + }, + "IN_LIEU_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_lieu_time" + } + }, + "MATERNITY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "maternity_leave" + } + }, + "PATERNITY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paternity_leave" + } + }, + "PARENTAL_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parental_leave" + } + }, + "BEREAVEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bereavement" + } + }, + "MILITARY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "military_leave" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PAID_TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paid_time_off" + } + }, + "CUSTOM_COMPANY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_company_leave" + } + }, + "RTT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rtt" + } + }, + "CASUAL_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "casual_leave" + } + }, + "ROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rol" + } + }, + "EX_FESTIVITA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ex_festivita" + } + } + }, + "traits": {} + }, + "com.remote.api#EmployeeLeavePolicyLeavePolicyVariantId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.remote.api#EmployeeLeavePolicyLeavePolicyVariantIdCase1" + } + }, + "traits": { + "smithy.api#documentation": "The ID of the leave policy variant" + } + }, + "com.remote.api#TimeoffType": { + "type": "enum", + "members": { + "TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "time_off" + } + }, + "SICK_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sick_leave" + } + }, + "PUBLIC_HOLIDAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public_holiday" + } + }, + "UNPAID_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unpaid_leave" + } + }, + "EXTENDED_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "extended_leave" + } + }, + "IN_LIEU_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_lieu_time" + } + }, + "MATERNITY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "maternity_leave" + } + }, + "PATERNITY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paternity_leave" + } + }, + "PARENTAL_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parental_leave" + } + }, + "BEREAVEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bereavement" + } + }, + "MILITARY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "military_leave" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PAID_TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paid_time_off" + } + }, + "CUSTOM_COMPANY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_company_leave" + } + }, + "RTT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rtt" + } + }, + "CASUAL_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "casual_leave" + } + }, + "ROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rol" + } + }, + "EX_FESTIVITA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ex_festivita" + } + } + }, + "traits": {} + }, + "com.remote.api#EmployeeLeavePolicyUnit": { + "type": "enum", + "members": { + "DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "days" + } + }, + "HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hours" + } + }, + "UNLIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unlimited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryPendingApprovalType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryPendingApproval": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LeavePolicySummaryPendingApprovalType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes requested timeoffs (not approved) in the past or in the future." + } + }, + "com.remote.api#LeavePolicySummaryTakenType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryTaken": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LeavePolicySummaryTakenType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes all time off (past and future, pending or approved)." + } + }, + "com.remote.api#LeavePolicySummaryUpcomingApprovedType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryUpcomingApproved": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LeavePolicySummaryUpcomingApprovedType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes all upcoming approved time off." + } + }, + "com.remote.api#LeavePolicySummaryUpcomingRequestedType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryUpcomingRequested": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LeavePolicySummaryUpcomingRequestedType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes all upcoming requested time off." + } + }, + "com.remote.api#LeavePolicySummaryUsedType": { + "type": "enum", + "members": { + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.remote.api#LeavePolicySummaryUsed": { + "type": "structure", + "members": { + "days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#LeavePolicySummaryUsedType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Includes only approved time off in the past." + } + }, + "com.remote.api#ListLeavePoliciesSummaryResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#LeavePolicySummary" + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeLeavePoliciesSummary": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#ListLeavePoliciesSummaryResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/leave-policies/summary", + "code": 200 + }, + "smithy.api#documentation": "List Employee Leave Policies Summary\n\nList the leave policies summary (balances and entitlements) for the current employee\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeePayslipFilesRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListPayslipFilesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListPayslipFilesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many payslip_files" + } + }, + "com.remote.api#PayslipFile": { + "type": "structure", + "members": { + "currency": { + "target": "com.remote.api#PayslipFileCurrency", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Original filename of the payslip", + "smithy.api#required": {} + } + }, + "net_salary": { + "target": "com.remote.api#PayslipFileNetSalary", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A single payslip file with its associated payroll run metadata." + } + }, + "com.remote.api#PayslipFileCurrency": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "symbol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currency symbol", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayslipFileNetSalary": { + "type": "structure", + "members": { + "converted_amount": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "converter": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fee": { + "target": "smithy.api#String" + }, + "rate": { + "target": "smithy.api#String" + }, + "source_amount": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Net salary amount including source/converted amounts, currencies and conversion rate. Shape produced by `Tiger.Billing.Value.Amount.build/1`." + } + }, + "com.remote.api#ListPayslipFilesResponseDataPayslipFilesList": { + "type": "list", + "member": { + "target": "com.remote.api#PayslipFile" + }, + "traits": {} + }, + "com.remote.api#ListPayslipFilesResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "payslip_files": { + "target": "com.remote.api#ListPayslipFilesResponseDataPayslipFilesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeePayslipFiles": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeePayslipFilesRequest" + }, + "output": { + "target": "com.remote.api#ListPayslipFilesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/payslip-files", + "code": 200 + }, + "smithy.api#documentation": "List payslip files for the authenticated employee\n\nReturns a paginated list of payslip files belonging to the current employee.\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeePayslipsRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListEmployeePayslipsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListEmployeePayslipsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many payslips" + } + }, + "com.remote.api#PayslipItem": { + "type": "structure", + "members": { + "file": { + "target": "com.remote.api#PayslipItemFile", + "traits": { + "smithy.api#documentation": "File metadata", + "smithy.api#required": {} + } + }, + "has_employee_payroll_overviews": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "payroll_output": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Payroll output breakdown", + "com.distilled.openapi#nullable": {} + } + }, + "payroll_run": { + "target": "com.remote.api#PayslipItemPayrollRun", + "traits": { + "smithy.api#documentation": "Payroll run metadata", + "com.distilled.openapi#nullable": {} + } + }, + "payslip": { + "target": "com.remote.api#PayslipItemPayslip", + "traits": { + "smithy.api#documentation": "Payslip data", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A payslip with file, payslip, payroll run, and payroll output metadata." + } + }, + "com.remote.api#PayslipItemFile": { + "type": "structure", + "members": { + "inserted_at": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "File metadata" + } + }, + "com.remote.api#PayslipItemPayrollRun": { + "type": "structure", + "members": { + "expected_payout_date": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "period_end": { + "target": "smithy.api#String" + }, + "period_start": { + "target": "smithy.api#String" + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Payroll run metadata" + } + }, + "com.remote.api#PayslipItemPayslip": { + "type": "structure", + "members": { + "active_compensation": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Active compensation at the time of the payslip", + "com.distilled.openapi#nullable": {} + } + }, + "has_content_layout": { + "target": "smithy.api#Boolean" + }, + "net_salary": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Net salary amount", + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Payslip data" + } + }, + "com.remote.api#ListEmployeePayslipsResponseDataPayslipsList": { + "type": "list", + "member": { + "target": "com.remote.api#PayslipItem" + }, + "traits": {} + }, + "com.remote.api#ListEmployeePayslipsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "payslips": { + "target": "com.remote.api#ListEmployeePayslipsResponseDataPayslipsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeePayslips": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeePayslipsRequest" + }, + "output": { + "target": "com.remote.api#ListEmployeePayslipsResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/payslips", + "code": 200 + }, + "smithy.api#documentation": "List approved payslip files for the authenticated employee\n\nReturns a paginated list of payslip files belonging to the current employee.\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeePersonalDetailsRequest": { + "type": "structure", + "members": { + "personal_details_json_schema_version": { + "target": "com.remote.api#GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "personal_details_json_schema_version", + "smithy.api#documentation": "Version of the personal_details form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1EmployeePersonalDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeePersonalDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/personal-details", + "code": 200 + }, + "smithy.api#documentation": "Show employee personal details\n\nReturns the authenticated employee's personal details.\n\nThis endpoint requires country-specific data. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV1EmployeePersonalDetailsRequest": { + "type": "structure", + "members": { + "personal_details_json_schema_version": { + "target": "com.remote.api#PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "personal_details_json_schema_version", + "smithy.api#documentation": "Version of the personal_details form schema" + } + }, + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment personal details. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `employment_basic_information` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmployeePersonalDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmployeePersonalDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/personal-details", + "code": 200 + }, + "smithy.api#documentation": "Update employee personal details\n\nUpdates the authenticated employee's personal details (date of birth,\nnational ID, nationality, etc.).\n\nThis endpoint requires country-specific data. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeePersonalInformation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/personal-information", + "code": 200 + }, + "smithy.api#documentation": "Show personal information for the authenticated employee\n\nReturns personal information for the authenticated employee.\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmployeeStateTaxesJurisdictionRequest": { + "type": "structure", + "members": { + "jurisdiction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Two-letter US state/jurisdiction code" + } + }, + "state_taxes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "State taxes params for the jurisdiction in the path. As its properties vary depending\n on the country and jurisdiction, you must query the\n [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code\n and `global_payroll_state_taxes` as path parameters.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmployeeStateTaxesJurisdiction": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmployeeStateTaxesJurisdictionRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/state-taxes/{jurisdiction}", + "code": 200 + }, + "smithy.api#documentation": "Submit employee state taxes\n\nSubmits the authenticated employee's US state tax withholding answers for a\nsingle jurisdiction (e.g. `NY`).\n\nAvailable for US Global Payroll employees once they reach the post-enrollment\nstate, at which point the per-jurisdiction state tax task exists.\n\nThis endpoint requires country/jurisdiction-specific data. Query the\n[Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_state_taxes`\nas the form name to discover the schema for a given country.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeTimeoffRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListTimeoffResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListTimeoffResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many timeoffs" + } + }, + "com.remote.api#Timeoff": { + "type": "structure", + "members": { + "approved_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the time off was approved. Null if not yet approved.", + "com.distilled.openapi#nullable": {} + } + }, + "approver_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "automatic": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this time off was automatically created by the system (e.g., public holidays) rather than requested by the employee." + } + }, + "cancel_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason provided when the time off was cancelled. Null if not cancelled.", + "com.distilled.openapi#nullable": {} + } + }, + "cancelled_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "document": { + "target": "com.remote.api#File" + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment this time off belongs to.", + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The last day of the time off period (ISO 8601 date).", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the time off record.", + "smithy.api#required": {} + } + }, + "leave_policy": { + "target": "com.remote.api#LeavePolicy", + "traits": { + "smithy.api#required": {} + } + }, + "leave_policy_variant_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "UUID of the custom company leave policy variant associated with this time off. Null for standard leave types.", + "com.distilled.openapi#nullable": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional notes provided by the employee when requesting the time off.", + "com.distilled.openapi#nullable": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The first day of the time off period (ISO 8601 date).", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#TimeoffStatus", + "traits": { + "smithy.api#documentation": "The current status of a time off request.\n\n- `requested`: The employee has submitted a time off request and it is awaiting approval.\n- `approved`: The time off request has been approved by a manager.\n- `cancelled`: The time off request was cancelled by the employee or an admin.\n- `declined`: The time off request was declined by a manager.\n- `taken`: The approved time off has been taken (the dates have passed).\n- `cancel_requested`: The employee has requested cancellation of a previously approved time off, pending manager approval.\n", + "smithy.api#required": {} + } + }, + "timeoff_days": { + "target": "com.remote.api#TimeoffTimeoffDaysList", + "traits": { + "smithy.api#documentation": "The individual days and hours within this time off period.", + "smithy.api#required": {} + } + }, + "timeoff_type": { + "target": "com.remote.api#TimeoffType", + "traits": { + "smithy.api#required": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "total_minutes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of minutes taken off across all `timeoff_days`. Always equals the sum of the per-day `minutes` values.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A time off record for an employee, representing a period of leave (e.g., vacation, sick leave, parental leave)." + } + }, + "com.remote.api#LeavePolicy": { + "type": "structure", + "members": { + "leave_policy_variant_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (slug) of the specific policy variant.", + "smithy.api#required": {} + } + }, + "leave_type": { + "target": "com.remote.api#TimeoffType", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The display name of the leave policy (e.g., \"Self-Care\", \"Annual Leave\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The leave policy associated with a time off request. Policies define the rules and entitlements for specific types of leave." + } + }, + "com.remote.api#TimeoffStatus": { + "type": "enum", + "members": { + "REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requested" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined" + } + }, + "TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "taken" + } + }, + "CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancel_requested" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of a time off request.\n\n- `requested`: The employee has submitted a time off request and it is awaiting approval.\n- `approved`: The time off request has been approved by a manager.\n- `cancelled`: The time off request was cancelled by the employee or an admin.\n- `declined`: The time off request was declined by a manager.\n- `taken`: The approved time off has been taken (the dates have passed).\n- `cancel_requested`: The employee has requested cancellation of a previously approved time off, pending manager approval.\n" + } + }, + "com.remote.api#TimeoffDay": { + "type": "structure", + "members": { + "day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "hours": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of hours taken off on this day (e.g., 8 for a full day, 4 for a half day). For minute-precision durations (e.g., 7 hours 30 minutes), use `minutes`.", + "smithy.api#required": {} + } + }, + "minutes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of minutes taken off on this day (e.g., 480 for a full 8-hour day, 450 for 7 hours 30 minutes). Minute-precision counterpart of `hours`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A single day within a time off request, specifying the date and the number of hours taken off that day." + } + }, + "com.remote.api#TimeoffTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDay" + }, + "traits": { + "smithy.api#documentation": "The individual days and hours within this time off period." + } + }, + "com.remote.api#ListTimeoffResponseDataTimeoffsList": { + "type": "list", + "member": { + "target": "com.remote.api#Timeoff" + }, + "traits": {} + }, + "com.remote.api#ListTimeoffResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "timeoffs": { + "target": "com.remote.api#ListTimeoffResponseDataTimeoffsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmployeeTimeoff": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeTimeoffRequest" + }, + "output": { + "target": "com.remote.api#ListTimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/timeoff", + "code": 200 + }, + "smithy.api#documentation": "List employee time offs\n\nLists the current employee's time off records\n\n## Scopes" + } + }, + "com.remote.api#TimeoffDocumentParams": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The binary content of the file encoded with base64", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name of the document", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Timeoff document params" + } + }, + "com.remote.api#TimeoffDaysParams": { + "type": "structure", + "members": { + "day": { + "target": "smithy.api#String" + }, + "hours": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#documentation": "Timeoff days params" + } + }, + "com.remote.api#PostV1EmployeeTimeoffRequestTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDaysParams" + }, + "traits": {} + }, + "com.remote.api#PostV1EmployeeTimeoffRequest": { + "type": "structure", + "members": { + "document": { + "target": "com.remote.api#TimeoffDocumentParams" + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "leave_policy_variant_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "timeoff_days": { + "target": "com.remote.api#PostV1EmployeeTimeoffRequestTimeoffDaysList", + "traits": { + "smithy.api#required": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#TimeoffResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#TimeoffResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Timeoff response" + } + }, + "com.remote.api#TimeoffResponseData": { + "type": "structure", + "members": { + "timeoff": { + "target": "com.remote.api#Timeoff", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1EmployeeTimeoff": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmployeeTimeoffRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employee/timeoff", + "code": 200 + }, + "smithy.api#documentation": "Create a Pending Time Off\n\nCreates a pending Time Off record\n\n## Scopes" + } + }, + "com.remote.api#PatchV1EmployeeTimeoffIdRequestTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDaysParams" + }, + "traits": {} + }, + "com.remote.api#PatchV1EmployeeTimeoffIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timeoff ID" + } + }, + "document": { + "target": "com.remote.api#TimeoffDocumentParams" + }, + "edit_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the update. Required when updating the time off data but not changing the status.", + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String" + }, + "leave_policy_variant_id": { + "target": "smithy.api#String" + }, + "notes": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String" + }, + "timeoff_days": { + "target": "com.remote.api#PatchV1EmployeeTimeoffIdRequestTimeoffDaysList" + }, + "timezone": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1EmployeeTimeoffId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1EmployeeTimeoffIdRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employee/timeoff/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update Time Off as Employee\n\nUpdates a Time Off record as Employee\n\n## Scopes" + } + }, + "com.remote.api#PatchV1EmployeeTimeoffId2RequestTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDaysParams" + }, + "traits": {} + }, + "com.remote.api#PatchV1EmployeeTimeoffId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timeoff ID" + } + }, + "document": { + "target": "com.remote.api#TimeoffDocumentParams" + }, + "edit_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the update. Required when updating the time off data but not changing the status.", + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String" + }, + "leave_policy_variant_id": { + "target": "smithy.api#String" + }, + "notes": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String" + }, + "timeoff_days": { + "target": "com.remote.api#PatchV1EmployeeTimeoffId2RequestTimeoffDaysList" + }, + "timezone": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1EmployeeTimeoffId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1EmployeeTimeoffId2Request" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/employee/timeoff/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update Time Off as Employee\n\nUpdates a Time Off record as Employee\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmployeeTimeoffIdCancelRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timeoff ID" + } + }, + "cancel_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmployeeTimeoffIdCancel": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmployeeTimeoffIdCancelRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employee/timeoff/{id}/cancel", + "code": 200 + }, + "smithy.api#documentation": "Cancel Time Off as Employee\n\nCancels a Time Off record as Employee\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmployeeTimesheetsRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1EmployeeTimesheets": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmployeeTimesheetsRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employee/timesheets", + "code": 200 + }, + "smithy.api#documentation": "List timesheets for the authenticated employee\n\nReturns a paginated list of timesheets for the authenticated employee.\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentContractsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "only_active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "only_active", + "smithy.api#documentation": "Only Active" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListEmploymentContractResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListEmploymentContractResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentContract": { + "type": "structure", + "members": { + "activated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "amendment_contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the employment contract that was amended by this employment contract, if any.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "compensation": { + "target": "com.remote.api#Compensation", + "traits": { + "smithy.api#required": {} + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of this contract.", + "smithy.api#required": {} + } + }, + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "effective_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The job title as specified in this contract.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#EmploymentContractStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#Compensation": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The compensation amount in cents. Null if compensation is not yet set.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "currency_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code for the compensation. Null if not yet set.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "wage_type": { + "target": "com.remote.api#CompensationWageType", + "traits": { + "smithy.api#documentation": "Whether the employee is paid hourly or on a salary basis. Null if not yet set.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompensationWageType": { + "type": "enum", + "members": { + "HOURLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hourly" + } + }, + "SALARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "salary" + } + } + }, + "traits": { + "smithy.api#documentation": "Whether the employee is paid hourly or on a salary basis. Null if not yet set." + } + }, + "com.remote.api#EmploymentContractStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + } + }, + "traits": { + "smithy.api#documentation": "The status of the employment contract." + } + }, + "com.remote.api#ListEmploymentContractResponseDataEmploymentContractsList": { + "type": "list", + "member": { + "target": "com.remote.api#EmploymentContract" + }, + "traits": {} + }, + "com.remote.api#ListEmploymentContractResponseData": { + "type": "structure", + "members": { + "employment_contracts": { + "target": "com.remote.api#ListEmploymentContractResponseDataEmploymentContractsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentContracts": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentContractsRequest" + }, + "output": { + "target": "com.remote.api#ListEmploymentContractResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employment-contracts", + "code": 200 + }, + "smithy.api#documentation": "List Employment Contract.\n\nGet the employment contract history for a given employment. If `only_active` is true, it will return only the active or last active contract.\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentContractsEmploymentIdPendingChangesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentContractPendingChangesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentContractPendingChangesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ContractPendingChanges": { + "type": "structure", + "members": { + "changes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Describes all the changes requested for the contract and contract details with all their previous and current values.\nIts properties may vary depending on the country.\n", + "smithy.api#required": {} + } + }, + "contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "effective_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "pending_action_for_activation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates if the contract is pending an action to be activated when effective_at is reached.\nIf true, it means that an action needs to be performed, either a verification by Remote or a signature from the\nemployer or the employee. If false, then the contract will be active when effective_at is reached.\n" + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentContractPendingChangesResponseDataPendingChangesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractPendingChanges" + }, + "traits": {} + }, + "com.remote.api#EmploymentContractPendingChangesResponseData": { + "type": "structure", + "members": { + "pending_changes": { + "target": "com.remote.api#EmploymentContractPendingChangesResponseDataPendingChangesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentContractsEmploymentIdPendingChanges": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentContractsEmploymentIdPendingChangesRequest" + }, + "output": { + "target": "com.remote.api#EmploymentContractPendingChangesResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employment-contracts/{employment_id}/pending-changes", + "code": 200 + }, + "smithy.api#documentation": "Get employment contract pending changes\n\nGet all the pending changes (waiting for aproval or signature) for the employment contract.\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsRequestEmploymentModel": { + "type": "enum", + "members": { + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + }, + "PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "peo" + } + }, + "EOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eor" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "company_id", + "smithy.api#documentation": "Company ID" + } + }, + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "email", + "smithy.api#documentation": "Filters the results by employments whose login email matches the value" + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filters the results by employments whose status matches the value.\nSupports multiple values separated by commas.\nAlso supports the value `incomplete` to get all employments that are not onboarded yet.\n" + } + }, + "employment_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_type", + "smithy.api#documentation": "Filters the results by employments whose employment product type matches the value" + } + }, + "employment_model": { + "target": "com.remote.api#GetV1EmploymentsRequestEmploymentModel", + "traits": { + "smithy.api#httpQuery": "employment_model", + "smithy.api#documentation": "Filters the results by employments whose employment model matches the value.\nPossible values: `global_payroll`, `peo`, `eor`\n" + } + }, + "short_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "short_id", + "smithy.api#documentation": "Filters the results by the employment's short ID. Returns at most one result." + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "partner_external_id", + "smithy.api#documentation": "Filters the results by the `partner_external_id` value the calling integration holds\nfor the employment; another integration's identifiers are never matched. Matching is\nexact, including case. The same value may be set on several employments (for example\na rehire), so several results may be returned.\n" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListEmploymentsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListEmploymentsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many employments" + } + }, + "com.remote.api#MinimalEmployment": { + "type": "structure", + "members": { + "country": { + "target": "com.remote.api#NullableCountry", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "department": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of related department, if any. Otherwise, null.", + "com.distilled.openapi#nullable": {} + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique ID of related department, if any. Otherwise, null.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_lifecycle_stage": { + "target": "com.remote.api#EmploymentLifecycleStage", + "traits": { + "smithy.api#required": {} + } + }, + "employment_model": { + "target": "com.remote.api#MinimalEmploymentEmploymentModel", + "traits": { + "smithy.api#documentation": "The employment model. `eor` (Employer of Record), `peo` (Professional Employer Organization), or `global_payroll`.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "full_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's full name.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's job title.", + "smithy.api#required": {} + } + }, + "login_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email the employee uses to log in to Remote.", + "smithy.api#required": {} + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nNull when the integration has not set one.\n", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "personal_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's personal email address.", + "smithy.api#required": {} + } + }, + "short_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#EmploymentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#MinimalEmploymentType", + "traits": { + "smithy.api#documentation": "The type of employment.", + "smithy.api#required": {} + } + }, + "work_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Work address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's work email address. Null if not set.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#NullableCountry": { + "type": "structure", + "members": { + "alpha_2_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 alpha-2 country code (e.g., \"PT\").", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 alpha-3 country code (e.g., \"PRT\"). This is the primary code used across the Remote API.", + "smithy.api#required": {} + } + }, + "contractor_products_available": { + "target": "com.remote.api#NullableCountryContractorProductsAvailableList", + "traits": { + "smithy.api#documentation": "Contractor product names available for this country" + } + }, + "country_subdivisions": { + "target": "com.remote.api#NullableCountryCountrySubdivisionsList", + "traits": { + "smithy.api#documentation": "Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_agreement_preview_available": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether an Employment Agreement preview is available for this country." + } + }, + "eor_onboarding": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether EOR (Employer of Record) onboarding is available in this country." + } + }, + "locked_benefits": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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)." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The country's full English name.", + "smithy.api#required": {} + } + }, + "region": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The geographic region the country belongs to (e.g., \"Europe\", \"Asia\", \"Americas\")." + } + }, + "subregion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The geographic subregion (e.g., \"Southern Europe\", \"Southeast Asia\"). Null for some countries.", + "com.distilled.openapi#nullable": {} + } + }, + "supported_json_schemas": { + "target": "com.remote.api#NullableCountrySupportedJsonSchemasList", + "traits": { + "smithy.api#documentation": "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." + } + } + }, + "traits": { + "smithy.api#documentation": "A supported country on Remote" + } + }, + "com.remote.api#NullableCountryContractorProductsAvailableItem": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + }, + "PLUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "plus" + } + }, + "COR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cor" + } + } + }, + "traits": {} + }, + "com.remote.api#NullableCountryContractorProductsAvailableList": { + "type": "list", + "member": { + "target": "com.remote.api#NullableCountryContractorProductsAvailableItem" + }, + "traits": { + "smithy.api#documentation": "Contractor product names available for this country" + } + }, + "com.remote.api#NullableCountryCountrySubdivisionsList": { + "type": "list", + "member": { + "target": "com.remote.api#CountrySubdivision" + }, + "traits": { + "smithy.api#documentation": "Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services." + } + }, + "com.remote.api#NullableCountrySupportedJsonSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#EmploymentLifecycleStage": { + "type": "enum", + "members": { + "EMPLOYMENT_CREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_creation" + } + }, + "EMPLOYEE_SELF_ENROLLMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee_self_enrollment" + } + }, + "RIGHT_TO_WORK_CHECK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "right_to_work_check" + } + }, + "CONTRACT_SIGNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_signing" + } + }, + "REMOTE_ENROLLMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_enrollment" + } + }, + "ONBOARDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "onboarded" + } + }, + "OFFBOARDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarded" + } + } + }, + "traits": { + "smithy.api#documentation": "The stage of employment lifecycle. When it's `onboarded` means the employee is ready to commence or has already commenced." + } + }, + "com.remote.api#MinimalEmploymentEmploymentModel": { + "type": "enum", + "members": { + "EOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eor" + } + }, + "PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "peo" + } + }, + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + } + }, + "traits": { + "smithy.api#documentation": "The employment model. `eor` (Employer of Record), `peo` (Professional Employer Organization), or `global_payroll`." + } + }, + "com.remote.api#MinimalEmploymentType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "DIRECT_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "direct_employee" + } + }, + "GLOBAL_PAYROLL_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll_employee" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of employment." + } + }, + "com.remote.api#ListEmploymentsResponseDataEmploymentsList": { + "type": "list", + "member": { + "target": "com.remote.api#MinimalEmployment" + }, + "traits": {} + }, + "com.remote.api#ListEmploymentsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "employments": { + "target": "com.remote.api#ListEmploymentsResponseDataEmploymentsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1Employments": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsRequest" + }, + "output": { + "target": "com.remote.api#ListEmploymentsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments", + "code": 200 + }, + "smithy.api#documentation": "List employments\n\nLists all employments, except for the deleted ones.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool." + } + }, + "com.remote.api#PostV1EmploymentsRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PostV1EmploymentsRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PostV1EmploymentsRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsRequestType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "GLOBAL_PAYROLL_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll_employee" + } + }, + "HRIS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hris" + } + } + }, + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + }, + "com.remote.api#PostV1EmploymentsRequest": { + "type": "structure", + "members": { + "json_schema_version": { + "target": "com.remote.api#PostV1EmploymentsRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `employment_basic_information` as path parameters.", + "smithy.api#required": {} + } + }, + "bill_to_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the legal entity that should be billed for the employment. If omitted, falls back to `engaged_by_legal_entity_id`. For EOR and Contractor employments this may differ from `engaged_by_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `engaged_by_legal_entity_id`." + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This optional field is deprecated." + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code where the employee will be based (e.g., `AUS`, `GBR`, `USA`).", + "smithy.api#required": {} + } + }, + "engaged_by_entity_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated alias for `engaged_by_legal_entity_id`. Use `engaged_by_legal_entity_id` instead." + } + }, + "engaged_by_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the legal entity that engages the employee or contractor. Required for Global Payroll employees. For EOR and Contractor employments this may differ from `bill_to_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `bill_to_legal_entity_id`." + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system." + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nOmit the field to leave the value unchanged; send `null` to clear it. Surrounding\nwhitespace is trimmed off. It can be set at any employment status, and the same\nvalue may be used on several employments (for example a rehire).\n", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#PostV1EmploymentsRequestType", + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentCreationResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentCreationResponseData" + } + }, + "traits": {} + }, + "com.remote.api#EmploymentBasicResponse": { + "type": "structure", + "members": { + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `basic_information` as path parameters.\n\n When present, `login_email` indicates which address the employee logs in with: `\"personal\"` or\n `\"work\"`." + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company." + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code for this employment." + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When this employment was created." + } + }, + "employment_lifecycle_stage": { + "target": "com.remote.api#EmploymentLifecycleStage" + }, + "full_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's full name." + } + }, + "id": { + "target": "smithy.api#String" + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's job title. May be null if not yet set.", + "com.distilled.openapi#nullable": {} + } + }, + "login_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email the employee uses to log in to Remote." + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nNull when the integration has not set one.\n", + "com.distilled.openapi#nullable": {} + } + }, + "personal_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's personal email address." + } + }, + "provisional_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Required for employees, optional for contractors" + } + }, + "type": { + "target": "com.remote.api#EmploymentBasicResponseType", + "traits": { + "smithy.api#documentation": "The type of employment." + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When this employment was last updated." + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#EmploymentBasicResponseType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of employment." + } + }, + "com.remote.api#EmploymentCreationResponseData": { + "type": "structure", + "members": { + "employment": { + "target": "com.remote.api#EmploymentBasicResponse" + } + }, + "traits": {} + }, + "com.remote.api#PostV1Employments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentCreationResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments", + "code": 200 + }, + "smithy.api#documentation": "Create employment\n\nCreates an employment. We support creating employees and contractors.\n\n## Global Payroll Employees\n\nTo create a Global Payroll employee, pass `global_payroll_employee` as the `type` parameter,\nand provide the id of the specific legal entity that the employee will be engaged by and billed to as the `engaged_by_legal_entity_id` parameter.\n\n## HRIS Employees\n\nTo create a HRIS employee, pass `hris` as the `type` parameter.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsBulkRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "company_id", + "smithy.api#documentation": "Company ID" + } + }, + "cursor": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "cursor", + "smithy.api#documentation": "Opaque pagination cursor returned as `next_cursor` from a previous page." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Number of employments to return per page (max 100, default 50)." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentsBulkResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentsBulkResponseDataList", + "traits": { + "smithy.api#required": {} + } + }, + "next_cursor": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Opaque cursor to pass as the `cursor` query parameter to fetch the next page.\n`null` once the last page has been reached.\n", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A keyset-paginated page of full-detail employment records." + } + }, + "com.remote.api#Employment": { + "type": "structure", + "members": { + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Personal details information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "short_id": { + "target": "smithy.api#String" + }, + "department": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of related department, if any. Otherwise, null.", + "com.distilled.openapi#nullable": {} + } + }, + "manager_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email address of the employee's manager. Null if no manager is assigned.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "provisional_start_date": { + "target": "smithy.api#String" + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "pricing_plan_details": { + "target": "com.remote.api#PricingPlanDetails", + "traits": { + "smithy.api#required": {} + } + }, + "full_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's full name.", + "smithy.api#required": {} + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nNull when the integration has not set one.\n", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#EmploymentType", + "traits": { + "smithy.api#documentation": "For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n", + "smithy.api#required": {} + } + }, + "contractor_settings": { + "target": "com.remote.api#EmploymentContractorSettings", + "traits": { + "smithy.api#documentation": "Contractor-specific settings. Only present for contractor employments.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_lifecycle_stage": { + "target": "com.remote.api#EmploymentLifecycleStage", + "traits": { + "smithy.api#required": {} + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "contractor_type": { + "target": "com.remote.api#EmploymentContractorType", + "traits": { + "smithy.api#documentation": "Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus.", + "com.distilled.openapi#nullable": {} + } + }, + "contractor_rate": { + "target": "com.remote.api#EmploymentContractorRate", + "traits": { + "smithy.api#documentation": "Contractor compensation rate details. Only present for contractor employments when rate is configured.", + "com.distilled.openapi#nullable": {} + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company this employment belongs to.", + "smithy.api#required": {} + } + }, + "expiration_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The planned service end date for contractor of record (COR) employments.\n\nFor signed COR contractors, this date is stored on the contract record (not in `contract_details`).\nIt is `null` for employee employments or unsigned contractor agreements.\n\nDate format is ISO 8601 without the time component (e.g. \"2024-12-31\").\n", + "com.distilled.openapi#nullable": {} + } + }, + "work_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Work address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "bill_to_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the legal entity that is billed for this employment.", + "com.distilled.openapi#nullable": {} + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's work email address, typically provided by the employer.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#EmploymentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this employment record was last updated.", + "smithy.api#required": {} + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. Its properties may vary depending on the country.\n\nWhen present, `login_email` indicates which address the employee logs in with:\n`\"personal\"` or `\"work\"`.\n" + } + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's job title. May be null if not yet set.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "probation_period_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the employee's probation period ends, if applicable." + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique ID of related department, if any. Otherwise, null.", + "com.distilled.openapi#nullable": {} + } + }, + "manager": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The full name of the employee's manager." + } + }, + "login_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email address the employee uses to log in to the Remote platform.", + "smithy.api#required": {} + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_model": { + "target": "com.remote.api#EmploymentEmploymentModel", + "traits": { + "smithy.api#documentation": "For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "personal_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's personal email address, used for account-related communications.", + "smithy.api#required": {} + } + }, + "country": { + "target": "com.remote.api#NullableCountry", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "user_status": { + "target": "com.remote.api#UserStatus" + }, + "seniority_date": { + "target": "smithy.api#String" + }, + "bank_account_details": { + "target": "com.remote.api#EmploymentBankAccountDetailsList", + "traits": { + "smithy.api#required": {} + } + }, + "files": { + "target": "com.remote.api#EmploymentFilesList", + "traits": { + "smithy.api#documentation": "Documents associated with this employment (e.g., contracts, tax forms, identity documents).", + "smithy.api#required": {} + } + }, + "active_contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the currently active contract for this employment." + } + }, + "engaged_by_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the legal entity that engaged this employment.", + "com.distilled.openapi#nullable": {} + } + }, + "billing_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Billing address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "onboarding_tasks": { + "target": "com.remote.api#OnboardingTasks", + "traits": { + "smithy.api#required": {} + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "eligible_for_onboarding_cancellation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this employment can still be cancelled during the onboarding process. Once the employment is active, this will be false.", + "smithy.api#required": {} + } + }, + "manager_employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employment ID of the employee's manager on Remote, if the manager is also managed through Remote. Null otherwise.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this employment record was created.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Complete information of an employment, including all onboarding task statuses, country-specific form data (address, contract, administrative, etc.), and contractor-specific settings where applicable." + } + }, + "com.remote.api#PricingPlanDetails": { + "type": "structure", + "members": { + "frequency": { + "target": "com.remote.api#PricingPlanDetailsFrequency", + "traits": { + "smithy.api#documentation": "How often Remote bills the employer for management fees. Annual billing typically offers a discount.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Selected type of payment." + } + }, + "com.remote.api#PricingPlanDetailsFrequency": { + "type": "enum", + "members": { + "ANNUALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "annually" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + } + }, + "traits": { + "smithy.api#documentation": "How often Remote bills the employer for management fees. Annual billing typically offers a discount." + } + }, + "com.remote.api#EmploymentType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "DIRECT_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "direct_employee" + } + }, + "GLOBAL_PAYROLL_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll_employee" + } + } + }, + "traits": { + "smithy.api#documentation": "For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n" + } + }, + "com.remote.api#EmploymentContractorSettings": { + "type": "structure", + "members": { + "requires_work_confirmation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the contractor requires work confirmation before submitting invoices." + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor-specific settings. Only present for contractor employments." + } + }, + "com.remote.api#EmploymentContractorType": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + }, + "COR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cor" + } + }, + "PLUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "plus" + } + } + }, + "traits": { + "smithy.api#documentation": "Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus." + } + }, + "com.remote.api#EmploymentContractorRateAmountCurrency": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Currency code (e.g., USD, EUR)" + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentContractorRateAmount": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Rate amount as decimal" + } + }, + "currency": { + "target": "com.remote.api#EmploymentContractorRateAmountCurrency" + } + }, + "traits": {} + }, + "com.remote.api#EmploymentContractorRatePayFrequency": { + "type": "enum", + "members": { + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "BI_WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_weekly" + } + }, + "SEMI_MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "semi_monthly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + } + }, + "traits": { + "smithy.api#documentation": "Payment frequency cadence" + } + }, + "com.remote.api#EmploymentContractorRateType": { + "type": "enum", + "members": { + "HOURLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hourly" + } + }, + "DAILY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + }, + "ONE_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "one_off" + } + } + }, + "traits": { + "smithy.api#documentation": "Rate type indicating billing frequency" + } + }, + "com.remote.api#EmploymentContractorRate": { + "type": "structure", + "members": { + "amount": { + "target": "com.remote.api#EmploymentContractorRateAmount" + }, + "pay_frequency": { + "target": "com.remote.api#EmploymentContractorRatePayFrequency", + "traits": { + "smithy.api#documentation": "Payment frequency cadence", + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the contractor rate" + } + }, + "type": { + "target": "com.remote.api#EmploymentContractorRateType", + "traits": { + "smithy.api#documentation": "Rate type indicating billing frequency" + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor compensation rate details. Only present for contractor employments when rate is configured." + } + }, + "com.remote.api#EmploymentEmploymentModel": { + "type": "enum", + "members": { + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + }, + "PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "peo" + } + }, + "EOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eor" + } + } + }, + "traits": { + "smithy.api#documentation": "For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n" + } + }, + "com.remote.api#EmploymentBankAccountDetailsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.remote.api#EmploymentFilesList": { + "type": "list", + "member": { + "target": "com.remote.api#File" + }, + "traits": { + "smithy.api#documentation": "Documents associated with this employment (e.g., contracts, tax forms, identity documents)." + } + }, + "com.remote.api#OnboardingTasks": { + "type": "structure", + "members": { + "address_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "administrative_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "bank_account_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "billing_address_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "contract_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "emergency_contact_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "employment_document_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "personal_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + }, + "pricing_plan_details": { + "target": "com.remote.api#TaskDescription", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "All tasks that need to be completed before marking the employment as ready" + } + }, + "com.remote.api#TaskDescription": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable description of what this onboarding task requires." + } + }, + "status": { + "target": "com.remote.api#TaskDescriptionStatus", + "traits": { + "smithy.api#documentation": "The status of the task" + } + } + }, + "traits": { + "smithy.api#documentation": "Description and status of an onboarding task." + } + }, + "com.remote.api#TaskDescriptionStatus": { + "type": "enum", + "members": { + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + } + }, + "traits": { + "smithy.api#documentation": "The status of the task" + } + }, + "com.remote.api#EmploymentsBulkResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#Employment" + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsBulk": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsBulkRequest" + }, + "output": { + "target": "com.remote.api#EmploymentsBulkResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/bulk", + "code": 200 + }, + "smithy.api#documentation": "Bulk list employments\n\nLists full-detail employments for the company scope, page-by-page via an opaque cursor.\nEach employment is the same shape returned by Show employment, except files are excluded\nto avoid a per-employment file lookup; use the Show employment endpoint to fetch files for\na specific employment. The `files` field is always `null` on this endpoint.\n\nPass the `next_cursor` value from a page's response as the `cursor` query parameter to fetch\nthe next page. `next_cursor` is `null` once the last page has been reached.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "exclude_files": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "exclude_files", + "smithy.api#documentation": "Whether files should be excluded" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentShowResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentShowResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing the full employment record, including the termination date if the employment has an active offboarding." + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "DIRECT_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "direct_employee" + } + }, + "GLOBAL_PAYROLL_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll_employee" + } + } + }, + "traits": { + "smithy.api#documentation": "For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n" + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorSettings": { + "type": "structure", + "members": { + "requires_work_confirmation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the contractor requires work confirmation before submitting invoices." + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor-specific settings. Only present for contractor employments." + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorType": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + }, + "COR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cor" + } + }, + "PLUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "plus" + } + } + }, + "traits": { + "smithy.api#documentation": "Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus." + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorRateAmountCurrency": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Currency code (e.g., USD, EUR)" + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorRateAmount": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Rate amount as decimal" + } + }, + "currency": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorRateAmountCurrency" + } + }, + "traits": {} + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorRatePayFrequency": { + "type": "enum", + "members": { + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "BI_WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_weekly" + } + }, + "SEMI_MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "semi_monthly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + } + }, + "traits": { + "smithy.api#documentation": "Payment frequency cadence" + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorRateType": { + "type": "enum", + "members": { + "HOURLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hourly" + } + }, + "DAILY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + }, + "ONE_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "one_off" + } + } + }, + "traits": { + "smithy.api#documentation": "Rate type indicating billing frequency" + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentContractorRate": { + "type": "structure", + "members": { + "amount": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorRateAmount" + }, + "pay_frequency": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorRatePayFrequency", + "traits": { + "smithy.api#documentation": "Payment frequency cadence", + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the contractor rate" + } + }, + "type": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorRateType", + "traits": { + "smithy.api#documentation": "Rate type indicating billing frequency" + } + } + }, + "traits": { + "smithy.api#documentation": "Contractor compensation rate details. Only present for contractor employments when rate is configured." + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentEmploymentModel": { + "type": "enum", + "members": { + "GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll" + } + }, + "PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "peo" + } + }, + "EOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eor" + } + } + }, + "traits": { + "smithy.api#documentation": "For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n" + } + }, + "com.remote.api#EmploymentShowResponseDataEmploymentBankAccountDetailsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.remote.api#EmploymentShowResponseDataEmploymentFilesList": { + "type": "list", + "member": { + "target": "com.remote.api#File" + }, + "traits": { + "smithy.api#documentation": "Documents associated with this employment (e.g., contracts, tax forms, identity documents)." + } + }, + "com.remote.api#EmploymentShowResponseDataEmployment": { + "type": "structure", + "members": { + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Personal details information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "short_id": { + "target": "smithy.api#String" + }, + "department": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of related department, if any. Otherwise, null.", + "com.distilled.openapi#nullable": {} + } + }, + "manager_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email address of the employee's manager. Null if no manager is assigned.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "provisional_start_date": { + "target": "smithy.api#String" + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "pricing_plan_details": { + "target": "com.remote.api#PricingPlanDetails", + "traits": { + "smithy.api#required": {} + } + }, + "full_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's full name.", + "smithy.api#required": {} + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nNull when the integration has not set one.\n", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentType", + "traits": { + "smithy.api#documentation": "For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n", + "smithy.api#required": {} + } + }, + "contractor_settings": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorSettings", + "traits": { + "smithy.api#documentation": "Contractor-specific settings. Only present for contractor employments.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_lifecycle_stage": { + "target": "com.remote.api#EmploymentLifecycleStage", + "traits": { + "smithy.api#required": {} + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "contractor_type": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorType", + "traits": { + "smithy.api#documentation": "Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus.", + "com.distilled.openapi#nullable": {} + } + }, + "contractor_rate": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentContractorRate", + "traits": { + "smithy.api#documentation": "Contractor compensation rate details. Only present for contractor employments when rate is configured.", + "com.distilled.openapi#nullable": {} + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company this employment belongs to.", + "smithy.api#required": {} + } + }, + "expiration_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The planned service end date for contractor of record (COR) employments.\n\nFor signed COR contractors, this date is stored on the contract record (not in `contract_details`).\nIt is `null` for employee employments or unsigned contractor agreements.\n\nDate format is ISO 8601 without the time component (e.g. \"2024-12-31\").\n", + "com.distilled.openapi#nullable": {} + } + }, + "work_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Work address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "bill_to_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the legal entity that is billed for this employment.", + "com.distilled.openapi#nullable": {} + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's work email address, typically provided by the employer.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#EmploymentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this employment record was last updated.", + "smithy.api#required": {} + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. Its properties may vary depending on the country.\n\nWhen present, `login_email` indicates which address the employee logs in with:\n`\"personal\"` or `\"work\"`.\n" + } + }, + "job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's job title. May be null if not yet set.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "probation_period_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the employee's probation period ends, if applicable." + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique ID of related department, if any. Otherwise, null.", + "com.distilled.openapi#nullable": {} + } + }, + "manager": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The full name of the employee's manager." + } + }, + "login_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email address the employee uses to log in to the Remote platform.", + "smithy.api#required": {} + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "employment_model": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentEmploymentModel", + "traits": { + "smithy.api#documentation": "For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and\n[Show employment](#operation/get_show_employment) operations are available.\n", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "personal_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's personal email address, used for account-related communications.", + "smithy.api#required": {} + } + }, + "country": { + "target": "com.remote.api#NullableCountry", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "user_status": { + "target": "com.remote.api#UserStatus" + }, + "seniority_date": { + "target": "smithy.api#String" + }, + "bank_account_details": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentBankAccountDetailsList", + "traits": { + "smithy.api#required": {} + } + }, + "files": { + "target": "com.remote.api#EmploymentShowResponseDataEmploymentFilesList", + "traits": { + "smithy.api#documentation": "Documents associated with this employment (e.g., contracts, tax forms, identity documents).", + "smithy.api#required": {} + } + }, + "active_contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the currently active contract for this employment." + } + }, + "engaged_by_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the legal entity that engaged this employment.", + "com.distilled.openapi#nullable": {} + } + }, + "billing_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Billing address information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "onboarding_tasks": { + "target": "com.remote.api#OnboardingTasks", + "traits": { + "smithy.api#required": {} + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. Its properties may vary depending on the country.", + "smithy.api#required": {} + } + }, + "eligible_for_onboarding_cancellation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this employment can still be cancelled during the onboarding process. Once the employment is active, this will be false.", + "smithy.api#required": {} + } + }, + "manager_employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employment ID of the employee's manager on Remote, if the manager is also managed through Remote. Null otherwise.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this employment record was created.", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Most updated termination date for the offboarding. This date is subject to change through the offboarding process even after it is finalized.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentShowResponseData": { + "type": "structure", + "members": { + "employment": { + "target": "com.remote.api#EmploymentShowResponseDataEmployment" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#EmploymentShowResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Show employment\n\nShows all the information of an employment.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequestType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + } + }, + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "address_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "administrative_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "administrative_details_json_schema_version", + "smithy.api#documentation": "Version of the administrative_details form schema" + } + }, + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "employment_basic_information_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "employment_basic_information_json_schema_version", + "smithy.api#documentation": "Version of the employment_basic_information form schema" + } + }, + "billing_address_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "billing_address_details_json_schema_version", + "smithy.api#documentation": "Version of the billing_address_details form schema" + } + }, + "contract_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "contract_details_json_schema_version", + "smithy.api#documentation": "Version of the contract_details form schema" + } + }, + "emergency_contact_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "emergency_contact_details_json_schema_version", + "smithy.api#documentation": "Version of the emergency_contact_details form schema" + } + }, + "personal_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "personal_details_json_schema_version", + "smithy.api#documentation": "Version of the personal_details form schema" + } + }, + "pricing_plan_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "pricing_plan_details_json_schema_version", + "smithy.api#documentation": "Version of the pricing_plan_details form schema" + } + }, + "skip_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip_benefits", + "smithy.api#documentation": "Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API." + } + }, + "actions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "actions", + "smithy.api#documentation": "Complementary action(s) to perform when creating an employment." + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `address_details` as path parameters." + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `administrative_details` as path parameters." + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Bank account information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `bank_account_details` as path parameters." + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `employment_basic_information` as path parameters." + } + }, + "billing_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Billing address information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `billing_address_details` as path parameters." + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company. Optional when updating." + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `contract_details` as path parameters." + } + }, + "country": { + "target": "com.remote.api#Country" + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code for this employment." + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The department of the employment. The department must belong to the same company as the employment.\nWhen set to `null`, the employment will be unassigned from a department.\n", + "com.distilled.openapi#nullable": {} + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `emergency_contact_details` as path parameters." + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system." + } + }, + "manager_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user id of the manager, who should have an `admin`, `owner` or `people_manager` role.\nYou can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager).\n**Update of this field is only available for active employments.**\n" + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nOmit the field to leave the value unchanged; send `null` to clear it. Surrounding\nwhitespace is trimmed off. It can be set at any employment status, and the same\nvalue may be used on several employments (for example a rehire).\n", + "com.distilled.openapi#nullable": {} + } + }, + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Personal details information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `personal_details` as path parameters." + } + }, + "pricing_plan_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Pricing plan details information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `pricing_plan_details` as path parameters." + } + }, + "type": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequestType", + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The work email of the employment." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing the full employment record after an update operation." + } + }, + "com.remote.api#EmploymentResponseData": { + "type": "structure", + "members": { + "employment": { + "target": "com.remote.api#Employment" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update employment\n\nUpdates an employment.\n\n**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.\n\n**For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email.\n\n**For `invited` employments:** You can update the work_email.\n\nAfter onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`.\nIf you want to provide additional information for an employment, please make sure to do so **before** the employee is invited.\nWe 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.\nCurrently, these amendments can only be done through the Remote UI.\n\nIt is possible to update the `external_id` of the employment for all employment statuses.\n\nThe same applies to `partner_external_id`, the reference code private to the calling integration. Omit the field to leave it unchanged; send `null` to clear it.\n\n## Global Payroll Employees\n\nTo update a Global Payment employment your input data must comply with the global payroll json schemas.\n\n**For `active` employments:** In addition to the above list, you can update personal_details.\n\n## Direct Employees\n\nTo update an HRIS employment your input data must comply with the HRIS json schemas.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\nPlease contact Remote if you need to update contractors via API since it's currently not supported.\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2RequestType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + } + }, + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2Request": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "address_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "administrative_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "administrative_details_json_schema_version", + "smithy.api#documentation": "Version of the administrative_details form schema" + } + }, + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "employment_basic_information_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "employment_basic_information_json_schema_version", + "smithy.api#documentation": "Version of the employment_basic_information form schema" + } + }, + "billing_address_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "billing_address_details_json_schema_version", + "smithy.api#documentation": "Version of the billing_address_details form schema" + } + }, + "contract_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "contract_details_json_schema_version", + "smithy.api#documentation": "Version of the contract_details form schema" + } + }, + "emergency_contact_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "emergency_contact_details_json_schema_version", + "smithy.api#documentation": "Version of the emergency_contact_details form schema" + } + }, + "personal_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "personal_details_json_schema_version", + "smithy.api#documentation": "Version of the personal_details form schema" + } + }, + "pricing_plan_details_json_schema_version": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "pricing_plan_details_json_schema_version", + "smithy.api#documentation": "Version of the pricing_plan_details form schema" + } + }, + "skip_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip_benefits", + "smithy.api#documentation": "Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API." + } + }, + "actions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "actions", + "smithy.api#documentation": "Complementary action(s) to perform when creating an employment." + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `address_details` as path parameters." + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `administrative_details` as path parameters." + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Bank account information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `bank_account_details` as path parameters." + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `employment_basic_information` as path parameters." + } + }, + "billing_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Billing address information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `billing_address_details` as path parameters." + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company. Optional when updating." + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `contract_details` as path parameters." + } + }, + "country": { + "target": "com.remote.api#Country" + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code for this employment." + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The department of the employment. The department must belong to the same company as the employment.\nWhen set to `null`, the employment will be unassigned from a department.\n", + "com.distilled.openapi#nullable": {} + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `emergency_contact_details` as path parameters." + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system." + } + }, + "manager_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user id of the manager, who should have an `admin`, `owner` or `people_manager` role.\nYou can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager).\n**Update of this field is only available for active employments.**\n" + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nOmit the field to leave the value unchanged; send `null` to clear it. Surrounding\nwhitespace is trimmed off. It can be set at any employment status, and the same\nvalue may be used on several employments (for example a rehire).\n", + "com.distilled.openapi#nullable": {} + } + }, + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Personal details information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `personal_details` as path parameters." + } + }, + "pricing_plan_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Pricing plan details information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `pricing_plan_details` as path parameters." + } + }, + "type": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2RequestType", + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The work email of the employment." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1EmploymentsEmploymentId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2Request" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update employment\n\nUpdates an employment.\n\n**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.\n\n**For `active` employments:** You can update the manager (`manager_id` field), emergency_contact_details, address_details and work_email.\n\n**For `invited` employments:** You can update the work_email.\n\nAfter onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`.\nIf you want to provide additional information for an employment, please make sure to do so **before** the employee is invited.\nWe 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.\nCurrently, these amendments can only be done through the Remote UI.\n\nIt is possible to update the `external_id` of the employment for all employment statuses.\n\nThe same applies to `partner_external_id`, the reference code private to the calling integration. Omit the field to leave it unchanged; send `null` to clear it.\n\n## Global Payroll Employees\n\nTo update a Global Payment employment your input data must comply with the global payroll json schemas.\n\n**For `active` employments:** In addition to the above list, you can update personal_details.\n\n## Direct Employees\n\nTo update an HRIS employment your input data must comply with the HRIS json schemas.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\nPlease contact Remote if you need to update contractors via API since it's currently not supported.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment Id" + } + }, + "background_check_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Background Check Id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BackgroundChecksBackgroundCheckResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BackgroundChecksBackgroundCheckResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Background Check Response" + } + }, + "com.remote.api#BackgroundChecksBackgroundCheck": { + "type": "structure", + "members": { + "background_check_request_items": { + "target": "com.remote.api#BackgroundChecksBackgroundCheckBackgroundCheckRequestItemsList", + "traits": { + "smithy.api#documentation": "Individual checks that make up this background check request", + "smithy.api#required": {} + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the associated employment", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the background check request", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#BackgroundChecksBackgroundCheckStatus", + "traits": { + "smithy.api#documentation": "Overall status of the background check request", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BackgroundChecksBackgroundCheckRequestItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the background check request item", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#BackgroundChecksBackgroundCheckRequestItemStatus", + "traits": { + "smithy.api#documentation": "Status of the background check item", + "smithy.api#required": {} + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Display title of the background check item", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Type of background check (e.g. criminal, education)", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BackgroundChecksBackgroundCheckRequestItemStatus": { + "type": "enum", + "members": { + "EMPLOYER_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer_requested" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "NEEDS_EMPLOYEE_RESPONSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "needs_employee_response" + } + }, + "NEEDS_EMPLOYER_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "needs_employer_review" + } + }, + "NEEDS_REMOTE_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "needs_remote_review" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + } + }, + "traits": { + "smithy.api#documentation": "Status of the background check item" + } + }, + "com.remote.api#BackgroundChecksBackgroundCheckBackgroundCheckRequestItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#BackgroundChecksBackgroundCheckRequestItem" + }, + "traits": { + "smithy.api#documentation": "Individual checks that make up this background check request" + } + }, + "com.remote.api#BackgroundChecksBackgroundCheckStatus": { + "type": "enum", + "members": { + "EMPLOYER_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer_requested" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "NEEDS_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "needs_review" + } + }, + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "complete" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + }, + "SUBMISSION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submission_failed" + } + } + }, + "traits": { + "smithy.api#documentation": "Overall status of the background check request" + } + }, + "com.remote.api#BackgroundChecksBackgroundCheckResponseData": { + "type": "structure", + "members": { + "background_check": { + "target": "com.remote.api#BackgroundChecksBackgroundCheck", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest" + }, + "output": { + "target": "com.remote.api#BackgroundChecksBackgroundCheckResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/background-checks/{background_check_id}", + "code": 200 + }, + "smithy.api#documentation": "Show Background Check\n\nShow Background Check details for a given employment and background check request.\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdBasicInformationRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `employment_basic_information` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdBasicInformation": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdBasicInformationRequest" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employments/{employment_id}/basic-information", + "code": 200 + }, + "smithy.api#documentation": "Update basic information\n\nUpdates employment's basic information.\n\nSupported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the employment" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentsBenefitOffersListBenefitOffers": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentsBenefitOffersListBenefitOffersDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The list of benefit offers for an employment schema" + } + }, + "com.remote.api#UnifiedEmploymentBenefitOffer": { + "type": "structure", + "members": { + "benefit_group": { + "target": "com.remote.api#UnifiedEmploymentBenefitGroup", + "traits": { + "smithy.api#required": {} + } + }, + "benefit_tier": { + "target": "com.remote.api#UnifiedEmploymentBenefitTier", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The benefit offer for an employment schema" + } + }, + "com.remote.api#UnifiedEmploymentBenefitGroup": { + "type": "structure", + "members": { + "filter": { + "target": "com.remote.api#UnifiedMinimalBenefitGroup", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#UnifiedMinimalBenefitGroup": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#UnifiedEmploymentBenefitTier": { + "type": "structure", + "members": { + "display_cost": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#EmploymentsBenefitOffersListBenefitOffersDataList": { + "type": "list", + "member": { + "target": "com.remote.api#UnifiedEmploymentBenefitOffer" + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffers": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersRequest" + }, + "output": { + "target": "com.remote.api#EmploymentsBenefitOffersListBenefitOffers" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/benefit-offers", + "code": 200 + }, + "smithy.api#documentation": "Get employment benefit offers\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffersRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the employment" + } + }, + "json_schema_version": { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffers": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffersRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employments/{employment_id}/benefit-offers", + "code": 200 + }, + "smithy.api#documentation": "Upserts employment benefit offers" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the employment" + } + }, + "json_schema_version": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseData", + "traits": { + "smithy.api#documentation": "JSON Schema" + } + } + }, + "traits": { + "smithy.api#documentation": "JSON schema response for benefit offers" + } + }, + "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaPropertiesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaRequiredList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaXJsfOrderList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema": { + "type": "structure", + "members": { + "properties": { + "target": "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaPropertiesMap", + "traits": { + "smithy.api#required": {} + } + }, + "required": { + "target": "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaRequiredList" + }, + "x_jsf_order": { + "target": "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaXJsfOrderList", + "traits": { + "smithy.api#jsonName": "x-jsf-order" + } + } + }, + "traits": {} + }, + "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseData": { + "type": "structure", + "members": { + "schema": { + "target": "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema" + }, + "version": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#documentation": "JSON Schema" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchema": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest" + }, + "output": { + "target": "com.remote.api#UnifiedEmploymentsBenefitOffersJSONSchemaResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/benefit-offers/schema", + "code": 200 + }, + "smithy.api#documentation": "Get a employment benefit offers JSON schema\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CompanyStructureNodesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CompanyStructureNodesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyStructureNode": { + "type": "structure", + "members": { + "attributes": { + "target": "com.remote.api#CompanyStructureNodeAttributesMap", + "traits": { + "smithy.api#documentation": "Arbitrary attributes including legal entity code" + } + }, + "company_structure": { + "target": "com.remote.api#CompanyStructureNodeCompanyStructure" + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "parent": { + "target": "com.remote.api#CompanyStructureNodeParent", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CompanyStructureNodeAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Arbitrary attributes including legal entity code" + } + }, + "com.remote.api#CompanyStructureNodeCompanyStructure": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#CompanyStructureNodeParentAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Arbitrary attributes including cost_center" + } + }, + "com.remote.api#CompanyStructureNodeParent": { + "type": "structure", + "members": { + "attributes": { + "target": "com.remote.api#CompanyStructureNodeParentAttributesMap", + "traits": { + "smithy.api#documentation": "Arbitrary attributes including cost_center" + } + }, + "id": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#CompanyStructureNodesResponseDataCompanyStructureNodesList": { + "type": "list", + "member": { + "target": "com.remote.api#CompanyStructureNode" + }, + "traits": {} + }, + "com.remote.api#CompanyStructureNodesResponseData": { + "type": "structure", + "members": { + "company_structure_nodes": { + "target": "com.remote.api#CompanyStructureNodesResponseDataCompanyStructureNodesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCompanyStructureNodes": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest" + }, + "output": { + "target": "com.remote.api#CompanyStructureNodesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/company-structure-nodes", + "code": 200 + }, + "smithy.api#documentation": "List company structure nodes\n\nShows all the company structure nodes of an employment.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdContractDocumentsRequestStatusesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorContractDocumentStatus" + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdContractDocumentsRequestExceptStatusesList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorContractDocumentStatus" + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdContractDocumentsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "statuses": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdContractDocumentsRequestStatusesList", + "traits": { + "smithy.api#httpQuery": "statuses", + "smithy.api#documentation": "Filter by contract document statuses" + } + }, + "except_statuses": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdContractDocumentsRequestExceptStatusesList", + "traits": { + "smithy.api#httpQuery": "except_statuses", + "smithy.api#documentation": "Exclude contract documents with specific statuses" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IndexContractDocumentsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IndexContractDocuments", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Paginated list of contract documents" + } + }, + "com.remote.api#IndexContractDocuments": { + "type": "structure", + "members": { + "contract_documents": { + "target": "com.remote.api#IndexContractDocumentsContractDocumentsList", + "traits": { + "smithy.api#documentation": "Array of contract documents", + "smithy.api#required": {} + } + }, + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page number", + "smithy.api#required": {} + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of contract documents", + "smithy.api#required": {} + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of pages", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Paginated list of contract documents" + } + }, + "com.remote.api#ContractDocumentItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Contract document slug/ID", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Created timestamp", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Contract document name", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "signatories": { + "target": "com.remote.api#ContractDocumentItemSignatoriesList", + "traits": { + "smithy.api#documentation": "List of signatories for this contract document", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractorContractDocumentStatus", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Contract document type", + "smithy.api#required": {} + } + }, + "updated_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last updated timestamp", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contract document item in list response" + } + }, + "com.remote.api#ListSignatory": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Email address of the signatory", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Full name of the signatory", + "com.distilled.openapi#nullable": {} + } + }, + "signature_method": { + "target": "com.remote.api#ListSignatorySignatureMethod", + "traits": { + "smithy.api#documentation": "Signing method used by this signatory" + } + }, + "signature_type": { + "target": "com.remote.api#ListSignatorySignatureType", + "traits": { + "smithy.api#documentation": "Legal signature level applied when signing" + } + }, + "signed_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when the signatory signed the document, null if not yet signed", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#SignatoryStatus", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#SignatoryType", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User identifier for internal signatories, null for external signatories", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A signatory on a contract document. For company and employee signatories, `user_id` is provided. For other signatory types, `user_id` is null." + } + }, + "com.remote.api#ListSignatorySignatureMethod": { + "type": "enum", + "members": { + "IN_PLATFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_platform" + } + }, + "DOCUSIGN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "docusign" + } + } + }, + "traits": { + "smithy.api#documentation": "Signing method used by this signatory" + } + }, + "com.remote.api#ListSignatorySignatureType": { + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + }, + "QES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "qes" + } + }, + "AES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aes" + } + }, + "SES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ses" + } + } + }, + "traits": { + "smithy.api#documentation": "Legal signature level applied when signing" + } + }, + "com.remote.api#ContractDocumentItemSignatoriesList": { + "type": "list", + "member": { + "target": "com.remote.api#ListSignatory" + }, + "traits": { + "smithy.api#documentation": "List of signatories for this contract document" + } + }, + "com.remote.api#IndexContractDocumentsContractDocumentsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractDocumentItem" + }, + "traits": { + "smithy.api#documentation": "Array of contract documents" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdContractDocuments": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdContractDocumentsRequest" + }, + "output": { + "target": "com.remote.api#IndexContractDocumentsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/contract-documents", + "code": 200 + }, + "smithy.api#documentation": "List contract documents for an employment\n\nOnly 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).\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractEligibilityRequestEligibleToWorkInResidingCountry": { + "type": "enum", + "members": { + "CITIZEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "citizen" + } + }, + "PERMANENT_RESIDENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "permanent_resident" + } + }, + "TEMPORARY_RESIDENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "temporary_resident" + } + } + }, + "traits": { + "smithy.api#documentation": "type of employment eligibility to work in residing country" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractEligibilityRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "eligible_to_work_in_residing_country": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractEligibilityRequestEligibleToWorkInResidingCountry", + "traits": { + "smithy.api#documentation": "type of employment eligibility to work in residing country", + "smithy.api#required": {} + } + }, + "employer_or_work_restrictions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "whether the employer or work restrictions apply", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractEligibility": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractEligibilityRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments/{employment_id}/contract-eligibility", + "code": 200 + }, + "smithy.api#documentation": "Create contract eligibility\n\nCreate contract eligibility for an employment.\n\nThis will create a new contract eligibility for the employment.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractOriginRequestContractOrigin": { + "type": "enum", + "members": { + "REMOTE_CONTRACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_contract" + } + }, + "CUSTOM_REMOTE_CONTRACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_remote_contract" + } + }, + "PROVIDED_BY_CUSTOMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "provided_by_customer" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractOriginRequestTemplateType": { + "type": "enum", + "members": { + "CONTRACTOR_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_agreement" + } + }, + "CONTRACTOR_SERVICES_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_services_agreement" + } + }, + "CONTRACTOR_STATEMENT_OF_WORK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_statement_of_work" + } + }, + "CUSTOM_CONTRACTOR_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_contractor_agreement" + } + }, + "CUSTOM_CONTRACTOR_AGREEMENT_V2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_contractor_agreement_v2" + } + } + }, + "traits": { + "smithy.api#documentation": "Required when contract_origin is remote_contract or custom_remote_contract, ignored when provided_by_customer" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractOriginRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "contract_origin": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractOriginRequestContractOrigin", + "traits": { + "smithy.api#required": {} + } + }, + "template_type": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractOriginRequestTemplateType", + "traits": { + "smithy.api#documentation": "Required when contract_origin is remote_contract or custom_remote_contract, ignored when provided_by_customer", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractOrigin": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractOriginRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments/{employment_id}/contract-origin", + "code": 200 + }, + "smithy.api#documentation": "Set contract origin for a contractor employment\n\nSets the `contract_origin` for a contractor employment.\n\n* `remote_contract` — Remote provides and manages the contract (a contract document is created)\n* `custom_remote_contract` — A customised Remote contract is used (a contract document is created)\n* `provided_by_customer` — The employer provides their own contract (no contract document is created)\n\nWhen `provided_by_customer` is selected, the contractor can be invited without completing the\n`contract_details` onboarding step.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequestItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#ContractorInvoiceScheduleItem" + }, + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount." + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment identifier" + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "items": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequestItemsList", + "traits": { + "smithy.api#documentation": "List of invoice items that composes the overall invoice amount.", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom defined note.", + "com.distilled.openapi#nullable": {} + } + }, + "number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Invoice identifier.", + "com.distilled.openapi#nullable": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ContractorInvoicePreviewResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorInvoicePreviewResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Returns a base64 encoded Contractor Invoice preview document." + } + }, + "com.remote.api#ContractorInvoicePreviewResponseDataContractorInvoicePreview": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ContractorInvoicePreviewResponseData": { + "type": "structure", + "members": { + "contractor_invoice_preview": { + "target": "com.remote.api#ContractorInvoicePreviewResponseDataContractorInvoicePreview", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdContractorInvoicesPreview": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest" + }, + "output": { + "target": "com.remote.api#ContractorInvoicePreviewResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments/{employment_id}/contractor-invoices/preview", + "code": 200 + }, + "smithy.api#documentation": "Preview a Contractor Invoice\n\nReturns a base64-encoded PDF preview of a contractor invoice built from the given parameters.\n\nThe document is a draft and is not persisted.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCostCenterAllocationsRequestStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scheduled" + } + }, + "EXPIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expired" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "status": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCostCenterAllocationsRequestStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filters allocations by status. When omitted, allocations of every status are returned." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListCostCenterAllocationsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListCostCenterAllocationsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response listing the cost center allocations for an employment." + } + }, + "com.remote.api#ListCostCenterAllocationsResponseDataCostCenterAllocationsList": { + "type": "list", + "member": { + "target": "com.remote.api#CostCenterAllocation" + }, + "traits": {} + }, + "com.remote.api#ListCostCenterAllocationsResponseData": { + "type": "structure", + "members": { + "cost_center_allocations": { + "target": "com.remote.api#ListCostCenterAllocationsResponseDataCostCenterAllocationsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCostCenterAllocations": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest" + }, + "output": { + "target": "com.remote.api#ListCostCenterAllocationsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/cost-center-allocations", + "code": 200 + }, + "smithy.api#documentation": "List cost center allocations for an employment\n\nLists the cost center allocations for an employment. Each allocation includes the cost center,\nthe allocated percentage, and its effective period. An employment with no cost center assigned\nreturns an empty list.\n\nUse the `status` query parameter to return only `active`, `scheduled`, or `expired` allocations.\nWhen omitted, all allocations are returned.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCustomFieldsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListEmploymentCustomFieldValuePaginatedResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListEmploymentCustomFieldValuePaginatedResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many custom_field_values" + } + }, + "com.remote.api#ListEmploymentCustomFieldValueResponse": { + "type": "structure", + "members": { + "custom_field_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the custom field definition.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The display name of the custom field.", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The data type of the custom field (e.g., \"string\", \"integer\", \"single_select\").", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.remote.api#ListEmploymentCustomFieldValueResponseValue", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A custom field value as returned in list responses, including the field definition details alongside the value." + } + }, + "com.remote.api#ListEmploymentCustomFieldValueResponseValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Integer" + }, + "Case2": { + "target": "smithy.api#Boolean" + }, + "Case3": { + "target": "smithy.api#Double" + }, + "EmploymentCustomFieldValueJsonValue": { + "target": "com.remote.api#EmploymentCustomFieldValueJsonValue" + } + }, + "traits": {} + }, + "com.remote.api#ListEmploymentCustomFieldValuePaginatedResponseDataCustomFieldValuesList": { + "type": "list", + "member": { + "target": "com.remote.api#ListEmploymentCustomFieldValueResponse" + }, + "traits": {} + }, + "com.remote.api#ListEmploymentCustomFieldValuePaginatedResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "custom_field_values": { + "target": "com.remote.api#ListEmploymentCustomFieldValuePaginatedResponseDataCustomFieldValuesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdCustomFields": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCustomFieldsRequest" + }, + "output": { + "target": "com.remote.api#ListEmploymentCustomFieldValuePaginatedResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/custom-fields", + "code": 200 + }, + "smithy.api#documentation": "List custom field value for an employment\n\nReturns a list of custom field values for a given employment\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementDownload": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest" + }, + "output": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/employment-agreement/download", + "code": 200 + }, + "smithy.api#documentation": "Download the Employment Agreement for an employment\n\nDownloads a PDF of the auto-generated Employment Agreement for an employment.\n\nThe document is rendered as a draft (no signatures) and is not persisted. EA preview is only\navailable for countries that have a published Employment Agreement automation template — see the\n`employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentAgreementPreviewResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentAgreementPreviewResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Return a base64 encoded Employment Agreement preview document" + } + }, + "com.remote.api#EmploymentAgreementPreviewResponseDataEmploymentAgreement": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentAgreementPreviewResponseData": { + "type": "structure", + "members": { + "employment_agreement": { + "target": "com.remote.api#EmploymentAgreementPreviewResponseDataEmploymentAgreement", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementPreview": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest" + }, + "output": { + "target": "com.remote.api#EmploymentAgreementPreviewResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/employment-agreement/preview", + "code": 200 + }, + "smithy.api#documentation": "Preview the Employment Agreement for an employment\n\nReturns a base64-encoded PDF preview of the auto-generated Employment Agreement for an employment.\n\nThe document is rendered as a draft (no signatures) and is not persisted. EA preview is only\navailable for countries that have a published Employment Agreement automation template — see the\n`employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsAllowancesDetailsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#EngagementAgreementDetailsFile": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ID of the file. Send it back when upserting to keep the file.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name, including its extension.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A file attached to the engagement agreement details." + } + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsCbaDocumentList": { + "type": "list", + "member": { + "target": "com.remote.api#EngagementAgreementDetailsFile" + }, + "traits": {} + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsCovenantsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsWorkingDaysList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetails": { + "type": "structure", + "members": { + "allowances_details": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsAllowancesDetailsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "available_pto": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "break_time_per_day": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "business_expenses": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cba": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cba_document": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsCbaDocumentList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "covenants": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsCovenantsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_allowances": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_bonus": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_business_expenses": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_business_presence": { + "target": "smithy.api#String" + }, + "has_cba": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_commissions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_covenants": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_illness_remuneration": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_overtime_compensation": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_pension_scheme": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_signing_bonus": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_similar_roles": { + "target": "smithy.api#String" + }, + "has_similar_work_conditions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "illness_remuneration_details": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "max_annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "min_annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_compensation_begins": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_compensation_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_pay_percentage": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pension_scheme": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "similar_roles": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "similar_work_conditions_details": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "work_hours_per_week": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "working_days": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetailsWorkingDaysList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#EmploymentEngagementAgreementDetailsResponseData": { + "type": "structure", + "members": { + "details": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponseDataDetails", + "traits": { + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdEngagementAgreementDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/engagement-agreement-details", + "code": 200 + }, + "smithy.api#documentation": "Get engagement agreement details\n\nReturns the engagement agreement details for an employment.\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#EngagementAgreementDetailsFileParams": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file content, Base64 encoded. Required when uploading a new file. The decoded content must match the extension given in `name`. Requests are capped at 25MB in total, which leaves room for a file of roughly 18MB once Base64 encoded." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ID of a file uploaded previously, as returned by the show endpoint. Send it to keep that file." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name, including its extension.", + "smithy.api#required": {} + } + }, + "size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The file size in bytes, before Base64 encoding." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file's media type." + } + } + }, + "traits": { + "smithy.api#documentation": "A file attached to the engagement agreement details.\n\nTo upload a new file, send its `name` and its base64-encoded `content`. To keep a file uploaded\npreviously, send back the `name` and `id` returned by the show endpoint instead. Every entry\nmust do one or the other — an entry carrying neither is rejected, and an `id` that does not\nbelong to this record is rejected too. Files that are not included in the payload are deleted.\n\nOnly the properties below are accepted; any other one is rejected. In particular a file's\n`sub_type` is derived from the field it is attached to and cannot be set by the caller.\n" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList": { + "type": "list", + "member": { + "target": "com.remote.api#EngagementAgreementDetailsFileParams" + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails": { + "type": "structure", + "members": { + "allowances_details": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "available_pto": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "break_time_per_day": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "business_expenses": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cba": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cba_document": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "covenants": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_allowances": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_bonus": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_business_expenses": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_business_presence": { + "target": "smithy.api#String" + }, + "has_cba": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_commissions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_covenants": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_illness_remuneration": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_overtime_compensation": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_pension_scheme": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_signing_bonus": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_similar_roles": { + "target": "smithy.api#String" + }, + "has_similar_work_conditions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "illness_remuneration_details": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "max_annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "min_annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_compensation_begins": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_compensation_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_pay_percentage": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pension_scheme": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "similar_roles": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "similar_work_conditions_details": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "work_hours_per_week": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "working_days": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "engagement_agreement_details": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails", + "traits": { + "smithy.api#documentation": "Engagement agreement details params. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_engagement_agreement_details_country) endpoint\npassing the country code.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments/{employment_id}/engagement-agreement-details", + "code": 200 + }, + "smithy.api#documentation": "Upsert engagement agreement details\n\nCreates or updates the engagement agreement details for an employment.\n\nThis endpoint requires country-specific data. The exact required fields will vary depending on\nwhich country the employment is in. To see the list of parameters for each country, see the\n**Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that compliance requirements for each country are subject to change according to local laws.\nUsing Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended\nto avoid compliance issues and to have the latest version of a country's requirements.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdFederalTaxesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "federal_taxes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Federal taxes params. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `global_payroll_federal_taxes` as path parameters.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdFederalTaxes": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdFederalTaxesRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employments/{employment_id}/federal-taxes", + "code": 200 + }, + "smithy.api#documentation": "Update federal taxes\n\nUpdates employment's federal taxes.\n\nRequirements to update federal taxes successfully:\n* Employment should be Global Payroll\n* Employment should be in the post-enrollment state\n* Employment should belong to USA\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdFilesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Filter by file type (optional)" + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "sub_type", + "smithy.api#documentation": "Filter by file sub_type (optional)" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListFilesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListFilesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many files" + } + }, + "com.remote.api#ListFilesResponseDataFilesList": { + "type": "list", + "member": { + "target": "com.remote.api#File" + }, + "traits": {} + }, + "com.remote.api#ListFilesResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "files": { + "target": "com.remote.api#ListFilesResponseDataFilesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdFiles": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdFilesRequest" + }, + "output": { + "target": "com.remote.api#ListFilesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/files", + "code": 200 + }, + "smithy.api#documentation": "List employment files\n\nLists files associated with a specific employment.\n\nSupports filtering by file type and sub_type.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdInviteRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdInvite": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdInviteRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments/{employment_id}/invite", + "code": 200 + }, + "smithy.api#documentation": "Invite employment\n\nInvite an employment to start the self-enrollment.\n\nRequirements for the invitation to succeed:\n\n* Employment needs to have the following JSON Schema forms filled: `contract_details` and `pricing_plan_details`\n* `provisional_start_date` must consider the minimum onboarding time of the employment's country\n\nIf there are validations errors, they are returned with a Conflict HTTP Status (409) and a descriptive message.\nHTTP Status OK (200) is returned in case of success.\n\nIn case of the following error message:\n`\"Please reselect benefits - the previous selection is no longer available\"`\nit means that the benefit options have been updated and the employment's benefits are no longer compliant with the new schema.\n\nIn this case, reselect benefits by updating `contract_details` JSON Schema form.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdJobRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentJobResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#Job", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#Job": { + "type": "structure", + "members": { + "career_track": { + "target": "com.remote.api#JobAssociation", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional company-defined code for this job (e.g., \"JOB-0\"). Null if not set.", + "com.distilled.openapi#nullable": {} + } + }, + "custom_field_values": { + "target": "com.remote.api#JobCustomFieldValuesList" + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the job's responsibilities and scope. Null if not set.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the job.", + "smithy.api#required": {} + } + }, + "identifier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A company-defined identifier for this job (e.g., \"eng-001\").", + "smithy.api#required": {} + } + }, + "job_family": { + "target": "com.remote.api#JobAssociation", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "job_level": { + "target": "com.remote.api#JobAssociation", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "job_sub_family": { + "target": "com.remote.api#JobAssociation", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The display name of the job (e.g., \"Senior Backend Engineer\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#JobAssociation": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the associated entity." + } + }, + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The human-readable name of the associated entity." + } + } + }, + "traits": { + "smithy.api#documentation": "A reference to a related job classification entity (job family, sub-family, career track, or job level). Null if not assigned." + } + }, + "com.remote.api#JobCustomFieldValuesItemDefinition": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String" + }, + "title": { + "target": "smithy.api#String" + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#JobCustomFieldValuesItemValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Integer" + }, + "Case2": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.remote.api#JobCustomFieldValuesItem": { + "type": "structure", + "members": { + "definition": { + "target": "com.remote.api#JobCustomFieldValuesItemDefinition" + }, + "value": { + "target": "com.remote.api#JobCustomFieldValuesItemValue" + } + }, + "traits": {} + }, + "com.remote.api#JobCustomFieldValuesList": { + "type": "list", + "member": { + "target": "com.remote.api#JobCustomFieldValuesItem" + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdJob": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdJobRequest" + }, + "output": { + "target": "com.remote.api#EmploymentJobResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/job", + "code": 200 + }, + "smithy.api#documentation": "Show employment job\n\nShows an employment job details.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1EmploymentsEmploymentIdOnboardingStepsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmploymentOnboardingStepsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmploymentOnboardingStepsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#Step": { + "type": "structure", + "members": { + "completed_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for this step instance", + "smithy.api#required": {} + } + }, + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable step name", + "smithy.api#required": {} + } + }, + "started_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#StepStatus", + "traits": { + "smithy.api#documentation": "Step status", + "smithy.api#required": {} + } + }, + "sub_steps": { + "target": "com.remote.api#StepSubStepsList", + "traits": { + "smithy.api#documentation": "Ordered list of substeps for this step", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Step type identifier", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#StepStatus": { + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_started" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + } + }, + "traits": { + "smithy.api#documentation": "Step status" + } + }, + "com.remote.api#SubStep": { + "type": "structure", + "members": { + "completed_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for this substep", + "smithy.api#required": {} + } + }, + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable substep name", + "smithy.api#required": {} + } + }, + "optional": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this substep is optional", + "smithy.api#required": {} + } + }, + "started_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#SubStepStatus", + "traits": { + "smithy.api#documentation": "Substep status", + "smithy.api#required": {} + } + }, + "tag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional UI tag", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Substep type identifier", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#SubStepStatus": { + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_started" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_progress" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + } + }, + "traits": { + "smithy.api#documentation": "Substep status" + } + }, + "com.remote.api#StepSubStepsList": { + "type": "list", + "member": { + "target": "com.remote.api#SubStep" + }, + "traits": { + "smithy.api#documentation": "Ordered list of substeps for this step" + } + }, + "com.remote.api#EmploymentOnboardingStepsResponseDataStepsList": { + "type": "list", + "member": { + "target": "com.remote.api#Step" + }, + "traits": {} + }, + "com.remote.api#EmploymentOnboardingStepsResponseData": { + "type": "structure", + "members": { + "steps": { + "target": "com.remote.api#EmploymentOnboardingStepsResponseDataStepsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1EmploymentsEmploymentIdOnboardingSteps": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdOnboardingStepsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentOnboardingStepsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/employments/{employment_id}/onboarding-steps", + "code": 200 + }, + "smithy.api#documentation": "Show onboarding steps for an employment\n\nReturns onboarding steps and substeps in a hierarchical, ordered structure.\n\n## Scopes" + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdPersonalDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment personal details. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `employment_basic_information` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1EmploymentsEmploymentIdPersonalDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdPersonalDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/employments/{employment_id}/personal-details", + "code": 200 + }, + "smithy.api#documentation": "Update personal details\n\nUpdates employment's personal details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "file": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The proof of payment file (PDF)", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#RiskReserveProofOfPaymentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#RiskReserveProofOfPaymentResponseData" + } + }, + "traits": {} + }, + "com.remote.api#RiskReserveProofOfPaymentResponseDataStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "AUTO_APPROVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto_approve" + } + }, + "MANUAL_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "manual_review" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + } + }, + "traits": { + "smithy.api#documentation": "Current status of the proof of payment" + } + }, + "com.remote.api#RiskReserveProofOfPaymentResponseData": { + "type": "structure", + "members": { + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Proof of payment ID" + } + }, + "status": { + "target": "com.remote.api#RiskReserveProofOfPaymentResponseDataStatus", + "traits": { + "smithy.api#documentation": "Current status of the proof of payment" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1EmploymentsEmploymentIdRiskReserveProofOfPayments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest" + }, + "output": { + "target": "com.remote.api#RiskReserveProofOfPaymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/employments/{employment_id}/risk-reserve-proof-of-payments", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "Submit risk reserve proof of payment\n\nSubmits a proof of payment document for a risk reserve associated with an employment.\n\nTriggers an `employment.cor_hiring.proof_of_payment_submitted` webhook event.\n\n\n## Scopes", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.remote.api#GetV1ExpensesRequest": { + "type": "structure", + "members": { + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListExpenseResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListExpenseResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many expenses" + } + }, + "com.remote.api#ExpenseOrDraft": { + "type": "union", + "members": { + "Expense": { + "target": "com.remote.api#Expense" + }, + "DraftExpense": { + "target": "com.remote.api#DraftExpense" + } + }, + "traits": { + "smithy.api#documentation": "An expense or a draft object, depending on the status. Drafts (status `draft` or `archived`) may have incomplete(null) data.\n\nThe expense status `draft` occurs when users want to save expenses but don't want them to be considered for approval just yet.\nOnly expenses in `pending` status can be approved or declined. It is possible to update a pending expense to status draft, or vice versa.\n\nThere are no flows that change the status of an expense to `draft` automatically. This is purely a manual action by the employee.\n" + } + }, + "com.remote.api#Expense": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The expense amount in the original currency, in cents.", + "smithy.api#required": {} + } + }, + "category": { + "target": "com.remote.api#ExpenseCategory", + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated)", + "com.distilled.openapi#nullable": {} + } + }, + "converted_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The expense amount converted to the company's billing currency, in cents.", + "smithy.api#required": {} + } + }, + "converted_currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {} + } + }, + "converted_tax_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The tax portion converted to the company's billing currency, in cents.", + "smithy.api#required": {} + } + }, + "currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment this expense belongs to.", + "smithy.api#required": {} + } + }, + "expense_category": { + "target": "com.remote.api#ExpenseExpenseCategory", + "traits": { + "smithy.api#documentation": "New hierarchical expense category (recommended)", + "com.distilled.openapi#nullable": {} + } + }, + "expense_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the expense was incurred (ISO 8601 format). Must be in the past.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the expense.", + "smithy.api#required": {} + } + }, + "invoice_period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The payroll invoice period this expense is associated with, in YYYY-MM format. Null if not yet assigned to a payroll period.", + "com.distilled.openapi#nullable": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional additional notes or context about the expense.", + "com.distilled.openapi#nullable": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason provided when the expense was declined. Null for non-declined expenses.", + "com.distilled.openapi#nullable": {} + } + }, + "receipts": { + "target": "com.remote.api#ExpenseReceiptsList", + "traits": { + "smithy.api#documentation": "Uploaded receipt files for this expense. Maximum 5 receipts." + } + }, + "reviewed_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the expense was reviewed. Null if not yet reviewed.", + "com.distilled.openapi#nullable": {} + } + }, + "reviewer": { + "target": "com.remote.api#ExpenseReviewer", + "traits": { + "smithy.api#documentation": "The person who reviewed (approved or declined) this expense. Null if not yet reviewed.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#ExpenseStatus", + "traits": { + "smithy.api#documentation": "The current status of the expense.\n\n- `pending`: Submitted and awaiting approval.\n- `approved`: Approved by a reviewer and queued for reimbursement.\n- `declined`: Declined by a reviewer. See `reason` for details.\n- `canceled`: Canceled by the employee before approval.\n- `processing`: Being processed as part of a payroll run.\n- `reimbursed`: Successfully reimbursed to the employee.\n" + } + }, + "tax_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The tax portion of the expense amount in the original currency, in cents.", + "smithy.api#required": {} + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A short description of the expense (e.g., \"New keyboard\", \"Team dinner\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A submitted expense record with complete data. All monetary amounts are integers in the currency's minor unit (cents)." + } + }, + "com.remote.api#ExpenseCategory": { + "type": "enum", + "members": { + "CAR_RENTAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_rental" + } + }, + "COWORKING_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking_office" + } + }, + "EDUCATION_TRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "education_training" + } + }, + "ENTERTAINMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "entertainment" + } + }, + "FLIGHT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flight" + } + }, + "FUEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fuel" + } + }, + "GIFTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gifts" + } + }, + "INSURANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "insurance" + } + }, + "LODGING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lodging" + } + }, + "MEALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meals" + } + }, + "MILEAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mileage" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PARKING_TOLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parking_toll" + } + }, + "PER_DIEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "per_diem" + } + }, + "SUBSCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "subscription" + } + }, + "TECH_EQUIPMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tech_equipment" + } + }, + "TELECOMMUNICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "telecommunication" + } + }, + "TRANSPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transport" + } + }, + "UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "utilities" + } + }, + "VACCINATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vaccination_testing" + } + }, + "VISA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "visa" + } + }, + "WELLNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wellness" + } + }, + "COWORKING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking" + } + }, + "HOME_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "home_office" + } + }, + "PHONE_UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_utilities" + } + }, + "TRAVEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel" + } + } + }, + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated)" + } + }, + "com.remote.api#ExpenseExpenseCategory": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Internal category code (e.g., 'travel.flights')" + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the category" + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable category name" + } + } + }, + "traits": { + "smithy.api#documentation": "New hierarchical expense category (recommended)" + } + }, + "com.remote.api#ExpenseReceiptsList": { + "type": "list", + "member": { + "target": "com.remote.api#File" + }, + "traits": { + "smithy.api#documentation": "Uploaded receipt files for this expense. Maximum 5 receipts." + } + }, + "com.remote.api#ExpenseReviewer": { + "type": "structure", + "members": { + "user_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reviewer's email address." + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the reviewer." + } + }, + "user_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reviewer's full name." + } + } + }, + "traits": { + "smithy.api#documentation": "The person who reviewed (approved or declined) this expense. Null if not yet reviewed." + } + }, + "com.remote.api#ExpenseStatus": { + "type": "enum", + "members": { + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "REIMBURSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reimbursed" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the expense.\n\n- `pending`: Submitted and awaiting approval.\n- `approved`: Approved by a reviewer and queued for reimbursement.\n- `declined`: Declined by a reviewer. See `reason` for details.\n- `canceled`: Canceled by the employee before approval.\n- `processing`: Being processed as part of a payroll run.\n- `reimbursed`: Successfully reimbursed to the employee.\n" + } + }, + "com.remote.api#DraftExpense": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The expense amount in the original currency, in cents. Null if not yet entered.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "category": { + "target": "com.remote.api#DraftExpenseCategory", + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated)", + "com.distilled.openapi#nullable": {} + } + }, + "converted_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The converted expense amount in the company's billing currency, in cents. Null if not yet calculated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "converted_currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "converted_tax_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The converted tax portion, in cents. Null if not yet calculated.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "currency": { + "target": "com.remote.api#CurrencyDefinition", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment this expense belongs to.", + "smithy.api#required": {} + } + }, + "expense_category": { + "target": "com.remote.api#DraftExpenseExpenseCategory", + "traits": { + "smithy.api#documentation": "New hierarchical expense category (recommended)", + "com.distilled.openapi#nullable": {} + } + }, + "expense_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the expense was incurred. May be null in drafts.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the draft expense.", + "smithy.api#required": {} + } + }, + "invoice_period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not applicable for draft expenses. Always null.", + "com.distilled.openapi#nullable": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional additional notes about the expense.", + "com.distilled.openapi#nullable": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not applicable for draft expenses. Always null.", + "com.distilled.openapi#nullable": {} + } + }, + "receipts": { + "target": "com.remote.api#DraftExpenseReceiptsList", + "traits": { + "smithy.api#documentation": "Uploaded receipt files. May be empty for drafts. Maximum 5 receipts." + } + }, + "reviewed_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not applicable for draft expenses. Always null.", + "com.distilled.openapi#nullable": {} + } + }, + "reviewer": { + "target": "com.remote.api#DraftExpenseReviewer", + "traits": { + "smithy.api#documentation": "Not applicable for draft expenses. Always null.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#DraftExpenseStatus", + "traits": { + "smithy.api#documentation": "The draft status.\n\n- `draft`: The expense is saved as a draft by the employee and not submitted for approval.\n- `archived`: The draft was soft-deleted by the employee.\n" + } + }, + "tax_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The tax portion in the original currency, in cents. Null if not yet entered.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A short description of the expense. May be null in drafts.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#DraftExpenseCategory": { + "type": "enum", + "members": { + "CAR_RENTAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_rental" + } + }, + "COWORKING_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking_office" + } + }, + "EDUCATION_TRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "education_training" + } + }, + "ENTERTAINMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "entertainment" + } + }, + "FLIGHT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flight" + } + }, + "FUEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fuel" + } + }, + "GIFTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gifts" + } + }, + "INSURANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "insurance" + } + }, + "LODGING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lodging" + } + }, + "MEALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meals" + } + }, + "MILEAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mileage" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PARKING_TOLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parking_toll" + } + }, + "PER_DIEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "per_diem" + } + }, + "SUBSCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "subscription" + } + }, + "TECH_EQUIPMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tech_equipment" + } + }, + "TELECOMMUNICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "telecommunication" + } + }, + "TRANSPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transport" + } + }, + "UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "utilities" + } + }, + "VACCINATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vaccination_testing" + } + }, + "VISA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "visa" + } + }, + "WELLNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wellness" + } + }, + "COWORKING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking" + } + }, + "HOME_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "home_office" + } + }, + "PHONE_UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_utilities" + } + }, + "TRAVEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel" + } + } + }, + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated)" + } + }, + "com.remote.api#DraftExpenseExpenseCategory": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Internal category code (e.g., 'travel.flights')" + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the category" + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable category name" + } + } + }, + "traits": { + "smithy.api#documentation": "New hierarchical expense category (recommended)" + } + }, + "com.remote.api#DraftExpenseReceiptsList": { + "type": "list", + "member": { + "target": "com.remote.api#File" + }, + "traits": { + "smithy.api#documentation": "Uploaded receipt files. May be empty for drafts. Maximum 5 receipts." + } + }, + "com.remote.api#DraftExpenseReviewer": { + "type": "structure", + "members": { + "user_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reviewer's email address." + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the reviewer." + } + }, + "user_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reviewer's full name." + } + } + }, + "traits": { + "smithy.api#documentation": "Not applicable for draft expenses. Always null." + } + }, + "com.remote.api#DraftExpenseStatus": { + "type": "enum", + "members": { + "DRAFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "draft" + } + }, + "ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "archived" + } + } + }, + "traits": { + "smithy.api#documentation": "The draft status.\n\n- `draft`: The expense is saved as a draft by the employee and not submitted for approval.\n- `archived`: The draft was soft-deleted by the employee.\n" + } + }, + "com.remote.api#ListExpenseResponseDataExpensesList": { + "type": "list", + "member": { + "target": "com.remote.api#ExpenseOrDraft" + }, + "traits": {} + }, + "com.remote.api#ListExpenseResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "expenses": { + "target": "com.remote.api#ListExpenseResponseDataExpensesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1Expenses": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ExpensesRequest" + }, + "output": { + "target": "com.remote.api#ListExpenseResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/expenses", + "code": 200 + }, + "smithy.api#documentation": "List expenses\n\nLists all expenses records\n\n## Scopes" + } + }, + "com.remote.api#PostV1ExpensesRequestCategory": { + "type": "enum", + "members": { + "CAR_RENTAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_rental" + } + }, + "COWORKING_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking_office" + } + }, + "EDUCATION_TRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "education_training" + } + }, + "ENTERTAINMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "entertainment" + } + }, + "FLIGHT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flight" + } + }, + "FUEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fuel" + } + }, + "GIFTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gifts" + } + }, + "INSURANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "insurance" + } + }, + "LODGING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lodging" + } + }, + "MEALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meals" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PARKING_TOLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parking_toll" + } + }, + "SUBSCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "subscription" + } + }, + "TECH_EQUIPMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tech_equipment" + } + }, + "TELECOMMUNICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "telecommunication" + } + }, + "TRANSPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transport" + } + }, + "UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "utilities" + } + }, + "VACCINATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vaccination_testing" + } + }, + "VISA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "visa" + } + }, + "WELLNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wellness" + } + }, + "COWORKING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coworking" + } + }, + "HOME_OFFICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "home_office" + } + }, + "PHONE_UTILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_utilities" + } + }, + "TRAVEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel" + } + } + }, + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated).
\nNote: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future.\n" + } + }, + "com.remote.api#PostV1ExpensesRequestReceiptsList": { + "type": "list", + "member": { + "target": "com.remote.api#Base64File" + }, + "traits": {} + }, + "com.remote.api#PostV1ExpensesRequest": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The expense amount in the specified currency, in cents.", + "smithy.api#required": {} + } + }, + "category": { + "target": "com.remote.api#PostV1ExpensesRequestCategory", + "traits": { + "smithy.api#documentation": "Categories allowed for an expense (legacy, deprecated).
\nNote: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future.\n", + "com.distilled.openapi#nullable": {} + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": " The three-letter code for the expense currency.
\n Examples: `\"USD\"`, `\"EUR\"`, `\"CAD\"`\n", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID for the employment to which this expense relates.", + "smithy.api#required": {} + } + }, + "expense_category_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Slug of the expense category from the hierarchical categories system (recommended). Takes precedence over legacy category field.", + "com.distilled.openapi#nullable": {} + } + }, + "expense_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the purchase, which must be in the past", + "smithy.api#required": {} + } + }, + "receipt": { + "target": "com.remote.api#Base64File" + }, + "receipts": { + "target": "com.remote.api#PostV1ExpensesRequestReceiptsList" + }, + "reviewed_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time that the expense was reviewed in ISO8601 format. If not provided, it defaults to the current datetime." + } + }, + "reviewer_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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." + } + }, + "tax_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The tax portion of the expense amount, in cents. Use 0 if no tax applies." + } + }, + "timezone": { + "target": "smithy.api#String" + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A short description of the expense (e.g., \"New keyboard\", \"Team dinner\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ExpenseResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ExpenseResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a single expense record." + } + }, + "com.remote.api#ExpenseResponseData": { + "type": "structure", + "members": { + "expense": { + "target": "com.remote.api#ExpenseOrDraft", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1Expenses": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ExpensesRequest" + }, + "output": { + "target": "com.remote.api#ExpenseResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/expenses", + "code": 200 + }, + "smithy.api#documentation": "Create expense\n\nCreates an **approved** expense\n\n## Scopes" + } + }, + "com.remote.api#GetV1ExpensesCategoriesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "The employment ID for which to list categories. Required if neither expense_id nor country_code is provided." + } + }, + "expense_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "expense_id", + "smithy.api#documentation": "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." + } + }, + "include_parents": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_parents", + "smithy.api#documentation": "Include un-selectable intermediate categories in the response" + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "country_code", + "smithy.api#documentation": "Filter categories by country (ISO 3166-1 alpha-3 code, e.g. \"GBR\"). Only used when neither employment_id nor expense_id is provided." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ExpensesCategories": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ExpensesCategoriesRequest" + }, + "output": { + "target": "com.remote.api#ListExpenseCategoriesResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/expenses/categories", + "code": 200 + }, + "smithy.api#documentation": "List expense categories\n\nLists the effective hierarchy of expense categories. At least one of employment_id, expense_id, or country_code must be provided." + } + }, + "com.remote.api#GetV1ExpensesExpenseIdReceiptsReceiptIdRequest": { + "type": "structure", + "members": { + "expense_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The expense ID" + } + }, + "receipt_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The receipt ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ExpensesExpenseIdReceiptsReceiptId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ExpensesExpenseIdReceiptsReceiptIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/expenses/{expense_id}/receipts/{receipt_id}", + "code": 200 + }, + "smithy.api#documentation": "Download a receipt by id\n\nDownload a receipt by id.\n\n## Scopes" + } + }, + "com.remote.api#GetV1ExpensesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Expense ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ExpensesId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ExpensesIdRequest" + }, + "output": { + "target": "com.remote.api#ExpenseResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/expenses/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show expense\n\nShows a single expense record\n\n## Scopes" + } + }, + "com.remote.api#UpdateExpenseParams": { + "type": "union", + "members": { + "ApproveExpenseParams": { + "target": "com.remote.api#ApproveExpenseParams" + }, + "DeclineExpenseParams": { + "target": "com.remote.api#DeclineExpenseParams" + } + }, + "traits": { + "smithy.api#documentation": "Update expense params" + } + }, + "com.remote.api#ApproveExpenseParams": { + "type": "structure", + "members": { + "status": { + "target": "com.remote.api#ApproveExpenseParamsStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Approve an expense" + } + }, + "com.remote.api#ApproveExpenseParamsStatus": { + "type": "enum", + "members": { + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + } + }, + "traits": {} + }, + "com.remote.api#DeclineExpenseParams": { + "type": "structure", + "members": { + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for declination.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#DeclineExpenseParamsStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Decline an expense" + } + }, + "com.remote.api#DeclineExpenseParamsStatus": { + "type": "enum", + "members": { + "DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1ExpensesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Expense ID" + } + }, + "body": { + "target": "com.remote.api#UpdateExpenseParams", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1ExpensesId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1ExpensesIdRequest" + }, + "output": { + "target": "com.remote.api#ExpenseResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/expenses/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update an expense\n\nUpdates an expense\n\n## Scopes" + } + }, + "com.remote.api#PatchV1ExpensesId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Expense ID" + } + }, + "body": { + "target": "com.remote.api#UpdateExpenseParams", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1ExpensesId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1ExpensesId2Request" + }, + "output": { + "target": "com.remote.api#ExpenseResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/expenses/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update an expense\n\nUpdates an expense\n\n## Scopes" + } + }, + "com.remote.api#GetV1FilesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "File ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DownloadFileResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#DownloadFileResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing the file's metadata and its base64-encoded content for download." + } + }, + "com.remote.api#DownloadFileResponseDataFile": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#DownloadFileResponseData": { + "type": "structure", + "members": { + "file": { + "target": "com.remote.api#DownloadFileResponseDataFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1FilesId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1FilesIdRequest" + }, + "output": { + "target": "com.remote.api#DownloadFileResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/files/{id}", + "code": 200 + }, + "smithy.api#documentation": "Download file\n\nDownloads a file.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1HelpCenterArticlesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Help Center Article Zendesk ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#HelpCenterArticleResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#HelpCenterArticleResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Help Center Article Response" + } + }, + "com.remote.api#HelpCenterArticle": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Body of the article", + "smithy.api#required": {} + } + }, + "html_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "HTML URL of the article", + "smithy.api#required": {} + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Title of the article", + "smithy.api#required": {} + } + }, + "zendesk_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Zendesk ID of the article", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Help Center Article" + } + }, + "com.remote.api#HelpCenterArticleResponseData": { + "type": "structure", + "members": { + "help_center_article": { + "target": "com.remote.api#HelpCenterArticle", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1HelpCenterArticlesId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1HelpCenterArticlesIdRequest" + }, + "output": { + "target": "com.remote.api#HelpCenterArticleResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/help-center-articles/{id}", + "code": 200 + }, + "smithy.api#documentation": "Get Help Center Article\n\nGet a help center article by its ID\n\n## Scopes" + } + }, + "com.remote.api#GetV1IdentityVerificationEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IdentityVerificationResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IdentityVerificationResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Identity Verification response" + } + }, + "com.remote.api#IdentityVerification": { + "type": "structure", + "members": { + "contract_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "employment_document": { + "target": "com.remote.api#EmploymentDocument", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_image": { + "target": "com.remote.api#EmploymentImage", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Identity Verification" + } + }, + "com.remote.api#EmploymentDocument": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the file.", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name including extension (e.g., \"id.pdf\", \"contract.pdf\").", + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the file (e.g., \"id\", \"contract\", \"tax_form\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A file associated with an employment, such as a contract, tax form, or identity document." + } + }, + "com.remote.api#EmploymentImage": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the file.", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name including extension (e.g., \"id.pdf\", \"contract.pdf\").", + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the file (e.g., \"id\", \"contract\", \"tax_form\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A file associated with an employment, such as a contract, tax form, or identity document." + } + }, + "com.remote.api#IdentityVerificationResponseData": { + "type": "structure", + "members": { + "identity_verification_data": { + "target": "com.remote.api#IdentityVerification" + } + }, + "traits": {} + }, + "com.remote.api#GetV1IdentityVerificationEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1IdentityVerificationEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#IdentityVerificationResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/identity-verification/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Get Employment Profile\n\nGets necessary information to perform the identity verification of an employee.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1IdentityVerificationEmploymentIdDeclineRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1IdentityVerificationEmploymentIdDecline": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1IdentityVerificationEmploymentIdDeclineRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/identity-verification/{employment_id}/decline", + "code": 200 + }, + "smithy.api#documentation": "Decline Identity Verification\n\nDeclines the identity verification of an employee.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1IdentityVerificationEmploymentIdVerifyRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1IdentityVerificationEmploymentIdVerify": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1IdentityVerificationEmploymentIdVerifyRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/identity-verification/{employment_id}/verify", + "code": 200 + }, + "smithy.api#documentation": "Verify Employment Identity\n\nEndpoint to confirms the employment profile is from the actual employee\n\n\n## Scopes" + } + }, + "com.remote.api#IdentityCurrentResponse": { + "type": "union", + "members": { + "IdentityClientCredentialsResponse": { + "target": "com.remote.api#IdentityClientCredentialsResponse" + }, + "IdentityCompanyAccessTokenResponse": { + "target": "com.remote.api#IdentityCompanyAccessTokenResponse" + }, + "IdentityCustomerAccessTokenResponse": { + "target": "com.remote.api#IdentityCustomerAccessTokenResponse" + } + }, + "traits": { + "smithy.api#documentation": "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:\n\n- **Client Credentials Token**: Returns the integration's `client_id` and details. No company or user context.\n- **Company Access Token** (Authorization Code flow): Returns full context — integration credentials, the company being accessed, and the authorizing user.\n- **Customer API Token**: Returns only the company and user. No integration credentials since the company is accessing its own data directly." + } + }, + "com.remote.api#IdentityClientCredentialsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IdentityClientCredentialsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#IdentityIntegration": { + "type": "structure", + "members": { + "contact_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The primary contact email address registered for this integration partner.", + "smithy.api#required": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The human-readable display name of the integration partner, as shown to users.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique machine-readable identifier for the integration partner. Used internally to reference this integration.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the integration partner associated with the current authentication token." + } + }, + "com.remote.api#IdentityClientCredentialsResponseData": { + "type": "structure", + "members": { + "client_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The OAuth2 client ID used to obtain this token.", + "smithy.api#required": {} + } + }, + "integration": { + "target": "com.remote.api#IdentityIntegration", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IdentityCompanyAccessTokenResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IdentityCompanyAccessTokenResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#IdentityCompany": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company. Use this ID when making subsequent API calls that require a company reference.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The registered name of the company on the Remote platform.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The company that the current authentication token is scoped to. Only present when using a company-scoped access token or customer API token." + } + }, + "com.remote.api#IdentityUser": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email address of the user who authorized the token.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the user.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The full name of the user who authorized the token.", + "smithy.api#required": {} + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The current account status of the user on the Remote platform.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The user (company manager) associated with the current authentication token. Represents the person who authorized access to the company's data." + } + }, + "com.remote.api#IdentityCompanyAccessTokenResponseData": { + "type": "structure", + "members": { + "client_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The OAuth2 client ID of the integration partner that obtained this token.", + "smithy.api#required": {} + } + }, + "company": { + "target": "com.remote.api#IdentityCompany", + "traits": { + "smithy.api#required": {} + } + }, + "integration": { + "target": "com.remote.api#IdentityIntegration", + "traits": { + "smithy.api#required": {} + } + }, + "user": { + "target": "com.remote.api#IdentityUser", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IdentityCustomerAccessTokenResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IdentityCustomerAccessTokenResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#IdentityCustomerAccessTokenResponseData": { + "type": "structure", + "members": { + "company": { + "target": "com.remote.api#IdentityCompany", + "traits": { + "smithy.api#required": {} + } + }, + "user": { + "target": "com.remote.api#IdentityUser", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1IdentityCurrentResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#IdentityCurrentResponse", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#GetV1IdentityCurrent": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#GetV1IdentityCurrentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/identity/current", + "code": 200 + }, + "smithy.api#documentation": "Get token identity\n\nShows information about the entities that can be controlled by the current auth token." + } + }, + "com.remote.api#GetV1IncentivesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter by Employment ID" + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter by Incentive status" + } + }, + "recurring_incentive_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "recurring_incentive_id", + "smithy.api#documentation": "Filter by Recurring Incentive id" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Filter by Incentive type. Defaults to all self-serve incentive types (the types\ncreatable through this API) when omitted. Pass this explicitly (e.g. `severance`)\nto also retrieve types that are entered outside of self-serve, such as severance.\nPass `all` to retrieve every incentive type, including those types.\n" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListIncentivesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListIncentivesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many incentives" + } + }, + "com.remote.api#Incentive": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The incentive amount in the employment's currency, in cents. For example, EUR 500.25 would be represented as 50025.", + "smithy.api#required": {} + } + }, + "amount_tax_type": { + "target": "com.remote.api#AmountTaxType", + "traits": { + "smithy.api#required": {} + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the incentive takes effect. Determines which payroll cycle the incentive will be paid in.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment this incentive belongs to.", + "smithy.api#required": {} + } + }, + "expected_payout_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected date when this incentive will be paid to the employee. Null if not yet determined.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the incentive.", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional note describing the reason or context for this incentive.", + "com.distilled.openapi#nullable": {} + } + }, + "payroll_output_category": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broader payroll category this incentive's `type` belongs to (e.g., \"incentive\", \"benefits_cash\")." + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The end date of the period this incentive covers. Null for non-periodic incentives.", + "com.distilled.openapi#nullable": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The start date of the period this incentive covers (e.g., for quarterly bonuses). Null for non-periodic incentives.", + "com.distilled.openapi#nullable": {} + } + }, + "recurring_incentive_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If this incentive was generated from a recurring incentive schedule, this is the ID of the parent recurring incentive. Null for one-time incentives.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The current status of the incentive (e.g., \"pending\", \"scheduled\", \"paid\", \"cancelled\").", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of incentive (e.g., \"signing_bonus\", \"performance_bonus\", \"commission\", \"referral_bonus\").", + "smithy.api#required": {} + } + }, + "type_label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The human-readable label for `type` (e.g., \"Signing bonus\", \"Commission\", \"Severance\")." + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#AmountTaxType": { + "type": "enum", + "members": { + "GROSS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gross" + } + }, + "NET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "net" + } + } + }, + "traits": { + "smithy.api#documentation": " Whether the amount given accounts for taxes or not.\n\n `gross` indicates that the amount given is the amount to be paid before taxes\n are subtracted.\n\n `net` indicates that the amount given is the amount which will be paid to the\n employee after taxes. Remote will gross this up to ensure the taxes are\n included and employee receives the amount requested without further reduction.\n" + } + }, + "com.remote.api#ListIncentivesResponseDataIncentivesList": { + "type": "list", + "member": { + "target": "com.remote.api#Incentive" + }, + "traits": {} + }, + "com.remote.api#ListIncentivesResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "incentives": { + "target": "com.remote.api#ListIncentivesResponseDataIncentivesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1Incentives": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1IncentivesRequest" + }, + "output": { + "target": "com.remote.api#ListIncentivesResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/incentives", + "code": 200 + }, + "smithy.api#documentation": "List Incentives\n\nLists all Incentives of a company\n\n## Scopes" + } + }, + "com.remote.api#PostV1IncentivesRequestType": { + "type": "enum", + "members": { + "ACTING_UP_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "acting_up_allowance" + } + }, + "ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "allowance" + } + }, + "CAR_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_allowance" + } + }, + "HEALTH_AND_WELLNESS_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "health_and_wellness_allowance" + } + }, + "INTERNET_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internet_allowance" + } + }, + "MEAL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meal_allowance" + } + }, + "ON_CALL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "on_call_allowance" + } + }, + "PARENTHOOD_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parenthood_allowance" + } + }, + "PHONE_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_allowance" + } + }, + "RELOCATION_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation_allowance" + } + }, + "TRAVEL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_allowance" + } + }, + "WORK_FROM_HOME_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_from_home_allowance" + } + }, + "BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bonus" + } + }, + "HOLIDAY_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "holiday_bonus" + } + }, + "REFERRAL_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referral_bonus" + } + }, + "RETENTION_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retention_bonus" + } + }, + "COMMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "commission" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "OVERTIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "overtime" + } + }, + "STIPEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stipend" + } + }, + "SIGNING_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "signing_bonus" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1IncentivesRequest": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount (in the currency of the employment) to be given to the employee.\n\nThis field accepts fractional amounts as well. However to avoid precision issues\nand errors that can arise from storing fractional amounts, the Remote API only\naccepts currencies and their fractional amounts as integers. This means you\nshould append fractional amounts to the end of the amount you're passing in with\nthis field.\n\nFor example, if the incentive you're offering is EUR 500.25, you would specify `50025` as\nthe amount for this field.\n", + "smithy.api#required": {} + } + }, + "amount_tax_type": { + "target": "com.remote.api#AmountTaxType", + "traits": { + "smithy.api#required": {} + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date at which the incentive should take effect.\n\nNote that the incentive is not paid out on the effective date, but during the\nnext payroll cycle. The effective date determines which payroll cycle the\nincentive will be paid out in.\n\nThe effective date needs to be today or a future date.\n\nNote for recurring incentives: since the months don't have the same amount of days,\nif day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to\nthe last day of each month, avoiding the possibility of skipping a month in the recurrence.\n", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#PostV1IncentivesRequestType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IncentiveResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IncentiveResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a single incentive record." + } + }, + "com.remote.api#IncentiveResponseData": { + "type": "structure", + "members": { + "incentive": { + "target": "com.remote.api#Incentive", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1Incentives": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1IncentivesRequest" + }, + "output": { + "target": "com.remote.api#IncentiveResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/incentives", + "code": 200 + }, + "smithy.api#documentation": "Create Incentive\n\nCreates an Incentive.\n\nIncentives use the currency of the employment specified provided in the `employment_id` field.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1IncentivesRecurringRequest": { + "type": "structure", + "members": { + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter by recurring incentive status: active or deactive." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Filter by recurring incentive type." + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "note", + "smithy.api#documentation": "Filter by recurring incentives that contain the value in their notes." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListRecurringIncentivesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListRecurringIncentivesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many recurring_incentives" + } + }, + "com.remote.api#RecurringIncentive": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The recurring payment amount in the employment's currency, in cents.", + "smithy.api#required": {} + } + }, + "amount_tax_type": { + "target": "com.remote.api#AmountTaxType", + "traits": { + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the recurring incentive stops generating payments. Null for open-ended recurring incentives.", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the recurring incentive.", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional note describing the purpose of this recurring incentive.", + "com.distilled.openapi#nullable": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the recurring incentive starts generating payments.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#RecurringIncentiveStatus", + "traits": { + "smithy.api#documentation": "Whether this recurring incentive is currently active and generating payments, or inactive (paused/ended).", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#RecurringIncentiveType", + "traits": { + "smithy.api#documentation": "The type of recurring incentive (e.g., \"meal_allowance\", \"housing_allowance\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A recurring incentive (e.g., monthly meal allowance, housing stipend) that automatically generates individual incentive payments on a monthly schedule." + } + }, + "com.remote.api#RecurringIncentiveStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + } + }, + "traits": { + "smithy.api#documentation": "Whether this recurring incentive is currently active and generating payments, or inactive (paused/ended)." + } + }, + "com.remote.api#RecurringIncentiveType": { + "type": "enum", + "members": { + "ACTING_UP_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "acting_up_allowance" + } + }, + "ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "allowance" + } + }, + "CAR_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_allowance" + } + }, + "HEALTH_AND_WELLNESS_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "health_and_wellness_allowance" + } + }, + "INTERNET_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internet_allowance" + } + }, + "MEAL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meal_allowance" + } + }, + "ON_CALL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "on_call_allowance" + } + }, + "PARENTHOOD_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parenthood_allowance" + } + }, + "PHONE_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_allowance" + } + }, + "RELOCATION_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation_allowance" + } + }, + "TRAVEL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_allowance" + } + }, + "WORK_FROM_HOME_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_from_home_allowance" + } + }, + "BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bonus" + } + }, + "HOLIDAY_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "holiday_bonus" + } + }, + "REFERRAL_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referral_bonus" + } + }, + "RETENTION_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retention_bonus" + } + }, + "COMMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "commission" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "OVERTIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "overtime" + } + }, + "STIPEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stipend" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of recurring incentive (e.g., \"meal_allowance\", \"housing_allowance\")." + } + }, + "com.remote.api#ListRecurringIncentivesResponseDataRecurringIncentivesList": { + "type": "list", + "member": { + "target": "com.remote.api#RecurringIncentive" + }, + "traits": {} + }, + "com.remote.api#ListRecurringIncentivesResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "recurring_incentives": { + "target": "com.remote.api#ListRecurringIncentivesResponseDataRecurringIncentivesList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1IncentivesRecurring": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1IncentivesRecurringRequest" + }, + "output": { + "target": "com.remote.api#ListRecurringIncentivesResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/incentives/recurring", + "code": 200 + }, + "smithy.api#documentation": "List Recurring Incentive\n\nList all Recurring Incentives of a company.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1IncentivesRecurringRequestType": { + "type": "enum", + "members": { + "ACTING_UP_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "acting_up_allowance" + } + }, + "ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "allowance" + } + }, + "CAR_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "car_allowance" + } + }, + "HEALTH_AND_WELLNESS_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "health_and_wellness_allowance" + } + }, + "INTERNET_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internet_allowance" + } + }, + "MEAL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "meal_allowance" + } + }, + "ON_CALL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "on_call_allowance" + } + }, + "PARENTHOOD_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parenthood_allowance" + } + }, + "PHONE_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "phone_allowance" + } + }, + "RELOCATION_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation_allowance" + } + }, + "TRAVEL_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_allowance" + } + }, + "WORK_FROM_HOME_ALLOWANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_from_home_allowance" + } + }, + "BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bonus" + } + }, + "HOLIDAY_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "holiday_bonus" + } + }, + "REFERRAL_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "referral_bonus" + } + }, + "RETENTION_BONUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retention_bonus" + } + }, + "COMMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "commission" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "OVERTIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "overtime" + } + }, + "STIPEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stipend" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1IncentivesRecurringRequest": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount (in the currency of the employment) to be given to the employee.\n\nThis field accepts fractional amounts as well. However to avoid precision issues\nand errors that can arise from storing fractional amounts, the Remote API only\naccepts currencies and their fractional amounts as integers. This means you\nshould append fractional amounts to the end of the amount you're passing in with\nthis field.\n\nFor example, if the incentive you're offering is EUR 500.25, you would specify `50025` as\nthe amount for this field.\n", + "smithy.api#required": {} + } + }, + "amount_tax_type": { + "target": "com.remote.api#AmountTaxType", + "traits": { + "smithy.api#required": {} + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date at which the incentive should take effect.\n\nNote that the incentive is not paid out on the effective date, but during the\nnext payroll cycle. The effective date determines which payroll cycle the\nincentive will be paid out in.\n\nThe effective date needs to be today or a future date.\n\nNote for recurring incentives: since the months don't have the same amount of days,\nif day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to\nthe last day of each month, avoiding the possibility of skipping a month in the recurrence.\n", + "smithy.api#required": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "duration_in_months": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "How many times the payment will repeat. At the moment we only fully support monthly frequency.\n\nThis field is only necessary if the recurring incentive has an end date.\n" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#PostV1IncentivesRecurringRequestType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#RecurringIncentiveResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#RecurringIncentiveResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Recurring Incentive response" + } + }, + "com.remote.api#RecurringIncentiveResponseData": { + "type": "structure", + "members": { + "recurring_incentive": { + "target": "com.remote.api#RecurringIncentive", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1IncentivesRecurring": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1IncentivesRecurringRequest" + }, + "output": { + "target": "com.remote.api#RecurringIncentiveResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/incentives/recurring", + "code": 200 + }, + "smithy.api#documentation": "Create Recurring Incentive\n\nCreate a Recurring Incentive, that is, a monthly paid incentive.\n\nIncentives use the currency of the employment specified provided in the `employment_id` field.\n\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1IncentivesRecurringIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Recurring Incentive ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteRecurringIncentiveResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#DeleteRecurringIncentiveResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "`\"status\": \"ok\"` indicates that any recurring incentives with `pending` status were\nsuccessfully deleted.\n\n`already_scheduled_incentives` returns a list of incentives that were already scheduled\nfor payout and as such, cannot be deleted. You will notice that these incentives do not\nhave a `pending` status.\n" + } + }, + "com.remote.api#DeleteRecurringIncentiveResponseDataAlreadyScheduledIncentivesList": { + "type": "list", + "member": { + "target": "com.remote.api#Incentive" + }, + "traits": {} + }, + "com.remote.api#DeleteRecurringIncentiveResponseData": { + "type": "structure", + "members": { + "already_scheduled_incentives": { + "target": "com.remote.api#DeleteRecurringIncentiveResponseDataAlreadyScheduledIncentivesList", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#DeleteV1IncentivesRecurringId": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1IncentivesRecurringIdRequest" + }, + "output": { + "target": "com.remote.api#DeleteRecurringIncentiveResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/incentives/recurring/{id}", + "code": 200 + }, + "smithy.api#documentation": "Delete a Recurring Incentive\n\nDelete a Recurring Incentive, that is, a monthly paid incentive.\n\nInternally, Remote schedules upcoming incentives. As such, when you attempt to\ndelete a recurring incentive, Remote will **ONLY** delete scheduled incentives\nwith the `pending` status.\n\nIncentives payments that are already scheduled and cannot be deleted will be\nincluded in the response, in case you need to reference them.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1IncentivesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Incentive ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1IncentivesId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1IncentivesIdRequest" + }, + "output": { + "target": "com.remote.api#IncentiveResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/incentives/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Incentive\n\nShow an Incentive's details\n\n## Scopes" + } + }, + "com.remote.api#PatchV1IncentivesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Incentive ID" + } + }, + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount (in the currency of the employment) to be given to the employee.\n\nThis field accepts fractional amounts as well. However to avoid precision issues\nand errors that can arise from storing fractional amounts, the Remote API only\naccepts currencies and their fractional amounts as integers. This means you\nshould append fractional amounts to the end of the amount you're passing in with\nthis field.\n\nFor example, if the incentive you're offering is EUR 500.25, you would specify `50025` as\nthe amount for this field.\n" + } + }, + "amount_tax_type": { + "target": "com.remote.api#AmountTaxType" + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date at which the incentive should take effect.\n\nNote that the incentive is not paid out on the effective date, but during the\nnext payroll cycle. The effective date determines which payroll cycle the\nincentive will be paid out in.\n\nThe effective date needs to be today or a future date.\n\nNote for recurring incentives: since the months don't have the same amount of days,\nif day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to\nthe last day of each month, avoiding the possibility of skipping a month in the recurrence.\n" + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The end date of the incentive period (month, quarter, half-year or year)", + "com.distilled.openapi#nullable": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The start date of the incentive period (month, quarter, half-year or year)", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A valid type according to the payment frequency" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1IncentivesId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1IncentivesIdRequest" + }, + "output": { + "target": "com.remote.api#IncentiveResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/incentives/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update Incentive\n\nUpdates an Incentive.\n\nIncentives use the currency of the employment specified provided in the `employment_id` field.\n\nThe API doesn't support updating paid incentives.\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1IncentivesId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Incentive ID" + } + }, + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount (in the currency of the employment) to be given to the employee.\n\nThis field accepts fractional amounts as well. However to avoid precision issues\nand errors that can arise from storing fractional amounts, the Remote API only\naccepts currencies and their fractional amounts as integers. This means you\nshould append fractional amounts to the end of the amount you're passing in with\nthis field.\n\nFor example, if the incentive you're offering is EUR 500.25, you would specify `50025` as\nthe amount for this field.\n" + } + }, + "amount_tax_type": { + "target": "com.remote.api#AmountTaxType" + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date at which the incentive should take effect.\n\nNote that the incentive is not paid out on the effective date, but during the\nnext payroll cycle. The effective date determines which payroll cycle the\nincentive will be paid out in.\n\nThe effective date needs to be today or a future date.\n\nNote for recurring incentives: since the months don't have the same amount of days,\nif day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to\nthe last day of each month, avoiding the possibility of skipping a month in the recurrence.\n" + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The end date of the incentive period (month, quarter, half-year or year)", + "com.distilled.openapi#nullable": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The start date of the incentive period (month, quarter, half-year or year)", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A valid type according to the payment frequency" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1IncentivesId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1IncentivesId2Request" + }, + "output": { + "target": "com.remote.api#IncentiveResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/incentives/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update Incentive\n\nUpdates an Incentive.\n\nIncentives use the currency of the employment specified provided in the `employment_id` field.\n\nThe API doesn't support updating paid incentives.\n\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1IncentivesIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Incentive ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1IncentivesId": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1IncentivesIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/incentives/{id}", + "code": 200 + }, + "smithy.api#documentation": "Delete an Incentive\n\nDelete an incentive.\n\n`one_time` incentives that have the following status **CANNOT** be deleted:\n* `processing`\n* `paid`\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1LeavePoliciesDetailsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1LeavePoliciesDetailsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1LeavePoliciesDetailsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#ListLeavePoliciesDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/leave-policies/details/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "List Leave Policies Details\n\nDescribe the leave policies (custom or not) for a given employment\n\n## Scopes" + } + }, + "com.remote.api#GetV1LeavePoliciesSummaryEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1LeavePoliciesSummaryEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1LeavePoliciesSummaryEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#ListLeavePoliciesSummaryResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/leave-policies/summary/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "List Leave Policies Summary\n\nList all the data related to time off for a given employment\n\n## Scopes" + } + }, + "com.remote.api#MagicLinkParams": { + "type": "union", + "members": { + "Case0": { + "target": "com.remote.api#MagicLinkParamsCase0" + }, + "Case1": { + "target": "com.remote.api#MagicLinkParamsCase1" + } + }, + "traits": { + "smithy.api#documentation": "Magic link params" + } + }, + "com.remote.api#MagicLinkParamsCase0": { + "type": "structure", + "members": { + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The path to which the user will be redirected to after login. This field has a max length of 2000 characters.\n\nIf not specified, `/dashboard` will be used by default.\n\nMust begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.).\nAn ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`).\n\nAn optional query string can be specified too. If present, the query string must start with a question mark (`?`)\nand must include at least one key value pair. Both, keys and values, can only include\nalphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character).\nAdditional key value pairs are allowed using ampersand (`&`).\n\nQuery keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded.\nQuery values are optional, the actual value may be empty and the equals sign (`=`) may be missing too.\n\nSome **Valid** examples for `path`:\n - o `/dashboard`\n - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5`\n - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=status&filters%5B0%5D%5Bvalue%5D=active`\n - o `/dashboard?key=value&foo=bar`\n\nSome **Invalid** examples for `path`:\n - x `missing_forward_slash`\n - x `/invalid//path`\n - x `//some`\n - x `/?key=value`\n - x `/some/i.n:valid*`\n - x `/invalid/end/slash/`\n - x `/some?malformed_percent_encoded_key%1=value`\n" + } + }, + "user_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#MagicLinkParamsCase1": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The path to which the user will be redirected to after login. This field has a max length of 2000 characters.\n\nIf not specified, `/dashboard` will be used by default.\n\nMust begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.).\nAn ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`).\n\nAn optional query string can be specified too. If present, the query string must start with a question mark (`?`)\nand must include at least one key value pair. Both, keys and values, can only include\nalphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character).\nAdditional key value pairs are allowed using ampersand (`&`).\n\nQuery keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded.\nQuery values are optional, the actual value may be empty and the equals sign (`=`) may be missing too.\n\nSome **Valid** examples for `path`:\n - o `/dashboard`\n - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5`\n - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=status&filters%5B0%5D%5Bvalue%5D=active`\n - o `/dashboard?key=value&foo=bar`\n\nSome **Invalid** examples for `path`:\n - x `missing_forward_slash`\n - x `/invalid//path`\n - x `//some`\n - x `/?key=value`\n - x `/some/i.n:valid*`\n - x `/invalid/end/slash/`\n - x `/some?malformed_percent_encoded_key%1=value`\n" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1MagicLinkRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#MagicLinkParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#MagicLinkResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#MagicLinkResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#MagicLinkResponseData": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1MagicLink": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1MagicLinkRequest" + }, + "output": { + "target": "com.remote.api#MagicLinkResponse" + }, + "errors": [ + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/magic-link", + "code": 200 + }, + "smithy.api#documentation": "Magic links generator\n\nGenerates a magic link for a passwordless authentication.\nTo create a magic link for a company admin, you need to provide the `user_id` parameter.\nTo create a magic link for an employee, you need to provide the `employment_id` parameter.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1OffboardingsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter by Employment ID" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Filter by offboarding type" + } + }, + "include_confidential": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "include_confidential", + "smithy.api#documentation": "By default, the results do not include confidential termination requests.\nSend `include_confidential=true` to include confidential requests in the response.\n" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListOffboardingResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListOffboardingResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many offboardings" + } + }, + "com.remote.api#ResignationOrTerminationOffboarding": { + "type": "union", + "members": { + "ResignationOffboarding": { + "target": "com.remote.api#ResignationOffboarding" + }, + "TerminationOffboarding": { + "target": "com.remote.api#TerminationOffboarding" + } + }, + "traits": {} + }, + "com.remote.api#ResignationOffboarding": { + "type": "structure", + "members": { + "additional_comments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional comments or context about the resignation.", + "com.distilled.openapi#nullable": {} + } + }, + "agrees_to_pto_amount": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer agrees with the employee's PTO balance." + } + }, + "employer_awareness": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of how and when the employer was made aware of the resignation." + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment being resigned from.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the offboarding request.", + "smithy.api#required": {} + } + }, + "offboarding_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the offboarding record. When present, this can be used\nto query `GET /api/eor/v2/offboardings/{id}` for the v2 offboarding shape.\n", + "com.distilled.openapi#nullable": {} + } + }, + "proposed_last_working_day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's proposed last working day. The actual last day may differ based on notice period requirements.", + "smithy.api#required": {} + } + }, + "reason_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A detailed description of the employee's reason for resigning." + } + }, + "requested_by": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employee who submitted the resignation.", + "smithy.api#required": {} + } + }, + "resignation_reason": { + "target": "com.remote.api#ResignationOffboardingResignationReason", + "traits": { + "smithy.api#documentation": "The reason the employee gave for their resignation.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ResignationOffboardingStatus", + "traits": { + "smithy.api#documentation": "The current status of the offboarding request.\n\n- `submitted`: The resignation has been submitted and is awaiting review.\n- `in_review`: Remote is processing the resignation.\n- `done`: The offboarding has been completed.\n- `canceled`: The resignation was withdrawn or canceled.\n", + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the resignation was submitted.", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Most updated termination date for the offboarding. This date is subject to change through the offboarding process even after it is finalized.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#ResignationOffboardingType", + "traits": { + "smithy.api#documentation": "The type of offboarding. Always `\"resignation\"` for employee-initiated resignations.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#ResignationOffboardingResignationReason": { + "type": "enum", + "members": { + "CANCELLATION_BEFORE_START_DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancellation_before_start_date" + } + }, + "COMPANY_CULTURE_OR_VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company_culture_or_values" + } + }, + "CONVERSION_TO_CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion_to_contractor" + } + }, + "CONVERSION_TO_GLOBAL_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion_to_global_payroll" + } + }, + "CONVERSION_TO_PEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion_to_peo" + } + }, + "DISSATISFACTION_WITH_REMOTE_SERVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dissatisfaction_with_remote_service" + } + }, + "INCAPACITY_TO_PERFORM_INHERENT_DUTIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incapacity_to_perform_inherent_duties" + } + }, + "INFRASTRUCTURE_CHALLENGES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "infrastructure_challenges" + } + }, + "LACK_OF_RECOGNITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lack_of_recognition" + } + }, + "LEADERSHIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "leadership" + } + }, + "MUTUAL_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mutual_agreement" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "OTHER_JOB_OPPORTUNITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other_job_opportunity" + } + }, + "PERSONAL_REASONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "personal_reasons" + } + }, + "POSITION_DOES_NOT_MEET_EXPECTATIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "position_does_not_meet_expectations" + } + }, + "RELATIONSHIP_WITH_COWORKERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relationship_with_coworkers" + } + }, + "RELOCATION_FROM_ENTITY_TO_ENTITY_BY_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation_from_entity_to_entity_by_employee" + } + }, + "RELOCATION_LEAVING_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation_leaving_remote" + } + }, + "REMUNERATION_AND_BENEFITS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remuneration_and_benefits" + } + }, + "RETIREMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retirement" + } + }, + "TRANSFER_AND_RELOCATION_NEW_CUSTOMER_AND_NEW_COUNTRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transfer_and_relocation_new_customer_and_new_country" + } + }, + "TRANSFER_BETWEEN_REMOTE_CUSTOMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transfer_between_remote_customer" + } + }, + "TRANSFER_FROM_REMOTE_TO_CUSTOMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transfer_from_remote_to_customer" + } + }, + "TRANSFER_FROM_REMOTE_TO_OTHER_EOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transfer_from_remote_to_other_eor" + } + } + }, + "traits": { + "smithy.api#documentation": "The reason the employee gave for their resignation." + } + }, + "com.remote.api#ResignationOffboardingStatus": { + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "done" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the offboarding request.\n\n- `submitted`: The resignation has been submitted and is awaiting review.\n- `in_review`: Remote is processing the resignation.\n- `done`: The offboarding has been completed.\n- `canceled`: The resignation was withdrawn or canceled.\n" + } + }, + "com.remote.api#ResignationOffboardingType": { + "type": "enum", + "members": { + "RESIGNATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "resignation" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of offboarding. Always `\"resignation\"` for employee-initiated resignations." + } + }, + "com.remote.api#TerminationOffboarding": { + "type": "structure", + "members": { + "additional_comments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional comments or context about the termination provided by the employer.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "agrees_to_pto_amount": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer agreed with the employee's PTO balance at the time of the termination request." + } + }, + "confidential": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {} + } + }, + "employee_awareness": { + "target": "com.remote.api#TerminationOffboardingEmployeeAwareness", + "traits": { + "smithy.api#documentation": "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." + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment being terminated.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the offboarding request.", + "smithy.api#required": {} + } + }, + "offboarding_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the offboarding record. When present, this can be used\nto query `GET /api/eor/v2/offboardings/{id}` for the v2 offboarding shape.\n", + "com.distilled.openapi#nullable": {} + } + }, + "personal_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Remote will use this email address for post-termination communication.\nIf it is not provided, this field will be derived from the employment record. Therefore, it is important to ensure that it is not a company email.\n" + } + }, + "proposed_termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employer's proposed termination date. The actual termination date may differ based on local labor laws and notice period requirements.", + "smithy.api#required": {} + } + }, + "reason_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A detailed description of the circumstances leading to the termination.", + "smithy.api#required": {} + } + }, + "requested_by": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company admin who submitted the termination request.", + "smithy.api#required": {} + } + }, + "risk_assessment_reasons": { + "target": "com.remote.api#TerminationOffboardingRiskAssessmentReasonsList", + "traits": { + "smithy.api#documentation": "Reasons that may increase the legal risk of this termination (e.g., the employee is pregnant, on family leave, etc.).", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#TerminationOffboardingStatus", + "traits": { + "smithy.api#documentation": "The current status of the offboarding request.\n\n- `submitted`: The request has been submitted and is awaiting review by Remote.\n- `in_review`: Remote is reviewing the request for legal compliance and risks.\n- `done`: The offboarding has been completed and the employment is terminated.\n- `canceled`: The offboarding request was canceled before completion.\n", + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the offboarding request was submitted.", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Most updated termination date for the offboarding. This date is subject to change through the offboarding process even after it is finalized.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "termination_reason": { + "target": "com.remote.api#TerminationOffboardingTerminationReason", + "traits": { + "smithy.api#documentation": "The reason for the termination, as submitted by the employer.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#TerminationOffboardingType", + "traits": { + "smithy.api#documentation": "The type of offboarding. Always `\"termination\"` for employer-initiated terminations.", + "smithy.api#required": {} + } + }, + "will_challenge_termination": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer believes the employee is likely to challenge their termination.", + "smithy.api#required": {} + } + }, + "will_challenge_termination_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional details about why the employee may challenge the termination, if applicable." + } + } + }, + "traits": { + "smithy.api#documentation": "An offboarding request initiated by the employer to terminate an employment. Includes termination details, risk assessment, and status tracking through Remote's review process." + } + }, + "com.remote.api#TerminationOffboardingEmployeeAwareness": { + "type": "structure", + "members": { + "date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the employee was told about the termination.", + "com.distilled.openapi#nullable": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Notes about how the termination was communicated to the employee.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#TerminationOffboardingRiskAssessmentReasonsItem": { + "type": "enum", + "members": { + "CARING_RESPONSIBILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "caring_responsibilities" + } + }, + "DISABLED_OR_HEALTH_CONDITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled_or_health_condition" + } + }, + "FAMILY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "family_leave" + } + }, + "MEMBER_OF_UNION_OR_WORKS_COUNCIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "member_of_union_or_works_council" + } + }, + "NONE_OF_THESE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none_of_these" + } + }, + "PREGNANT_OR_BREASTFEEDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pregnant_or_breastfeeding" + } + }, + "REPORTED_CONCERNS_WITH_WORKPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reported_concerns_with_workplace" + } + }, + "REQUESTED_MEDICAL_OR_FAMILY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requested_medical_or_family_leave" + } + }, + "SICK_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sick_leave" + } + } + }, + "traits": {} + }, + "com.remote.api#TerminationOffboardingRiskAssessmentReasonsList": { + "type": "list", + "member": { + "target": "com.remote.api#TerminationOffboardingRiskAssessmentReasonsItem" + }, + "traits": { + "smithy.api#documentation": "Reasons that may increase the legal risk of this termination (e.g., the employee is pregnant, on family leave, etc.)." + } + }, + "com.remote.api#TerminationOffboardingStatus": { + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "done" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the offboarding request.\n\n- `submitted`: The request has been submitted and is awaiting review by Remote.\n- `in_review`: Remote is reviewing the request for legal compliance and risks.\n- `done`: The offboarding has been completed and the employment is terminated.\n- `canceled`: The offboarding request was canceled before completion.\n" + } + }, + "com.remote.api#TerminationOffboardingTerminationReason": { + "type": "enum", + "members": { + "CANCELLATION_BEFORE_START_DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancellation_before_start_date" + } + }, + "COMPLIANCE_ISSUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "compliance_issue" + } + }, + "CONVERSION_TO_CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion_to_contractor" + } + }, + "DISSATISFACTION_WITH_REMOTE_SERVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dissatisfaction_with_remote_service" + } + }, + "END_OF_FIXED_TERM_CONTRACT_COMPLIANCE_ISSUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_compliance_issue" + } + }, + "END_OF_FIXED_TERM_CONTRACT_INCAPACITY_TO_PERFORM_INHERENT_DUTIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_incapacity_to_perform_inherent_duties" + } + }, + "END_OF_FIXED_TERM_CONTRACT_LOCAL_REGULATIONS_MAX_TERM_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_local_regulations_max_term_reached" + } + }, + "END_OF_FIXED_TERM_CONTRACT_MISCONDUCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_misconduct" + } + }, + "END_OF_FIXED_TERM_CONTRACT_OPERATIONAL_REASONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_operational_reasons" + } + }, + "END_OF_FIXED_TERM_CONTRACT_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_other" + } + }, + "END_OF_FIXED_TERM_CONTRACT_PERFORMANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_performance" + } + }, + "END_OF_FIXED_TERM_CONTRACT_REDUNDANCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_redundancy" + } + }, + "END_OF_FIXED_TERM_CONTRACT_VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_values" + } + }, + "GROSS_MISCONDUCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gross_misconduct" + } + }, + "INCAPACITY_TO_PERFORM_INHERENT_DUTIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incapacity_to_perform_inherent_duties" + } + }, + "JOB_ABANDONMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "job_abandonment" + } + }, + "MUTUAL_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mutual_agreement" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PERFORMANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "performance" + } + }, + "VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "values" + } + }, + "WORKFORCE_REDUCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "workforce_reduction" + } + } + }, + "traits": { + "smithy.api#documentation": "The reason for the termination, as submitted by the employer." + } + }, + "com.remote.api#TerminationOffboardingType": { + "type": "enum", + "members": { + "TERMINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "termination" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of offboarding. Always `\"termination\"` for employer-initiated terminations." + } + }, + "com.remote.api#ListOffboardingResponseDataOffboardingsList": { + "type": "list", + "member": { + "target": "com.remote.api#ResignationOrTerminationOffboarding" + }, + "traits": {} + }, + "com.remote.api#ListOffboardingResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "offboardings": { + "target": "com.remote.api#ListOffboardingResponseDataOffboardingsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1Offboardings": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1OffboardingsRequest" + }, + "output": { + "target": "com.remote.api#ListOffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/offboardings", + "code": 200 + }, + "smithy.api#documentation": "List Offboarding\n\nLists Offboarding requests.\n\n## Scopes" + } + }, + "com.remote.api#TerminationDetailsParams": { + "type": "structure", + "members": { + "acknowledge_termination_procedure": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer acknowledges and agrees to follow Remote's termination procedure for this jurisdiction.", + "com.distilled.openapi#nullable": {} + } + }, + "additional_comments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional details regarding the termination process.", + "com.distilled.openapi#nullable": {} + } + }, + "agrees_to_pto_amount": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer agrees with the employee's current paid time off balance. If false, you may provide a timesheet file documenting any discrepancies.", + "com.distilled.openapi#nullable": {} + } + }, + "agrees_to_pto_amount_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional notes about the PTO balance, especially if there are discrepancies.", + "com.distilled.openapi#nullable": {} + } + }, + "confidential": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Confidential requests are visible for who authorized the token or integration. Non-confidential requests are visible to all admins in the company.", + "smithy.api#required": {} + } + }, + "customer_informed_employee": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "employee_awareness": { + "target": "com.remote.api#TerminationDetailsParamsEmployeeAwareness", + "traits": { + "smithy.api#documentation": "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." + } + }, + "personal_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Remote will use this email address for post-termination communication.\nIf it is not provided, this field will be derived from the employment record. Therefore, it is important to ensure that it is not a company email.\n" + } + }, + "proposed_termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "In most cases, employee needs to be notified before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. Remote will use those factors to determine the required notice period. Please note that we cannot commit to a termination date until we conduct a full review of the information you submit.", + "smithy.api#required": {} + } + }, + "reason_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Description of the reason for termination", + "smithy.api#required": {} + } + }, + "risk_assessment_reasons": { + "target": "com.remote.api#TerminationDetailsParamsRiskAssessmentReasonsList", + "traits": { + "smithy.api#documentation": "Possible reasons for offboarding risk assessment", + "smithy.api#required": {} + } + }, + "termination_reason": { + "target": "com.remote.api#TerminationDetailsParamsTerminationReason", + "traits": { + "smithy.api#documentation": "Choose an accurate termination reason to avoid unfair or unlawful dismissal claims.\n\nIf the termination is created before the employee's start date, this field\nwill be set to `cancellation_before_start_date`.\n", + "smithy.api#required": {} + } + }, + "termination_reason_files": { + "target": "com.remote.api#TerminationDetailsParamsTerminationReasonFilesList", + "traits": { + "smithy.api#documentation": "Any supporting documents regarding the termination reason" + } + }, + "timesheet_file": { + "target": "com.remote.api#OffboardingFile", + "traits": { + "smithy.api#documentation": "Paid time off accuracy\n\nTypically, any vacation pay accrued and unpaid at the time\nof termination must be paid out to the employee. To avoid overpaying or underpaying,\nplease make sure we have an accurate account of their paid time off by querying the\n[Show Time Off Balance](#operation/get_show_timeoff_balance) endpoint,\nfiltering by the `employment_id`.\nThis optional document should be sent in case of any discrepancies.\n" + } + }, + "will_challenge_termination": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether is it likely or not that the employee will challenge their termination", + "smithy.api#required": {} + } + }, + "will_challenge_termination_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If it is likely that the employee will challenge their termination, please provide additional details explaining the risk" + } + } + }, + "traits": {} + }, + "com.remote.api#TerminationDetailsParamsEmployeeAwareness": { + "type": "structure", + "members": { + "date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When the employee was told about the termination.", + "com.distilled.openapi#nullable": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Notes describing how the termination was shared with the employee. Remote advises being as specific as possible, and include details about the employee’s response, if applicable.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#TerminationDetailsParamsRiskAssessmentReasonsItem": { + "type": "enum", + "members": { + "CARING_RESPONSIBILITIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "caring_responsibilities" + } + }, + "DISABLED_OR_HEALTH_CONDITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled_or_health_condition" + } + }, + "FAMILY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "family_leave" + } + }, + "MEMBER_OF_UNION_OR_WORKS_COUNCIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "member_of_union_or_works_council" + } + }, + "NONE_OF_THESE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none_of_these" + } + }, + "PREGNANT_OR_BREASTFEEDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pregnant_or_breastfeeding" + } + }, + "REPORTED_CONCERNS_WITH_WORKPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reported_concerns_with_workplace" + } + }, + "REQUESTED_MEDICAL_OR_FAMILY_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requested_medical_or_family_leave" + } + }, + "SICK_LEAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sick_leave" + } + } + }, + "traits": {} + }, + "com.remote.api#TerminationDetailsParamsRiskAssessmentReasonsList": { + "type": "list", + "member": { + "target": "com.remote.api#TerminationDetailsParamsRiskAssessmentReasonsItem" + }, + "traits": { + "smithy.api#documentation": "Possible reasons for offboarding risk assessment" + } + }, + "com.remote.api#TerminationDetailsParamsTerminationReason": { + "type": "enum", + "members": { + "CANCELLATION_BEFORE_START_DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancellation_before_start_date" + } + }, + "COMPLIANCE_ISSUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "compliance_issue" + } + }, + "CONVERSION_TO_CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion_to_contractor" + } + }, + "DISSATISFACTION_WITH_REMOTE_SERVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dissatisfaction_with_remote_service" + } + }, + "END_OF_FIXED_TERM_CONTRACT_COMPLIANCE_ISSUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_compliance_issue" + } + }, + "END_OF_FIXED_TERM_CONTRACT_INCAPACITY_TO_PERFORM_INHERENT_DUTIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_incapacity_to_perform_inherent_duties" + } + }, + "END_OF_FIXED_TERM_CONTRACT_LOCAL_REGULATIONS_MAX_TERM_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_local_regulations_max_term_reached" + } + }, + "END_OF_FIXED_TERM_CONTRACT_MISCONDUCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_misconduct" + } + }, + "END_OF_FIXED_TERM_CONTRACT_OPERATIONAL_REASONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_operational_reasons" + } + }, + "END_OF_FIXED_TERM_CONTRACT_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_other" + } + }, + "END_OF_FIXED_TERM_CONTRACT_PERFORMANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_performance" + } + }, + "END_OF_FIXED_TERM_CONTRACT_REDUNDANCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_redundancy" + } + }, + "END_OF_FIXED_TERM_CONTRACT_VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_of_fixed_term_contract_values" + } + }, + "GROSS_MISCONDUCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gross_misconduct" + } + }, + "INCAPACITY_TO_PERFORM_INHERENT_DUTIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incapacity_to_perform_inherent_duties" + } + }, + "JOB_ABANDONMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "job_abandonment" + } + }, + "MUTUAL_AGREEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mutual_agreement" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + }, + "PERFORMANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "performance" + } + }, + "VALUES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "values" + } + }, + "WORKFORCE_REDUCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "workforce_reduction" + } + } + }, + "traits": { + "smithy.api#documentation": "Choose an accurate termination reason to avoid unfair or unlawful dismissal claims.\n\nIf the termination is created before the employee's start date, this field\nwill be set to `cancellation_before_start_date`.\n" + } + }, + "com.remote.api#OffboardingFile": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The content in base64 encoding", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#TerminationDetailsParamsTerminationReasonFilesList": { + "type": "list", + "member": { + "target": "com.remote.api#OffboardingFile" + }, + "traits": { + "smithy.api#documentation": "Any supporting documents regarding the termination reason" + } + }, + "com.remote.api#PostV1OffboardingsRequestType": { + "type": "enum", + "members": { + "TERMINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "termination" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of the offboarding request. For now, only `termination` is allowed." + } + }, + "com.remote.api#PostV1OffboardingsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment to be terminated.", + "smithy.api#required": {} + } + }, + "termination_details": { + "target": "com.remote.api#TerminationDetailsParams", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#PostV1OffboardingsRequestType", + "traits": { + "smithy.api#documentation": "The type of the offboarding request. For now, only `termination` is allowed.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#OffboardingResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#Offboarding" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a single offboarding record with full details." + } + }, + "com.remote.api#Offboarding": { + "type": "structure", + "members": { + "offboarding": { + "target": "com.remote.api#ResignationOrTerminationOffboarding" + } + }, + "traits": { + "smithy.api#documentation": "A wrapper containing an offboarding record, which can be either a termination (employer-initiated) or a resignation (employee-initiated)." + } + }, + "com.remote.api#PostV1Offboardings": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1OffboardingsRequest" + }, + "output": { + "target": "com.remote.api#OffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/offboardings", + "code": 200 + }, + "smithy.api#documentation": "Create Offboarding\n\nCreates an Offboarding request\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1OffboardingsEmploymentsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1OffboardingsEmploymentsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1OffboardingsEmploymentsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#ListOffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/offboardings/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "List Offboardings for Employment\n\nLists Offboarding requests for a specific employment.\n\n## Scopes" + } + }, + "com.remote.api#GetV1OffboardingsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Offboarding request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1OffboardingsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1OffboardingsIdRequest" + }, + "output": { + "target": "com.remote.api#OffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/offboardings/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Offboarding\n\nShows an Offboarding request.\n\n## Scopes" + } + }, + "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pre-onboarding document ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ShowPreOnboardingDocumentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ShowPreOnboardingDocumentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Returns the rendered contract PDF (base64) and signatories for a pre-onboarding document." + } + }, + "com.remote.api#ShowPreOnboardingDocumentResponseDataPreOnboardingDocumentSignatoriesList": { + "type": "list", + "member": { + "target": "com.remote.api#Signatory" + }, + "traits": { + "smithy.api#documentation": "Parties that must sign or have signed the document." + } + }, + "com.remote.api#ShowPreOnboardingDocumentResponseDataPreOnboardingDocument": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Base64-encoded PDF, prefixed with `data:application/pdf;base64,`.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "File name of the rendered document.", + "smithy.api#required": {} + } + }, + "signatories": { + "target": "com.remote.api#ShowPreOnboardingDocumentResponseDataPreOnboardingDocumentSignatoriesList", + "traits": { + "smithy.api#documentation": "Parties that must sign or have signed the document.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ContractorContractDocumentStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ShowPreOnboardingDocumentResponseData": { + "type": "structure", + "members": { + "pre_onboarding_document": { + "target": "com.remote.api#ShowPreOnboardingDocumentResponseDataPreOnboardingDocument", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest" + }, + "output": { + "target": "com.remote.api#ShowPreOnboardingDocumentResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}", + "code": 200 + }, + "smithy.api#documentation": "Retrieve a pre-onboarding document with its rendered PDF content\n\nReturns the rendered contract PDF (base64-encoded) and the list of signatories for the given\npre-onboarding document. The `content` field is prefixed with `data:application/pdf;base64,` so\nit can be embedded directly in a document viewer.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pre-onboarding document ID" + } + }, + "signature": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signer's full legal name as their electronic signature.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign", + "code": 200 + }, + "smithy.api#documentation": "Sign a pre-onboarding document\n\nSigns the latest contract document associated with the given pre-onboarding document on behalf\nof the company signatory.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IndexPreOnboardingRequirementsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#IndexPreOnboardingRequirementsResponseDataList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "List of pre-onboarding requirements for an employment." + } + }, + "com.remote.api#PreOnboardingRequirement": { + "type": "structure", + "members": { + "depends_on_requirement": { + "target": "com.remote.api#PreOnboardingRequirement", + "traits": { + "smithy.api#documentation": "The requirement that must be fulfilled before this one becomes available (if any).", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable description; rich HTML for acknowledgement requirements.", + "smithy.api#required": {} + } + }, + "freeze_employment_data": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employment data is frozen because this requirement is finished.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable name of the requirement.", + "smithy.api#required": {} + } + }, + "redlining_help_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Email address to contact for help with redlining (document requirements only).", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#PreOnboardingRequirementStatus", + "traits": { + "smithy.api#documentation": "Current status of this requirement for the given employment.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "supports_redlining": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the requirement supports redlining (document requirements only).", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#PreOnboardingRequirementType", + "traits": { + "smithy.api#documentation": "The requirement type.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A pre-onboarding requirement (document or acknowledgement) that must be fulfilled before an employee can be onboarded." + } + }, + "com.remote.api#PreOnboardingRequirementStatus": { + "type": "enum", + "members": { + "BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "blocked" + } + }, + "AWAITING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "awaiting" + } + }, + "FINISHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "finished" + } + }, + "REVISED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "revised" + } + } + }, + "traits": { + "smithy.api#documentation": "Current status of this requirement for the given employment." + } + }, + "com.remote.api#PreOnboardingRequirementType": { + "type": "enum", + "members": { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "ACKNOWLEDGEMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "acknowledgement" + } + } + }, + "traits": { + "smithy.api#documentation": "The requirement type." + } + }, + "com.remote.api#IndexPreOnboardingRequirementsResponseDataList": { + "type": "list", + "member": { + "target": "com.remote.api#PreOnboardingRequirement" + }, + "traits": {} + }, + "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirements": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest" + }, + "output": { + "target": "com.remote.api#IndexPreOnboardingRequirementsResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements", + "code": 200 + }, + "smithy.api#documentation": "List pre-onboarding requirements for an employment\n\nReturns the list of pre-onboarding requirements — both documents (e.g. master service\nagreements, individual labour agreements) and acknowledgements — that must be fulfilled\nbefore the given employment can be onboarded. Each requirement carries its `type`, current\n`status`, and the requirement it `depends_on` (if any).\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "requirement_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pre-onboarding requirement slug" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CreatePreOnboardingAcknowledgementResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CreatePreOnboardingAcknowledgementResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Returns the slug of the recorded pre-onboarding acknowledgement." + } + }, + "com.remote.api#CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CreatePreOnboardingAcknowledgementResponseData": { + "type": "structure", + "members": { + "pre_onboarding_acknowledgement": { + "target": "com.remote.api#CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledge": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest" + }, + "output": { + "target": "com.remote.api#CreatePreOnboardingAcknowledgementResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements/{requirement_slug}/acknowledge", + "code": 200 + }, + "smithy.api#documentation": "Acknowledge a pre-onboarding acknowledgement requirement\n\nRecords an acknowledgement for an acknowledgement requirement. Rejected if the requirement\nis blocked by an unmet dependency or has already been acknowledged.\n\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "requirement_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pre-onboarding requirement slug" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledge": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements/{requirement_slug}/acknowledge", + "code": 200 + }, + "smithy.api#documentation": "Remove a pre-onboarding acknowledgement\n\nRemoves a previously recorded acknowledgement. Rejected once a requirement that depends on\nthis acknowledgement has been signed/completed.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "requirement_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pre-onboarding requirement slug" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CreatePreOnboardingDocumentResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CreatePreOnboardingDocumentResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Returns the slug of the found-or-created pre-onboarding document." + } + }, + "com.remote.api#CreatePreOnboardingDocumentResponseDataPreOnboardingDocument": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CreatePreOnboardingDocumentResponseData": { + "type": "structure", + "members": { + "pre_onboarding_document": { + "target": "com.remote.api#CreatePreOnboardingDocumentResponseDataPreOnboardingDocument", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocuments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest" + }, + "output": { + "target": "com.remote.api#CreatePreOnboardingDocumentResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements/{requirement_slug}/documents", + "code": 200 + }, + "smithy.api#documentation": "Find or create a document for a pre-onboarding requirement\n\nFinds an existing unsigned pre-onboarding document for the given document requirement, or\ncreates a new one. Idempotent: repeated calls return the same document until it is signed.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayItemsRequest": { + "type": "structure", + "members": { + "employment_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_slug", + "smithy.api#documentation": "Filter by employment slug" + } + }, + "effective_from": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "effective_from", + "smithy.api#documentation": "Filter pay items with effective_date >= given date (YYYY-MM-DD)" + } + }, + "effective_to": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "effective_to", + "smithy.api#documentation": "Filter pay items with effective_date <= given date (YYYY-MM-DD)" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListPayItemsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListPayItemsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayItem": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Value of the pay item. Its unit depends on the `type` of the pay code (see GET /v1/companies/:company_id/legal-entities/:legal_entity_id/pay-codes): `amount` in cents, `percentage` in basis points, `unit` as a raw count, `hours` as a whole number of hours, `duration` in seconds.\n", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Pay item type code", + "smithy.api#required": {} + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Working day date (YYYY-MM-DD)", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment UUID", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Pay item's unique identifier", + "smithy.api#required": {} + } + }, + "provider_data": { + "target": "com.remote.api#PayItemProviderData", + "traits": { + "smithy.api#required": {} + } + }, + "replaced_ids": { + "target": "com.remote.api#PayItemReplacedIdsList", + "traits": { + "smithy.api#documentation": "Ids of pay items this one has replaced, oldest first. Empty if this pay item has never been edited.\n", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayItemProviderData": { + "type": "structure", + "members": { + "adjustment_effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Correction date for a previously submitted day (YYYY-MM-DD)" + } + }, + "hourly_rate": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Hourly rate in cents" + } + }, + "hourly_rate_currency_code": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_deduction": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether payout_amount should be considered a deduction" + } + }, + "pay_rate": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Overtime rate multiplier (e.g. 1.5)" + } + }, + "payout_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Associated payout or deduction in cents" + } + }, + "payout_currency_code": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "shift_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Shift identifier from partner system" + } + }, + "work_day_duration": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Expected work day duration in seconds" + } + } + }, + "traits": {} + }, + "com.remote.api#PayItemReplacedIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Ids of pay items this one has replaced, oldest first. Empty if this pay item has never been edited.\n" + } + }, + "com.remote.api#ListPayItemsResponseDataDataList": { + "type": "list", + "member": { + "target": "com.remote.api#PayItem" + }, + "traits": { + "smithy.api#documentation": "List of pay items" + } + }, + "com.remote.api#ListPayItemsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page number", + "smithy.api#required": {} + } + }, + "data": { + "target": "com.remote.api#ListPayItemsResponseDataDataList", + "traits": { + "smithy.api#documentation": "List of pay items", + "smithy.api#required": {} + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of pay items", + "smithy.api#required": {} + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of pages", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1PayItems": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayItemsRequest" + }, + "output": { + "target": "com.remote.api#ListPayItemsResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/pay-items", + "code": 200 + }, + "smithy.api#documentation": "List Pay Items\n\nLists pay items for a company with optional filtering by employment, date range, and pagination.\n\n## Scopes" + } + }, + "com.remote.api#PayItemParams": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Value of the pay item. Its unit depends on the `type` of the pay code (see GET /v1/companies/:company_id/legal-entities/:legal_entity_id/pay-codes): `amount` in cents, `percentage` in basis points, `unit` as a raw count, `hours` as a whole number of hours, `duration` in seconds. Must be non-zero; negative values are allowed for corrections.\n", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Pay item type code. Mutually exclusive with `external_import_code` — provide exactly one." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Working day date (YYYY-MM-DD)", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Employment UUID. Only Global Payroll employments are supported.", + "smithy.api#required": {} + } + }, + "external_import_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Partner-defined pay element identifier, as configured on the legal entity pay element. Mutually exclusive with `code` — provide exactly one." + } + }, + "provider_data": { + "target": "com.remote.api#PayItemProviderData" + } + }, + "traits": {} + }, + "com.remote.api#PostV1PayItemsBulkRequestPayItemsList": { + "type": "list", + "member": { + "target": "com.remote.api#PayItemParams" + }, + "traits": {} + }, + "com.remote.api#PostV1PayItemsBulkRequest": { + "type": "structure", + "members": { + "pay_items": { + "target": "com.remote.api#PostV1PayItemsBulkRequestPayItemsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BulkCreatePayItemsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BulkCreatePayItemsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayItemBulkCreateFailures": { + "type": "structure", + "members": { + "error": { + "target": "com.remote.api#PayItemBulkCreateFailuresError", + "traits": { + "smithy.api#documentation": "Failure reason. Includes `employment_not_global_payroll` when the provided employment is not Global Payroll, and `pay_item_code_not_allowed` / `pay_item_external_import_code_not_allowed` when the given identifier does not resolve to an allowed pay element." + } + }, + "row_number": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.remote.api#UnprocessableEntityResponse": { + "type": "union", + "members": { + "Case0": { + "target": "com.remote.api#UnprocessableEntityResponseCase0" + }, + "Case1": { + "target": "com.remote.api#UnprocessableEntityResponseCase1" + } + }, + "traits": {} + }, + "com.remote.api#UnprocessableEntityResponseCase0": { + "type": "structure", + "members": { + "errors": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ParameterError": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An error code that describes the nature of the error.", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A developer friendly error message that gives details on what the error was and how it may be remedied.", + "smithy.api#required": {} + } + }, + "param": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The parameter that lead to the error message.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#UnprocessableEntityResponseCase1MessageCase2List": { + "type": "list", + "member": { + "target": "com.remote.api#ParameterError" + }, + "traits": {} + }, + "com.remote.api#ActionError": { + "type": "structure", + "members": { + "action": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The action that lead to the error message.", + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An error code that describes the nature of the error.", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A developer friendly error message that gives details on what the error was and how it may be remedied.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#UnprocessableEntityResponseCase1MessageCase4List": { + "type": "list", + "member": { + "target": "com.remote.api#ActionError" + }, + "traits": {} + }, + "com.remote.api#UnprocessableEntityResponseCase1Message": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "ParameterError": { + "target": "com.remote.api#ParameterError" + }, + "Case2": { + "target": "com.remote.api#UnprocessableEntityResponseCase1MessageCase2List" + }, + "ActionError": { + "target": "com.remote.api#ActionError" + }, + "Case4": { + "target": "com.remote.api#UnprocessableEntityResponseCase1MessageCase4List" + } + }, + "traits": {} + }, + "com.remote.api#UnprocessableEntityResponseCase1": { + "type": "structure", + "members": { + "message": { + "target": "com.remote.api#UnprocessableEntityResponseCase1Message", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayItemBulkCreateFailuresError": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "UnprocessableEntityResponse": { + "target": "com.remote.api#UnprocessableEntityResponse" + } + }, + "traits": { + "smithy.api#documentation": "Failure reason. Includes `employment_not_global_payroll` when the provided employment is not Global Payroll, and `pay_item_code_not_allowed` / `pay_item_external_import_code_not_allowed` when the given identifier does not resolve to an allowed pay element." + } + }, + "com.remote.api#BulkCreatePayItemsResponseDataFailuresList": { + "type": "list", + "member": { + "target": "com.remote.api#PayItemBulkCreateFailures" + }, + "traits": {} + }, + "com.remote.api#PayItemBulkCreateSuccesses": { + "type": "structure", + "members": { + "pay_item": { + "target": "com.remote.api#PayItem", + "traits": { + "smithy.api#required": {} + } + }, + "row_number": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#BulkCreatePayItemsResponseDataSuccessesList": { + "type": "list", + "member": { + "target": "com.remote.api#PayItemBulkCreateSuccesses" + }, + "traits": {} + }, + "com.remote.api#BulkCreatePayItemsResponseData": { + "type": "structure", + "members": { + "failures": { + "target": "com.remote.api#BulkCreatePayItemsResponseDataFailuresList", + "traits": { + "smithy.api#required": {} + } + }, + "successes": { + "target": "com.remote.api#BulkCreatePayItemsResponseDataSuccessesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1PayItemsBulk": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1PayItemsBulkRequest" + }, + "output": { + "target": "com.remote.api#BulkCreatePayItemsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/pay-items/bulk", + "code": 200 + }, + "smithy.api#documentation": "Bulk Create Pay Items\n\nBulk creates pay items for employments. Supports up to 500 items per request.\nEach item must supply exactly one of `code` or `external_import_code` to identify the pay element.\nIntegration-specific fields (shift code, currency, pay amount, etc.) go in the `provider_data` object.\nOnly Global Payroll employments are supported. Non-GP employments are returned as `employment_not_global_payroll`.\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1PayItemsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pay item ID" + } + }, + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Value of the pay item. See PayItemParams.amount for unit details. Must be non-zero; negative values are allowed for corrections." + } + }, + "effective_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Working day date (YYYY-MM-DD)" + } + }, + "provider_data": { + "target": "com.remote.api#PayItemProviderData" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PayItemResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#PayItemResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayItemResponseData": { + "type": "structure", + "members": { + "pay_item": { + "target": "com.remote.api#PayItem", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1PayItemsId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1PayItemsIdRequest" + }, + "output": { + "target": "com.remote.api#PayItemResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/pay-items/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update a Pay Item\n\nUpdates a pay item. Editing a pay item archives the existing one and creates a new one with a new `id` — use the response's `replaced_ids` to reconcile with the id you had stored. Only the fields provided are changed.\nCannot update pay items linked to a payroll adjustment, salary pay items, pay items automatically created from an external source, or pay items whose payroll run is no longer in preparation.\n\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1PayItemsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Pay item ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1PayItemsId": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1PayItemsIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/pay-items/{id}", + "code": 200 + }, + "smithy.api#documentation": "Delete a Pay Item\n\nArchives a pay item. Cannot delete pay items linked to a payroll adjustment, salary pay items, pay items automatically created from an external source, or pay items whose payroll run is no longer in preparation.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollCalendarsRequest": { + "type": "structure", + "members": { + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "country_code", + "smithy.api#documentation": "Filter payroll calendars by country code" + } + }, + "year": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "year", + "smithy.api#documentation": "Filter payroll calendars by year" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PayrollCalendarsEORResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#PayrollCalendarsEORResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many payroll_calendars" + } + }, + "com.remote.api#PayrollCalendarEOR": { + "type": "structure", + "members": { + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "cycle_frequency": { + "target": "com.remote.api#CycleFrequency", + "traits": { + "smithy.api#required": {} + } + }, + "cycles": { + "target": "com.remote.api#PayrollCalendarEORCyclesList", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CycleFrequency": { + "type": "enum", + "members": { + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + }, + "BI_MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_monthly" + } + }, + "BI_WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_weekly" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + } + }, + "traits": { + "smithy.api#documentation": "The frequency at which the payroll calendar is run." + } + }, + "com.remote.api#Cycle": { + "type": "structure", + "members": { + "employee_inclusion_cutoff_date": { + "target": "smithy.api#String" + }, + "end_date": { + "target": "smithy.api#String" + }, + "input_cutoff_date": { + "target": "smithy.api#String" + }, + "payment_date": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.remote.api#PayrollCalendarEORCyclesList": { + "type": "list", + "member": { + "target": "com.remote.api#Cycle" + }, + "traits": {} + }, + "com.remote.api#PayrollCalendarsEORResponseDataPayrollCalendarsList": { + "type": "list", + "member": { + "target": "com.remote.api#PayrollCalendarEOR" + }, + "traits": {} + }, + "com.remote.api#PayrollCalendarsEORResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "payroll_calendars": { + "target": "com.remote.api#PayrollCalendarsEORResponseDataPayrollCalendarsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1PayrollCalendars": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollCalendarsRequest" + }, + "output": { + "target": "com.remote.api#PayrollCalendarsEORResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-calendars", + "code": 200 + }, + "smithy.api#documentation": "List EOR Payroll Calendar\n\nList all active payroll calendars for EOR.\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollCalendarsCycleRequest": { + "type": "structure", + "members": { + "cycle": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The cycle for which to list the payroll calendars. Format: YYYY-MM" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PayrollCalendarsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#PayrollCalendarsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many payroll_calendars" + } + }, + "com.remote.api#PayrollCalendar": { + "type": "structure", + "members": { + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "cycle_frequency": { + "target": "com.remote.api#CycleFrequency", + "traits": { + "smithy.api#required": {} + } + }, + "cycles": { + "target": "com.remote.api#PayrollCalendarCyclesList", + "traits": { + "smithy.api#required": {} + } + }, + "owned_by_remote": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PayrollCalendarCyclesList": { + "type": "list", + "member": { + "target": "com.remote.api#Cycle" + }, + "traits": {} + }, + "com.remote.api#PayrollCalendarsResponseDataPayrollCalendarsList": { + "type": "list", + "member": { + "target": "com.remote.api#PayrollCalendar" + }, + "traits": {} + }, + "com.remote.api#PayrollCalendarsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "payroll_calendars": { + "target": "com.remote.api#PayrollCalendarsResponseDataPayrollCalendarsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1PayrollCalendarsCycle": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollCalendarsCycleRequest" + }, + "output": { + "target": "com.remote.api#PayrollCalendarsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-calendars/{cycle}", + "code": 200 + }, + "smithy.api#documentation": "List Company Payroll Calendar\n\nList all payroll calendars for the company within the requested cycle.\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollRunsRequest": { + "type": "structure", + "members": { + "payroll_period": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "payroll_period", + "smithy.api#documentation": "Filters payroll runs where period_start or period_end match the given date" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListPayrollRunResponse": { + "type": "structure", + "members": { + "payroll_runs": { + "target": "com.remote.api#ListPayrollRunResponsePayrollRunsList", + "traits": { + "smithy.api#documentation": "List of payroll runs matching the query filters." + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a list of payroll runs for the company. Each payroll run includes summary information but not per-employee breakdowns." + } + }, + "com.remote.api#MinimalPayrollRun": { + "type": "structure", + "members": { + "approval_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "currency_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "cutoff_date": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "expected_payout_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the payroll run.", + "smithy.api#required": {} + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#MinimalPayrollRunStatus", + "traits": { + "smithy.api#documentation": "The current status of the payroll run.\n\n- `preparing`: The payroll run is being assembled. Costs are estimates.\n- `processing`: Submitted for processing. Costs are still estimates.\n- `completed`: Processing is complete. Costs are final.\n- `finalized`: Payments have been or will be disbursed.\n- `waiting_for_customer_approval`: Requires company approval before proceeding.\n- `rejected`: Rejected during approval and needs revision.\n", + "smithy.api#required": {} + } + }, + "total_payroll_cost": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total cost of this payroll run across all employees. Amount in cents.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#MinimalPayrollRunType", + "traits": { + "smithy.api#documentation": "The type of payroll run.\n\n- `main`: Regular recurring payroll.\n- `one_off`: Ad-hoc off-cycle payment.\n- `pro_forma`: Simulated run for cost estimation.\n- `tax_documents`: Tax document generation only.\n- `expenses`: Dedicated expense reimbursement run.\n- `parallel`: Supplementary run alongside the main payroll.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#MinimalPayrollRunStatus": { + "type": "enum", + "members": { + "PREPARING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "preparing" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "FINALIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "finalized" + } + }, + "WAITING_FOR_CUSTOMER_APPROVAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "waiting_for_customer_approval" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the payroll run.\n\n- `preparing`: The payroll run is being assembled. Costs are estimates.\n- `processing`: Submitted for processing. Costs are still estimates.\n- `completed`: Processing is complete. Costs are final.\n- `finalized`: Payments have been or will be disbursed.\n- `waiting_for_customer_approval`: Requires company approval before proceeding.\n- `rejected`: Rejected during approval and needs revision.\n" + } + }, + "com.remote.api#MinimalPayrollRunType": { + "type": "enum", + "members": { + "MAIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "main" + } + }, + "ONE_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "one_off" + } + }, + "PRO_FORMA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pro_forma" + } + }, + "TAX_DOCUMENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tax_documents" + } + }, + "EXPENSES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expenses" + } + }, + "PARALLEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parallel" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of payroll run.\n\n- `main`: Regular recurring payroll.\n- `one_off`: Ad-hoc off-cycle payment.\n- `pro_forma`: Simulated run for cost estimation.\n- `tax_documents`: Tax document generation only.\n- `expenses`: Dedicated expense reimbursement run.\n- `parallel`: Supplementary run alongside the main payroll.\n" + } + }, + "com.remote.api#ListPayrollRunResponsePayrollRunsList": { + "type": "list", + "member": { + "target": "com.remote.api#MinimalPayrollRun" + }, + "traits": { + "smithy.api#documentation": "List of payroll runs matching the query filters." + } + }, + "com.remote.api#GetV1PayrollRuns": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollRunsRequest" + }, + "output": { + "target": "com.remote.api#ListPayrollRunResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-runs", + "code": 200 + }, + "smithy.api#documentation": "List Company Payroll Runs\n\nLists all payroll runs for a company\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdRequest": { + "type": "structure", + "members": { + "payroll_run_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Payroll run ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PayrollRunResponse": { + "type": "structure", + "members": { + "payroll_run": { + "target": "com.remote.api#PayrollRun" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a single payroll run with full details including cost totals and employee breakdowns." + } + }, + "com.remote.api#PayrollRun": { + "type": "structure", + "members": { + "approval_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "benefits_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total benefits cost across all employees in this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "currency_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "cutoff_date": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "employee_details": { + "target": "com.remote.api#PayrollRunEmployeeDetailsList", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {} + } + }, + "employer_contributions_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total employer-side contributions (social contributions, employer taxes, etc.) across all employees. Amount in cents.", + "smithy.api#required": {} + } + }, + "expected_payout_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "expenses_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total reimbursed expenses across all employees in this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the payroll run.", + "smithy.api#required": {} + } + }, + "incentives_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total incentives (bonuses, commissions, etc.) across all employees in this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "other_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total of other payroll components not categorized elsewhere. Amount in cents.", + "smithy.api#required": {} + } + }, + "period_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "period_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "salary_total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total base salary amount across all employees in this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#PayrollRunStatus", + "traits": { + "smithy.api#documentation": "The current status of the payroll run.\n\n- `preparing`: The payroll run is being assembled. Employee details and costs are estimates and may change.\n- `processing`: The payroll run has been submitted for processing by the local payroll provider. Costs are still estimates.\n- `completed`: Payroll processing is complete. Costs are final and payslips are available.\n- `finalized`: The payroll run has been finalized and payments have been or will be disbursed.\n- `waiting_for_customer_approval`: The payroll run requires approval from the company before it can proceed.\n- `rejected`: The payroll run was rejected during the approval process and needs to be revised.\n", + "smithy.api#required": {} + } + }, + "total_payroll_cost": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total cost of this payroll run across all employees, including salaries, benefits, employer contributions, expenses, and incentives. Amount in cents.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#PayrollRunType", + "traits": { + "smithy.api#documentation": "The type of payroll run.\n\n- `main`: The regular recurring payroll for the period.\n- `one_off`: An ad-hoc payroll run outside the regular cycle, typically for off-cycle payments.\n- `pro_forma`: A simulated payroll run used for cost estimation purposes. Not actually processed.\n- `tax_documents`: A payroll run for generating tax-related documents only.\n- `expenses`: A payroll run dedicated to reimbursing approved expenses.\n- `parallel`: A supplementary payroll run that runs alongside the main payroll for the same period.\n" + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#EmployeeDetails": { + "type": "structure", + "members": { + "base_salary": { + "target": "com.remote.api#EmployeeDetailsBaseSalary", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {} + } + }, + "benefits": { + "target": "com.remote.api#EmployeeDetailsBenefits", + "traits": { + "smithy.api#documentation": "Total cost of employee benefits (health insurance, pension, etc.) for this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "deductions": { + "target": "com.remote.api#EmployeeDetailsDeductions", + "traits": { + "smithy.api#documentation": "Total deductions from the employee's gross pay, including taxes and social contributions. Amount in cents.", + "smithy.api#required": {} + } + }, + "employer_costs": { + "target": "com.remote.api#EmployeeDetailsEmployerCosts", + "traits": { + "smithy.api#documentation": "Total employer-side contributions and costs (employer social contributions, taxes, etc.) beyond the employee's gross pay. Amount in cents.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the employment record for this employee." + } + }, + "expenses": { + "target": "com.remote.api#EmployeeDetailsExpenses", + "traits": { + "smithy.api#documentation": "Total approved expenses reimbursed to the employee in this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "full_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The full name of the employee. May be null if the employee's profile is incomplete.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "gross_pay": { + "target": "com.remote.api#EmployeeDetailsGrossPay", + "traits": { + "smithy.api#documentation": "The employee's gross pay before any deductions. Amount in cents.", + "smithy.api#required": {} + } + }, + "incentives": { + "target": "com.remote.api#EmployeeDetailsIncentives", + "traits": { + "smithy.api#documentation": "Total incentives (bonuses, commissions, etc.) paid to the employee in this payroll run. Amount in cents.", + "smithy.api#required": {} + } + }, + "net_pay": { + "target": "com.remote.api#EmployeeDetailsNetPay", + "traits": { + "smithy.api#documentation": "The net amount paid to the employee after all deductions (taxes, social contributions, etc.). Amount in cents.", + "smithy.api#required": {} + } + }, + "other": { + "target": "com.remote.api#EmployeeDetailsOther", + "traits": { + "smithy.api#documentation": "Any other payroll components not categorized as salary, benefits, expenses, or incentives. Amount in cents.", + "smithy.api#required": {} + } + }, + "payslip_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "total_cost": { + "target": "com.remote.api#EmployeeDetailsTotalCost", + "traits": { + "smithy.api#documentation": "The total cost to the employer for this employee in this payroll run, including salary, benefits, employer contributions, expenses, and incentives. Amount in cents.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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)." + } + }, + "com.remote.api#EmployeeDetailsBaseSalary": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#EmployeeDetailsBenefits": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "Total cost of employee benefits (health insurance, pension, etc.) for this payroll run. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsDeductions": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "Total deductions from the employee's gross pay, including taxes and social contributions. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsEmployerCosts": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "Total employer-side contributions and costs (employer social contributions, taxes, etc.) beyond the employee's gross pay. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsExpenses": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "Total approved expenses reimbursed to the employee in this payroll run. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsGrossPay": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "The employee's gross pay before any deductions. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsIncentives": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "Total incentives (bonuses, commissions, etc.) paid to the employee in this payroll run. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsNetPay": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "The net amount paid to the employee after all deductions (taxes, social contributions, etc.). Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsOther": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "Any other payroll components not categorized as salary, benefits, expenses, or incentives. Amount in cents." + } + }, + "com.remote.api#EmployeeDetailsTotalCost": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Amount in cents." + } + }, + "currency": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 4217 currency code." + } + } + }, + "traits": { + "smithy.api#documentation": "The total cost to the employer for this employee in this payroll run, including salary, benefits, employer contributions, expenses, and incentives. Amount in cents." + } + }, + "com.remote.api#PayrollRunEmployeeDetailsList": { + "type": "list", + "member": { + "target": "com.remote.api#EmployeeDetails" + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#PayrollRunStatus": { + "type": "enum", + "members": { + "PREPARING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "preparing" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "FINALIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "finalized" + } + }, + "WAITING_FOR_CUSTOMER_APPROVAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "waiting_for_customer_approval" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rejected" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the payroll run.\n\n- `preparing`: The payroll run is being assembled. Employee details and costs are estimates and may change.\n- `processing`: The payroll run has been submitted for processing by the local payroll provider. Costs are still estimates.\n- `completed`: Payroll processing is complete. Costs are final and payslips are available.\n- `finalized`: The payroll run has been finalized and payments have been or will be disbursed.\n- `waiting_for_customer_approval`: The payroll run requires approval from the company before it can proceed.\n- `rejected`: The payroll run was rejected during the approval process and needs to be revised.\n" + } + }, + "com.remote.api#PayrollRunType": { + "type": "enum", + "members": { + "MAIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "main" + } + }, + "ONE_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "one_off" + } + }, + "PRO_FORMA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pro_forma" + } + }, + "TAX_DOCUMENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tax_documents" + } + }, + "EXPENSES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expenses" + } + }, + "PARALLEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "parallel" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of payroll run.\n\n- `main`: The regular recurring payroll for the period.\n- `one_off`: An ad-hoc payroll run outside the regular cycle, typically for off-cycle payments.\n- `pro_forma`: A simulated payroll run used for cost estimation purposes. Not actually processed.\n- `tax_documents`: A payroll run for generating tax-related documents only.\n- `expenses`: A payroll run dedicated to reimbursing approved expenses.\n- `parallel`: A supplementary payroll run that runs alongside the main payroll for the same period.\n" + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdRequest" + }, + "output": { + "target": "com.remote.api#PayrollRunResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-runs/{payroll_run_id}", + "code": 200 + }, + "smithy.api#documentation": "Show Company Payroll Runs\n\nGiven an ID, shows a payroll run.\n`employee_details` field is deprecated in favour of the `employee_details` endpoint and will be removed in the future.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest": { + "type": "structure", + "members": { + "payroll_run_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Payroll run ID" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#EmployeeDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#EmployeeDetailsResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Paginated response containing per-employee payroll cost breakdowns for a specific payroll run." + } + }, + "com.remote.api#EmployeeDetailsResponseDataEmployeeDetailsList": { + "type": "list", + "member": { + "target": "com.remote.api#EmployeeDetails" + }, + "traits": { + "smithy.api#documentation": "List of per-employee cost breakdowns for the payroll run." + } + }, + "com.remote.api#EmployeeDetailsResponseData": { + "type": "structure", + "members": { + "employee_details": { + "target": "com.remote.api#EmployeeDetailsResponseDataEmployeeDetailsList", + "traits": { + "smithy.api#documentation": "List of per-employee cost breakdowns for the payroll run.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdEmployeeDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmployeeDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-runs/{payroll_run_id}/employee-details", + "code": 200 + }, + "smithy.api#documentation": "Get Employee Details for a Payroll Run\n\nGets the employee details for a payroll run\n\n## Scopes" + } + }, + "com.remote.api#PostV1PayrollRunsPayrollRunIdGlReportsRequestType": { + "type": "enum", + "members": { + "SUMMARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "summary" + } + }, + "BY_DEPARTMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "by_department" + } + }, + "EMPLOYEE_DETAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee_detail" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of GL report to generate." + } + }, + "com.remote.api#PostV1PayrollRunsPayrollRunIdGlReportsRequest": { + "type": "structure", + "members": { + "payroll_run_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The payroll run's ID" + } + }, + "type": { + "target": "com.remote.api#PostV1PayrollRunsPayrollRunIdGlReportsRequestType", + "traits": { + "smithy.api#documentation": "The type of GL report to generate.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GLReportResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#GLReportResponseData" + } + }, + "traits": {} + }, + "com.remote.api#GLReport": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the GL report.", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when the report was requested.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#GLReportStatus", + "traits": { + "smithy.api#documentation": "Current generation status of the report.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#GLReportType", + "traits": { + "smithy.api#documentation": "The type of GL report.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A General Ledger report generation request and its current status." + } + }, + "com.remote.api#GLReportStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + } + }, + "traits": { + "smithy.api#documentation": "Current generation status of the report." + } + }, + "com.remote.api#GLReportType": { + "type": "enum", + "members": { + "SUMMARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "summary" + } + }, + "BY_DEPARTMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "by_department" + } + }, + "EMPLOYEE_DETAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee_detail" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of GL report." + } + }, + "com.remote.api#GLReportResponseData": { + "type": "structure", + "members": { + "gl_report": { + "target": "com.remote.api#GLReport" + } + }, + "traits": {} + }, + "com.remote.api#PostV1PayrollRunsPayrollRunIdGlReports": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1PayrollRunsPayrollRunIdGlReportsRequest" + }, + "output": { + "target": "com.remote.api#GLReportResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/payroll-runs/{payroll_run_id}/gl-reports", + "code": 200 + }, + "smithy.api#documentation": "Create a GL report\n\nTriggers generation of a General Ledger report for the given payroll run and type.\nReturns immediately with a `pending` report — poll `show` until `status` is `completed`,\nthen call `download`.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest": { + "type": "structure", + "members": { + "payroll_run_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The payroll run's ID" + } + }, + "gl_report_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The GL report's ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest" + }, + "output": { + "target": "com.remote.api#GLReportResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-runs/{payroll_run_id}/gl-reports/{gl_report_id}", + "code": 200 + }, + "smithy.api#documentation": "Show a GL report\n\nReturns the current status of a GL report. Poll until `status` is `completed`, then call `download`.\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest": { + "type": "structure", + "members": { + "payroll_run_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The payroll run's ID" + } + }, + "gl_report_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The GL report's ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownload": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest" + }, + "output": { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payroll-runs/{payroll_run_id}/gl-reports/{gl_report_id}/download", + "code": 200 + }, + "smithy.api#documentation": "Download a GL report\n\nDownloads the generated GL report as a CSV file. The report must have `status: completed` before calling this endpoint.\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayslipsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Employment ID" + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start_date", + "smithy.api#documentation": "Filters by payslips `issued_at` field, after or on the same day than the given date" + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "end_date", + "smithy.api#documentation": "Filters by payslips `issued_at` field, before or or the same day than the given date" + } + }, + "expected_payout_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "expected_payout_start_date", + "smithy.api#documentation": "Filters by payslips `expected_payout_date` field, after or on the same day than the given date" + } + }, + "expected_payout_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "expected_payout_end_date", + "smithy.api#documentation": "Filters by payslips `expected_payout_date` field, before or or the same day than the given date" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListPayslipsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListPayslipsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many payslips" + } + }, + "com.remote.api#Payslip": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment this payslip belongs to.", + "smithy.api#required": {} + } + }, + "expected_payout_date": { + "target": "smithy.api#String" + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the payslip.", + "smithy.api#required": {} + } + }, + "issued_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the payslip was issued.", + "smithy.api#required": {} + } + }, + "net_pay_converted_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The net pay amount converted to the company's billing currency, in cents. Only shown if available." + } + }, + "net_pay_source_amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The net pay amount in the source (local) currency, in cents. Only shown if available." + } + } + }, + "traits": { + "smithy.api#documentation": "A payslip issued to an employee for a specific payroll period." + } + }, + "com.remote.api#ListPayslipsResponseDataPayslipsList": { + "type": "list", + "member": { + "target": "com.remote.api#Payslip" + }, + "traits": {} + }, + "com.remote.api#ListPayslipsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "payslips": { + "target": "com.remote.api#ListPayslipsResponseDataPayslipsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1Payslips": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayslipsRequest" + }, + "output": { + "target": "com.remote.api#ListPayslipsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payslips", + "code": 200 + }, + "smithy.api#documentation": "List payslips\n\nLists all payslips belonging to a company. Can also filter for a single employment belonging\nto that company.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1PayslipsPayslipIdPdfRequest": { + "type": "structure", + "members": { + "payslip_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Payslip ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1PayslipsPayslipIdPdfResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#GetV1PayslipsPayslipIdPdf": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1PayslipsPayslipIdPdfRequest" + }, + "output": { + "target": "com.remote.api#GetV1PayslipsPayslipIdPdfResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/payslips/{payslip_id}/pdf", + "code": 200 + }, + "smithy.api#documentation": "Download payslip in the PDF format\n\nGiven a Payslip ID, downloads a payslip.\nIt is important to note that each country has a different payslip format and they are not authored by Remote.\n\n\n## Scopes" + } + }, + "com.remote.api#ListPricingPlanPartnerTemplatesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListPricingPlanPartnerTemplatesResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "List of pricing plan partner templates" + } + }, + "com.remote.api#PricingPlanPartnerTemplate": { + "type": "structure", + "members": { + "base_price": { + "target": "com.remote.api#Price", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "period": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The period in months for the template, 0 means unlimited" + } + }, + "price": { + "target": "com.remote.api#Price", + "traits": { + "smithy.api#required": {} + } + }, + "product": { + "target": "com.remote.api#Product", + "traits": { + "smithy.api#required": {} + } + }, + "unlimited": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the template is unlimited in time (do not expire)" + } + } + }, + "traits": { + "smithy.api#documentation": "Pricing plan partner template" + } + }, + "com.remote.api#ListPricingPlanPartnerTemplatesResponseDataPricingPlanPartnerTemplatesList": { + "type": "list", + "member": { + "target": "com.remote.api#PricingPlanPartnerTemplate" + }, + "traits": {} + }, + "com.remote.api#ListPricingPlanPartnerTemplatesResponseData": { + "type": "structure", + "members": { + "pricing_plan_partner_templates": { + "target": "com.remote.api#ListPricingPlanPartnerTemplatesResponseDataPricingPlanPartnerTemplatesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1PricingPlanPartnerTemplates": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#ListPricingPlanPartnerTemplatesResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/pricing-plan-partner-templates", + "code": 200 + }, + "smithy.api#documentation": "List pricing plan partner templates\n\nList all pricing plan partner templates.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1ProbationCompletionLetterRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employment ID.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ProbationCompletionLetterResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ProbationCompletionLetterResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Probation completion letter request response" + } + }, + "com.remote.api#ProbationCompletionLetter": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "letter": { + "target": "com.remote.api#ProbationCompletionLetterFile", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#ProbationCompletionLetterStatus", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "zendesk_ticket_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Probation completion letter request" + } + }, + "com.remote.api#ProbationCompletionLetterFile": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the file.", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name including extension (e.g., \"id.pdf\", \"contract.pdf\").", + "smithy.api#required": {} + } + }, + "sub_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The broad category of the file (e.g., \"id\", \"contract\", \"tax_form\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A file associated with an employment, such as a contract, tax form, or identity document." + } + }, + "com.remote.api#ProbationCompletionLetterStatus": { + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "done" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + } + }, + "traits": {} + }, + "com.remote.api#ProbationCompletionLetterResponseData": { + "type": "structure", + "members": { + "probation_completion_letter": { + "target": "com.remote.api#ProbationCompletionLetter", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ProbationCompletionLetter": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ProbationCompletionLetterRequest" + }, + "output": { + "target": "com.remote.api#ProbationCompletionLetterResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/probation-completion-letter", + "code": 200 + }, + "smithy.api#documentation": "Create probation completion letter\n\nCreate a new probation completion letter request.\n\n## Scopes" + } + }, + "com.remote.api#GetV1ProbationCompletionLetterIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "probation completion letter ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ProbationCompletionLetterId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ProbationCompletionLetterIdRequest" + }, + "output": { + "target": "com.remote.api#ProbationCompletionLetterResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/probation-completion-letter/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show probation completion letter\n\nShow a single probation completion letter.\n\n## Scopes" + } + }, + "com.remote.api#ProbationExtensionFile": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The content of the file encoded in base64.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the file.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ProbationExtensionsRequest": { + "type": "structure", + "members": { + "additional_details": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Any additional details that need to be considered for the probation extension." + } + }, + "date_of_discussion_with_employee": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date when the discussion with the employee took place. Is required when `was_employee_informed` is `true` and should be in the past." + } + }, + "duration_of_extension_in_days": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of days to add to the existing probation end date.", + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employment ID that is related to the probation extension request.", + "smithy.api#required": {} + } + }, + "reason_for_extension": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the probation extension.", + "smithy.api#required": {} + } + }, + "supporting_document": { + "target": "com.remote.api#ProbationExtensionFile", + "traits": { + "smithy.api#documentation": "Upload performance improvement plan or any other supporting document.\nThis optional document can be sent only if `was_employee_informed` is `true`.\n" + } + }, + "was_employee_informed": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employee was informed about the probation extension.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ProbationExtensionResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ProbationExtensionResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Probation Extension Response" + } + }, + "com.remote.api#ProbationExtension": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the probation extension request.", + "smithy.api#required": {} + } + }, + "requested_by": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the user who submitted the request.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ProbationExtensionStatus", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the extension request was submitted.", + "smithy.api#required": {} + } + }, + "zendesk_ticket_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A link to the support ticket for this extension, if one was created. Null otherwise.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A request to extend an employee's probation period. Requires Remote's review for compliance with local labor laws." + } + }, + "com.remote.api#ProbationExtensionStatus": { + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "done" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deleted" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of a probation extension request.\n\n- `submitted`: The request has been submitted and is awaiting review.\n- `in_review`: Remote is reviewing the request for compliance.\n- `done`: The probation extension has been approved and applied.\n- `canceled`: The request was canceled.\n- `deleted`: The request was deleted.\n" + } + }, + "com.remote.api#ProbationExtensionResponseData": { + "type": "structure", + "members": { + "probation_extension": { + "target": "com.remote.api#ProbationExtension", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1ProbationExtensions": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1ProbationExtensionsRequest" + }, + "output": { + "target": "com.remote.api#ProbationExtensionResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/probation-extensions", + "code": 200 + }, + "smithy.api#documentation": "Create Probation Extension\n\nCreate a probation extension request.\n\n## Scopes" + } + }, + "com.remote.api#GetV1ProbationExtensionsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Probation Extension Request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ProbationExtensionsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ProbationExtensionsIdRequest" + }, + "output": { + "target": "com.remote.api#ProbationExtensionResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/probation-extensions/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Probation Extension\n\nShows a Probation Extension Request.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1ResignationsOffboardingRequestIdRequest": { + "type": "structure", + "members": { + "offboarding_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Offboarding request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ResignationResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#Resignation" + } + }, + "traits": { + "smithy.api#documentation": "Resignation response" + } + }, + "com.remote.api#Resignation": { + "type": "structure", + "members": { + "resignation": { + "target": "com.remote.api#ResignationResignation" + } + }, + "traits": { + "smithy.api#documentation": "Resignation details for an offboarding request. The shape depends on whether the employee resigned before or after their employment start date." + } + }, + "com.remote.api#ResignationBeforeStartDate": { + "type": "structure", + "members": { + "contract_job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The job title from the employee's contract.", + "smithy.api#required": {} + } + }, + "contract_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The original start date from the employee's contract.", + "smithy.api#required": {} + } + }, + "resignation_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the employee submitted their resignation (UTC).", + "smithy.api#required": {} + } + }, + "resignation_reason_label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable label describing the reason for resignation (e.g., \"Decided not to join before starting\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Resignation details for an employee who resigned before their employment start date. Contains basic contract and resignation information only." + } + }, + "com.remote.api#ResignationAfterStartDate": { + "type": "structure", + "members": { + "contract_currency_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 4217 currency code of the employee's contract (used for any reimbursement calculations).", + "smithy.api#required": {} + } + }, + "contract_job_title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The job title from the employee's contract.", + "smithy.api#required": {} + } + }, + "contract_proabtion_period_passed": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employee's probation period has passed. Affects notice period requirements in many jurisdictions.", + "smithy.api#required": {} + } + }, + "contract_probation_period_end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The end date of the employee's probation period. Null if the contract has no probation period.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "contract_start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The original start date from the employee's contract.", + "smithy.api#required": {} + } + }, + "days_of_notice": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of calendar days of notice required based on the contract terms and local labor laws.", + "smithy.api#required": {} + } + }, + "paid_timeoffs_breakdown_labels": { + "target": "com.remote.api#ResignationAfterStartDatePaidTimeoffsBreakdownLabelsList", + "traits": { + "smithy.api#documentation": "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\").", + "smithy.api#required": {} + } + }, + "proposed_last_day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's proposed last working day, calculated based on the notice period and local labor laws.", + "smithy.api#required": {} + } + }, + "resignation_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date the employee submitted their resignation (UTC).", + "smithy.api#required": {} + } + }, + "resignation_reason_label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable label describing the reason for resignation (e.g., \"Retirement\", \"Other job opportunity\").", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#ResignationAfterStartDatePaidTimeoffsBreakdownLabelsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "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\")." + } + }, + "com.remote.api#ResignationResignation": { + "type": "union", + "members": { + "ResignationBeforeStartDate": { + "target": "com.remote.api#ResignationBeforeStartDate" + }, + "ResignationAfterStartDate": { + "target": "com.remote.api#ResignationAfterStartDate" + } + }, + "traits": {} + }, + "com.remote.api#GetV1ResignationsOffboardingRequestId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ResignationsOffboardingRequestIdRequest" + }, + "output": { + "target": "com.remote.api#ResignationResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/resignations/{offboarding_request_id}", + "code": 200 + }, + "smithy.api#documentation": "Show Resignation\n\nShows the details of a resignation with status `submitted`.\n\n## Scopes" + } + }, + "com.remote.api#GetV1ResignationsOffboardingRequestIdResignationLetterRequest": { + "type": "structure", + "members": { + "offboarding_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Offboarding request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ResignationsOffboardingRequestIdResignationLetter": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ResignationsOffboardingRequestIdResignationLetterRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/resignations/{offboarding_request_id}/resignation-letter", + "code": 200 + }, + "smithy.api#documentation": "Download a resignation letter\n\nDownloads a resignation letter from an employment request.\n\n## Scopes" + } + }, + "com.remote.api#ValidateResignationRequestParams": { + "type": "union", + "members": { + "ResignationAfterStartDateRequestParams": { + "target": "com.remote.api#ResignationAfterStartDateRequestParams" + }, + "ResignationBeforeStartDateRequestParams": { + "target": "com.remote.api#ResignationBeforeStartDateRequestParams" + } + }, + "traits": {} + }, + "com.remote.api#ResignationAfterStartDateRequestParams": { + "type": "structure", + "members": { + "accepts_proposed_notice": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer accepts the proposed notice period and last working day. If false, provide an alternative `proposed_last_date`.", + "smithy.api#required": {} + } + }, + "agrees_to_pto_amount": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer agrees with the employee's current PTO balance. If false, provide notes explaining the discrepancy.", + "smithy.api#required": {} + } + }, + "agrees_to_pto_amount_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Required if `agrees_to_pto_amount` is set to false." + } + }, + "agrees_to_resignation_reason": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer agrees with the resignation reason stated by the employee. If false, provide notes with the employer's perspective.", + "smithy.api#required": {} + } + }, + "agrees_to_resignation_reason_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "required if `agrees_to_resignation_reason` is set to false." + } + }, + "has_additional_information": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer has additional information to share about the resignation. If true, provide notes.", + "smithy.api#required": {} + } + }, + "has_additional_information_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "required if `has_additional_information` is set to true." + } + }, + "has_more_salary_info": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether there are salary adjustments or additional salary information to communicate. If true, provide notes.", + "smithy.api#required": {} + } + }, + "has_more_salary_info_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "required if `has_more_salary_info` is set to true." + } + }, + "is_owed_outstanding_reimbursements": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employee is owed any outstanding expense reimbursements. If true, provide the amount and notes.", + "smithy.api#required": {} + } + }, + "owed_outstanding_reimbursements": { + "target": "com.remote.api#ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements", + "traits": { + "smithy.api#documentation": "required if `is_owed_outstanding_reimbursements` is set to true." + } + }, + "proposed_last_date": { + "target": "com.remote.api#ResignationAfterStartDateRequestParamsProposedLastDate", + "traits": { + "smithy.api#documentation": "Required if `accepts_proposed_notice` is set to false." + } + }, + "timesheet_file": { + "target": "com.remote.api#ResignationFile", + "traits": { + "smithy.api#documentation": "Paid time off accuracy\n\nTypically, any vacation pay accrued and unpaid at the time\nof termination must be paid out to the employee. To avoid overpaying or underpaying,\nplease make sure we have an accurate account of their paid time off by querying the\n[Show Time Off Balance](#operation/get_show_timeoff_balance) endpoint,\nfiltering by the `employment_id`.\nThis optional document should be sent in case of any discrepancies.\n" + } + }, + "will_take_more_pto": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employee intends to take more PTO before their last working day. If true, provide notes with details.", + "smithy.api#required": {} + } + }, + "will_take_more_pto_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "required if `will_take_more_pto` is set to true." + } + } + }, + "traits": {} + }, + "com.remote.api#ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The amount (in the currency of the employment) to be given to the employee.\n\nThis field accepts fractional amounts as well. However to avoid precision issues\nand errors that can arise from storing fractional amounts, the Remote API only\naccepts currencies and their fractional amounts as integers. This means you\nshould append fractional amounts to the end of the amount you're passing in with\nthis field.\n\nFor example, if the amount you're offering is EUR 500.25, you would specify `50025` as\nthe amount for this field.\n" + } + }, + "notes": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "required if `is_owed_outstanding_reimbursements` is set to true." + } + }, + "com.remote.api#ResignationAfterStartDateRequestParamsProposedLastDate": { + "type": "structure", + "members": { + "date": { + "target": "smithy.api#String" + }, + "notes": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Required if `accepts_proposed_notice` is set to false." + } + }, + "com.remote.api#ResignationFile": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The content in base64 encoding", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The file name", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ResignationBeforeStartDateRequestParams": { + "type": "structure", + "members": { + "proposed_resignation_accepted": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employer accepts the employee's resignation. If false, notes are required explaining why.", + "smithy.api#required": {} + } + }, + "proposed_resignation_accepted_notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Required if `proposed_resignation_accepted` is set to false." + } + } + }, + "traits": {} + }, + "com.remote.api#PutV1ResignationsOffboardingRequestIdValidateRequest": { + "type": "structure", + "members": { + "offboarding_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Offboarding request ID" + } + }, + "body": { + "target": "com.remote.api#ValidateResignationRequestParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1ResignationsOffboardingRequestIdValidate": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1ResignationsOffboardingRequestIdValidateRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/resignations/{offboarding_request_id}/validate", + "code": 200 + }, + "smithy.api#documentation": "Validate resignation request\n\nValidates a resignation employment request\n\n## Scopes" + } + }, + "com.remote.api#PostV1RiskReserveRequest": { + "type": "structure", + "members": { + "employment_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1RiskReserve": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1RiskReserveRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/risk-reserve", + "code": 200 + }, + "smithy.api#documentation": "Create risk reserve\n\nCreate a new risk reserve\n\n## Scopes" + } + }, + "com.remote.api#PostV1SandboxBenefitRenewalRequestsRequest": { + "type": "structure", + "members": { + "benefit_group_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the benefit group to create a renewal request for.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#BenefitRenewalRequestsCreateBenefitRenewalRequestResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#BenefitRenewalRequestsCreateBenefitRenewalRequestResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Create Benefit Renewal Request Response" + } + }, + "com.remote.api#BenefitRenewalRequestsCreateBenefitRenewalRequestResponseData": { + "type": "structure", + "members": { + "benefit_renewal_request": { + "target": "com.remote.api#BenefitRenewalRequestsBenefitRenewalRequest", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1SandboxBenefitRenewalRequests": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxBenefitRenewalRequestsRequest" + }, + "output": { + "target": "com.remote.api#BenefitRenewalRequestsCreateBenefitRenewalRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/benefit-renewal-requests", + "code": 200 + }, + "smithy.api#documentation": "Creates a Benefit Renewal Request\n\nCreates a Benefit Renewal Request for a specific Benefit Group.\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdBypassEligibilityChecks": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/companies/{company_id}/bypass-eligibility-checks", + "code": 200 + }, + "smithy.api#documentation": "Pass KYB\n\nPass KYB and credit risk for a company without the intervention of a Remote admin.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal Entity ID to set as the new default" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}", + "code": 200 + }, + "smithy.api#documentation": "Reassign default legal entity\n\nSet a different legal entity as the company's default entity.\n\nThe default entity is used when creating new employments without an explicit entity.\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ISO 3166-1 alpha-3 country code", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData": { + "type": "structure", + "members": { + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Legal entity slug" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Legal entity name" + } + }, + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Legal entity status" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntities": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest" + }, + "output": { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/companies/{company_id}/legal-entities", + "code": 200 + }, + "smithy.api#documentation": "Create a legal entity\n\nCreate a new legal entity for a company in a given country, with KYB automatically passed.\n\nThe entity is created with active status and can be set as the company's default\nusing the reassign default entity endpoint.\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal Entity ID to activate Global Payroll on" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayroll": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/companies/{company_id}/legal-entities/{legal_entity_id}/activate-global-payroll", + "code": 200 + }, + "smithy.api#documentation": "Activate Global Payroll for a legal entity\n\nEnables the Global Payroll product on a legal entity so that GP employees can be created against it.\n\nPerforms three idempotent steps:\n * Adds the Global Payroll product to the company.\n * Flips `global_payroll_enabled` on the legal entity's settings.\n * Ensures a Global Payroll pricing plan exists for the legal entity's country.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Company ID" + } + }, + "legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Legal Entity ID" + } + }, + "credit_risk_status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Credit risk status to set.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatus": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/companies/{company_id}/legal-entities/{legal_entity_id}/set-credit-risk-status", + "code": 200 + }, + "smithy.api#documentation": "Set company credit risk status\n\nSets the credit risk status of a specific legal entity to any valid credit risk status.\n\nUse this endpoint to test hiring flows affected by credit risk, without needing Remote admin intervention.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest": { + "type": "structure", + "members": { + "contract_amendment_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Contract amendment request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdApprove": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest" + }, + "output": { + "target": "com.remote.api#ContractAmendmentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve", + "code": 200 + }, + "smithy.api#documentation": "Approve Contract Amendment\n\nApproves a contract amendment request without the intervention of a Remote admin.\nApprovals done via this endpoint are effective immediately,\nregardless of the effective date entered on the contract amendment creation.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest": { + "type": "structure", + "members": { + "contract_amendment_request_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Contract amendment request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancel": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel", + "code": 200 + }, + "smithy.api#documentation": "Cancel Contract Amendment\n\nUse this endpoint to cancel an existing contract amendment request.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestPayFrequency": { + "type": "enum", + "members": { + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "BI_WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bi_weekly" + } + }, + "SEMI_MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "semi_monthly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + } + }, + "traits": { + "smithy.api#documentation": "How often the contractor is paid. Must be null or omitted for a `one_off` rate." + } + }, + "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestType": { + "type": "enum", + "members": { + "HOURLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hourly" + } + }, + "DAILY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + }, + "ONE_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "one_off" + } + } + }, + "traits": { + "smithy.api#documentation": "The unit the amount is paid per." + } + }, + "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Contractor employment ID" + } + }, + "amount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The amount paid per `type`, in the major unit, e.g. 103.83.", + "smithy.api#required": {} + } + }, + "pay_frequency": { + "target": "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestPayFrequency", + "traits": { + "smithy.api#documentation": "How often the contractor is paid. Must be null or omitted for a `one_off` rate.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestType", + "traits": { + "smithy.api#documentation": "The unit the amount is paid per.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#SandboxContractorRateResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ContractorRate", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The contractor rate that was seeded." + } + }, + "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRates": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest" + }, + "output": { + "target": "com.remote.api#SandboxContractorRateResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/contractors/employments/{employment_id}/rates", + "code": 200 + }, + "smithy.api#documentation": "Seed a contractor rate\n\nCreates or replaces the contractor's rate, so that the rate endpoints can be exercised without\ngoing through contract signature.\n\nThe currency is derived from the legal entity the contractor is paid in by. A rate in a\ncurrency the contractor cannot be paid in is rejected with `422`.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#PostV1SandboxEmploymentsRequestType": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "GLOBAL_PAYROLL_EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global_payroll_employee" + } + }, + "HRIS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hris" + } + } + }, + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + }, + "com.remote.api#PostV1SandboxEmploymentsRequest": { + "type": "structure", + "members": { + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `employment_basic_information` as path parameters.", + "smithy.api#required": {} + } + }, + "bill_to_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the legal entity that should be billed for the employment. If omitted, falls back to `engaged_by_legal_entity_id`. For EOR and Contractor employments this may differ from `engaged_by_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `engaged_by_legal_entity_id`." + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This optional field is deprecated." + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ISO 3166-1 3-letter country code where the employee will be based (e.g., `AUS`, `GBR`, `USA`).", + "smithy.api#required": {} + } + }, + "engaged_by_entity_slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated alias for `engaged_by_legal_entity_id`. Use `engaged_by_legal_entity_id` instead." + } + }, + "engaged_by_legal_entity_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the legal entity that engages the employee or contractor. Required for Global Payroll employees. For EOR and Contractor employments this may differ from `bill_to_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `bill_to_legal_entity_id`." + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system." + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nOmit the field to leave the value unchanged; send `null` to clear it. Surrounding\nwhitespace is trimmed off. It can be set at any employment status, and the same\nvalue may be used on several employments (for example a rehire).\n", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#PostV1SandboxEmploymentsRequestType", + "traits": { + "smithy.api#documentation": "If not provided, it will default to `employee`." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxEmployments": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxEmploymentsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentCreationResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/employments", + "code": 200 + }, + "smithy.api#documentation": "Create employment\n\nCreates an employment without provisional_start_date validation.\n\nThis endpoint is only available in Sandbox and allows creating employments which\n`provisional_start_date` is in the past. This is especially helpful for:\n * Testing the Timeoff Balance endpoints\n * Testing the Offboarding endpoints\n * Testing features around probation periods\n\nThis endpoint will respond with a 404 outside of the Sandbox environment.\n\nFor creating an employment's parameters outside of testing purposes, use [this\nEmployment create endpoint](#operation/post_create_employment)" + } + }, + "com.remote.api#PatchV1SandboxEmploymentsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "provisional_start_date": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.remote.api#EmploymentStatus" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1SandboxEmploymentsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1SandboxEmploymentsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/sandbox/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update employment\n\nUpdates an employment. Use this endpoint to:\n- modify employment states for testing\n- Backdate employment start dates\n\nThis endpoint will respond with a 404 outside of the Sandbox environment.\n\n`partner_external_id` cannot be updated here and is ignored if sent, like any other\nunsupported field. Set it with `PATCH /api/eor/v1/employments/{employment_id}` instead.\n\nFor updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment)." + } + }, + "com.remote.api#PatchV1SandboxEmploymentsEmploymentId2Request": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "provisional_start_date": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.remote.api#EmploymentStatus" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1SandboxEmploymentsEmploymentId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1SandboxEmploymentsEmploymentId2Request" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/sandbox/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update employment\n\nUpdates an employment. Use this endpoint to:\n- modify employment states for testing\n- Backdate employment start dates\n\nThis endpoint will respond with a 404 outside of the Sandbox environment.\n\n`partner_external_id` cannot be updated here and is ignored if sent, like any other\nunsupported field. Set it with `PATCH /api/eor/v1/employments/{employment_id}` instead.\n\nFor updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment)." + } + }, + "com.remote.api#DeleteV1SandboxEmploymentsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1SandboxEmploymentsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1SandboxEmploymentsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/sandbox/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Archive employment\n\nArchives an employment, setting its status to `archived`.\n\nThis endpoint is only available in Sandbox and allows partners to clean up test\nemployees during automated E2E testing without requiring Remote manual intervention.\n\nThis endpoint will respond with a 404 outside of the Sandbox environment." + } + }, + "com.remote.api#PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest" + }, + "output": { + "target": "com.remote.api#RiskReserveProofOfPaymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve", + "code": 200 + }, + "smithy.api#documentation": "Approve risk reserve proof of payment\n\nApproves a risk reserve proof of payment without the intervention of a Remote admin.\n\nTriggers an `employment.cor_hiring.proof_of_payment_accepted` webhook event.\n\nThis endpoint is only available in Sandbox, otherwise it will respond with a 404." + } + }, + "com.remote.api#WebhookTriggerParams": { + "type": "union", + "members": { + "WebhookTriggerEmploymentParams": { + "target": "com.remote.api#WebhookTriggerEmploymentParams" + }, + "WebhookTriggerBillingParams": { + "target": "com.remote.api#WebhookTriggerBillingParams" + } + }, + "traits": { + "smithy.api#documentation": "Required params to trigger a webhook event in the Sandbox environment" + } + }, + "com.remote.api#WebhookTriggerEmploymentParams": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "event_type": { + "target": "com.remote.api#WebhookTriggerEmploymentParamsEventType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#WebhookTriggerEmploymentParamsEventType": { + "type": "enum", + "members": { + "BACKGROUND_CHECK_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "background_check.status.updated" + } + }, + "BENEFIT_RENEWAL_REQUEST_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "benefit_renewal_request.created" + } + }, + "BILLING_DOCUMENT_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "billing_document.issued" + } + }, + "COMPANY_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.activated" + } + }, + "COMPANY_MANAGER_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_created" + } + }, + "COMPANY_MANAGER_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_deleted" + } + }, + "COMPANY_MANAGER_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_updated" + } + }, + "COMPANY_OWNER_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.owner_changed" + } + }, + "COMPANY_ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.archived" + } + }, + "COMPANY_EOR_HIRING_ADDITIONAL_INFORMATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.additional_information_required" + } + }, + "COMPANY_EOR_HIRING_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_NO_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.no_reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.referred" + } + }, + "COMPANY_EOR_HIRING_VERIFICATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.verification_completed" + } + }, + "COMPANY_PARTNER_OFFBOARDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.partner_offboarded" + } + }, + "COMPANY_PRICING_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.pricing_plan.updated" + } + }, + "CONTRACT_AMENDMENT_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.canceled" + } + }, + "CONTRACT_AMENDMENT_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.deleted" + } + }, + "CONTRACT_AMENDMENT_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.done" + } + }, + "CONTRACT_AMENDMENT_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.review_started" + } + }, + "CONTRACT_AMENDMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.submitted" + } + }, + "CONTRACT_TERMINATION_DATE_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract.termination_date_reached" + } + }, + "CONTRACT_DOCUMENT_STATUS_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_document.status.changed" + } + }, + "CONTRACTOR_INVOICE_EMPLOYER_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.employer_paid" + } + }, + "CONTRACTOR_INVOICE_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.issued" + } + }, + "CONTRACTOR_INVOICE_PAID_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.paid_out" + } + }, + "CONTRACTOR_INVOICE_PAYMENT_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.payment_initiated" + } + }, + "CUSTOM_FIELD_VALUE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_field.value_updated" + } + }, + "EMPLOYMENT_BENEFITS_SELECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.benefits.selected" + } + }, + "EMPLOYMENT_COMPANY_STRUCTURE_NODE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_company_structure_node.updated" + } + }, + "EMPLOYMENT_CONTRACT_ACTIVE_CONTRACT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.active_contract_updated" + } + }, + "EMPLOYMENT_CONTRACT_ADJUSTED_DURING_ONBOARDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.adjusted_during_onboarding" + } + }, + "EMPLOYMENT_ACCOUNT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.account.updated" + } + }, + "EMPLOYMENT_ADMINISTRATIVE_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.administrative_details.updated" + } + }, + "EMPLOYMENT_BASIC_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_basic_information.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_MANAGEMENT_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_management_plan.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.cancelled" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.executed" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.initiated" + } + }, + "EMPLOYMENT_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.details.updated" + } + }, + "EMPLOYMENT_EMPLOYMENT_AGREEMENT_AVAILABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.employment_agreement.available" + } + }, + "EMPLOYMENT_COR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.invoice_created" + } + }, + "EMPLOYMENT_EOR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.invoice_created" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_NO_LONGER_ELIGIBLE_FOR_ONBOARDING_CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.no_longer_eligible_for_onboarding_cancellation" + } + }, + "EMPLOYMENT_ONBOARDING_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding_task.completed" + } + }, + "EMPLOYMENT_ONBOARDING_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.cancelled" + } + }, + "EMPLOYMENT_ONBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.completed" + } + }, + "EMPLOYMENT_ONBOARDING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.started" + } + }, + "EMPLOYMENT_PERSONAL_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.personal_information.updated" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.cancelled" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.completed" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.submitted" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_ENDING_REMINDER_SENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation.period_ending_reminder_sent" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.cancelled" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.completed" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.submitted" + } + }, + "EMPLOYMENT_START_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.start_date.changed" + } + }, + "EMPLOYMENT_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.status.updated" + } + }, + "EMPLOYMENT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.updated" + } + }, + "EMPLOYMENT_USER_STATUS_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.activated" + } + }, + "EMPLOYMENT_USER_STATUS_DEACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.deactivated" + } + }, + "EMPLOYMENT_USER_STATUS_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.initiated" + } + }, + "EMPLOYMENT_USER_STATUS_INVITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.invited" + } + }, + "EMPLOYMENT_WORK_EMAIL_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.work_email.updated" + } + }, + "EXPENSE_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.approved" + } + }, + "EXPENSE_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.declined" + } + }, + "EXPENSE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.deleted" + } + }, + "EXPENSE_REIMBURSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.reimbursed" + } + }, + "EXPENSE_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.submitted" + } + }, + "EXPENSE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.updated" + } + }, + "IDENTITY_VERIFICATION_VERIFICATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "identity_verification.verification_required" + } + }, + "INCENTIVE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.created" + } + }, + "INCENTIVE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.deleted" + } + }, + "INCENTIVE_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.paid" + } + }, + "INCENTIVE_PROCESSING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.processing_started" + } + }, + "INCENTIVE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.updated" + } + }, + "OFFBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.completed" + } + }, + "OFFBOARDING_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.deleted" + } + }, + "OFFBOARDING_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.done" + } + }, + "OFFBOARDING_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.review_started" + } + }, + "OFFBOARDING_SUBMITTED_TO_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted_to_payroll" + } + }, + "OFFBOARDING_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted" + } + }, + "PAYSLIP_RELEASED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payslip.released" + } + }, + "SSO_CONFIGURATION_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.disabled" + } + }, + "SSO_CONFIGURATION_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.enabled" + } + }, + "SSO_CONFIGURATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.updated" + } + }, + "TIMEOFF_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.approved" + } + }, + "TIMEOFF_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.canceled" + } + }, + "TIMEOFF_CANCELLATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.cancellation_requested" + } + }, + "TIMEOFF_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.date_changed" + } + }, + "TIMEOFF_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.declined" + } + }, + "TIMEOFF_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.requested" + } + }, + "TIMEOFF_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.started" + } + }, + "TIMEOFF_TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.taken" + } + }, + "TIMEOFF_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.updated" + } + }, + "TIMESHEET_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.submitted" + } + }, + "TIMESHEET_IN_CALIBRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.in_calibration" + } + }, + "TRAVEL_LETTER_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_manager" + } + }, + "TRAVEL_LETTER_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_remote" + } + }, + "TRAVEL_LETTER_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_manager" + } + }, + "TRAVEL_LETTER_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_remote" + } + }, + "TRAVEL_LETTER_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.requested" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_manager" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_remote" + } + }, + "WORK_AUTHORIZATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.cancelled" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_manager" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_remote" + } + }, + "WORK_AUTHORIZATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.requested" + } + } + }, + "traits": {} + }, + "com.remote.api#WebhookTriggerBillingParams": { + "type": "structure", + "members": { + "document_type": { + "target": "com.remote.api#WebhookTriggerBillingParamsDocumentType", + "traits": { + "smithy.api#required": {} + } + }, + "event_type": { + "target": "com.remote.api#WebhookTriggerBillingParamsEventType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#WebhookTriggerBillingParamsDocumentType": { + "type": "enum", + "members": { + "SUPPLEMENTAL_SERVICE_INVOICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "supplemental_service_invoice" + } + }, + "PREFUNDING_INVOICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "prefunding_invoice" + } + }, + "RECONCILIATION_INVOICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reconciliation_invoice" + } + }, + "SUPPLEMENTAL_SERVICE_CREDIT_NOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "supplemental_service_credit_note" + } + }, + "PREFUNDING_CREDIT_NOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "prefunding_credit_note" + } + }, + "RECONCILIATION_CREDIT_NOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "reconciliation_credit_note" + } + } + }, + "traits": {} + }, + "com.remote.api#WebhookTriggerBillingParamsEventType": { + "type": "enum", + "members": { + "BILLING_DOCUMENT_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "billing_document.issued" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1SandboxWebhookCallbacksTriggerRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#WebhookTriggerParams", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SandboxWebhookCallbacksTrigger": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SandboxWebhookCallbacksTriggerRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sandbox/webhook-callbacks/trigger", + "code": 200 + }, + "smithy.api#documentation": "Trigger a Webhook\n\nTriggers a callback previously registered for webhooks. Use this endpoint to\nemit a webhook for testing in the Sandbox environment. This endpoint will\nrespond with a 404 outside of the Sandbox environment." + } + }, + "com.remote.api#GetV1ScimV2GroupsRequest": { + "type": "structure", + "members": { + "startIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "startIndex", + "smithy.api#documentation": "1-based index of the first result" + } + }, + "count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "count", + "smithy.api#documentation": "Maximum number of results per page" + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter", + "smithy.api#documentation": "Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IntegrationsScimGroupListResponse": { + "type": "structure", + "members": { + "Resources": { + "target": "com.remote.api#IntegrationsScimGroupListResponseResourcesList", + "traits": { + "smithy.api#documentation": "Array of group resources", + "smithy.api#required": {} + } + }, + "itemsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results returned in the current set", + "smithy.api#required": {} + } + }, + "schemas": { + "target": "com.remote.api#IntegrationsScimGroupListResponseSchemasList", + "traits": { + "smithy.api#documentation": "SCIM schema identifiers", + "smithy.api#required": {} + } + }, + "startIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "1-based index of the first result in the current set", + "smithy.api#required": {} + } + }, + "totalResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of results matching the query", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimGroup": { + "type": "structure", + "members": { + "displayName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Display name of the group", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the group", + "smithy.api#required": {} + } + }, + "members": { + "target": "com.remote.api#IntegrationsScimGroupMembersList", + "traits": { + "smithy.api#documentation": "Array of group members (per RFC 7643)", + "smithy.api#required": {} + } + }, + "meta": { + "target": "com.remote.api#IntegrationsScimGroupMeta" + }, + "schemas": { + "target": "com.remote.api#IntegrationsScimGroupSchemasList", + "traits": { + "smithy.api#documentation": "SCIM schema identifiers", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimGroupMembersItem": { + "type": "structure", + "members": { + "_ref": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URI of the user resource", + "smithy.api#jsonName": "$ref" + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Display name of the user" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User ID (slug)", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimGroupMembersList": { + "type": "list", + "member": { + "target": "com.remote.api#IntegrationsScimGroupMembersItem" + }, + "traits": { + "smithy.api#documentation": "Array of group members (per RFC 7643)" + } + }, + "com.remote.api#IntegrationsScimGroupMeta": { + "type": "structure", + "members": { + "created": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Creation timestamp" + } + }, + "lastModified": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last modification timestamp" + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource type" + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimGroupSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "SCIM schema identifiers" + } + }, + "com.remote.api#IntegrationsScimGroupListResponseResourcesList": { + "type": "list", + "member": { + "target": "com.remote.api#IntegrationsScimGroup" + }, + "traits": { + "smithy.api#documentation": "Array of group resources" + } + }, + "com.remote.api#IntegrationsScimGroupListResponseSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "SCIM schema identifiers" + } + }, + "com.remote.api#GetV1ScimV2Groups": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ScimV2GroupsRequest" + }, + "output": { + "target": "com.remote.api#IntegrationsScimGroupListResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/scim/v2/Groups", + "code": 200 + }, + "smithy.api#documentation": "List groups via SCIM v2.0\n\nRetrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard" + } + }, + "com.remote.api#GetV1ScimV2GroupsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Group ID (slug)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ScimV2GroupsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ScimV2GroupsIdRequest" + }, + "output": { + "target": "com.remote.api#IntegrationsScimGroup" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/scim/v2/Groups/{id}", + "code": 200 + }, + "smithy.api#documentation": "Get group by ID via SCIM v2.0\n\nRetrieves a single group (department) for the authenticated company by group ID" + } + }, + "com.remote.api#GetV1ScimV2UsersRequest": { + "type": "structure", + "members": { + "startIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "startIndex", + "smithy.api#documentation": "1-based index of the first result" + } + }, + "count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "count", + "smithy.api#documentation": "Maximum number of results per page" + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter", + "smithy.api#documentation": "Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#IntegrationsScimUserListResponse": { + "type": "structure", + "members": { + "Resources": { + "target": "com.remote.api#IntegrationsScimUserListResponseResourcesList", + "traits": { + "smithy.api#documentation": "Array of user resources", + "smithy.api#required": {} + } + }, + "itemsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results returned in the current set", + "smithy.api#required": {} + } + }, + "schemas": { + "target": "com.remote.api#IntegrationsScimUserListResponseSchemasList", + "traits": { + "smithy.api#documentation": "SCIM schema identifiers", + "smithy.api#required": {} + } + }, + "startIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "1-based index of the first result in the current set", + "smithy.api#required": {} + } + }, + "totalResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of results matching the query", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimUser": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the user is active", + "smithy.api#required": {} + } + }, + "displayName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name to display for the user" + } + }, + "emails": { + "target": "com.remote.api#IntegrationsScimUserEmailsList", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the user", + "smithy.api#required": {} + } + }, + "meta": { + "target": "com.remote.api#IntegrationsScimUserMeta" + }, + "name": { + "target": "com.remote.api#IntegrationsScimUserName", + "traits": { + "smithy.api#required": {} + } + }, + "nickName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The casual/preferred name for the user" + } + }, + "schemas": { + "target": "com.remote.api#IntegrationsScimUserSchemasList", + "traits": { + "smithy.api#documentation": "SCIM schema identifiers", + "smithy.api#required": {} + } + }, + "urn_ietf_params_scim_schemas_extension_enterprise_2_0_User": { + "target": "com.remote.api#IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User", + "traits": { + "smithy.api#documentation": "Enterprise User extension attributes (RFC 7643 §4.3)", + "smithy.api#jsonName": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" + } + }, + "userName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Username for the user", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimUserEmailsItem": { + "type": "structure", + "members": { + "primary": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this is the primary email" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Type of email (e.g., 'work')", + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Email address", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimUserEmailsList": { + "type": "list", + "member": { + "target": "com.remote.api#IntegrationsScimUserEmailsItem" + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimUserMeta": { + "type": "structure", + "members": { + "created": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Creation timestamp" + } + }, + "lastModified": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last modification timestamp" + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource type" + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimUserName": { + "type": "structure", + "members": { + "familyName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last name", + "smithy.api#required": {} + } + }, + "formatted": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Full name" + } + }, + "givenName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "First name", + "smithy.api#required": {} + } + }, + "honorificPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Salutation, e.g. 'Ms', 'Mr'" + } + } + }, + "traits": {} + }, + "com.remote.api#IntegrationsScimUserSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "SCIM schema identifiers" + } + }, + "com.remote.api#IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager": { + "type": "structure", + "members": { + "_ref": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The URI of the SCIM resource representing the user's manager", + "smithy.api#jsonName": "$ref" + } + }, + "displayName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The displayName of the user's manager" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the SCIM resource representing the user's manager" + } + } + }, + "traits": { + "smithy.api#documentation": "The user's manager" + } + }, + "com.remote.api#IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User": { + "type": "structure", + "members": { + "department": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifies the name of a department" + } + }, + "employeeNumber": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Numeric or alphanumeric identifier assigned to a person", + "com.distilled.openapi#nullable": {} + } + }, + "manager": { + "target": "com.remote.api#IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager", + "traits": { + "smithy.api#documentation": "The user's manager" + } + } + }, + "traits": { + "smithy.api#documentation": "Enterprise User extension attributes (RFC 7643 §4.3)" + } + }, + "com.remote.api#IntegrationsScimUserListResponseResourcesList": { + "type": "list", + "member": { + "target": "com.remote.api#IntegrationsScimUser" + }, + "traits": { + "smithy.api#documentation": "Array of user resources" + } + }, + "com.remote.api#IntegrationsScimUserListResponseSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "SCIM schema identifiers" + } + }, + "com.remote.api#GetV1ScimV2Users": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ScimV2UsersRequest" + }, + "output": { + "target": "com.remote.api#IntegrationsScimUserListResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/scim/v2/Users", + "code": 200 + }, + "smithy.api#documentation": "List users via SCIM v2.0\n\nRetrieves a list of users for the authenticated company following SCIM 2.0 standard" + } + }, + "com.remote.api#GetV1ScimV2UsersIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "User ID (slug)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1ScimV2UsersId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1ScimV2UsersIdRequest" + }, + "output": { + "target": "com.remote.api#IntegrationsScimUser" + }, + "errors": [ + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/scim/v2/Users/{id}", + "code": 200 + }, + "smithy.api#documentation": "Get user by ID via SCIM v2.0\n\nRetrieves a single user for the authenticated company by user ID" + } + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequestErrorCategory": { + "type": "enum", + "members": { + "RENDER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RENDER_ERROR" + } + }, + "NETWORK_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NETWORK_ERROR" + } + }, + "VALIDATION_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VALIDATION_ERROR" + } + }, + "STATE_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STATE_ERROR" + } + }, + "HOOK_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HOOK_ERROR" + } + }, + "RUNTIME_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNTIME_ERROR" + } + }, + "UNKNOWN_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN_ERROR" + } + } + }, + "traits": { + "smithy.api#documentation": "Error category" + } + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequestErrorComponentStackList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Component Stack" + } + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequestErrorSeverity": { + "type": "enum", + "members": { + "CRITICAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "critical" + } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "error" + } + }, + "WARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "warning" + } + }, + "INFO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "info" + } + } + }, + "traits": { + "smithy.api#documentation": "Error severity" + } + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequestError": { + "type": "structure", + "members": { + "category": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequestErrorCategory", + "traits": { + "smithy.api#documentation": "Error category", + "smithy.api#required": {} + } + }, + "component_stack": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequestErrorComponentStackList", + "traits": { + "smithy.api#documentation": "Component Stack", + "com.distilled.openapi#nullable": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Error message", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Error name", + "smithy.api#required": {} + } + }, + "severity": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequestErrorSeverity", + "traits": { + "smithy.api#documentation": "Error severity", + "smithy.api#required": {} + } + }, + "stack": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Stack Trace", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequestMetadataEnvironment": { + "type": "enum", + "members": { + "PRODUCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "production" + } + }, + "STAGING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "staging" + } + }, + "LOCAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "local" + } + }, + "PARTNERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "partners" + } + }, + "SANDBOX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sandbox" + } + } + }, + "traits": { + "smithy.api#documentation": "SDK runtime environment" + } + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequestMetadata": { + "type": "structure", + "members": { + "environment": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequestMetadataEnvironment", + "traits": { + "smithy.api#documentation": "SDK runtime environment", + "smithy.api#required": {} + } + }, + "sdk_version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "SDK Version", + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Client Timestamp", + "smithy.api#required": {} + } + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Client URL", + "smithy.api#required": {} + } + }, + "user_agent": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User Agent", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1SdkTelemetryErrorsRequest": { + "type": "structure", + "members": { + "context": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Context", + "com.distilled.openapi#nullable": {} + } + }, + "error": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequestError", + "traits": { + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequestMetadata", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1SdkTelemetryErrors": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SdkTelemetryErrorsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sdk/telemetry-errors", + "code": 200 + }, + "smithy.api#documentation": "Report SDK errors\n\nReceives error telemetry from the frontend SDK.\nErrors are logged to observability backend for monitoring and debugging." + } + }, + "com.remote.api#SSOConfigurationResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#SSOConfiguration" + } + }, + "traits": { + "smithy.api#documentation": "SSO Configuration response" + } + }, + "com.remote.api#SSOConfiguration": { + "type": "structure", + "members": { + "audience_uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The audience URI (Entity ID) for SAML assertions.", + "smithy.api#required": {} + } + }, + "domain": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email domain(s) that should be routed through SSO. Multiple domains can be comma-separated (e.g., \"company.com,company.co.uk\").", + "smithy.api#required": {} + } + }, + "identity_provider_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The URL of the company's SAML identity provider (IdP) login endpoint.", + "smithy.api#required": {} + } + }, + "sso_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The SSO login callback URL (Assertion Consumer Service URL).", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A complete SSO configuration for a company, including both Remote-generated values (sso_url, audience_uri) and company-provided values (domain, identity_provider_url)." + } + }, + "com.remote.api#GetV1SsoConfiguration": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#SSOConfigurationResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/sso-configuration", + "code": 200 + }, + "smithy.api#documentation": "Show the current SSO Configuration\n\nShows the current SSO Configuration for the company.\n\n## Scopes" + } + }, + "com.remote.api#PostV1SsoConfigurationRequest": { + "type": "structure", + "members": { + "certificate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The SAML signing certificate from your identity provider, base64-encoded.", + "smithy.api#required": {} + } + }, + "domain": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The email domain(s) to route through SSO (e.g., \"example.com\").", + "smithy.api#required": {} + } + }, + "identity_provider_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The URL of the SAML identity provider login endpoint.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#CreateSSOConfigurationResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#CreateSSOConfigurationResult", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#CreateSSOConfigurationResult": { + "type": "structure", + "members": { + "audience_uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "certificate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "domain": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "identity_provider_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "sso_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1SsoConfiguration": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1SsoConfigurationRequest" + }, + "output": { + "target": "com.remote.api#CreateSSOConfigurationResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/sso-configuration", + "code": 200 + }, + "smithy.api#documentation": "Create the SSO Configuration\n\nCreates the SSO Configuration for the company.\n\n## Scopes" + } + }, + "com.remote.api#SSOConfigurationDetailsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#SSOConfigurationDetails" + } + }, + "traits": { + "smithy.api#documentation": "SSO Configuration Details response" + } + }, + "com.remote.api#SSOConfigurationDetails": { + "type": "structure", + "members": { + "audience_uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The audience URI (Entity ID) for the SAML assertion. Configure this in your identity provider's SAML settings.", + "smithy.api#required": {} + } + }, + "sso_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The SSO login callback URL. Configure this as the Assertion Consumer Service (ACS) URL in your identity provider.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The SSO configuration details needed to set up your identity provider (IdP) to connect with Remote." + } + }, + "com.remote.api#GetV1SsoConfigurationDetails": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.remote.api#SSOConfigurationDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/sso-configuration/details", + "code": 200 + }, + "smithy.api#documentation": "Show the SSO Configuration Details\n\nShows the SSO Configuration details for the company.\n\n## Scopes" + } + }, + "com.remote.api#GetV1TestSchemaRequestJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV1TestSchemaRequestJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV1TestSchemaRequestJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV1TestSchemaRequest": { + "type": "structure", + "members": { + "json_schema_version": { + "target": "com.remote.api#GetV1TestSchemaRequestJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "json_schema_version", + "smithy.api#documentation": "Version of the form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1TestSchema": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TestSchemaRequest" + }, + "output": { + "target": "com.remote.api#CompanyFormResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/test-schema", + "code": 200 + }, + "smithy.api#documentation": "Get a mock JSON Schema\n\nGet a mock JSON Schema for testing purposes" + } + }, + "com.remote.api#TimeoffStatus2": { + "type": "enum", + "members": { + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined" + } + }, + "REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requested" + } + }, + "TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "taken" + } + }, + "CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancel_requested" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of a time off request.\n\n- `requested`: The employee has submitted a time off request and it is awaiting approval.\n- `approved`: The time off request has been approved by a manager.\n- `cancelled`: The time off request was cancelled by the employee or an admin.\n- `declined`: The time off request was declined by a manager.\n- `taken`: The approved time off has been taken (the dates have passed).\n- `cancel_requested`: The employee has requested cancellation of a previously approved time off, pending manager approval.\n" + } + }, + "com.remote.api#GetV1TimeoffRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TimeoffRequestSortBy": { + "type": "enum", + "members": { + "TIMEOFF_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff_type" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "status" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TimeoffRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Only show time off for a specific employment" + } + }, + "timeoff_type": { + "target": "com.remote.api#TimeoffType", + "traits": { + "smithy.api#httpQuery": "timeoff_type", + "smithy.api#documentation": "Filter time off by its type" + } + }, + "status": { + "target": "com.remote.api#TimeoffStatus2", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter time off by its status" + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start_date", + "smithy.api#documentation": "ISO 8601 date. When combined with `end_date`, returns all time off records that overlap the `[start_date, end_date]` window — including records that only partially overlap at either boundary. When used alone, returns records whose `start_date` is on or after this date.\n" + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "end_date", + "smithy.api#documentation": "ISO 8601 date. When combined with `start_date`, returns all time off records that overlap the `[start_date, end_date]` window — including records that only partially overlap at either boundary. When used alone, returns records whose `end_date` is on or before this date.\n" + } + }, + "order": { + "target": "com.remote.api#GetV1TimeoffRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "sort_by": { + "target": "com.remote.api#GetV1TimeoffRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1Timeoff": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TimeoffRequest" + }, + "output": { + "target": "com.remote.api#ListTimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/timeoff", + "code": 200 + }, + "smithy.api#documentation": "List Time Off\n\nLists all Time Off records.\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimeoffRequestTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDaysParams" + }, + "traits": {} + }, + "com.remote.api#PostV1TimeoffRequestStatus": { + "type": "enum", + "members": { + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1TimeoffRequest": { + "type": "structure", + "members": { + "document": { + "target": "com.remote.api#TimeoffDocumentParams" + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "leave_policy_variant_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "UUID of a custom company leave policy assigned to the employment. Use this field instead of `timeoff_type` when creating time off against a custom leave policy. Discover available custom leave policy UUIDs via `GET /v1/leave-policies/details/{employment_id}`." + } + }, + "notes": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "timeoff_days": { + "target": "com.remote.api#PostV1TimeoffRequestTimeoffDaysList", + "traits": { + "smithy.api#required": {} + } + }, + "timeoff_type": { + "target": "com.remote.api#TimeoffType" + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "approved_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "approver_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#PostV1TimeoffRequestStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1Timeoff": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimeoffRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timeoff", + "code": 200 + }, + "smithy.api#documentation": "Create Time Off\n\nCreates a Time Off record\n\n## Scopes" + } + }, + "com.remote.api#TimeoffTypesEmploymentType": { + "type": "enum", + "members": { + "CONTRACTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor" + } + }, + "FULL_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full_time" + } + } + }, + "traits": { + "smithy.api#documentation": "Optional query parameter for the List Time Off Types endpoint.\n- `contractor` — time off types for contractor employments (e.g. includes `time_off`).\n- `full_time` — time off types for full-time employments (e.g. includes `paid_time_off`).\nWhen omitted, the response is unchanged from previous API versions (full-time types).\n" + } + }, + "com.remote.api#GetV1TimeoffTypesRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.remote.api#TimeoffTypesEmploymentType", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types)." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListTimeoffTypesResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListTimeoffTypesResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Time off types response" + } + }, + "com.remote.api#TimeoffTypeResponse": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "com.remote.api#TimeoffType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A single time off type with name and description" + } + }, + "com.remote.api#ListTimeoffTypesResponseDataTimeoffTypesList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffTypeResponse" + }, + "traits": { + "smithy.api#documentation": "List of time off types available for the requested employment type" + } + }, + "com.remote.api#ListTimeoffTypesResponseData": { + "type": "structure", + "members": { + "timeoff_types": { + "target": "com.remote.api#ListTimeoffTypesResponseDataTimeoffTypesList", + "traits": { + "smithy.api#documentation": "List of time off types available for the requested employment type", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TimeoffTypes": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TimeoffTypesRequest" + }, + "output": { + "target": "com.remote.api#ListTimeoffTypesResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/timeoff/types", + "code": 200 + }, + "smithy.api#documentation": "List Time Off Types\n\nLists all time off types that can be used for the `timeoff_type` parameter.\n\n**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.\n\nOptionally, pass `type=contractor` to get time off types for contractor employments, or `type=full_time` for full-time employments (same as omitting the parameter).\n\n\n## Scopes" + } + }, + "com.remote.api#GetV1TimeoffIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timeoff ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV1TimeoffId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TimeoffIdRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/timeoff/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Time Off\n\nShows a single Time Off record\n\n## Scopes" + } + }, + "com.remote.api#PatchV1TimeoffIdRequestStatus": { + "type": "enum", + "members": { + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1TimeoffIdRequestTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDaysParams" + }, + "traits": {} + }, + "com.remote.api#PatchV1TimeoffIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timeoff ID" + } + }, + "approved_at": { + "target": "smithy.api#String" + }, + "approver_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cancel_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for cancelling a time off. Required when updating to status `cancelled`.", + "smithy.api#required": {} + } + }, + "document": { + "target": "com.remote.api#TimeoffDocumentParams" + }, + "edit_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the update. Required when updating the time off data but not changing the status.", + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String" + }, + "notes": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.remote.api#PatchV1TimeoffIdRequestStatus" + }, + "timeoff_days": { + "target": "com.remote.api#PatchV1TimeoffIdRequestTimeoffDaysList" + }, + "timeoff_type": { + "target": "com.remote.api#TimeoffType" + }, + "timezone": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1TimeoffId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1TimeoffIdRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/timeoff/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update Time Off\n\nUpdates a Time Off record.\nWarning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025.\nTo approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead.\n\n\n## Scopes" + } + }, + "com.remote.api#PatchV1TimeoffId2RequestStatus": { + "type": "enum", + "members": { + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1TimeoffId2RequestTimeoffDaysList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeoffDaysParams" + }, + "traits": {} + }, + "com.remote.api#PatchV1TimeoffId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timeoff ID" + } + }, + "approved_at": { + "target": "smithy.api#String" + }, + "approver_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cancel_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for cancelling a time off. Required when updating to status `cancelled`.", + "smithy.api#required": {} + } + }, + "document": { + "target": "com.remote.api#TimeoffDocumentParams" + }, + "edit_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the update. Required when updating the time off data but not changing the status.", + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String" + }, + "notes": { + "target": "smithy.api#String" + }, + "start_date": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.remote.api#PatchV1TimeoffId2RequestStatus" + }, + "timeoff_days": { + "target": "com.remote.api#PatchV1TimeoffId2RequestTimeoffDaysList" + }, + "timeoff_type": { + "target": "com.remote.api#TimeoffType" + }, + "timezone": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1TimeoffId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1TimeoffId2Request" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/timeoff/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update Time Off\n\nUpdates a Time Off record.\nWarning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025.\nTo approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdApproveRequest": { + "type": "structure", + "members": { + "timeoff_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Time Off ID" + } + }, + "approver_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdApprove": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimeoffTimeoffIdApproveRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timeoff/{timeoff_id}/approve", + "code": 200 + }, + "smithy.api#documentation": "Approve Time Off\n\nApprove a time off request.\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdCancelRequest": { + "type": "structure", + "members": { + "timeoff_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Time Off ID" + } + }, + "cancel_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdCancel": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimeoffTimeoffIdCancelRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timeoff/{timeoff_id}/cancel", + "code": 200 + }, + "smithy.api#documentation": "Cancel Time Off\n\nCancel a time off request that was already approved.\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestApproveRequest": { + "type": "structure", + "members": { + "timeoff_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Time Off ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestApprove": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestApproveRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timeoff/{timeoff_id}/cancel-request/approve", + "code": 200 + }, + "smithy.api#documentation": "Approve a time off cancellation request\n\nApprove a time off cancellation request.\nIn order to approve a time off cancellation request, the timeoff status must be `cancel_requested`.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestDeclineRequest": { + "type": "structure", + "members": { + "timeoff_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Time Off ID" + } + }, + "decline_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestDecline": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestDeclineRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timeoff/{timeoff_id}/cancel-request/decline", + "code": 200 + }, + "smithy.api#documentation": "Decline a time off cancellation request\n\nDecline a time off cancellation request.\n\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdDeclineRequest": { + "type": "structure", + "members": { + "timeoff_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Time Off ID" + } + }, + "decline_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1TimeoffTimeoffIdDecline": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimeoffTimeoffIdDeclineRequest" + }, + "output": { + "target": "com.remote.api#TimeoffResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timeoff/{timeoff_id}/decline", + "code": 200 + }, + "smithy.api#documentation": "Decline Time Off\n\nDecline a time off request. Please note that only time off requests on the `requested` status can be declined.\n\n## Scopes" + } + }, + "com.remote.api#TimesheetStatus": { + "type": "enum", + "members": { + "OPEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "open" + } + }, + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "IN_CALIBRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_calibration" + } + }, + "PROCESSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processed" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of a timesheet in its lifecycle.\n\n- `open`: The timesheet is a draft and only visible to the employee. It has not been submitted yet.\n- `submitted`: The employee has submitted the timesheet for review. It is awaiting approval.\n- `approved`: The timesheet has been approved and will be included in the next payroll run.\n- `in_calibration`: The timesheet was sent back to the employee for revision. The employee needs to correct and resubmit it.\n- `processed`: The timesheet has been processed as part of a payroll run. This is a terminal state.\n" + } + }, + "com.remote.api#GetV1TimesheetsRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TimesheetsRequestSortBy": { + "type": "enum", + "members": { + "SUBMITTED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted_at" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TimesheetsRequest": { + "type": "structure", + "members": { + "status": { + "target": "com.remote.api#TimesheetStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter timesheets by their status" + } + }, + "order": { + "target": "com.remote.api#GetV1TimesheetsRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "sort_by": { + "target": "com.remote.api#GetV1TimesheetsRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListTimesheetsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListTimesheetsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many timesheets" + } + }, + "com.remote.api#Timesheet": { + "type": "structure", + "members": { + "approval_required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {} + } + }, + "break_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "holiday_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "night_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional notes added by the employee when submitting the timesheet.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "on_call_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "overtime_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "regular_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#TimesheetStatus", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the employee submitted this timesheet for approval. Null if the timesheet has not been submitted yet (status is `open`).", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "time_trackings": { + "target": "com.remote.api#TimesheetTimeTrackingsList", + "traits": { + "smithy.api#documentation": "The individual time tracking entries that make up this timesheet.", + "smithy.api#required": {} + } + }, + "timeoff_hours": { + "target": "com.remote.api#HoursAndMinutes" + }, + "total_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "unpaid_break_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "weekend_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#TimeTracking": { + "type": "structure", + "members": { + "clock_in": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "clock_out": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "has_holiday_hours": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this time tracking entry includes any hours worked on public holidays.", + "smithy.api#required": {} + } + }, + "has_night_hours": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this time tracking entry includes any hours worked during night hours.", + "smithy.api#required": {} + } + }, + "has_weekend_hours": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this time tracking entry includes any hours worked on weekends.", + "smithy.api#required": {} + } + }, + "holiday_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "night_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional free-text notes about this time tracking entry, such as project or task details.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "time_breakdown": { + "target": "com.remote.api#TimeBreakdown", + "traits": { + "smithy.api#required": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "total_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.remote.api#TimeTrackingType", + "traits": { + "smithy.api#documentation": "The category of time being tracked (e.g., regular hours, overtime, on-call, break time).", + "smithy.api#required": {} + } + }, + "weekend_hours": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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)." + } + }, + "com.remote.api#TimeBreakdown": { + "type": "structure", + "members": { + "day": { + "target": "com.remote.api#TypeOfDayBreakdown", + "traits": { + "smithy.api#required": {} + } + }, + "night": { + "target": "com.remote.api#TypeOfDayBreakdown", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#TypeOfDayBreakdown": { + "type": "structure", + "members": { + "holiday": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "regular": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + }, + "weekend": { + "target": "com.remote.api#HoursAndMinutes", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Hours breakdown by type of day (regular working day, weekend, or public holiday) for a specific time of day (day or night)." + } + }, + "com.remote.api#TimeTrackingType": { + "type": "enum", + "members": { + "REGULAR_HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "regular_hours" + } + }, + "OVERTIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "overtime" + } + }, + "ON_CALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "on_call" + } + }, + "BREAK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "break" + } + }, + "UNPAID_BREAK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unpaid_break" + } + }, + "TIME_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "time_off" + } + }, + "PUBLIC_HOLIDAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public_holiday" + } + } + }, + "traits": { + "smithy.api#documentation": "The category of time being tracked (e.g., regular hours, overtime, on-call, break time)." + } + }, + "com.remote.api#TimesheetTimeTrackingsList": { + "type": "list", + "member": { + "target": "com.remote.api#TimeTracking" + }, + "traits": { + "smithy.api#documentation": "The individual time tracking entries that make up this timesheet." + } + }, + "com.remote.api#ListTimesheetsResponseDataTimesheetsList": { + "type": "list", + "member": { + "target": "com.remote.api#Timesheet" + }, + "traits": {} + }, + "com.remote.api#ListTimesheetsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "timesheets": { + "target": "com.remote.api#ListTimesheetsResponseDataTimesheetsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1Timesheets": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TimesheetsRequest" + }, + "output": { + "target": "com.remote.api#ListTimesheetsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/timesheets", + "code": 200 + }, + "smithy.api#documentation": "List timesheets\n\nLists all timesheets.\n\n## Scopes" + } + }, + "com.remote.api#GetV1TimesheetsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timesheet ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#TimesheetResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#TimesheetResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a full timesheet with all hour breakdowns and time tracking entries." + } + }, + "com.remote.api#TimesheetResponseData": { + "type": "structure", + "members": { + "timesheet": { + "target": "com.remote.api#Timesheet", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TimesheetsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TimesheetsIdRequest" + }, + "output": { + "target": "com.remote.api#TimesheetResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/timesheets/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show timesheet\n\nShows a timesheet by its ID.\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimesheetsTimesheetIdApproveRequest": { + "type": "structure", + "members": { + "timesheet_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timesheet ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#MinimalTimesheetResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#MinimalTimesheetResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a minimal timesheet representation, returned after create and approve operations." + } + }, + "com.remote.api#MinimalTimesheet": { + "type": "structure", + "members": { + "approval_required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this timesheet requires explicit approval before processing.", + "smithy.api#required": {} + } + }, + "country_code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "end_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional notes added by the employee.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "start_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#TimesheetStatus", + "traits": { + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the employee submitted this timesheet. Null if not yet submitted.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#MinimalTimesheetResponseData": { + "type": "structure", + "members": { + "timesheet": { + "target": "com.remote.api#MinimalTimesheet", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1TimesheetsTimesheetIdApprove": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimesheetsTimesheetIdApproveRequest" + }, + "output": { + "target": "com.remote.api#MinimalTimesheetResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timesheets/{timesheet_id}/approve", + "code": 200 + }, + "smithy.api#documentation": "Approve timesheet\n\nApproves the given timesheet.\n\n## Scopes" + } + }, + "com.remote.api#PostV1TimesheetsTimesheetIdSendBackRequest": { + "type": "structure", + "members": { + "timesheet_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Timesheet ID" + } + }, + "sent_back_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A required explanation of why the timesheet is being sent back. This will be visible to the employee.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#SentBackTimesheetResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#SentBackTimesheetResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response returned after a timesheet has been sent back to the employee for revision." + } + }, + "com.remote.api#SentBackTimesheet": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "sent_back": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Always `true` for sent-back timesheets, indicating the timesheet was returned for revision.", + "smithy.api#required": {} + } + }, + "sent_back_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason provided by the reviewer for why the timesheet needs to be revised.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#TimesheetStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#SentBackTimesheetResponseData": { + "type": "structure", + "members": { + "timesheet": { + "target": "com.remote.api#SentBackTimesheet", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1TimesheetsTimesheetIdSendBack": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1TimesheetsTimesheetIdSendBackRequest" + }, + "output": { + "target": "com.remote.api#SentBackTimesheetResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/timesheets/{timesheet_id}/send-back", + "code": 200 + }, + "smithy.api#documentation": "Send back a timesheet for review or modification\n\nSends the given timesheet back to the employee for review or modification.\n\n## Scopes" + } + }, + "com.remote.api#GetV1TravelLetterRequestsRequestStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_manager" + } + }, + "DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_remote" + } + }, + "APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_manager" + } + }, + "APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_remote" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TravelLetterRequestsRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TravelLetterRequestsRequestSortBy": { + "type": "enum", + "members": { + "SUBMITTED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted_at" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TravelLetterRequestsRequest": { + "type": "structure", + "members": { + "status": { + "target": "com.remote.api#GetV1TravelLetterRequestsRequestStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter results on the given status" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter results on the given employment slug" + } + }, + "employee_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employee_name", + "smithy.api#documentation": "Filter results on the given employee name" + } + }, + "order": { + "target": "com.remote.api#GetV1TravelLetterRequestsRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "sort_by": { + "target": "com.remote.api#GetV1TravelLetterRequestsRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListTravelLettersResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListTravelLettersResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many travel_letter_requests" + } + }, + "com.remote.api#TravelLetterRequest": { + "type": "structure", + "members": { + "additional_information": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional information provided by the employee about their travel plans.", + "smithy.api#required": {} + } + }, + "destination_country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "embassy_address": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The address of the embassy or consulate where the travel letter will be submitted.", + "smithy.api#required": {} + } + }, + "employer_approver": { + "target": "com.remote.api#TravelLetterUser", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employer_special_instructions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Special instructions from the employer to include in the travel letter. Null if none provided.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the travel letter request.", + "smithy.api#required": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The purpose of the travel (e.g., business meeting, conference, client visit).", + "smithy.api#required": {} + } + }, + "requires_travel_address": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the employee needs to provide a specific travel address (accommodation address at the destination).", + "smithy.api#required": {} + } + }, + "responsible_for_accommodation_cost": { + "target": "com.remote.api#TravelLetterRequestResponsibleForAccommodationCost", + "traits": { + "smithy.api#documentation": "Who is responsible for accommodation costs during the trip. Set by the employer during approval. Null if not yet approved.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "responsible_for_meal_cost": { + "target": "com.remote.api#TravelLetterRequestResponsibleForMealCost", + "traits": { + "smithy.api#documentation": "Who is responsible for meal costs during the trip. Set by the employer during approval. Null if not yet approved.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "responsible_for_travel_cost": { + "target": "com.remote.api#TravelLetterRequestResponsibleForTravelCost", + "traits": { + "smithy.api#documentation": "Who is responsible for transportation costs. Set by the employer during approval. Null if not yet approved.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#TravelLetterRequestStatus", + "traits": { + "smithy.api#documentation": "The current status of the travel letter request.\n\n- `pending`: Submitted by the employee and awaiting manager review.\n- `cancelled`: Cancelled by the employee before approval.\n- `declined_by_manager`: The employer manager declined the request.\n- `declined_by_remote`: Remote declined the request after manager approval (e.g., compliance reasons).\n- `approved_by_manager`: Approved by the employer manager, awaiting Remote's review.\n- `approved_by_remote`: Fully approved by both the manager and Remote. The travel letter will be generated.\n", + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "travel_address": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's accommodation address at the destination. Null if `requires_travel_address` is false or not yet provided.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "travel_date_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "travel_date_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "travel_document_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's travel document (passport) number.", + "smithy.api#required": {} + } + }, + "travel_reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The category of travel reason selected by the employee.", + "smithy.api#required": {} + } + }, + "travel_reason_details": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Detailed explanation of the travel reason provided by the employee.", + "smithy.api#required": {} + } + }, + "user": { + "target": "com.remote.api#TravelLetterUser", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#TravelLetterUser": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user's email address.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the user.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user's full name.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A user associated with a travel letter request (either the employee or the employer approver)." + } + }, + "com.remote.api#TravelLetterRequestResponsibleForAccommodationCost": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": { + "smithy.api#documentation": "Who is responsible for accommodation costs during the trip. Set by the employer during approval. Null if not yet approved." + } + }, + "com.remote.api#TravelLetterRequestResponsibleForMealCost": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": { + "smithy.api#documentation": "Who is responsible for meal costs during the trip. Set by the employer during approval. Null if not yet approved." + } + }, + "com.remote.api#TravelLetterRequestResponsibleForTravelCost": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": { + "smithy.api#documentation": "Who is responsible for transportation costs. Set by the employer during approval. Null if not yet approved." + } + }, + "com.remote.api#TravelLetterRequestStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_manager" + } + }, + "DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_remote" + } + }, + "APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_manager" + } + }, + "APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_remote" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the travel letter request.\n\n- `pending`: Submitted by the employee and awaiting manager review.\n- `cancelled`: Cancelled by the employee before approval.\n- `declined_by_manager`: The employer manager declined the request.\n- `declined_by_remote`: Remote declined the request after manager approval (e.g., compliance reasons).\n- `approved_by_manager`: Approved by the employer manager, awaiting Remote's review.\n- `approved_by_remote`: Fully approved by both the manager and Remote. The travel letter will be generated.\n" + } + }, + "com.remote.api#ListTravelLettersResponseDataTravelLetterRequestsList": { + "type": "list", + "member": { + "target": "com.remote.api#TravelLetterRequest" + }, + "traits": {} + }, + "com.remote.api#ListTravelLettersResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + }, + "travel_letter_requests": { + "target": "com.remote.api#ListTravelLettersResponseDataTravelLetterRequestsList" + } + }, + "traits": {} + }, + "com.remote.api#GetV1TravelLetterRequests": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TravelLetterRequestsRequest" + }, + "output": { + "target": "com.remote.api#ListTravelLettersResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/travel-letter-requests", + "code": 200 + }, + "smithy.api#documentation": "List travel letter requests\n\nList travel letter requests.\n\n## Scopes" + } + }, + "com.remote.api#GetV1TravelLetterRequestsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "travel letter request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#TravelLetterResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#TravelLetterResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for travel letter request" + } + }, + "com.remote.api#TravelLetterResponseData": { + "type": "structure", + "members": { + "travel_letter_request": { + "target": "com.remote.api#TravelLetterRequest", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1TravelLetterRequestsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1TravelLetterRequestsIdRequest" + }, + "output": { + "target": "com.remote.api#TravelLetterResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/travel-letter-requests/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show travel letter request\n\nShow a single travel letter request.\n\n## Scopes" + } + }, + "com.remote.api#UpdateTravelLetterRequestParams": { + "type": "union", + "members": { + "ApprovedTravelLetter": { + "target": "com.remote.api#ApprovedTravelLetter" + }, + "DeclinedTravelLetter": { + "target": "com.remote.api#DeclinedTravelLetter" + } + }, + "traits": { + "smithy.api#documentation": "Schema for updating travel letter request parameters" + } + }, + "com.remote.api#ApprovedTravelLetter": { + "type": "structure", + "members": { + "employer_special_instructions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "responsible_for_accommodation_cost": { + "target": "com.remote.api#ApprovedTravelLetterResponsibleForAccommodationCost", + "traits": { + "smithy.api#required": {} + } + }, + "responsible_for_meal_cost": { + "target": "com.remote.api#ApprovedTravelLetterResponsibleForMealCost", + "traits": { + "smithy.api#required": {} + } + }, + "responsible_for_travel_cost": { + "target": "com.remote.api#ApprovedTravelLetterResponsibleForTravelCost", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#ApprovedTravelLetterStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for approved travel letter" + } + }, + "com.remote.api#ApprovedTravelLetterResponsibleForAccommodationCost": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": {} + }, + "com.remote.api#ApprovedTravelLetterResponsibleForMealCost": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": {} + }, + "com.remote.api#ApprovedTravelLetterResponsibleForTravelCost": { + "type": "enum", + "members": { + "EMPLOYEE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employee" + } + }, + "EMPLOYER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employer" + } + } + }, + "traits": {} + }, + "com.remote.api#ApprovedTravelLetterStatus": { + "type": "enum", + "members": { + "APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_manager" + } + } + }, + "traits": {} + }, + "com.remote.api#DeclinedTravelLetter": { + "type": "structure", + "members": { + "employer_special_instructions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#DeclinedTravelLetterStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for declined travel letter" + } + }, + "com.remote.api#DeclinedTravelLetterStatus": { + "type": "enum", + "members": { + "DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_manager" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1TravelLetterRequestsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Travel letter Request ID" + } + }, + "body": { + "target": "com.remote.api#UpdateTravelLetterRequestParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1TravelLetterRequestsId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1TravelLetterRequestsIdRequest" + }, + "output": { + "target": "com.remote.api#TravelLetterResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/travel-letter-requests/{id}", + "code": 200 + }, + "smithy.api#documentation": "Updates a travel letter request\n\nUpdates a travel letter request\n\n## Scopes" + } + }, + "com.remote.api#PatchV1TravelLetterRequestsId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Travel letter Request ID" + } + }, + "body": { + "target": "com.remote.api#UpdateTravelLetterRequestParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1TravelLetterRequestsId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1TravelLetterRequestsId2Request" + }, + "output": { + "target": "com.remote.api#TravelLetterResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/travel-letter-requests/{id}", + "code": 200 + }, + "smithy.api#documentation": "Updates a travel letter request\n\nUpdates a travel letter request\n\n## Scopes" + } + }, + "com.remote.api#PostV1WebhookCallbacksRequestSubscribedEventsItem": { + "type": "enum", + "members": { + "BACKGROUND_CHECK_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "background_check.status.updated" + } + }, + "BENEFIT_RENEWAL_REQUEST_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "benefit_renewal_request.created" + } + }, + "BILLING_DOCUMENT_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "billing_document.issued" + } + }, + "COMPANY_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.activated" + } + }, + "COMPANY_MANAGER_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_created" + } + }, + "COMPANY_MANAGER_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_deleted" + } + }, + "COMPANY_MANAGER_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_updated" + } + }, + "COMPANY_OWNER_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.owner_changed" + } + }, + "COMPANY_ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.archived" + } + }, + "COMPANY_EOR_HIRING_ADDITIONAL_INFORMATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.additional_information_required" + } + }, + "COMPANY_EOR_HIRING_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_NO_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.no_reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.referred" + } + }, + "COMPANY_EOR_HIRING_VERIFICATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.verification_completed" + } + }, + "COMPANY_PARTNER_OFFBOARDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.partner_offboarded" + } + }, + "COMPANY_PRICING_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.pricing_plan.updated" + } + }, + "CONTRACT_AMENDMENT_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.canceled" + } + }, + "CONTRACT_AMENDMENT_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.deleted" + } + }, + "CONTRACT_AMENDMENT_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.done" + } + }, + "CONTRACT_AMENDMENT_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.review_started" + } + }, + "CONTRACT_AMENDMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.submitted" + } + }, + "CONTRACT_TERMINATION_DATE_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract.termination_date_reached" + } + }, + "CONTRACT_DOCUMENT_STATUS_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_document.status.changed" + } + }, + "CONTRACTOR_INVOICE_EMPLOYER_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.employer_paid" + } + }, + "CONTRACTOR_INVOICE_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.issued" + } + }, + "CONTRACTOR_INVOICE_PAID_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.paid_out" + } + }, + "CONTRACTOR_INVOICE_PAYMENT_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.payment_initiated" + } + }, + "CUSTOM_FIELD_VALUE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_field.value_updated" + } + }, + "EMPLOYMENT_BENEFITS_SELECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.benefits.selected" + } + }, + "EMPLOYMENT_COMPANY_STRUCTURE_NODE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_company_structure_node.updated" + } + }, + "EMPLOYMENT_CONTRACT_ACTIVE_CONTRACT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.active_contract_updated" + } + }, + "EMPLOYMENT_CONTRACT_ADJUSTED_DURING_ONBOARDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.adjusted_during_onboarding" + } + }, + "EMPLOYMENT_ACCOUNT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.account.updated" + } + }, + "EMPLOYMENT_ADMINISTRATIVE_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.administrative_details.updated" + } + }, + "EMPLOYMENT_BASIC_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_basic_information.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_MANAGEMENT_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_management_plan.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.cancelled" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.executed" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.initiated" + } + }, + "EMPLOYMENT_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.details.updated" + } + }, + "EMPLOYMENT_EMPLOYMENT_AGREEMENT_AVAILABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.employment_agreement.available" + } + }, + "EMPLOYMENT_COR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.invoice_created" + } + }, + "EMPLOYMENT_EOR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.invoice_created" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_NO_LONGER_ELIGIBLE_FOR_ONBOARDING_CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.no_longer_eligible_for_onboarding_cancellation" + } + }, + "EMPLOYMENT_ONBOARDING_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding_task.completed" + } + }, + "EMPLOYMENT_ONBOARDING_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.cancelled" + } + }, + "EMPLOYMENT_ONBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.completed" + } + }, + "EMPLOYMENT_ONBOARDING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.started" + } + }, + "EMPLOYMENT_PERSONAL_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.personal_information.updated" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.cancelled" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.completed" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.submitted" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_ENDING_REMINDER_SENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation.period_ending_reminder_sent" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.cancelled" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.completed" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.submitted" + } + }, + "EMPLOYMENT_START_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.start_date.changed" + } + }, + "EMPLOYMENT_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.status.updated" + } + }, + "EMPLOYMENT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.updated" + } + }, + "EMPLOYMENT_USER_STATUS_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.activated" + } + }, + "EMPLOYMENT_USER_STATUS_DEACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.deactivated" + } + }, + "EMPLOYMENT_USER_STATUS_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.initiated" + } + }, + "EMPLOYMENT_USER_STATUS_INVITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.invited" + } + }, + "EMPLOYMENT_WORK_EMAIL_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.work_email.updated" + } + }, + "EXPENSE_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.approved" + } + }, + "EXPENSE_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.declined" + } + }, + "EXPENSE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.deleted" + } + }, + "EXPENSE_REIMBURSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.reimbursed" + } + }, + "EXPENSE_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.submitted" + } + }, + "EXPENSE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.updated" + } + }, + "IDENTITY_VERIFICATION_VERIFICATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "identity_verification.verification_required" + } + }, + "INCENTIVE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.created" + } + }, + "INCENTIVE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.deleted" + } + }, + "INCENTIVE_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.paid" + } + }, + "INCENTIVE_PROCESSING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.processing_started" + } + }, + "INCENTIVE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.updated" + } + }, + "OFFBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.completed" + } + }, + "OFFBOARDING_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.deleted" + } + }, + "OFFBOARDING_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.done" + } + }, + "OFFBOARDING_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.review_started" + } + }, + "OFFBOARDING_SUBMITTED_TO_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted_to_payroll" + } + }, + "OFFBOARDING_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted" + } + }, + "PAYSLIP_RELEASED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payslip.released" + } + }, + "SSO_CONFIGURATION_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.disabled" + } + }, + "SSO_CONFIGURATION_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.enabled" + } + }, + "SSO_CONFIGURATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.updated" + } + }, + "TIMEOFF_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.approved" + } + }, + "TIMEOFF_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.canceled" + } + }, + "TIMEOFF_CANCELLATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.cancellation_requested" + } + }, + "TIMEOFF_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.date_changed" + } + }, + "TIMEOFF_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.declined" + } + }, + "TIMEOFF_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.requested" + } + }, + "TIMEOFF_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.started" + } + }, + "TIMEOFF_TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.taken" + } + }, + "TIMEOFF_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.updated" + } + }, + "TIMESHEET_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.submitted" + } + }, + "TIMESHEET_IN_CALIBRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.in_calibration" + } + }, + "TRAVEL_LETTER_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_manager" + } + }, + "TRAVEL_LETTER_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_remote" + } + }, + "TRAVEL_LETTER_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_manager" + } + }, + "TRAVEL_LETTER_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_remote" + } + }, + "TRAVEL_LETTER_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.requested" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_manager" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_remote" + } + }, + "WORK_AUTHORIZATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.cancelled" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_manager" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_remote" + } + }, + "WORK_AUTHORIZATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.requested" + } + } + }, + "traits": { + "smithy.api#documentation": "The setting to be enabled." + } + }, + "com.remote.api#PostV1WebhookCallbacksRequestSubscribedEventsList": { + "type": "list", + "member": { + "target": "com.remote.api#PostV1WebhookCallbacksRequestSubscribedEventsItem" + }, + "traits": {} + }, + "com.remote.api#PostV1WebhookCallbacksRequest": { + "type": "structure", + "members": { + "subscribe_to_all_events": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, subscribe this callback to all current and future event types. Cannot be combined with `subscribed_events`." + } + }, + "subscribed_events": { + "target": "com.remote.api#PostV1WebhookCallbacksRequestSubscribedEventsList" + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#WebhookCallbackResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#WebhookCallbackResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Webhook callback response" + } + }, + "com.remote.api#WebhookCallbackResponseData": { + "type": "structure", + "members": { + "webhook_callback": { + "target": "com.remote.api#WebhookCallback", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1WebhookCallbacks": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1WebhookCallbacksRequest" + }, + "output": { + "target": "com.remote.api#WebhookCallbackResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/webhook-callbacks", + "code": 200 + }, + "smithy.api#documentation": "Create a Webhook Callback\n\nRegister a callback to be used for webhooks\n\n## Scopes" + } + }, + "com.remote.api#PatchV1WebhookCallbacksIdRequestSubscribedEventsItem": { + "type": "enum", + "members": { + "BACKGROUND_CHECK_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "background_check.status.updated" + } + }, + "BENEFIT_RENEWAL_REQUEST_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "benefit_renewal_request.created" + } + }, + "BILLING_DOCUMENT_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "billing_document.issued" + } + }, + "COMPANY_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.activated" + } + }, + "COMPANY_MANAGER_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_created" + } + }, + "COMPANY_MANAGER_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_deleted" + } + }, + "COMPANY_MANAGER_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.manager_updated" + } + }, + "COMPANY_OWNER_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.owner_changed" + } + }, + "COMPANY_ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.archived" + } + }, + "COMPANY_EOR_HIRING_ADDITIONAL_INFORMATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.additional_information_required" + } + }, + "COMPANY_EOR_HIRING_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_NO_RESERVE_PAYMENT_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.no_reserve_payment_requested" + } + }, + "COMPANY_EOR_HIRING_REFERRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.referred" + } + }, + "COMPANY_EOR_HIRING_VERIFICATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.eor_hiring.verification_completed" + } + }, + "COMPANY_PARTNER_OFFBOARDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.partner_offboarded" + } + }, + "COMPANY_PRICING_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "company.pricing_plan.updated" + } + }, + "CONTRACT_AMENDMENT_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.canceled" + } + }, + "CONTRACT_AMENDMENT_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.deleted" + } + }, + "CONTRACT_AMENDMENT_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.done" + } + }, + "CONTRACT_AMENDMENT_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.review_started" + } + }, + "CONTRACT_AMENDMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_amendment.submitted" + } + }, + "CONTRACT_TERMINATION_DATE_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract.termination_date_reached" + } + }, + "CONTRACT_DOCUMENT_STATUS_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contract_document.status.changed" + } + }, + "CONTRACTOR_INVOICE_EMPLOYER_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.employer_paid" + } + }, + "CONTRACTOR_INVOICE_ISSUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.issued" + } + }, + "CONTRACTOR_INVOICE_PAID_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.paid_out" + } + }, + "CONTRACTOR_INVOICE_PAYMENT_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "contractor_invoice.payment_initiated" + } + }, + "CUSTOM_FIELD_VALUE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom_field.value_updated" + } + }, + "EMPLOYMENT_BENEFITS_SELECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.benefits.selected" + } + }, + "EMPLOYMENT_COMPANY_STRUCTURE_NODE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_company_structure_node.updated" + } + }, + "EMPLOYMENT_CONTRACT_ACTIVE_CONTRACT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.active_contract_updated" + } + }, + "EMPLOYMENT_CONTRACT_ADJUSTED_DURING_ONBOARDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_contract.adjusted_during_onboarding" + } + }, + "EMPLOYMENT_ACCOUNT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.account.updated" + } + }, + "EMPLOYMENT_ADMINISTRATIVE_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.administrative_details.updated" + } + }, + "EMPLOYMENT_BASIC_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment_basic_information.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_MANAGEMENT_PLAN_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_management_plan.updated" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.cancelled" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_EXECUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.executed" + } + }, + "EMPLOYMENT_CONTRACTOR_OF_RECORD_TERMINATION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.contractor_of_record_termination.initiated" + } + }, + "EMPLOYMENT_DETAILS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.details.updated" + } + }, + "EMPLOYMENT_EMPLOYMENT_AGREEMENT_AVAILABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.employment_agreement.available" + } + }, + "EMPLOYMENT_COR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.invoice_created" + } + }, + "EMPLOYMENT_EOR_HIRING_INVOICE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.invoice_created" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_COR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.cor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_accepted" + } + }, + "EMPLOYMENT_EOR_HIRING_PROOF_OF_PAYMENT_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.eor_hiring.proof_of_payment_submitted" + } + }, + "EMPLOYMENT_NO_LONGER_ELIGIBLE_FOR_ONBOARDING_CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.no_longer_eligible_for_onboarding_cancellation" + } + }, + "EMPLOYMENT_ONBOARDING_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding_task.completed" + } + }, + "EMPLOYMENT_ONBOARDING_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.cancelled" + } + }, + "EMPLOYMENT_ONBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.completed" + } + }, + "EMPLOYMENT_ONBOARDING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.onboarding.started" + } + }, + "EMPLOYMENT_PERSONAL_INFORMATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.personal_information.updated" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.cancelled" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.completed" + } + }, + "EMPLOYMENT_PROBATION_COMPLETION_LETTER_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_completion_letter.submitted" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_ENDING_REMINDER_SENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation.period_ending_reminder_sent" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.cancelled" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.completed" + } + }, + "EMPLOYMENT_PROBATION_PERIOD_EXTENSION_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.probation_period_extension.submitted" + } + }, + "EMPLOYMENT_START_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.start_date.changed" + } + }, + "EMPLOYMENT_STATUS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.status.updated" + } + }, + "EMPLOYMENT_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.updated" + } + }, + "EMPLOYMENT_USER_STATUS_ACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.activated" + } + }, + "EMPLOYMENT_USER_STATUS_DEACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.deactivated" + } + }, + "EMPLOYMENT_USER_STATUS_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.initiated" + } + }, + "EMPLOYMENT_USER_STATUS_INVITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.user_status.invited" + } + }, + "EMPLOYMENT_WORK_EMAIL_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "employment.work_email.updated" + } + }, + "EXPENSE_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.approved" + } + }, + "EXPENSE_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.declined" + } + }, + "EXPENSE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.deleted" + } + }, + "EXPENSE_REIMBURSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.reimbursed" + } + }, + "EXPENSE_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.submitted" + } + }, + "EXPENSE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "expense.updated" + } + }, + "IDENTITY_VERIFICATION_VERIFICATION_REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "identity_verification.verification_required" + } + }, + "INCENTIVE_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.created" + } + }, + "INCENTIVE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.deleted" + } + }, + "INCENTIVE_PAID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.paid" + } + }, + "INCENTIVE_PROCESSING_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.processing_started" + } + }, + "INCENTIVE_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "incentive.updated" + } + }, + "OFFBOARDING_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.completed" + } + }, + "OFFBOARDING_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.deleted" + } + }, + "OFFBOARDING_DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.done" + } + }, + "OFFBOARDING_REVIEW_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.review_started" + } + }, + "OFFBOARDING_SUBMITTED_TO_PAYROLL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted_to_payroll" + } + }, + "OFFBOARDING_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "offboarding.submitted" + } + }, + "PAYSLIP_RELEASED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payslip.released" + } + }, + "SSO_CONFIGURATION_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.disabled" + } + }, + "SSO_CONFIGURATION_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.enabled" + } + }, + "SSO_CONFIGURATION_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sso_configuration.updated" + } + }, + "TIMEOFF_APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.approved" + } + }, + "TIMEOFF_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.canceled" + } + }, + "TIMEOFF_CANCELLATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.cancellation_requested" + } + }, + "TIMEOFF_DATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.date_changed" + } + }, + "TIMEOFF_DECLINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.declined" + } + }, + "TIMEOFF_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.requested" + } + }, + "TIMEOFF_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.started" + } + }, + "TIMEOFF_TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.taken" + } + }, + "TIMEOFF_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeoff.updated" + } + }, + "TIMESHEET_SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.submitted" + } + }, + "TIMESHEET_IN_CALIBRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timesheet.in_calibration" + } + }, + "TRAVEL_LETTER_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_manager" + } + }, + "TRAVEL_LETTER_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.approved_by_remote" + } + }, + "TRAVEL_LETTER_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_manager" + } + }, + "TRAVEL_LETTER_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.declined_by_remote" + } + }, + "TRAVEL_LETTER_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "travel_letter.requested" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_manager" + } + }, + "WORK_AUTHORIZATION_APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.approved_by_remote" + } + }, + "WORK_AUTHORIZATION_CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.cancelled" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_manager" + } + }, + "WORK_AUTHORIZATION_DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.declined_by_remote" + } + }, + "WORK_AUTHORIZATION_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "work_authorization.requested" + } + } + }, + "traits": { + "smithy.api#documentation": "The setting to be enabled." + } + }, + "com.remote.api#PatchV1WebhookCallbacksIdRequestSubscribedEventsList": { + "type": "list", + "member": { + "target": "com.remote.api#PatchV1WebhookCallbacksIdRequestSubscribedEventsItem" + }, + "traits": {} + }, + "com.remote.api#PatchV1WebhookCallbacksIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Webhook Callback ID" + } + }, + "subscribe_to_all_events": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, subscribe this callback to all current and future event types. Cannot be combined with `subscribed_events`." + } + }, + "subscribed_events": { + "target": "com.remote.api#PatchV1WebhookCallbacksIdRequestSubscribedEventsList" + }, + "url": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1WebhookCallbacksId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1WebhookCallbacksIdRequest" + }, + "output": { + "target": "com.remote.api#WebhookCallbackResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/webhook-callbacks/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update a Webhook Callback\n\nUpdate a callback previously registered for webhooks\n\n## Scopes" + } + }, + "com.remote.api#DeleteV1WebhookCallbacksIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Webhook Callback ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#DeleteV1WebhookCallbacksId": { + "type": "operation", + "input": { + "target": "com.remote.api#DeleteV1WebhookCallbacksIdRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/v1/webhook-callbacks/{id}", + "code": 200 + }, + "smithy.api#documentation": "Delete a Webhook Callback\n\nDelete a callback previously registered for webhooks\n\n## Scopes" + } + }, + "com.remote.api#GetV1WebhookEventsRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1WebhookEventsRequestSortBy": { + "type": "enum", + "members": { + "FIRST_TRIGGERED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "first_triggered_at" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1WebhookEventsRequest": { + "type": "structure", + "members": { + "event_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "event_type", + "smithy.api#documentation": "Filter by webhook event type" + } + }, + "successfully_delivered": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "successfully_delivered", + "smithy.api#documentation": "Filter by delivery status (true = 200, false = 4xx/5xx)" + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "company_id", + "smithy.api#documentation": "Filter by company ID" + } + }, + "before": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "before", + "smithy.api#documentation": "Filter by date before (ISO 8601 format)" + } + }, + "after": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "after", + "smithy.api#documentation": "Filter by date after (ISO 8601 format)" + } + }, + "order": { + "target": "com.remote.api#GetV1WebhookEventsRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "sort_by": { + "target": "com.remote.api#GetV1WebhookEventsRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListWebhookEventsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListWebhookEventsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many webhook_events" + } + }, + "com.remote.api#WebhookEvent": { + "type": "structure", + "members": { + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the company this event belongs to.", + "smithy.api#required": {} + } + }, + "event_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of event that was triggered (e.g., \"timesheet.created\", \"employment.activated\").", + "smithy.api#required": {} + } + }, + "first_triggered_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this event was first triggered.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the webhook event.", + "smithy.api#required": {} + } + }, + "last_triggered_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp of the most recent delivery attempt for this event.", + "smithy.api#required": {} + } + }, + "successfully_delivered": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the webhook event was successfully delivered to the callback URL (received a 2XX response).", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#ListWebhookEventsResponseDataWebhookEventsList": { + "type": "list", + "member": { + "target": "com.remote.api#WebhookEvent" + }, + "traits": {} + }, + "com.remote.api#ListWebhookEventsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + }, + "webhook_events": { + "target": "com.remote.api#ListWebhookEventsResponseDataWebhookEventsList" + } + }, + "traits": {} + }, + "com.remote.api#GetV1WebhookEvents": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1WebhookEventsRequest" + }, + "output": { + "target": "com.remote.api#ListWebhookEventsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/webhook-events", + "code": 200 + }, + "smithy.api#documentation": "List Webhook Events\n\nList all webhook events\n\n## Scopes" + } + }, + "com.remote.api#ReplayWebhookEventsParams": { + "type": "union", + "members": { + "IdsRequiredParams": { + "target": "com.remote.api#IdsRequiredParams" + }, + "BeforeAfterRequiredParams": { + "target": "com.remote.api#BeforeAfterRequiredParams" + } + }, + "traits": { + "smithy.api#documentation": "Replay webhook events params" + } + }, + "com.remote.api#IdsRequiredParams": { + "type": "structure", + "members": { + "ids": { + "target": "com.remote.api#IdsRequiredParamsIdsList", + "traits": { + "smithy.api#documentation": "A list of webhook event IDs to replay.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#IdsRequiredParamsIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of webhook event IDs to replay." + } + }, + "com.remote.api#BeforeAfterRequiredParams": { + "type": "structure", + "members": { + "after": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only replay events triggered after this timestamp (ISO 8601).", + "smithy.api#required": {} + } + }, + "before": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only replay events triggered before this timestamp (ISO 8601).", + "smithy.api#required": {} + } + }, + "company_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional filter to only replay events for a specific company." + } + }, + "event_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional filter to only replay events of this type." + } + }, + "successfully_delivered": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Optional filter by delivery status. Set to false to replay only failed deliveries." + } + } + }, + "traits": {} + }, + "com.remote.api#PostV1WebhookEventsReplayRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.remote.api#ReplayWebhookEventsParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV1WebhookEventsReplay": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV1WebhookEventsReplayRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v1/webhook-events/replay", + "code": 200 + }, + "smithy.api#documentation": "Replay Webhook Events\n\nReplay webhook events\n\n## Scopes" + } + }, + "com.remote.api#GetV1WorkAuthorizationRequestsRequestStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_manager" + } + }, + "DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_remote" + } + }, + "APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_manager" + } + }, + "APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_remote" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1WorkAuthorizationRequestsRequestOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1WorkAuthorizationRequestsRequestSortBy": { + "type": "enum", + "members": { + "SUBMITTED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "submitted_at" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1WorkAuthorizationRequestsRequest": { + "type": "structure", + "members": { + "status": { + "target": "com.remote.api#GetV1WorkAuthorizationRequestsRequestStatus", + "traits": { + "smithy.api#httpQuery": "status", + "smithy.api#documentation": "Filter results on the given status" + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter results on the given employment slug" + } + }, + "employee_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employee_name", + "smithy.api#documentation": "Filter results on the given employee name" + } + }, + "order": { + "target": "com.remote.api#GetV1WorkAuthorizationRequestsRequestOrder", + "traits": { + "smithy.api#httpQuery": "order", + "smithy.api#documentation": "Sort order" + } + }, + "sort_by": { + "target": "com.remote.api#GetV1WorkAuthorizationRequestsRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by", + "smithy.api#documentation": "Field to sort by" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Number of items per page" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#ListWorkAuthorizationRequestsResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#ListWorkAuthorizationRequestsResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many work_authorization_requests" + } + }, + "com.remote.api#WorkAuthorizationRequest": { + "type": "structure", + "members": { + "additional_information": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional information provided by the employee about their work authorization needs.", + "smithy.api#required": {} + } + }, + "destination_country": { + "target": "com.remote.api#Country", + "traits": { + "smithy.api#required": {} + } + }, + "employer_approver": { + "target": "com.remote.api#WorkAuthorizationUser", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "employer_special_instructions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Special instructions from the employer. Null if none provided.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the work authorization request.", + "smithy.api#required": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the work authorization request.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#WorkAuthorizationRequestStatus", + "traits": { + "smithy.api#documentation": "The current status of the work authorization request.\n\n- `pending`: Submitted and awaiting manager review.\n- `cancelled`: Cancelled by the employee.\n- `declined_by_manager`: Declined by the employer manager.\n- `declined_by_remote`: Declined by Remote after manager approval.\n- `approved_by_manager`: Approved by the manager, awaiting Remote's review.\n- `approved_by_remote`: Fully approved by both manager and Remote.\n", + "smithy.api#required": {} + } + }, + "submitted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "travel_date_end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "travel_date_start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "travel_document_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The employee's travel document (passport) number.", + "smithy.api#required": {} + } + }, + "user": { + "target": "com.remote.api#WorkAuthorizationUser", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "will_negotiate_or_sign_contracts": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "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.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "work_location": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The specific work location or address in the destination country. Null if not specified.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "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." + } + }, + "com.remote.api#WorkAuthorizationUser": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user's email address.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the user.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user's full name.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A user associated with a work authorization request (either the employee or the employer approver)." + } + }, + "com.remote.api#WorkAuthorizationRequestStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancelled" + } + }, + "DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_manager" + } + }, + "DECLINED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_remote" + } + }, + "APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_manager" + } + }, + "APPROVED_BY_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_remote" + } + } + }, + "traits": { + "smithy.api#documentation": "The current status of the work authorization request.\n\n- `pending`: Submitted and awaiting manager review.\n- `cancelled`: Cancelled by the employee.\n- `declined_by_manager`: Declined by the employer manager.\n- `declined_by_remote`: Declined by Remote after manager approval.\n- `approved_by_manager`: Approved by the manager, awaiting Remote's review.\n- `approved_by_remote`: Fully approved by both manager and Remote.\n" + } + }, + "com.remote.api#ListWorkAuthorizationRequestsResponseDataWorkAuthorizationRequestsList": { + "type": "list", + "member": { + "target": "com.remote.api#WorkAuthorizationRequest" + }, + "traits": {} + }, + "com.remote.api#ListWorkAuthorizationRequestsResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + }, + "work_authorization_requests": { + "target": "com.remote.api#ListWorkAuthorizationRequestsResponseDataWorkAuthorizationRequestsList" + } + }, + "traits": {} + }, + "com.remote.api#GetV1WorkAuthorizationRequests": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1WorkAuthorizationRequestsRequest" + }, + "output": { + "target": "com.remote.api#ListWorkAuthorizationRequestsResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/work-authorization-requests", + "code": 200 + }, + "smithy.api#documentation": "List work authorization requests\n\nList work authorization requests.\n\n## Scopes" + } + }, + "com.remote.api#GetV1WorkAuthorizationRequestsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "work authorization request ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#WorkAuthorizationRequestResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#WorkAuthorizationRequestResponseData", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for work authorization request" + } + }, + "com.remote.api#WorkAuthorizationRequestResponseData": { + "type": "structure", + "members": { + "work_authorization_request": { + "target": "com.remote.api#WorkAuthorizationRequest", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.remote.api#GetV1WorkAuthorizationRequestsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV1WorkAuthorizationRequestsIdRequest" + }, + "output": { + "target": "com.remote.api#WorkAuthorizationRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v1/work-authorization-requests/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show work authorization request\n\nShow a single work authorization request.\n\n## Scopes" + } + }, + "com.remote.api#UpdateWorkAuthorizationRequestParams": { + "type": "union", + "members": { + "ApprovedWorkAuthozation": { + "target": "com.remote.api#ApprovedWorkAuthozation" + }, + "DeclinedWorkAuthozation": { + "target": "com.remote.api#DeclinedWorkAuthozation" + } + }, + "traits": { + "smithy.api#documentation": "Schema for updating a work authorization request" + } + }, + "com.remote.api#ApprovedWorkAuthozation": { + "type": "structure", + "members": { + "employer_special_instructions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#ApprovedWorkAuthozationStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for approved work authorization" + } + }, + "com.remote.api#ApprovedWorkAuthozationStatus": { + "type": "enum", + "members": { + "APPROVED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved_by_manager" + } + } + }, + "traits": {} + }, + "com.remote.api#DeclinedWorkAuthozation": { + "type": "structure", + "members": { + "employer_special_instructions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.remote.api#DeclinedWorkAuthozationStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for declined work authorization" + } + }, + "com.remote.api#DeclinedWorkAuthozationStatus": { + "type": "enum", + "members": { + "DECLINED_BY_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "declined_by_manager" + } + } + }, + "traits": {} + }, + "com.remote.api#PatchV1WorkAuthorizationRequestsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "work authorization request ID" + } + }, + "body": { + "target": "com.remote.api#UpdateWorkAuthorizationRequestParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1WorkAuthorizationRequestsId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1WorkAuthorizationRequestsIdRequest" + }, + "output": { + "target": "com.remote.api#WorkAuthorizationRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v1/work-authorization-requests/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update work authorization request\n\nUpdates a work authorization request.\n\n## Scopes" + } + }, + "com.remote.api#PatchV1WorkAuthorizationRequestsId2Request": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "work authorization request ID" + } + }, + "body": { + "target": "com.remote.api#UpdateWorkAuthorizationRequestParams", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV1WorkAuthorizationRequestsId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV1WorkAuthorizationRequestsId2Request" + }, + "output": { + "target": "com.remote.api#WorkAuthorizationRequestResponse" + }, + "errors": [ + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/work-authorization-requests/{id}", + "code": 200 + }, + "smithy.api#documentation": "Update work authorization request\n\nUpdates a work authorization request.\n\n## Scopes" + } + }, + "com.remote.api#PatchV2EmploymentsEmploymentIdRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The department of the employment. The department must belong to the same company as the employment.\nWhen set to `null`, the employment will be unassigned from a department.\n", + "com.distilled.openapi#nullable": {} + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system." + } + }, + "manager_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user id of the manager, who should have an `admin`, `owner` or `people_manager` role.\nYou can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager).\n" + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nOmit the field to leave the value unchanged; send `null` to clear it. Surrounding\nwhitespace is trimmed off. It can be set at any employment status, and the same\nvalue may be used on several employments (for example a rehire).\n", + "com.distilled.openapi#nullable": {} + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The work email of the employment." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV2EmploymentsEmploymentId": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV2EmploymentsEmploymentIdRequest" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update employment" + } + }, + "com.remote.api#PatchV2EmploymentsEmploymentId2Request": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "department_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The department of the employment. The department must belong to the same company as the employment.\nWhen set to `null`, the employment will be unassigned from a department.\n", + "com.distilled.openapi#nullable": {} + } + }, + "external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system." + } + }, + "manager_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The user id of the manager, who should have an `admin`, `owner` or `people_manager` role.\nYou can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager).\n" + } + }, + "partner_external_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reference code for the employment record in the calling integration's own system.\nPrivate to that integration — no other integration can read or overwrite it.\nOmit the field to leave the value unchanged; send `null` to clear it. Surrounding\nwhitespace is trimmed off. It can be set at any employment status, and the same\nvalue may be used on several employments (for example a rehire).\n", + "com.distilled.openapi#nullable": {} + } + }, + "work_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The work email of the employment." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PatchV2EmploymentsEmploymentId2": { + "type": "operation", + "input": { + "target": "com.remote.api#PatchV2EmploymentsEmploymentId2Request" + }, + "output": { + "target": "com.remote.api#EmploymentResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/v2/employments/{employment_id}", + "code": 200 + }, + "smithy.api#documentation": "Update employment" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "address_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "address_details_json_schema_version", + "smithy.api#documentation": "Version of the address_details form schema" + } + }, + "address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Home address information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `address_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/address-details", + "code": 200 + }, + "smithy.api#documentation": "Update address details\n\nUpdates employment's address details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "administrative_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Administrative information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `administrative_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdAdministrativeDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/administrative-details", + "code": 200 + }, + "smithy.api#documentation": "Update administrative details\n\nUpdates employment's administrative details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "bank_account_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "bank_account_details_json_schema_version", + "smithy.api#documentation": "Version of the bank_account_details form schema" + } + }, + "bank_account_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Bank account information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `bank_account_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/bank-account-details", + "code": 200 + }, + "smithy.api#documentation": "Update bank account details\n\nUpdates employment's bank account details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformationRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "employment_basic_information_json_schema_version": { + "target": "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "employment_basic_information_json_schema_version", + "smithy.api#documentation": "Version of the employment_basic_information form schema" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformation": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformationRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v2/employments/{employment_id}/basic-information", + "code": 200 + }, + "smithy.api#documentation": "Get basic information\n\nReturns the employment's basic information.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformationRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "employment_basic_information_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "employment_basic_information_json_schema_version", + "smithy.api#documentation": "Version of the employment_basic_information form schema" + } + }, + "basic_information": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment basic information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `employment_basic_information` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformation": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformationRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/basic-information", + "code": 200 + }, + "smithy.api#documentation": "Update basic information\n\nUpdates employment's basic information.\n\nSupported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "billing_address_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "billing_address_details_json_schema_version", + "smithy.api#documentation": "Version of the billing_address_details form schema" + } + }, + "billing_address_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Billing address information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `billing_address_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/billing-address-details", + "code": 200 + }, + "smithy.api#documentation": "Update billing address details\n\nUpdates employment's billing address details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdContractDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "contract_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "contract_details_json_schema_version", + "smithy.api#documentation": "Version of the contract_details form schema" + } + }, + "skip_benefits": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip_benefits", + "smithy.api#documentation": "Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API." + } + }, + "contract_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contract information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `contract_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdContractDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdContractDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/contract-details", + "code": 200 + }, + "smithy.api#documentation": "Update contract details\n\nUpdates employment's contract details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContactRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "emergency_contact_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "emergency_contact_details_json_schema_version", + "smithy.api#documentation": "Version of the emergency_contact_details form schema" + } + }, + "emergency_contact_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Emergency contact information. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `emergency_contact_details` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContact": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContactRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/emergency-contact", + "code": 200 + }, + "smithy.api#documentation": "Update emergency contact\n\nUpdates the employment's emergency contact details.\n\nThis endpoint requires country-specific data. Query the **Show form schema** endpoint\npassing the country code and `emergency_contact_details` as path parameters to see\nthe required fields for a given country.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#GetV2EmploymentsEmploymentIdEngagementAgreementDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentEngagementAgreementDetailsResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v2/employments/{employment_id}/engagement-agreement-details", + "code": 200 + }, + "smithy.api#documentation": "Get engagement agreement details\n\nReturns the engagement agreement details for an employment.\n\n## Scopes" + } + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList": { + "type": "list", + "member": { + "target": "com.remote.api#EngagementAgreementDetailsFileParams" + }, + "traits": {} + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails": { + "type": "structure", + "members": { + "allowances_details": { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "available_pto": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "break_time_per_day": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "business_expenses": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cba": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cba_document": { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "covenants": { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_allowances": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_bonus": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_business_expenses": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_business_presence": { + "target": "smithy.api#String" + }, + "has_cba": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_commissions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_covenants": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_illness_remuneration": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_overtime_compensation": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_pension_scheme": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_signing_bonus": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_similar_roles": { + "target": "smithy.api#String" + }, + "has_similar_work_conditions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "illness_remuneration_details": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "max_annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "min_annual_gross_salary": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_compensation_begins": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_compensation_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "overtime_pay_percentage": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pension_scheme": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "similar_roles": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "similar_work_conditions_details": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "work_hours_per_week": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "working_days": { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "engagement_agreement_details": { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails", + "traits": { + "smithy.api#documentation": "Engagement agreement details params. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_engagement_agreement_details_country) endpoint\npassing the country code.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/v2/employments/{employment_id}/engagement-agreement-details", + "code": 200 + }, + "smithy.api#documentation": "Upsert engagement agreement details\n\nCreates or updates the engagement agreement details for an employment.\n\nThis endpoint requires country-specific data. The exact required fields will vary depending on\nwhich country the employment is in. To see the list of parameters for each country, see the\n**Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that compliance requirements for each country are subject to change according to local laws.\nUsing Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended\nto avoid compliance issues and to have the latest version of a country's requirements.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdFederalTaxesRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "federal_taxes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Federal taxes params. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `global_payroll_federal_taxes` as path parameters.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdFederalTaxes": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdFederalTaxesRequest" + }, + "output": { + "target": "com.remote.api#SuccessResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/federal-taxes", + "code": 200 + }, + "smithy.api#documentation": "Update federal taxes\n\nUpdates employment's federal taxes.\n\nRequirements to update federal taxes successfully:\n* Employment should be Global Payroll\n* Employment should be in the post-enrollment state\n* Employment should belong to USA\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "personal_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "personal_details_json_schema_version", + "smithy.api#documentation": "Version of the personal_details form schema" + } + }, + "personal_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Employment personal details. As its properties may vary depending on the country,\nyou must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\npassing the country code and `employment_basic_information` as path parameters.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/personal-details", + "code": 200 + }, + "smithy.api#documentation": "Update personal details\n\nUpdates employment's personal details.\n\nThis endpoint requires and returns country-specific data. The exact required and returned fields will\nvary depending on which country the employment is in. To see the list of parameters for each country,\nsee the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n\nPlease note that the compliance requirements for each country are subject to change according to local\nlaws. 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\ncompliance issues and to have the latest version of a country requirements.\n\nIf you are using this endpoint to build an integration, make sure you are dynamically collecting or\ndisplaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n\nFor more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n\nTo learn how you can dynamically generate forms to display in your UI, see the documentation for\nthe [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool.\n\n\n\n## Scopes" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersionCase1": { + "type": "enum", + "members": { + "LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latest" + } + } + }, + "traits": { + "smithy.api#documentation": "Use latest version" + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersion": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersionCase1" + } + }, + "traits": {} + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Employment ID" + } + }, + "pricing_plan_details_json_schema_version": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersion", + "traits": { + "smithy.api#httpQuery": "pricing_plan_details_json_schema_version", + "smithy.api#documentation": "Version of the pricing_plan_details form schema" + } + }, + "pricing_plan_details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Pricing plan details information. As its properties may vary depending on the country,\n you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint\n passing the country code and `pricing_plan_details` as path parameters.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetails": { + "type": "operation", + "input": { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest" + }, + "output": { + "target": "com.remote.api#EmploymentDetailsOnlyResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#Forbidden" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#Conflict" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/v2/employments/{employment_id}/pricing-plan-details", + "code": 200 + }, + "smithy.api#documentation": "Update pricing plan details\n\nUpdates the pricing plan for an employment. The frequency determines how often Remote bills the\nemployer for management fees. Annual billing typically offers a discount.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV2OffboardingsRequestType": { + "type": "enum", + "members": { + "TERMINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "termination" + } + }, + "RESIGNATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "resignation" + } + }, + "CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancellation" + } + }, + "RELOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation" + } + }, + "TRANSFER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transfer" + } + }, + "CONVERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV2OffboardingsRequest": { + "type": "structure", + "members": { + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "employment_id", + "smithy.api#documentation": "Filter by Employment ID" + } + }, + "type": { + "target": "com.remote.api#GetV2OffboardingsRequestType", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#documentation": "Filter by offboarding type." + } + }, + "include_confidential": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_confidential", + "smithy.api#documentation": "By default, the results do not include confidential termination requests.\nSend `include_confidential=true` to include confidential requests in the response.\n" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Starts fetching records after the given page" + } + }, + "page_size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page_size", + "smithy.api#documentation": "Change the amount of records returned per page, defaults to 20, limited to 100" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#V2ListOffboardingResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#V2ListOffboardingResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response schema listing many offboardings" + } + }, + "com.remote.api#V2Offboarding": { + "type": "structure", + "members": { + "confidential": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the offboarding is confidential. Confidential offboardings are hidden from\nlist and show responses by default.\n", + "com.distilled.openapi#nullable": {} + } + }, + "employment_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the employment being offboarded.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) of the offboarding record.", + "smithy.api#required": {} + } + }, + "inserted_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when the offboarding record was created.", + "smithy.api#required": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for the offboarding.", + "com.distilled.openapi#nullable": {} + } + }, + "request": { + "target": "com.remote.api#V2OffboardingRequest", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.remote.api#V2OffboardingStatus", + "traits": { + "smithy.api#documentation": "The current processing status of the offboarding.\n\n- `requested`: The offboarding request has been received and is awaiting review.\n- `in_review`: Remote is reviewing the request for legal compliance and risks.\n- `pending_payment`: The offboarding has been approved and submitted to payroll; the employee's final payment is being processed.\n- `completed`: The offboarding is complete and the employment has been terminated.\n", + "smithy.api#required": {} + } + }, + "termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The confirmed last day of employment. May be null until Remote finalizes the date.", + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.remote.api#V2OffboardingType", + "traits": { + "smithy.api#documentation": "The offboarding type.\n", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An offboarding record. Top-level fields hold the offboarding's lifecycle state. The\nnested `request` object holds the immutable creation snapshot of the inputs submitted\nwhen the offboarding was created.\n" + } + }, + "com.remote.api#V2OffboardingRequest": { + "type": "union", + "members": { + "V2TerminationRequest": { + "target": "com.remote.api#V2TerminationRequest" + }, + "V2ResignationRequest": { + "target": "com.remote.api#V2ResignationRequest" + } + }, + "traits": { + "smithy.api#documentation": "The shape depends on the originating request: offboardings that originated from a\ntermination carry a `V2TerminationRequest`; those that originated from a resignation carry\na `V2ResignationRequest`.\n" + } + }, + "com.remote.api#V2TerminationRequest": { + "type": "structure", + "members": { + "additional_comments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Free-text additional comments submitted by the requester.", + "com.distilled.openapi#nullable": {} + } + }, + "agrees_to_pto_amount": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the requester agreed with the proposed PTO amount.", + "com.distilled.openapi#nullable": {} + } + }, + "employee_awareness": { + "target": "com.remote.api#V2TerminationRequestEmployeeAwareness", + "traits": { + "smithy.api#documentation": "Present only when the requester indicated they have already informed the employee about the termination.", + "com.distilled.openapi#nullable": {} + } + }, + "proposed_termination_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The termination date proposed by the requester.", + "com.distilled.openapi#nullable": {} + } + }, + "reason_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Free-text description of the termination reason submitted by the requester.", + "com.distilled.openapi#nullable": {} + } + }, + "risk_assessment_reasons": { + "target": "com.remote.api#V2TerminationRequestRiskAssessmentReasonsList", + "traits": { + "smithy.api#documentation": "Risk-assessment flags submitted by the requester.", + "com.distilled.openapi#nullable": {} + } + }, + "will_challenge_termination": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the requester expects the employee to challenge the termination.", + "com.distilled.openapi#nullable": {} + } + }, + "will_challenge_termination_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Additional context the requester provided about a potential challenge.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Snapshot of the inputs submitted when a `termination` offboarding was created.\nThese fields do not change as the offboarding progresses.\n" + } + }, + "com.remote.api#V2TerminationRequestEmployeeAwareness": { + "type": "structure", + "members": { + "date": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "note": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Present only when the requester indicated they have already informed the employee about the termination." + } + }, + "com.remote.api#V2TerminationRequestRiskAssessmentReasonsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Risk-assessment flags submitted by the requester." + } + }, + "com.remote.api#V2ResignationRequest": { + "type": "structure", + "members": { + "additional_comments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Free-text additional comments submitted by the employee.", + "com.distilled.openapi#nullable": {} + } + }, + "employer_awareness": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Present only when the employee indicated they have already informed the employer about the resignation.", + "com.distilled.openapi#nullable": {} + } + }, + "proposed_last_working_day": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The last working day proposed by the employee.", + "com.distilled.openapi#nullable": {} + } + }, + "reason_description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Free-text description of the resignation reason submitted by the employee.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Snapshot of the inputs submitted when a `resignation` offboarding was created.\nThese fields do not change as the offboarding progresses.\n" + } + }, + "com.remote.api#V2OffboardingStatus": { + "type": "enum", + "members": { + "REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requested" + } + }, + "IN_REVIEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "in_review" + } + }, + "PENDING_PAYMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_payment" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "completed" + } + } + }, + "traits": { + "smithy.api#documentation": "The current processing status of the offboarding.\n\n- `requested`: The offboarding request has been received and is awaiting review.\n- `in_review`: Remote is reviewing the request for legal compliance and risks.\n- `pending_payment`: The offboarding has been approved and submitted to payroll; the employee's final payment is being processed.\n- `completed`: The offboarding is complete and the employment has been terminated.\n" + } + }, + "com.remote.api#V2OffboardingType": { + "type": "enum", + "members": { + "TERMINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "termination" + } + }, + "RESIGNATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "resignation" + } + }, + "CANCELLATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cancellation" + } + }, + "RELOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "relocation" + } + }, + "TRANSFER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transfer" + } + }, + "CONVERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "conversion" + } + } + }, + "traits": { + "smithy.api#documentation": "The offboarding type.\n" + } + }, + "com.remote.api#V2ListOffboardingResponseDataOffboardingsList": { + "type": "list", + "member": { + "target": "com.remote.api#V2Offboarding" + }, + "traits": {} + }, + "com.remote.api#V2ListOffboardingResponseData": { + "type": "structure", + "members": { + "current_page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The current page among all of the total_pages" + } + }, + "offboardings": { + "target": "com.remote.api#V2ListOffboardingResponseDataOffboardingsList" + }, + "total_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of records in the result" + } + }, + "total_pages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of pages the user can go through" + } + } + }, + "traits": {} + }, + "com.remote.api#GetV2Offboardings": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV2OffboardingsRequest" + }, + "output": { + "target": "com.remote.api#V2ListOffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v2/offboardings", + "code": 200 + }, + "smithy.api#documentation": "List Offboardings (v2)\n\nLists offboardings for a company.\n\n\n## Scopes" + } + }, + "com.remote.api#GetV2OffboardingsIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Offboarding ID" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.remote.api#V2OffboardingResponse": { + "type": "structure", + "members": { + "data": { + "target": "com.remote.api#V2OffboardingResponseData" + } + }, + "traits": { + "smithy.api#documentation": "Response containing a single v2 offboarding record." + } + }, + "com.remote.api#V2OffboardingResponseData": { + "type": "structure", + "members": { + "offboarding": { + "target": "com.remote.api#V2Offboarding" + } + }, + "traits": {} + }, + "com.remote.api#GetV2OffboardingsId": { + "type": "operation", + "input": { + "target": "com.remote.api#GetV2OffboardingsIdRequest" + }, + "output": { + "target": "com.remote.api#V2OffboardingResponse" + }, + "errors": [ + { + "target": "com.remote.api#BadRequest" + }, + { + "target": "com.remote.api#NotFound" + }, + { + "target": "com.remote.api#UnprocessableEntity" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/v2/offboardings/{id}", + "code": 200 + }, + "smithy.api#documentation": "Show Offboarding (v2)\n\nReturns a single offboarding by its ID.\n\n\n## Scopes" + } + }, + "com.remote.api#BadRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 400, + "com.distilled.openapi#errorMatchers": [ + { + "status": 400 + } + ] + } + }, + "com.remote.api#NotFound": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 404, + "com.distilled.openapi#errorMatchers": [ + { + "status": 404 + } + ] + } + }, + "com.remote.api#UnprocessableEntity": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 422, + "com.distilled.openapi#errorMatchers": [ + { + "status": 422 + } + ] + } + }, + "com.remote.api#Forbidden": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 403, + "com.distilled.openapi#errorMatchers": [ + { + "status": 403 + } + ] + } + }, + "com.remote.api#Conflict": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 409, + "com.distilled.openapi#errorMatchers": [ + { + "status": 409 + } + ] + } + }, + "com.remote.api#Remote": { + "type": "service", + "version": "2.0.0", + "operations": [ + { + "target": "com.remote.api#PostAuthOauth2Token" + }, + { + "target": "com.remote.api#GetV1BenefitOffers" + }, + { + "target": "com.remote.api#GetV1BenefitOffersCountrySummaries" + }, + { + "target": "com.remote.api#GetV1BenefitRenewalRequests" + }, + { + "target": "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestId" + }, + { + "target": "com.remote.api#PostV1BenefitRenewalRequestsBenefitRenewalRequestId" + }, + { + "target": "com.remote.api#GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema" + }, + { + "target": "com.remote.api#GetV1BillingDocuments" + }, + { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentId" + }, + { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentIdBreakdown" + }, + { + "target": "com.remote.api#GetV1BillingDocumentsBillingDocumentIdPdf" + }, + { + "target": "com.remote.api#PostV1BulkEmploymentJobs" + }, + { + "target": "com.remote.api#GetV1BulkEmploymentJobsJobId" + }, + { + "target": "com.remote.api#GetV1BulkEmploymentJobsJobIdRows" + }, + { + "target": "com.remote.api#PostV1CancelOnboardingEmploymentId" + }, + { + "target": "com.remote.api#GetV1Companies" + }, + { + "target": "com.remote.api#PostV1Companies" + }, + { + "target": "com.remote.api#GetV1CompaniesSchema" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyId" + }, + { + "target": "com.remote.api#PatchV1CompaniesCompanyId" + }, + { + "target": "com.remote.api#PatchV1CompaniesCompanyId2" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdActions" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdComplianceProfile" + }, + { + "target": "com.remote.api#PostV1CompaniesCompanyIdCreateToken" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntities" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails" + }, + { + "target": "com.remote.api#PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodes" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdPricingPlans" + }, + { + "target": "com.remote.api#PostV1CompaniesCompanyIdPricingPlans" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdProductPrices" + }, + { + "target": "com.remote.api#GetV1CompaniesCompanyIdWebhookCallbacks" + }, + { + "target": "com.remote.api#GetV1CompanyCurrencies" + }, + { + "target": "com.remote.api#GetV1CompanyDepartments" + }, + { + "target": "com.remote.api#PostV1CompanyDepartments" + }, + { + "target": "com.remote.api#GetV1CompanyManagers" + }, + { + "target": "com.remote.api#PostV1CompanyManagers" + }, + { + "target": "com.remote.api#GetV1CompanyManagersUserId" + }, + { + "target": "com.remote.api#PatchV1CompanyManagersUserId" + }, + { + "target": "com.remote.api#PatchV1CompanyManagersUserId2" + }, + { + "target": "com.remote.api#DeleteV1CompanyManagersUserId" + }, + { + "target": "com.remote.api#GetV1CompanyCompanyIdCostCenterAllocations" + }, + { + "target": "com.remote.api#GetV1ContractAmendments" + }, + { + "target": "com.remote.api#PostV1ContractAmendments" + }, + { + "target": "com.remote.api#PostV1ContractAmendmentsAutomatable" + }, + { + "target": "com.remote.api#GetV1ContractAmendmentsSchema" + }, + { + "target": "com.remote.api#GetV1ContractAmendmentsId" + }, + { + "target": "com.remote.api#GetV1ContractorInvoiceSchedules" + }, + { + "target": "com.remote.api#PostV1ContractorInvoiceSchedules" + }, + { + "target": "com.remote.api#GetV1ContractorInvoiceSchedulesId" + }, + { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesId" + }, + { + "target": "com.remote.api#PatchV1ContractorInvoiceSchedulesId2" + }, + { + "target": "com.remote.api#GetV1ContractorInvoices" + }, + { + "target": "com.remote.api#GetV1ContractorInvoicesId" + }, + { + "target": "com.remote.api#GetV1ContractorsCorTerminationRequests" + }, + { + "target": "com.remote.api#PostV1ContractorsEligibilityQuestionnaire" + }, + { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocuments" + }, + { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign" + }, + { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractDocumentsId" + }, + { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscription" + }, + { + "target": "com.remote.api#DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription" + }, + { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorCurrencies" + }, + { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription" + }, + { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptions" + }, + { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequests" + }, + { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId" + }, + { + "target": "com.remote.api#GetV1ContractorsEmploymentsEmploymentIdRates" + }, + { + "target": "com.remote.api#PostV1ContractorsEmploymentsEmploymentIdTimesheets" + }, + { + "target": "com.remote.api#GetV1ContractorsSchemasEligibilityQuestionnaire" + }, + { + "target": "com.remote.api#GetV1CostCalculatorCountries" + }, + { + "target": "com.remote.api#PostV1CostCalculatorEstimation" + }, + { + "target": "com.remote.api#PostV1CostCalculatorEstimationCsv" + }, + { + "target": "com.remote.api#PostV1CostCalculatorEstimationPdf" + }, + { + "target": "com.remote.api#GetV1CostCalculatorRegionsSlugFields" + }, + { + "target": "com.remote.api#GetV1Countries" + }, + { + "target": "com.remote.api#GetV1CountriesCountryCodeContractorContractDetails" + }, + { + "target": "com.remote.api#GetV1CountriesCountryCodeEngagementAgreementDetails" + }, + { + "target": "com.remote.api#GetV1CountriesCountryCodeHolidaysYear" + }, + { + "target": "com.remote.api#GetV1CountriesCountryCodeLegalEntityFormsForm" + }, + { + "target": "com.remote.api#GetV1CountriesCountryCodeForm" + }, + { + "target": "com.remote.api#PostV1CurrencyConverterEffective2" + }, + { + "target": "com.remote.api#PostV1CurrencyConverterEffective" + }, + { + "target": "com.remote.api#PostV1CurrencyConverterRaw" + }, + { + "target": "com.remote.api#GetV1CustomFields" + }, + { + "target": "com.remote.api#PostV1CustomFields" + }, + { + "target": "com.remote.api#GetV1CustomFieldsCustomFieldIdValuesEmploymentId" + }, + { + "target": "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId" + }, + { + "target": "com.remote.api#PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2" + }, + { + "target": "com.remote.api#GetV1DirectOffboardings" + }, + { + "target": "com.remote.api#PostV1Documents" + }, + { + "target": "com.remote.api#GetV1EmployeeAddress" + }, + { + "target": "com.remote.api#PutV1EmployeeAddress" + }, + { + "target": "com.remote.api#GetV1EmployeeBankAccount" + }, + { + "target": "com.remote.api#PutV1EmployeeBankAccount" + }, + { + "target": "com.remote.api#GetV1EmployeeCurrent" + }, + { + "target": "com.remote.api#GetV1EmployeeDocuments" + }, + { + "target": "com.remote.api#PostV1EmployeeDocuments" + }, + { + "target": "com.remote.api#GetV1EmployeeDocumentsId" + }, + { + "target": "com.remote.api#GetV1EmployeeEmergencyContact" + }, + { + "target": "com.remote.api#PutV1EmployeeEmergencyContact" + }, + { + "target": "com.remote.api#GetV1EmployeeExpenseCategories" + }, + { + "target": "com.remote.api#GetV1EmployeeExpenses" + }, + { + "target": "com.remote.api#PostV1EmployeeExpenses" + }, + { + "target": "com.remote.api#PutV1EmployeeFederalTaxes" + }, + { + "target": "com.remote.api#GetV1EmployeeIncentives" + }, + { + "target": "com.remote.api#GetV1EmployeeLeavePolicies" + }, + { + "target": "com.remote.api#GetV1EmployeeLeavePoliciesSummary" + }, + { + "target": "com.remote.api#GetV1EmployeePayslipFiles" + }, + { + "target": "com.remote.api#GetV1EmployeePayslips" + }, + { + "target": "com.remote.api#GetV1EmployeePersonalDetails" + }, + { + "target": "com.remote.api#PutV1EmployeePersonalDetails" + }, + { + "target": "com.remote.api#GetV1EmployeePersonalInformation" + }, + { + "target": "com.remote.api#PutV1EmployeeStateTaxesJurisdiction" + }, + { + "target": "com.remote.api#GetV1EmployeeTimeoff" + }, + { + "target": "com.remote.api#PostV1EmployeeTimeoff" + }, + { + "target": "com.remote.api#PatchV1EmployeeTimeoffId" + }, + { + "target": "com.remote.api#PatchV1EmployeeTimeoffId2" + }, + { + "target": "com.remote.api#PostV1EmployeeTimeoffIdCancel" + }, + { + "target": "com.remote.api#GetV1EmployeeTimesheets" + }, + { + "target": "com.remote.api#GetV1EmploymentContracts" + }, + { + "target": "com.remote.api#GetV1EmploymentContractsEmploymentIdPendingChanges" + }, + { + "target": "com.remote.api#GetV1Employments" + }, + { + "target": "com.remote.api#PostV1Employments" + }, + { + "target": "com.remote.api#GetV1EmploymentsBulk" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentId" + }, + { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId" + }, + { + "target": "com.remote.api#PatchV1EmploymentsEmploymentId2" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckId" + }, + { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdBasicInformation" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffers" + }, + { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdBenefitOffers" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdBenefitOffersSchema" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCompanyStructureNodes" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdContractDocuments" + }, + { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractEligibility" + }, + { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractOrigin" + }, + { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdContractorInvoicesPreview" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCostCenterAllocations" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdCustomFields" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementDownload" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEmploymentAgreementPreview" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdEngagementAgreementDetails" + }, + { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdEngagementAgreementDetails" + }, + { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdFederalTaxes" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdFiles" + }, + { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdInvite" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdJob" + }, + { + "target": "com.remote.api#GetV1EmploymentsEmploymentIdOnboardingSteps" + }, + { + "target": "com.remote.api#PutV1EmploymentsEmploymentIdPersonalDetails" + }, + { + "target": "com.remote.api#PostV1EmploymentsEmploymentIdRiskReserveProofOfPayments" + }, + { + "target": "com.remote.api#GetV1Expenses" + }, + { + "target": "com.remote.api#PostV1Expenses" + }, + { + "target": "com.remote.api#GetV1ExpensesCategories" + }, + { + "target": "com.remote.api#GetV1ExpensesExpenseIdReceiptsReceiptId" + }, + { + "target": "com.remote.api#GetV1ExpensesId" + }, + { + "target": "com.remote.api#PatchV1ExpensesId" + }, + { + "target": "com.remote.api#PatchV1ExpensesId2" + }, + { + "target": "com.remote.api#GetV1FilesId" + }, + { + "target": "com.remote.api#GetV1HelpCenterArticlesId" + }, + { + "target": "com.remote.api#GetV1IdentityVerificationEmploymentId" + }, + { + "target": "com.remote.api#PostV1IdentityVerificationEmploymentIdDecline" + }, + { + "target": "com.remote.api#PostV1IdentityVerificationEmploymentIdVerify" + }, + { + "target": "com.remote.api#GetV1IdentityCurrent" + }, + { + "target": "com.remote.api#GetV1Incentives" + }, + { + "target": "com.remote.api#PostV1Incentives" + }, + { + "target": "com.remote.api#GetV1IncentivesRecurring" + }, + { + "target": "com.remote.api#PostV1IncentivesRecurring" + }, + { + "target": "com.remote.api#DeleteV1IncentivesRecurringId" + }, + { + "target": "com.remote.api#GetV1IncentivesId" + }, + { + "target": "com.remote.api#PatchV1IncentivesId" + }, + { + "target": "com.remote.api#PatchV1IncentivesId2" + }, + { + "target": "com.remote.api#DeleteV1IncentivesId" + }, + { + "target": "com.remote.api#GetV1LeavePoliciesDetailsEmploymentId" + }, + { + "target": "com.remote.api#GetV1LeavePoliciesSummaryEmploymentId" + }, + { + "target": "com.remote.api#PostV1MagicLink" + }, + { + "target": "com.remote.api#GetV1Offboardings" + }, + { + "target": "com.remote.api#PostV1Offboardings" + }, + { + "target": "com.remote.api#GetV1OffboardingsEmploymentsEmploymentId" + }, + { + "target": "com.remote.api#GetV1OffboardingsId" + }, + { + "target": "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId" + }, + { + "target": "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign" + }, + { + "target": "com.remote.api#GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirements" + }, + { + "target": "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledge" + }, + { + "target": "com.remote.api#DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledge" + }, + { + "target": "com.remote.api#PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocuments" + }, + { + "target": "com.remote.api#GetV1PayItems" + }, + { + "target": "com.remote.api#PostV1PayItemsBulk" + }, + { + "target": "com.remote.api#PatchV1PayItemsId" + }, + { + "target": "com.remote.api#DeleteV1PayItemsId" + }, + { + "target": "com.remote.api#GetV1PayrollCalendars" + }, + { + "target": "com.remote.api#GetV1PayrollCalendarsCycle" + }, + { + "target": "com.remote.api#GetV1PayrollRuns" + }, + { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunId" + }, + { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdEmployeeDetails" + }, + { + "target": "com.remote.api#PostV1PayrollRunsPayrollRunIdGlReports" + }, + { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportId" + }, + { + "target": "com.remote.api#GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownload" + }, + { + "target": "com.remote.api#GetV1Payslips" + }, + { + "target": "com.remote.api#GetV1PayslipsPayslipIdPdf" + }, + { + "target": "com.remote.api#GetV1PricingPlanPartnerTemplates" + }, + { + "target": "com.remote.api#PostV1ProbationCompletionLetter" + }, + { + "target": "com.remote.api#GetV1ProbationCompletionLetterId" + }, + { + "target": "com.remote.api#PostV1ProbationExtensions" + }, + { + "target": "com.remote.api#GetV1ProbationExtensionsId" + }, + { + "target": "com.remote.api#GetV1ResignationsOffboardingRequestId" + }, + { + "target": "com.remote.api#GetV1ResignationsOffboardingRequestIdResignationLetter" + }, + { + "target": "com.remote.api#PutV1ResignationsOffboardingRequestIdValidate" + }, + { + "target": "com.remote.api#PostV1RiskReserve" + }, + { + "target": "com.remote.api#PostV1SandboxBenefitRenewalRequests" + }, + { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdBypassEligibilityChecks" + }, + { + "target": "com.remote.api#PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId" + }, + { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntities" + }, + { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayroll" + }, + { + "target": "com.remote.api#PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatus" + }, + { + "target": "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdApprove" + }, + { + "target": "com.remote.api#PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancel" + }, + { + "target": "com.remote.api#PostV1SandboxContractorsEmploymentsEmploymentIdRates" + }, + { + "target": "com.remote.api#PostV1SandboxEmployments" + }, + { + "target": "com.remote.api#PatchV1SandboxEmploymentsEmploymentId" + }, + { + "target": "com.remote.api#PatchV1SandboxEmploymentsEmploymentId2" + }, + { + "target": "com.remote.api#DeleteV1SandboxEmploymentsEmploymentId" + }, + { + "target": "com.remote.api#PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove" + }, + { + "target": "com.remote.api#PostV1SandboxWebhookCallbacksTrigger" + }, + { + "target": "com.remote.api#GetV1ScimV2Groups" + }, + { + "target": "com.remote.api#GetV1ScimV2GroupsId" + }, + { + "target": "com.remote.api#GetV1ScimV2Users" + }, + { + "target": "com.remote.api#GetV1ScimV2UsersId" + }, + { + "target": "com.remote.api#PostV1SdkTelemetryErrors" + }, + { + "target": "com.remote.api#GetV1SsoConfiguration" + }, + { + "target": "com.remote.api#PostV1SsoConfiguration" + }, + { + "target": "com.remote.api#GetV1SsoConfigurationDetails" + }, + { + "target": "com.remote.api#GetV1TestSchema" + }, + { + "target": "com.remote.api#GetV1Timeoff" + }, + { + "target": "com.remote.api#PostV1Timeoff" + }, + { + "target": "com.remote.api#GetV1TimeoffTypes" + }, + { + "target": "com.remote.api#GetV1TimeoffId" + }, + { + "target": "com.remote.api#PatchV1TimeoffId" + }, + { + "target": "com.remote.api#PatchV1TimeoffId2" + }, + { + "target": "com.remote.api#PostV1TimeoffTimeoffIdApprove" + }, + { + "target": "com.remote.api#PostV1TimeoffTimeoffIdCancel" + }, + { + "target": "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestApprove" + }, + { + "target": "com.remote.api#PostV1TimeoffTimeoffIdCancelRequestDecline" + }, + { + "target": "com.remote.api#PostV1TimeoffTimeoffIdDecline" + }, + { + "target": "com.remote.api#GetV1Timesheets" + }, + { + "target": "com.remote.api#GetV1TimesheetsId" + }, + { + "target": "com.remote.api#PostV1TimesheetsTimesheetIdApprove" + }, + { + "target": "com.remote.api#PostV1TimesheetsTimesheetIdSendBack" + }, + { + "target": "com.remote.api#GetV1TravelLetterRequests" + }, + { + "target": "com.remote.api#GetV1TravelLetterRequestsId" + }, + { + "target": "com.remote.api#PatchV1TravelLetterRequestsId" + }, + { + "target": "com.remote.api#PatchV1TravelLetterRequestsId2" + }, + { + "target": "com.remote.api#PostV1WebhookCallbacks" + }, + { + "target": "com.remote.api#PatchV1WebhookCallbacksId" + }, + { + "target": "com.remote.api#DeleteV1WebhookCallbacksId" + }, + { + "target": "com.remote.api#GetV1WebhookEvents" + }, + { + "target": "com.remote.api#PostV1WebhookEventsReplay" + }, + { + "target": "com.remote.api#GetV1WorkAuthorizationRequests" + }, + { + "target": "com.remote.api#GetV1WorkAuthorizationRequestsId" + }, + { + "target": "com.remote.api#PatchV1WorkAuthorizationRequestsId" + }, + { + "target": "com.remote.api#PatchV1WorkAuthorizationRequestsId2" + }, + { + "target": "com.remote.api#PatchV2EmploymentsEmploymentId" + }, + { + "target": "com.remote.api#PatchV2EmploymentsEmploymentId2" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdAddressDetails" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdAdministrativeDetails" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBankAccountDetails" + }, + { + "target": "com.remote.api#GetV2EmploymentsEmploymentIdBasicInformation" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBasicInformation" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdBillingAddressDetails" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdContractDetails" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdEmergencyContact" + }, + { + "target": "com.remote.api#GetV2EmploymentsEmploymentIdEngagementAgreementDetails" + }, + { + "target": "com.remote.api#PostV2EmploymentsEmploymentIdEngagementAgreementDetails" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdFederalTaxes" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPersonalDetails" + }, + { + "target": "com.remote.api#PutV2EmploymentsEmploymentIdPricingPlanDetails" + }, + { + "target": "com.remote.api#GetV2Offboardings" + }, + { + "target": "com.remote.api#GetV2OffboardingsId" + } + ], + "traits": { + "smithy.api#title": "Remote API", + "smithy.api#documentation": "Assembled from per-operation OpenAPI snippets in https://developer.remote.com/llms.txt. Remote does not publish a first-party OpenAPI document." + } + } + } +} diff --git a/packages/remote/package.json b/packages/remote/package.json new file mode 100644 index 000000000..f272048ff --- /dev/null +++ b/packages/remote/package.json @@ -0,0 +1,85 @@ +{ + "name": "@distilled.cloud/remote", + "version": "1.0.0-rc.8", + "repository": { + "type": "git", + "url": "https://github.com/alchemy-run/distilled", + "directory": "packages/remote" + }, + "license": "Apache-2.0", + "type": "module", + "sideEffects": false, + "files": [ + "lib", + "src" + ], + "exports": { + ".": { + "types": "./lib/index.d.ts", + "bun": "./src/index.ts", + "worker": "./src/index.ts", + "default": "./lib/index.js" + }, + "./Credentials": { + "types": "./lib/credentials.d.ts", + "bun": "./src/credentials.ts", + "worker": "./src/credentials.ts", + "default": "./lib/credentials.js" + }, + "./Errors": { + "types": "./lib/errors.d.ts", + "bun": "./src/errors.ts", + "worker": "./src/errors.ts", + "default": "./lib/errors.js" + }, + "./Traits": { + "types": "./lib/traits.d.ts", + "bun": "./src/traits.ts", + "worker": "./src/traits.ts", + "default": "./lib/traits.js" + }, + "./Pagination": { + "types": "./lib/pagination.d.ts", + "bun": "./src/pagination.ts", + "worker": "./src/pagination.ts", + "default": "./lib/pagination.js" + }, + "./Protocol": { + "types": "./lib/protocol.d.ts", + "bun": "./src/protocol.ts", + "worker": "./src/protocol.ts", + "default": "./lib/protocol.js" + }, + "./Retry": { + "types": "./lib/retry.d.ts", + "bun": "./src/retry.ts", + "worker": "./src/retry.ts", + "default": "./lib/retry.js" + }, + "./*": { + "types": "./lib/services/*.d.ts", + "bun": "./src/services/*.ts", + "worker": "./src/services/*.ts", + "default": "./lib/services/*.js" + } + }, + "scripts": { + "build": "tsc -b", + "convert": "bun scripts/convert.ts", + "generate": "bun scripts/convert.ts && bun scripts/generate.ts", + "typecheck": "tsc -p tsconfig.json", + "specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-remote", + "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-remote" + }, + "dependencies": { + "@distilled.cloud/core": "workspace:*" + }, + "devDependencies": { + "@types/bun": "catalog:tooling", + "@types/node": "catalog:tooling", + "@effect/platform-bun": "catalog:effect" + }, + "peerDependencies": { + "effect": "catalog:effect" + } +} diff --git a/packages/remote/scripts/convert.ts b/packages/remote/scripts/convert.ts new file mode 100644 index 000000000..8463480e8 --- /dev/null +++ b/packages/remote/scripts/convert.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env bun +/** + * convert — turn the Remote OpenAPI spec into a Smithy 2.0 JSON model. + * + * Input: specs/spec-mirror-remote/specs/openapi.json (spec submodule) + * patches/*.patch.json (RFC-6902 patches to the OpenAPI document) + * Output: .generated-specs/remote.json + * + * The OpenAPI→Smithy converter lives in + * `@distilled.cloud/core/codegen/openapi`; this script is Remote's pipeline + * config. `scripts/generate.ts` compiles the model into src/services. + */ +import * as path from "node:path"; +import { runOpenApiConvert } from "@distilled.cloud/core/codegen/openapi-cli"; + +await runOpenApiConvert({ + root: path.resolve(import.meta.dir, ".."), + specs: [ + { + name: "remote", + specPath: "specs/spec-mirror-remote/specs/openapi.json", + }, + ], + // OpenAPI-document patches (v0 layout: flat patches/*.patch.json). The + // smithy-model patch chain in generate.ts is disabled (`patchesDir: false`). + patchesDir: "patches", + options: { + namespace: "com.remote.api", + serviceName: "Remote", + skipDeprecated: true, + }, +}); diff --git a/packages/remote/scripts/generate.ts b/packages/remote/scripts/generate.ts new file mode 100644 index 000000000..73948b398 --- /dev/null +++ b/packages/remote/scripts/generate.ts @@ -0,0 +1,91 @@ +#!/usr/bin/env bun +/** + * generate — turn the Smithy JSON model in .generated-specs into the Remote + * Effect SDK. + * + * Input: .generated-specs/remote.json (written by scripts/convert.ts) + * Output: src/services/remote.ts + src/services/index.ts + * + * The smithy→SDK compiler and CLI pipeline live in + * `@distilled.cloud/core/codegen`; this script is Remote's provider spec. + * Remote keeps the wire's snake_case member names on the TS surface, so no + * member renaming or wire dictionaries appear here. + */ +import type { SdkSpec } from "@distilled.cloud/core/codegen/generator"; +import { runGeneratorCli } from "@distilled.cloud/core/codegen/cli"; + +const NULLABLE_TRAIT = "com.distilled.openapi#nullable"; +const ERROR_MATCHERS_TRAIT = "com.distilled.openapi#errorMatchers"; +const RAW_RESPONSE_TRAIT = "com.distilled.openapi#rawResponse"; +const SENSITIVE_TRAIT = "smithy.api#sensitive"; + +/** Remote's provider spec for the shared smithy→SDK compiler. */ +const remoteSpec: SdkSpec = { + nullableTrait: NULLABLE_TRAIT, + errorMatchersTrait: ERROR_MATCHERS_TRAIT, + + extraBindings: [ + { + // Sole member of a synthesized wrapper for bare array/scalar response + // bodies; as the response's only member, the response IS the payload. + trait: RAW_RESPONSE_TRAIT, + binding: "rawResponse", + pipe: "T.RawResponse()", + rootPipe: "T.RawResponseRoot()", + }, + ], + + // Sensitive strings (tokens, secrets, API keys): the schema member + // carries T.SensitiveValue; the REST protocol delivers Redacted values + // and accepts string | Redacted on input. + memberTraitPipes: { + [SENSITIVE_TRAIT]: "T.SensitiveValue", + }, + memberTsType: (m) => + SENSITIVE_TRAIT in m.traits + ? `string | Redacted.Redacted${m.nullable ? " | null" : ""}` + : undefined, + + // Unions surface as TS type unions over an opaque schema — the REST + // protocol passes union content through verbatim (wire names ARE the TS + // names for Remote), so no runtime case discrimination is needed. + union: ({ name, caseTargets, tsRef }) => [ + `export type ${name} = ${caseTargets.map(tsRef).join(" | ") || "unknown"};`, + `export const ${name} = /*@__PURE__*/ S.Unknown as any as S.Schema<${name}>;\n`, + ], + + paginationProfiles: { + cursor: { + strategy: "paginateCursor", + itemsFallback: "items", + }, + }, + + operationDecl: { + contextType: "RemoteOpContext", + commonErrorType: "RemoteOpError", + commonErrorClasses: ["UnknownRemoteError"], + protocol: "RemoteProtocol", + retry: "Retry.Retry", + }, + + sourceNote: ".generated-specs (specs/distilled-spec-remote)", + + // Sensitive member types reference Redacted; pull the import in when used. + postProcess: (code) => + code.includes("Redacted.Redacted<") + ? code.replace( + `import * as S from "@distilled.cloud/core/schema";\n`, + `import * as S from "@distilled.cloud/core/schema";\nimport * as Redacted from "effect/Redacted";\n`, + ) + : code, +}; + +runGeneratorCli({ + description: "Generate the Remote Effect SDK from the Smithy model", + root: `${import.meta.dir}/..`, + // patches/ holds OpenAPI-document patches consumed by scripts/convert.ts; + // there is no smithy-model patch chain. + patchesDir: false, + spec: () => remoteSpec, +}); diff --git a/packages/remote/src/credentials.ts b/packages/remote/src/credentials.ts new file mode 100644 index 000000000..e0d60be75 --- /dev/null +++ b/packages/remote/src/credentials.ts @@ -0,0 +1,63 @@ +/** + * Remote credentials — hand-written. + * + * The `Credentials` service holds an *effect* that resolves the current + * credentials on every request (the protocol layer resolves it per request + * on the calling fiber). Auth is a Remote API / OAuth bearer token sent as + * `Authorization: Bearer `. + */ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as Redacted from "effect/Redacted"; +import { ConfigError } from "@distilled.cloud/core/errors"; + +export const DEFAULT_API_BASE_URL = "https://gateway.remote.com"; + +export interface Config { + readonly apiKey: Redacted.Redacted; + readonly apiBaseUrl: string; +} + +export class Credentials extends Context.Service< + Credentials, + Effect.Effect +>()("RemoteCredentials") {} + +/** Layer from a plain API token + optional base URL. */ +export const fromApiKey = (config: { + readonly apiKey: string; + readonly apiBaseUrl?: string; +}): Layer.Layer => + Layer.succeed( + Credentials, + Effect.succeed({ + apiKey: Redacted.make(config.apiKey), + apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL, + }), + ); + +/** + * Reads REMOTE_API_KEY or REMOTE_ACCESS_TOKEN (required) and + * REMOTE_API_BASE_URL (optional). Sandbox is + * `https://gateway.remote-sandbox.com`. + */ +export const CredentialsFromEnv: Layer.Layer = Layer.succeed( + Credentials, + Effect.gen(function* () { + const apiKey = + process.env.REMOTE_API_KEY ?? process.env.REMOTE_ACCESS_TOKEN; + + if (!apiKey) { + return yield* new ConfigError({ + message: + "REMOTE_API_KEY (or REMOTE_ACCESS_TOKEN) environment variable is required", + }); + } + + return { + apiKey: Redacted.make(apiKey), + apiBaseUrl: process.env.REMOTE_API_BASE_URL ?? DEFAULT_API_BASE_URL, + }; + }).pipe(Effect.orDie), +); diff --git a/packages/remote/src/errors.ts b/packages/remote/src/errors.ts new file mode 100644 index 000000000..bb2918e0e --- /dev/null +++ b/packages/remote/src/errors.ts @@ -0,0 +1,50 @@ +/** + * Remote-specific error types. + * + * Re-exports the common HTTP errors from core and adds the Remote fallback + * errors. Note the generated service module additionally defines its own + * per-status matcher classes (BadRequest/NotFound/…) for the statuses each + * operation declares — those share `_tag`s with the core classes here, so + * `catchTag` works against either. + */ +export { + BadGateway, + BadRequest, + Conflict, + ConfigError, + Forbidden, + GatewayTimeout, + InternalServerError, + Locked, + NotFound, + ServiceUnavailable, + TooManyRequests, + Unauthorized, + UnprocessableEntity, + HTTP_STATUS_MAP, + DEFAULT_ERRORS, + API_ERRORS, +} from "@distilled.cloud/core/errors"; +export type { DefaultErrors } from "@distilled.cloud/core/errors"; + +import * as Schema from "effect/Schema"; +import * as Category from "@distilled.cloud/core/category"; + +/** Unknown Remote error — returned when nothing else matches the failure. */ +export class UnknownRemoteError extends Schema.TaggedError()( + "UnknownRemoteError", + { + code: Schema.optional(Schema.String), + message: Schema.optional(Schema.String), + body: Schema.Unknown, + }, +).pipe(Category.withServerError) {} + +/** Schema parse error wrapper. */ +export class RemoteParseError extends Schema.TaggedError()( + "RemoteParseError", + { + body: Schema.Unknown, + cause: Schema.Unknown, + }, +).pipe(Category.withParseError) {} diff --git a/packages/remote/src/index.ts b/packages/remote/src/index.ts new file mode 100644 index 000000000..907a91fa9 --- /dev/null +++ b/packages/remote/src/index.ts @@ -0,0 +1,38 @@ +/** + * @distilled.cloud/remote — Remote SDK for Effect. + * + * `./services` is generated by `scripts/generate.ts` from the Smithy model + * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI + * spec assembled from https://developer.remote.com/llms.txt). Everything + * else in this folder is hand-written. + * + * @example + * ```ts + * import * as Remote from "@distilled.cloud/remote"; + * + * const countries = yield* Remote.Services.remote.getV1Countries({}); + * ``` + */ +export * from "./credentials.ts"; +export * from "./errors.ts"; +export * as T from "./traits.ts"; +export { + RemoteProtocol, + type RemoteOpError, + type RemoteOpContext, +} from "./protocol.ts"; +export { paginateCursor } from "./pagination.ts"; +export * as Retry from "./retry.ts"; +export * as Services from "./services/index.ts"; +// Operations (and their request/response types) are importable straight off +// the package root. The service-local typed error classes shadow the +// same-named shared ones from ./errors.ts — the ops actually raise the +// service-local classes. +export * from "./services/remote.ts"; +export { + BadRequest, + Conflict, + Forbidden, + NotFound, + UnprocessableEntity, +} from "./services/remote.ts"; diff --git a/packages/remote/src/pagination.ts b/packages/remote/src/pagination.ts new file mode 100644 index 000000000..29054bb49 --- /dev/null +++ b/packages/remote/src/pagination.ts @@ -0,0 +1,7 @@ +/** + * Remote pagination — hand-written. + * + * Generated operations that the converter stamps as cursor-mode pass core's + * {@link paginateCursor}. + */ +export { paginateCursor } from "@distilled.cloud/core/pagination"; diff --git a/packages/remote/src/protocol.ts b/packages/remote/src/protocol.ts new file mode 100644 index 000000000..469256da7 --- /dev/null +++ b/packages/remote/src/protocol.ts @@ -0,0 +1,69 @@ +/** + * RemoteProtocol — hand-written. + * + * Remote speaks plain bearer-authenticated JSON REST (no response envelope), + * so the whole protocol is one `makeRestProtocol` call from + * `core/protocol-rest`: + * + * request: credentials → `Authorization: Bearer ` + base URL + * (default https://gateway.remote.com), resolved from the + * calling fiber on every request + * + * response: 2xx JSON is the payload (sensitive members delivered as + * `Redacted`); non-2xx `{ code?, message }` bodies map to the + * operation's typed error classes by status, then the shared + * HTTP-status classes, then {@link UnknownRemoteError}. + */ +import * as Effect from "effect/Effect"; +import type * as Layer from "effect/Layer"; +import * as Redacted from "effect/Redacted"; +import type * as HttpClient from "effect/unstable/http/HttpClient"; +import type * as HttpClientError from "effect/unstable/http/HttpClientError"; +import type * as API from "@distilled.cloud/core/api"; +import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest"; +import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors"; +import { Credentials, type Config } from "./credentials.ts"; +import { UnknownRemoteError } from "./errors.ts"; + +/** + * Error channel shared by every generated Remote operation. Generated service + * files annotate operations with `API.OperationMethod` explicitly so the compiler never infers these back out of + * the schema generics. + */ +export type RemoteOpError = + | InstanceType<(typeof API_ERRORS)[number]> + | UnknownRemoteError + | ConfigError + | HttpClientError.HttpClientError; + +/** Context (requirements) shared by every generated Remote operation. */ +export type RemoteOpContext = Credentials | HttpClient.HttpClient; + +export const RemoteProtocol: Layer.Layer = + makeRestProtocol({ + // The Credentials service holds an effect — resolving it here (per + // request, on the calling fiber) picks up context-provided credentials. + credentials: Effect.gen(function* () { + const resolve = yield* Credentials; + return yield* resolve; + }), + baseUrl: (creds) => creds.apiBaseUrl, + headers: (creds) => ({ + Authorization: `Bearer ${Redacted.value(creds.apiKey)}`, + }), + // Remote's error body is `{ code?: string, message: string }` (or + // `{ errors }` / `{ message }` depending on status) — the factory's + // default lenient envelope covers it. + unknownError: ({ code, message, body }) => + new UnknownRemoteError({ + code: + typeof code === "string" + ? code + : code !== undefined + ? String(code) + : undefined, + message, + body, + }), + }); diff --git a/packages/remote/src/retry.ts b/packages/remote/src/retry.ts new file mode 100644 index 000000000..78641e23c --- /dev/null +++ b/packages/remote/src/retry.ts @@ -0,0 +1,54 @@ +/** + * Remote retry configuration. + * + * Defines the per-SDK `Retry` Context.Service tag that generated operations + * wire into `API.make`. Callers can install a blanket retry policy at the + * layer level and have every Remote API call below it pick it up: + * + * @example + * ```ts + * import * as Remote from "@distilled.cloud/remote"; + * + * myEffect.pipe(Remote.Retry.transient); + * Effect.provide(myEffect, Layer.succeed(Remote.Retry.Retry, customPolicy)); + * ``` + */ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import { + type Policy, + throttlingFactory, + transientFactory, +} from "@distilled.cloud/core/retry"; + +export { + type Options, + type Factory, + type Policy, + makeDefault, + jittered, + capped, + throttlingOptions, + transientOptions, + throttlingFactory, + transientFactory, +} from "@distilled.cloud/core/retry"; + +/** Context tag for configuring retry behavior of Remote API calls. */ +export class Retry extends Context.Service()("RemoteRetry") {} + +/** Provides a custom retry policy to every Remote API call below it. */ +export const policy = (optionsOrFactory: Policy) => + Effect.provide(Layer.succeed(Retry, optionsOrFactory)); + +/** Disables all automatic retries. */ +export const none = Effect.provide( + Layer.succeed(Retry, { while: () => false }), +); + +/** Apply the throttling retry policy (retries throttling errors indefinitely). */ +export const throttling = policy(throttlingFactory); + +/** Apply the transient retry policy (retries all transient errors indefinitely). */ +export const transient = policy(transientFactory); diff --git a/packages/remote/src/services/index.ts b/packages/remote/src/services/index.ts new file mode 100644 index 000000000..078adb19a --- /dev/null +++ b/packages/remote/src/services/index.ts @@ -0,0 +1,2 @@ +// AUTO-GENERATED by scripts/generate.ts. Do not edit. +export * as remote from "./remote.ts"; diff --git a/packages/remote/src/services/remote.ts b/packages/remote/src/services/remote.ts new file mode 100644 index 000000000..7a0ff5fcb --- /dev/null +++ b/packages/remote/src/services/remote.ts @@ -0,0 +1,27844 @@ +// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/distilled-spec-remote). Do not edit. +import * as S from "@distilled.cloud/core/schema"; +import * as Redacted from "effect/Redacted"; +import * as API from "@distilled.cloud/core/api"; +import * as C from "@distilled.cloud/core/category"; +import * as T from "../traits.ts"; +import { + RemoteProtocol, + type RemoteOpError, + type RemoteOpContext, +} from "../protocol.ts"; +import { UnknownRemoteError } from "../errors.ts"; +import * as Retry from "../retry.ts"; + +export type { RemoteOpError, RemoteOpContext }; + +export class BadRequest + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("BadRequest", { + code: S.Number, + message: S.String, + }).pipe(C.withBadRequestError), + [{ status: 400 }], + ) {} + +export class Conflict + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("Conflict", { + code: S.Number, + message: S.String, + }).pipe(C.withConflictError), + [{ status: 409 }], + ) {} + +export class Forbidden + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("Forbidden", { + code: S.Number, + message: S.String, + }).pipe(C.withAuthError), + [{ status: 403 }], + ) {} + +export class NotFound + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("NotFound", { + code: S.Number, + message: S.String, + }).pipe(C.withBadRequestError), + [{ status: 404 }], + ) {} + +export class UnprocessableEntity + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("UnprocessableEntity", { + code: S.Number, + message: S.String, + }).pipe(C.withBadRequestError), + [{ status: 422 }], + ) {} + +export interface DeleteV1CompanyManagersUserIdRequest { + /** User ID */ + user_id: string; +} +export const DeleteV1CompanyManagersUserIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + user_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/v1/company-managers/{user_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteV1CompanyManagersUserIdRequest", +}) as any as S.Schema; + +export interface SuccessResponseData { + /** The result status. Always `"ok"` for successful operations. */ + status?: string; +} +export const SuccessResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(S.String), + }), +).annotate({ + identifier: "SuccessResponseData", +}) as any as S.Schema; + +/** A generic success response returned by operations that don't produce a specific resource (e.g., updates, deletes). */ +export interface SuccessResponse { + data: SuccessResponseData; +} +export const SuccessResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: SuccessResponseData, + }), +).annotate({ + identifier: "SuccessResponse", +}) as any as S.Schema; + +export interface DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest { + /** Employment ID */ + employment_id: string; +} +export const DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/v1/contractors/employments/{employment_id}/contractor-cor-subscription", + code: 200, + }), + ), + ).annotate({ + identifier: + "DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest", + }) as any as S.Schema; + +export interface DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse {} +export const DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: + "DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse", + }) as any as S.Schema; + +export interface DeleteV1IncentivesIdRequest { + /** Incentive ID */ + id: string; +} +export const DeleteV1IncentivesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/v1/incentives/{id}", code: 200 })), +).annotate({ + identifier: "DeleteV1IncentivesIdRequest", +}) as any as S.Schema; + +export interface DeleteV1IncentivesRecurringIdRequest { + /** Recurring Incentive ID */ + id: string; +} +export const DeleteV1IncentivesRecurringIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/v1/incentives/recurring/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteV1IncentivesRecurringIdRequest", +}) as any as S.Schema; + +/** Whether the amount given accounts for taxes or not. `gross` indicates that the amount given is the amount to be paid before taxes are subtracted. `net` indicates that the amount given is the amount which will be paid to the employee after taxes. Remote will gross this up to ensure the taxes are included and employee receives the amount requested without further reduction. */ +export type AmountTaxType = "gross" | "net"; +export const AmountTaxType = /*@__PURE__*/ S.String; + +/** 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 interface 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 broader payroll category this incentive's `type` belongs to (e.g., "incentive", "benefits_cash"). */ + payroll_output_category?: string; + /** 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; + /** The human-readable label for `type` (e.g., "Signing bonus", "Commission", "Severance"). */ + type_label?: string; +} +export const Incentive = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + amount_tax_type: AmountTaxType, + effective_date: S.NullOr(S.String), + employment_id: S.String, + expected_payout_date: S.optional(S.NullOr(S.String)), + id: S.String, + note: S.optional(S.NullOr(S.String)), + payroll_output_category: S.optional(S.String), + period_end: S.optional(S.NullOr(S.String)), + period_start: S.optional(S.NullOr(S.String)), + recurring_incentive_id: S.optional(S.NullOr(S.String)), + status: S.String, + type: S.String, + type_label: S.optional(S.String), + }), +).annotate({ identifier: "Incentive" }) as any as S.Schema; + +export type DeleteRecurringIncentiveResponseDataAlreadyScheduledIncentivesList = + Array; +export const DeleteRecurringIncentiveResponseDataAlreadyScheduledIncentivesList = + /*@__PURE__*/ S.Array( + Incentive, + ) as any as S.Schema; + +export interface DeleteRecurringIncentiveResponseData { + already_scheduled_incentives: DeleteRecurringIncentiveResponseDataAlreadyScheduledIncentivesList; + status?: string; +} +export const DeleteRecurringIncentiveResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + already_scheduled_incentives: + DeleteRecurringIncentiveResponseDataAlreadyScheduledIncentivesList, + status: S.optional(S.String), + }), +).annotate({ + identifier: "DeleteRecurringIncentiveResponseData", +}) as any as S.Schema; + +/** `"status": "ok"` indicates that any recurring incentives with `pending` status were successfully deleted. `already_scheduled_incentives` returns a list of incentives that were already scheduled for payout and as such, cannot be deleted. You will notice that these incentives do not have a `pending` status. */ +export interface DeleteRecurringIncentiveResponse { + data: DeleteRecurringIncentiveResponseData; +} +export const DeleteRecurringIncentiveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: DeleteRecurringIncentiveResponseData, + }), +).annotate({ + identifier: "DeleteRecurringIncentiveResponse", +}) as any as S.Schema; + +export interface DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest { + /** Employment ID */ + employment_id: string; + /** Pre-onboarding requirement slug */ + requirement_slug: string; +} +export const DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + requirement_slug: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements/{requirement_slug}/acknowledge", + code: 200, + }), + ), + ).annotate({ + identifier: + "DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest", + }) as any as S.Schema; + +export interface DeleteV1PayItemsIdRequest { + /** Pay item ID */ + id: string; +} +export const DeleteV1PayItemsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/v1/pay-items/{id}", code: 200 })), +).annotate({ + identifier: "DeleteV1PayItemsIdRequest", +}) as any as S.Schema; + +export interface DeleteV1SandboxEmploymentsEmploymentIdRequest { + /** Employment ID */ + employment_id: string; +} +export const DeleteV1SandboxEmploymentsEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/v1/sandbox/employments/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "DeleteV1SandboxEmploymentsEmploymentIdRequest", + }) as any as S.Schema; + +export interface DeleteV1WebhookCallbacksIdRequest { + /** Webhook Callback ID */ + id: string; +} +export const DeleteV1WebhookCallbacksIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/v1/webhook-callbacks/{id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteV1WebhookCallbacksIdRequest", +}) as any as S.Schema; + +export interface GetV1BenefitOffersRequest {} +export const GetV1BenefitOffersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/benefit-offers", code: 200 }), + ), +).annotate({ + identifier: "GetV1BenefitOffersRequest", +}) as any as S.Schema; + +/** 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 interface 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; +} +export const BenefitGroup = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + name: S.String, + policy_end_date: S.String, + policy_start_date: S.String, + }), +).annotate({ identifier: "BenefitGroup" }) as any as S.Schema; + +/** 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 interface 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; +} +export const BenefitProvider = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + name: S.String, + }), +).annotate({ + identifier: "BenefitProvider", +}) as any as S.Schema; + +/** The insurance carriers or providers associated with this tier. */ +export type BenefitTierProvidersList = Array; +export const BenefitTierProvidersList = /*@__PURE__*/ S.Array( + BenefitProvider, +) as any as S.Schema; + +/** 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 interface 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: BenefitTierProvidersList; +} +export const BenefitTier = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.String, + id: S.String, + name: S.String, + providers: BenefitTierProvidersList, + }), +).annotate({ identifier: "BenefitTier" }) as any as S.Schema; + +/** The cost breakdown between employee and employer for a benefit. Amounts are in the company's billing currency, in cents. */ +export interface 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; +} +export const Costs = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employee_cost: S.Number, + employer_cost: S.Number, + }), +).annotate({ identifier: "Costs" }) as any as S.Schema; + +/** 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. */ +export type BenefitStatus = "offered" | "enrolled" | "waived"; +export const BenefitStatus = /*@__PURE__*/ S.String; + +/** Benefits with status enrolled have their summed costs in costs. Benefits with status offered have their summed costs in projected_costs. Benefit-offers where the employer opted-out have benefit_tier: null in the response. */ +export interface Benefit { + costs: Costs | null; + /** 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 | null; + provider: BenefitProvider | null; + /** 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: BenefitStatus; + /** The type/category of the benefit. */ + type: string; +} +export const Benefit = /*@__PURE__*/ S.suspend(() => + S.Struct({ + costs: S.NullOr(Costs), + coverage_end_date: S.String, + coverage_start_date: S.String, + id: S.String, + name: S.String, + projected_costs: S.NullOr(Costs), + provider: S.NullOr(BenefitProvider), + status: BenefitStatus, + type: S.String, + }), +).annotate({ identifier: "Benefit" }) as any as S.Schema; + +export type BenefitOfferBenefitsList = Array; +export const BenefitOfferBenefitsList = /*@__PURE__*/ S.Array( + Benefit, +) as any as S.Schema; + +export interface BenefitOffer { + benefit_group: BenefitGroup; + benefit_tier: BenefitTier | null; + benefits: BenefitOfferBenefitsList; + costs: Costs | null; +} +export const BenefitOffer = /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_group: BenefitGroup, + benefit_tier: S.NullOr(BenefitTier), + benefits: BenefitOfferBenefitsList, + costs: S.NullOr(Costs), + }), +).annotate({ identifier: "BenefitOffer" }) as any as S.Schema; + +export type BenefitOffersByEmploymentBenefitOffersList = Array; +export const BenefitOffersByEmploymentBenefitOffersList = /*@__PURE__*/ S.Array( + BenefitOffer, +) as any as S.Schema; + +export type CountryContractorProductsAvailableItem = + | "standard" + | "plus" + | "cor"; +export const CountryContractorProductsAvailableItem = /*@__PURE__*/ S.String; + +/** Contractor product names available for this country */ +export type CountryContractorProductsAvailableList = Array< + CountryContractorProductsAvailableItem | (string & {}) +>; +export const CountryContractorProductsAvailableList = /*@__PURE__*/ S.Array( + CountryContractorProductsAvailableItem, +) as any as S.Schema; + +/** A subdivision of a supported country on Remote */ +export interface 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; +} +export const CountrySubdivision = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.optional(S.String), + name: S.String, + subdivision_type: S.optional(S.String), + }), +).annotate({ + identifier: "CountrySubdivision", +}) as any as S.Schema; + +/** Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services. */ +export type CountryCountrySubdivisionsList = Array; +export const CountryCountrySubdivisionsList = /*@__PURE__*/ S.Array( + CountrySubdivision, +) as any as S.Schema; + +/** 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. */ +export type CountrySupportedJsonSchemasList = Array; +export const CountrySupportedJsonSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** A supported country on Remote */ +export interface 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?: CountryContractorProductsAvailableList; + /** Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services. */ + country_subdivisions?: CountryCountrySubdivisionsList | null; + /** Whether an Employment Agreement preview is available for this country. */ + employment_agreement_preview_available?: boolean; + /** Whether EOR (Employer of Record) onboarding is available in this country. */ + 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?: CountrySupportedJsonSchemasList; +} +export const Country = /*@__PURE__*/ S.suspend(() => + S.Struct({ + alpha_2_code: S.String, + code: S.String, + contractor_products_available: S.optional( + CountryContractorProductsAvailableList, + ), + country_subdivisions: S.optional(S.NullOr(CountryCountrySubdivisionsList)), + employment_agreement_preview_available: S.optional(S.Boolean), + eor_onboarding: S.optional(S.Boolean), + locked_benefits: S.optional(S.String), + name: S.String, + region: S.optional(S.String), + subregion: S.optional(S.NullOr(S.String)), + supported_json_schemas: S.optional(CountrySupportedJsonSchemasList), + }), +).annotate({ identifier: "Country" }) as any as S.Schema; + +/** A lightweight employment representation used in benefit offer listings. */ +export interface 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; +} +export const BenefitOffersEmployment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country: Country, + given_name: S.NullOr(S.String), + id: S.String, + name: S.String, + surname: S.NullOr(S.String), + }), +).annotate({ + identifier: "BenefitOffersEmployment", +}) as any as S.Schema; + +export interface BenefitOffersByEmployment { + benefit_offers: BenefitOffersByEmploymentBenefitOffersList; + costs: Costs | null; + employment: BenefitOffersEmployment; +} +export const BenefitOffersByEmployment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_offers: BenefitOffersByEmploymentBenefitOffersList, + costs: S.NullOr(Costs), + employment: BenefitOffersEmployment, + }), +).annotate({ + identifier: "BenefitOffersByEmployment", +}) as any as S.Schema; + +export type BenefitOfferByEmploymentResponseDataBenefitOffersByEmploymentList = + Array; +export const BenefitOfferByEmploymentResponseDataBenefitOffersByEmploymentList = + /*@__PURE__*/ S.Array( + BenefitOffersByEmployment, + ) as any as S.Schema; + +/** The type of money in general use in a particular country */ +export interface Currency { + code: string; + name?: string; + slug: string; + symbol: string; +} +export const Currency = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + name: S.optional(S.String), + slug: S.String, + symbol: S.String, + }), +).annotate({ identifier: "Currency" }) as any as S.Schema; + +export interface BenefitOfferByEmploymentResponseData { + benefit_offers_by_employment: BenefitOfferByEmploymentResponseDataBenefitOffersByEmploymentList; + /** The unique identifier (UUID) of the company. */ + company_id: string; + currency: Currency; +} +export const BenefitOfferByEmploymentResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + benefit_offers_by_employment: + BenefitOfferByEmploymentResponseDataBenefitOffersByEmploymentList, + company_id: S.String, + currency: Currency, + }), +).annotate({ + identifier: "BenefitOfferByEmploymentResponseData", +}) as any as S.Schema; + +export interface BenefitOfferByEmploymentResponse { + data: BenefitOfferByEmploymentResponseData; +} +export const BenefitOfferByEmploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BenefitOfferByEmploymentResponseData, + }), +).annotate({ + identifier: "BenefitOfferByEmploymentResponse", +}) as any as S.Schema; + +export interface GetV1BenefitOffersCountrySummariesRequest {} +export const GetV1BenefitOffersCountrySummariesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/v1/benefit-offers/country-summaries", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1BenefitOffersCountrySummariesRequest", + }) as any as S.Schema; + +/** 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 interface 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; +} +export const EmployeeStats = /*@__PURE__*/ S.suspend(() => + S.Struct({ + number_of_employees_enrolled: S.Number, + number_of_employees_offered: S.Number, + }), +).annotate({ identifier: "EmployeeStats" }) as any as S.Schema; + +/** A benefit tier that has been offered to employees, combined with enrollment statistics for that tier. */ +export interface OfferedBenefitTier { + benefit_tier: BenefitTier; + employee_stats: EmployeeStats; +} +export const OfferedBenefitTier = /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_tier: BenefitTier, + employee_stats: EmployeeStats, + }), +).annotate({ + identifier: "OfferedBenefitTier", +}) as any as S.Schema; + +/** The individual tiers within this group that have been offered, each with their own enrollment statistics. */ +export type OfferedBenefitGroupOfferedBenefitTiersList = + Array; +export const OfferedBenefitGroupOfferedBenefitTiersList = /*@__PURE__*/ S.Array( + OfferedBenefitTier, +) as any as S.Schema; + +/** 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 interface 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: OfferedBenefitGroupOfferedBenefitTiersList; +} +export const OfferedBenefitGroup = /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_group: BenefitGroup, + employee_stats: EmployeeStats, + offered_benefit_tiers: OfferedBenefitGroupOfferedBenefitTiersList, + }), +).annotate({ + identifier: "OfferedBenefitGroup", +}) as any as S.Schema; + +/** All benefit groups that have been offered to employees in this country. */ +export type CountrySummaryOfferedBenefitGroupsList = Array; +export const CountrySummaryOfferedBenefitGroupsList = /*@__PURE__*/ S.Array( + OfferedBenefitGroup, +) as any as S.Schema; + +/** 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 interface CountrySummary { + country: Country; + employee_stats: EmployeeStats; + /** All benefit groups that have been offered to employees in this country. */ + offered_benefit_groups: CountrySummaryOfferedBenefitGroupsList; +} +export const CountrySummary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country: Country, + employee_stats: EmployeeStats, + offered_benefit_groups: CountrySummaryOfferedBenefitGroupsList, + }), +).annotate({ identifier: "CountrySummary" }) as any as S.Schema; + +/** Benefit offering summaries for each country where the company has employees. */ +export type CountrySummariesResponseDataCountrySummariesList = + Array; +export const CountrySummariesResponseDataCountrySummariesList = + /*@__PURE__*/ S.Array( + CountrySummary, + ) as any as S.Schema; + +export interface CountrySummariesResponseData { + /** 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: CountrySummariesResponseDataCountrySummariesList; +} +export const CountrySummariesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String, + country_summaries: CountrySummariesResponseDataCountrySummariesList, + }), +).annotate({ + identifier: "CountrySummariesResponseData", +}) as any as S.Schema; + +/** 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 interface CountrySummariesResponse { + data: CountrySummariesResponseData; +} +export const CountrySummariesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CountrySummariesResponseData, + }), +).annotate({ + identifier: "CountrySummariesResponse", +}) as any as S.Schema; + +export interface GetV1BenefitRenewalRequestsRequest { + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1BenefitRenewalRequestsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/benefit-renewal-requests", code: 200 }), + ), +).annotate({ + identifier: "GetV1BenefitRenewalRequestsRequest", +}) as any as S.Schema; + +/** A lightweight benefit group reference used in renewal requests. */ +export interface 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; +} +export const BenefitRenewalRequestsMinimalBenefitGroup = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String, + id: S.String, + name: S.String, + }), + ).annotate({ + identifier: "BenefitRenewalRequestsMinimalBenefitGroup", + }) as any as S.Schema; + +export interface 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; +} +export const NullableMinimalBenefitTier = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.String, + display_cost: S.optional(S.NullOr(S.String)), + id: S.String, + name: S.String, + }), +).annotate({ + identifier: "NullableMinimalBenefitTier", +}) as any as S.Schema; + +export interface BenefitRenewalRequestsMinimalBenefitRenewalResponse { + benefit_tier: NullableMinimalBenefitTier | null; + updated_at: string; +} +export const BenefitRenewalRequestsMinimalBenefitRenewalResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_tier: S.NullOr(NullableMinimalBenefitTier), + updated_at: S.String, + }), + ).annotate({ + identifier: "BenefitRenewalRequestsMinimalBenefitRenewalResponse", + }) as any as S.Schema; + +export interface BenefitRenewalRequestsBenefitRenewalRequest { + benefit_group: BenefitRenewalRequestsMinimalBenefitGroup; + benefit_renewal_response: BenefitRenewalRequestsMinimalBenefitRenewalResponse | null; + coverage_end_date: string; + coverage_start_date: string; + current_benefit_tier?: NullableMinimalBenefitTier | null; + /** 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: string; + /** Instructions for the employer about the renewal process, available plans, and deadlines. */ + renewal_selection_instructions: string; + renewal_selection_start_date: string; +} +export const BenefitRenewalRequestsBenefitRenewalRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_group: BenefitRenewalRequestsMinimalBenefitGroup, + benefit_renewal_response: S.NullOr( + BenefitRenewalRequestsMinimalBenefitRenewalResponse, + ), + coverage_end_date: S.String, + coverage_start_date: S.String, + current_benefit_tier: S.optional(S.NullOr(NullableMinimalBenefitTier)), + id: S.String, + number_of_affected_employees: S.Number, + renewal_selection_end_date: S.String, + renewal_selection_instructions: S.String, + renewal_selection_start_date: S.String, + }), + ).annotate({ + identifier: "BenefitRenewalRequestsBenefitRenewalRequest", + }) as any as S.Schema; + +export type BenefitRenewalRequestsListBenefitRenewalRequestResponseDataBenefitRenewalRequestsList = + Array; +export const BenefitRenewalRequestsListBenefitRenewalRequestResponseDataBenefitRenewalRequestsList = + /*@__PURE__*/ S.Array( + BenefitRenewalRequestsBenefitRenewalRequest, + ) as any as S.Schema; + +export interface BenefitRenewalRequestsListBenefitRenewalRequestResponseData { + benefit_renewal_requests?: BenefitRenewalRequestsListBenefitRenewalRequestResponseDataBenefitRenewalRequestsList; + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const BenefitRenewalRequestsListBenefitRenewalRequestResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_renewal_requests: S.optional( + BenefitRenewalRequestsListBenefitRenewalRequestResponseDataBenefitRenewalRequestsList, + ), + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), + ).annotate({ + identifier: "BenefitRenewalRequestsListBenefitRenewalRequestResponseData", + }) as any as S.Schema; + +/** Response schema listing many benefit_renewal_requests */ +export interface BenefitRenewalRequestsListBenefitRenewalRequestResponse { + data?: BenefitRenewalRequestsListBenefitRenewalRequestResponseData; +} +export const BenefitRenewalRequestsListBenefitRenewalRequestResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional( + BenefitRenewalRequestsListBenefitRenewalRequestResponseData, + ), + }), + ).annotate({ + identifier: "BenefitRenewalRequestsListBenefitRenewalRequestResponse", + }) as any as S.Schema; + +export interface GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest { + /** Benefit Renewal Request Id */ + benefit_renewal_request_id: string; +} +export const GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_renewal_request_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/benefit-renewal-requests/{benefit_renewal_request_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest", + }) as any as S.Schema; + +export interface BenefitRenewalRequestsBenefitRenewalRequestResponseData { + benefit_renewal_request: BenefitRenewalRequestsBenefitRenewalRequest; +} +export const BenefitRenewalRequestsBenefitRenewalRequestResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_renewal_request: BenefitRenewalRequestsBenefitRenewalRequest, + }), + ).annotate({ + identifier: "BenefitRenewalRequestsBenefitRenewalRequestResponseData", + }) as any as S.Schema; + +/** Benefit Renewal Request Response */ +export interface BenefitRenewalRequestsBenefitRenewalRequestResponse { + data: BenefitRenewalRequestsBenefitRenewalRequestResponseData; +} +export const BenefitRenewalRequestsBenefitRenewalRequestResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BenefitRenewalRequestsBenefitRenewalRequestResponseData, + }), + ).annotate({ + identifier: "BenefitRenewalRequestsBenefitRenewalRequestResponse", + }) as any as S.Schema; + +/** Use latest version */ +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersion = + | number + | GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersionCase1; +export const GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest { + /** Benefit Renewal Request Id */ + benefit_renewal_request_id: string; + /** Version of the form schema */ + json_schema_version?: GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersion; +} +export const GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_renewal_request_id: S.String.pipe(T.Label()), + json_schema_version: S.optional( + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest", + }) as any as S.Schema; + +/** Benefit Renewal Request Form Response, an object with required and optional fields, its descriptions and suggested presentation. */ +export interface BenefitRenewalRequestsBenefitRenewalRequestFormResponse { + data?: unknown; +} +export const BenefitRenewalRequestsBenefitRenewalRequestFormResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(S.Unknown), + }), + ).annotate({ + identifier: "BenefitRenewalRequestsBenefitRenewalRequestFormResponse", + }) as any as S.Schema; + +export interface GetV1BillingDocumentsRequest { + /** The month for the billing documents (in ISO-8601 format) */ + period?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1BillingDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + period: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/billing-documents", code: 200 })), +).annotate({ + identifier: "GetV1BillingDocumentsRequest", +}) as any as S.Schema; + +export type BillingDocumentsResponseDataBillingDocumentsItemBillingDocumentType = + | "reconciliation_invoice" + | "prefunding_invoice" + | "supplemental_service_invoice" + | "reconciliation_credit_note"; +export const BillingDocumentsResponseDataBillingDocumentsItemBillingDocumentType = + /*@__PURE__*/ S.String; + +export interface BillingDocumentsResponseDataBillingDocumentsItem { + /** 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?: BillingDocumentsResponseDataBillingDocumentsItemBillingDocumentType; + /** The unique identifier (UUID) of the billing document. */ + id?: string; +} +export const BillingDocumentsResponseDataBillingDocumentsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + bill_from: S.optional(S.NullOr(S.String)), + billing_document_period: S.optional(S.String), + billing_document_type: S.optional( + BillingDocumentsResponseDataBillingDocumentsItemBillingDocumentType, + ), + id: S.optional(S.String), + }), + ).annotate({ + identifier: "BillingDocumentsResponseDataBillingDocumentsItem", + }) as any as S.Schema; + +export type BillingDocumentsResponseDataBillingDocumentsList = + Array; +export const BillingDocumentsResponseDataBillingDocumentsList = + /*@__PURE__*/ S.Array( + BillingDocumentsResponseDataBillingDocumentsItem, + ) as any as S.Schema; + +export interface BillingDocumentsResponseData { + billing_documents: BillingDocumentsResponseDataBillingDocumentsList; + /** The current page among all of the total_pages */ + current_page: number; + /** The total number of records returned counting all pages */ + total_count: number; + /** The total number of pages the user can go through */ + total_pages: number; +} +export const BillingDocumentsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_documents: BillingDocumentsResponseDataBillingDocumentsList, + current_page: S.Number, + total_count: S.Number, + total_pages: S.Number, + }), +).annotate({ + identifier: "BillingDocumentsResponseData", +}) as any as S.Schema; + +/** Information about a list of billing documents */ +export interface BillingDocumentsResponse { + data: BillingDocumentsResponseData; +} +export const BillingDocumentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BillingDocumentsResponseData, + }), +).annotate({ + identifier: "BillingDocumentsResponse", +}) as any as S.Schema; + +export interface GetV1BillingDocumentsBillingDocumentIdRequest { + /** The billing document's ID */ + billing_document_id: string; + /** When true, includes billing document items whose type is not part of the standard set for the invoice type. */ + include_unrecognized_types?: boolean; +} +export const GetV1BillingDocumentsBillingDocumentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_document_id: S.String.pipe(T.Label()), + include_unrecognized_types: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/billing-documents/{billing_document_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1BillingDocumentsBillingDocumentIdRequest", + }) as any as S.Schema; + +/** A line item on a billing document, representing a specific cost category (e.g., base salary, allowances, taxes) for an employment. */ +export interface 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; +} +export const BillingDocumentAmountItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_document_amount: S.Number, + billing_document_currency: S.NullOr(S.String), + employment_id: S.optional(S.NullOr(S.String)), + source_amount: S.optional(S.Number), + source_currency: S.optional(S.NullOr(S.String)), + type: S.String, + }), +).annotate({ + identifier: "BillingDocumentAmountItem", +}) as any as S.Schema; + +/** The line items that make up this billing document. */ +export type BillingDocumentItemsList = Array; +export const BillingDocumentItemsList = /*@__PURE__*/ S.Array( + BillingDocumentAmountItem, +) as any as S.Schema; + +/** A billing document (invoice or credit note) issued to a company by Remote for employment management services. */ +export interface 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: BillingDocumentItemsList; + /** The total amount of the billing document, in cents. */ + total: number; +} +export const BillingDocument = /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_document_currency: S.String, + billing_document_number: S.String, + billing_document_period: S.String, + billing_document_type: S.String, + company_id: S.String, + id: S.String, + issued_date: S.String, + items: BillingDocumentItemsList, + total: S.Number, + }), +).annotate({ + identifier: "BillingDocument", +}) as any as S.Schema; + +export interface BillingDocumentResponseData { + billing_document: BillingDocument; +} +export const BillingDocumentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_document: BillingDocument, + }), +).annotate({ + identifier: "BillingDocumentResponseData", +}) as any as S.Schema; + +/** Information of a billing document */ +export interface BillingDocumentResponse { + data: BillingDocumentResponseData; +} +export const BillingDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BillingDocumentResponseData, + }), +).annotate({ + identifier: "BillingDocumentResponse", +}) as any as S.Schema; + +export interface GetV1BillingDocumentsBillingDocumentIdBreakdownRequest { + /** The billing document's ID */ + billing_document_id: string; + /** Filters the results by the type of the billing breakdown item. Matched exactly against the `type` field of the returned items, so unrecognised values yield an empty list. Card spend is reported as `Card expenses`, separately from payroll-reimbursed `Expenses`. */ + type?: string; +} +export const GetV1BillingDocumentsBillingDocumentIdBreakdownRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_document_id: S.String.pipe(T.Label()), + type: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/billing-documents/{billing_document_id}/breakdown", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1BillingDocumentsBillingDocumentIdBreakdownRequest", + }) as any as S.Schema; + +/** Item in a billing document breakdown */ +export interface BillingDocumentBreakdownItem { + /** Country code according to ISO 3166-1 3-digit alphabetic codes. May be null for legal-entity-wide lines. */ + country_code: string | null; + /** A human-readable description of this cost item. */ + description: string; + /** A unique identifier in UUID v4 format for the employment this cost belongs to. May be null for legal-entity-wide lines that apply to the whole legal entity rather than a single employment. */ + employment_id: string | null; + /** 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: string | null; + /** 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: string | null; + /** 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 */ + variance_from_invoice_amount: number | null; +} +export const BillingDocumentBreakdownItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.NullOr(S.String), + description: S.String, + employment_id: S.NullOr(S.String), + fx_rate: S.String, + invoice_amount: S.Number, + invoice_currency: S.NullOr(S.String), + invoice_number: S.String, + invoice_period: S.String, + source_amount: S.Number, + source_currency: S.NullOr(S.String), + type: S.String, + variance_from_invoice: S.NullOr(S.String), + variance_from_invoice_amount: S.NullOr(S.Number), + }), +).annotate({ + identifier: "BillingDocumentBreakdownItem", +}) as any as S.Schema; + +export type BillingDocumentBreakdownResponseDataBillingDocumentBreakdownList = + Array; +export const BillingDocumentBreakdownResponseDataBillingDocumentBreakdownList = + /*@__PURE__*/ S.Array( + BillingDocumentBreakdownItem, + ) as any as S.Schema; + +export interface BillingDocumentBreakdownResponseData { + billing_document_breakdown: BillingDocumentBreakdownResponseDataBillingDocumentBreakdownList; +} +export const BillingDocumentBreakdownResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + billing_document_breakdown: + BillingDocumentBreakdownResponseDataBillingDocumentBreakdownList, + }), +).annotate({ + identifier: "BillingDocumentBreakdownResponseData", +}) as any as S.Schema; + +/** Information about a billing document breakdown */ +export interface BillingDocumentBreakdownResponse { + data: BillingDocumentBreakdownResponseData; +} +export const BillingDocumentBreakdownResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BillingDocumentBreakdownResponseData, + }), +).annotate({ + identifier: "BillingDocumentBreakdownResponse", +}) as any as S.Schema; + +export interface GetV1BillingDocumentsBillingDocumentIdPdfRequest { + /** The billing document's ID */ + billing_document_id: string; +} +export const GetV1BillingDocumentsBillingDocumentIdPdfRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_document_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/billing-documents/{billing_document_id}/pdf", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1BillingDocumentsBillingDocumentIdPdfRequest", + }) as any as S.Schema; + +export type GetV1BillingDocumentsBillingDocumentIdPdfResponse = string; +export const GetV1BillingDocumentsBillingDocumentIdPdfResponse = + /*@__PURE__*/ S.suspend(() => S.String.pipe(T.RawResponseRoot())).annotate({ + identifier: "GetV1BillingDocumentsBillingDocumentIdPdfResponse", + }) as any as S.Schema; + +export interface GetV1BulkEmploymentJobsJobIdRequest { + /** Bulk employment job id */ + job_id: string; +} +export const GetV1BulkEmploymentJobsJobIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/bulk-employment-jobs/{job_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1BulkEmploymentJobsJobIdRequest", +}) as any as S.Schema; + +/** The column names that have been automatically mapped by Tiger (rawr!) and maybe also by AI. */ +export type BulkEmploymentImportJobColumnMappingAutoMappedColumnsList = + Array; +export const BulkEmploymentImportJobColumnMappingAutoMappedColumnsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface BulkEmploymentImportJobColumnMappingSourceColumnsItem { + /** The index of the data column in the file */ + index: number; + /** The name of the data column */ + name: string; + /** A sample data value from the data column */ + sample_data?: string | null; +} +export const BulkEmploymentImportJobColumnMappingSourceColumnsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + index: S.Number, + name: S.String, + sample_data: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "BulkEmploymentImportJobColumnMappingSourceColumnsItem", + }) as any as S.Schema; + +/** The data columns to map to */ +export type BulkEmploymentImportJobColumnMappingSourceColumnsList = + Array; +export const BulkEmploymentImportJobColumnMappingSourceColumnsList = + /*@__PURE__*/ S.Array( + BulkEmploymentImportJobColumnMappingSourceColumnsItem, + ) as any as S.Schema; + +/** The column mapping for the import job. For times when imported data columns do not match the schema fields and need to be manually mapped to the correct schema fields. */ +export interface BulkEmploymentImportJobColumnMapping { + /** The column names that have been automatically mapped by Tiger (rawr!) and maybe also by AI. */ + auto_mapped_columns?: BulkEmploymentImportJobColumnMappingAutoMappedColumnsList; + /** The map of schema fields paths to data columns */ + mapping: unknown; + /** The data columns to map to */ + source_columns: BulkEmploymentImportJobColumnMappingSourceColumnsList; + /** The number of columns that have not been mapped */ + unmapped_column_count: number; + /** The number of required schema field paths that have not been mapped */ + unmapped_required_field_count: number; +} +export const BulkEmploymentImportJobColumnMapping = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + auto_mapped_columns: S.optional( + BulkEmploymentImportJobColumnMappingAutoMappedColumnsList, + ), + mapping: S.Unknown, + source_columns: BulkEmploymentImportJobColumnMappingSourceColumnsList, + unmapped_column_count: S.Number, + unmapped_required_field_count: S.Number, + }), +).annotate({ + identifier: "BulkEmploymentImportJobColumnMapping", +}) as any as S.Schema; + +export type BulkEmploymentImportJobErrorsList = Array; +export const BulkEmploymentImportJobErrorsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type PersonalDetailsNationalityList = Array; +export const PersonalDetailsNationalityList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Names of fields redacted because the caller lacks the required attribute permission */ +export type PersonalDetailsRedactedFieldsList = Array; +export const PersonalDetailsRedactedFieldsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type PersonalDetailsTitle = "mr" | "mrs" | "miss" | "ms" | "mx"; +export const PersonalDetailsTitle = /*@__PURE__*/ S.String; + +/** Personal details for a user, includes sensitive information */ +export interface PersonalDetails { + birthdate?: string; + full_preferred_name?: string | null; + gender?: string | null; + gender_description?: string | null; + given_name?: string | null; + is_us_person?: boolean | null; + mobile_number?: string; + nationality?: PersonalDetailsNationalityList; + preferred_name?: string | null; + preferred_pronouns?: string | null; + recovery_number?: string | null; + /** Names of fields redacted because the caller lacks the required attribute permission */ + redacted_fields?: PersonalDetailsRedactedFieldsList; + sex?: string | null; + surname?: string | null; + title?: PersonalDetailsTitle | null; +} +export const PersonalDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + birthdate: S.optional(S.String), + full_preferred_name: S.optional(S.NullOr(S.String)), + gender: S.optional(S.NullOr(S.String)), + gender_description: S.optional(S.NullOr(S.String)), + given_name: S.optional(S.NullOr(S.String)), + is_us_person: S.optional(S.NullOr(S.Boolean)), + mobile_number: S.optional(S.String), + nationality: S.optional(PersonalDetailsNationalityList), + preferred_name: S.optional(S.NullOr(S.String)), + preferred_pronouns: S.optional(S.NullOr(S.String)), + recovery_number: S.optional(S.NullOr(S.String)), + redacted_fields: S.optional(PersonalDetailsRedactedFieldsList), + sex: S.optional(S.NullOr(S.String)), + surname: S.optional(S.NullOr(S.String)), + title: S.optional(S.NullOr(PersonalDetailsTitle)), + }), +).annotate({ + identifier: "PersonalDetails", +}) as any as S.Schema; + +export type MinimalUserStatus = + | "active" + | "cancelled" + | "deleted" + | "inactive" + | "draft" + | "created" + | "initiated"; +export const MinimalUserStatus = /*@__PURE__*/ S.String; + +export interface MinimalUser { + /** The email used for authentication. It may be hidden in case no permission is given to see sensible data. */ + email?: string | null; + name: string; + personal_details?: PersonalDetails | null; + profile_picture?: string | null; + slug: string; + status?: MinimalUserStatus; +} +export const MinimalUser = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.optional(S.NullOr(S.String)), + name: S.String, + personal_details: S.optional(S.NullOr(PersonalDetails)), + profile_picture: S.optional(S.NullOr(S.String)), + slug: S.String, + status: S.optional(MinimalUserStatus), + }), +).annotate({ identifier: "MinimalUser" }) as any as S.Schema; + +export type EmailStatus = "pending" | "confirmed" | "deleted"; +export const EmailStatus = /*@__PURE__*/ S.String; + +export type EmailType = "login" | "personal" | "work"; +export const EmailType = /*@__PURE__*/ S.String; + +export interface Email { + address: string; + confirmed_at?: string | null; + login_synced?: boolean; + status?: EmailStatus; + type?: EmailType; + unconfirmed_address?: string | null; +} +export const Email = /*@__PURE__*/ S.suspend(() => + S.Struct({ + address: S.String, + confirmed_at: S.optional(S.NullOr(S.String)), + login_synced: S.optional(S.Boolean), + status: S.optional(EmailStatus), + type: S.optional(EmailType), + unconfirmed_address: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "Email" }) as any as S.Schema; + +/** Indicates which email type the account login is synchronized with. */ +export type AccountsLoginSyncedWith = "none" | "personal" | "work"; +export const AccountsLoginSyncedWith = /*@__PURE__*/ S.String; + +export type AccountsAccountPersonalEmail = string | Email; +export const AccountsAccountPersonalEmail = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type AccountsAccountStatus = "created" | "active" | "deleted" | "locked"; +export const AccountsAccountStatus = /*@__PURE__*/ S.String; + +/** An Account */ +export interface AccountsAccount { + login_email?: Email | null; + login_synced_with?: AccountsLoginSyncedWith | null; + personal_email?: AccountsAccountPersonalEmail | null; + slug: string; + status?: AccountsAccountStatus; +} +export const AccountsAccount = /*@__PURE__*/ S.suspend(() => + S.Struct({ + login_email: S.optional(S.NullOr(Email)), + login_synced_with: S.optional(S.NullOr(AccountsLoginSyncedWith)), + personal_email: S.optional(S.NullOr(AccountsAccountPersonalEmail)), + slug: S.String, + status: S.optional(AccountsAccountStatus), + }), +).annotate({ + identifier: "AccountsAccount", +}) as any as S.Schema; + +export type AccountsAssignedRolesItemDataScope = + | "all" + | "employment_entities" + | "external" + | "internal" + | "rps" + | "secondary_reports" + | "direct_reports" + | "assigned_billing_legal_entities" + | "employment_countries" + | "employment_departments" + | "direct_and_indirect_reports" + | "employment_company_structure_nodes" + | "onboarding_reports"; +export const AccountsAssignedRolesItemDataScope = /*@__PURE__*/ S.String; + +export type AccountsAssignedRolesItemType = + | "default" + | "custom" + | "template" + | "owner"; +export const AccountsAssignedRolesItemType = /*@__PURE__*/ S.String; + +export interface AccountsAssignedRolesItem { + data_scope?: AccountsAssignedRolesItemDataScope; + name: string; + slug: string; + type?: AccountsAssignedRolesItemType; +} +export const AccountsAssignedRolesItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data_scope: S.optional(AccountsAssignedRolesItemDataScope), + name: S.String, + slug: S.String, + type: S.optional(AccountsAssignedRolesItemType), + }), +).annotate({ + identifier: "AccountsAssignedRolesItem", +}) as any as S.Schema; + +export type AccountsAssignedRoles = Array; +export const AccountsAssignedRoles = /*@__PURE__*/ S.Array( + AccountsAssignedRolesItem, +) as any as S.Schema; + +export interface AccountUserIntegrationUserIntegration { + name: string; +} +export const AccountUserIntegrationUserIntegration = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + name: S.String, + }), +).annotate({ + identifier: "AccountUserIntegrationUserIntegration", +}) as any as S.Schema; + +/** Whether this mapping represents a synced employee or a company admin */ +export type AccountUserIntegrationUserRole = "employee" | "employer"; +export const AccountUserIntegrationUserRole = /*@__PURE__*/ S.String; + +export interface AccountUserIntegrationUser { + external_user_id: string; + integration: AccountUserIntegrationUserIntegration; + /** Whether this mapping represents a synced employee or a company admin */ + role: AccountUserIntegrationUserRole; +} +export const AccountUserIntegrationUser = /*@__PURE__*/ S.suspend(() => + S.Struct({ + external_user_id: S.String, + integration: AccountUserIntegrationUserIntegration, + role: AccountUserIntegrationUserRole, + }), +).annotate({ + identifier: "AccountUserIntegrationUser", +}) as any as S.Schema; + +export type BulkEmploymentImportJobInsertedByCase1IntegrationUsersList = + Array; +export const BulkEmploymentImportJobInsertedByCase1IntegrationUsersList = + /*@__PURE__*/ S.Array( + AccountUserIntegrationUser, + ) as any as S.Schema; + +export interface AccountsMinimalCompanyAdmin { + job_title?: string | null; + name?: string; + slug?: string; +} +export const AccountsMinimalCompanyAdmin = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_title: S.optional(S.NullOr(S.String)), + name: S.optional(S.String), + slug: S.optional(S.String), + }), +).annotate({ + identifier: "AccountsMinimalCompanyAdmin", +}) as any as S.Schema; + +export type BulkEmploymentImportJobInsertedByCase1Role = + | "admin" + | "employer" + | "employee" + | "freelancer" + | "service_provider" + | "candidate"; +export const BulkEmploymentImportJobInsertedByCase1Role = + /*@__PURE__*/ S.String; + +export interface BulkEmploymentImportJobInsertedByCase1 { + account?: AccountsAccount | null; + assigned_roles?: AccountsAssignedRoles | null; + integration_users?: BulkEmploymentImportJobInsertedByCase1IntegrationUsersList; + invited_by?: AccountsMinimalCompanyAdmin | null; + job_title?: string | null; + login_synced_with?: AccountsLoginSyncedWith | null; + raw_email?: string; + role?: BulkEmploymentImportJobInsertedByCase1Role; + signup_source?: string | null; +} +export const BulkEmploymentImportJobInsertedByCase1 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + account: S.optional(S.NullOr(AccountsAccount)), + assigned_roles: S.optional(S.NullOr(AccountsAssignedRoles)), + integration_users: S.optional( + BulkEmploymentImportJobInsertedByCase1IntegrationUsersList, + ), + invited_by: S.optional(S.NullOr(AccountsMinimalCompanyAdmin)), + job_title: S.optional(S.NullOr(S.String)), + login_synced_with: S.optional(S.NullOr(AccountsLoginSyncedWith)), + raw_email: S.optional(S.String), + role: S.optional(BulkEmploymentImportJobInsertedByCase1Role), + signup_source: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "BulkEmploymentImportJobInsertedByCase1", +}) as any as S.Schema; + +/** Someone registered in Remote using a unique email address. */ +export type BulkEmploymentImportJobInsertedBy = + | MinimalUser + | BulkEmploymentImportJobInsertedByCase1; +export const BulkEmploymentImportJobInsertedBy = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface BulkEmploymentImportJobLegalEntity { + name?: string; + slug?: string; +} +export const BulkEmploymentImportJobLegalEntity = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + slug: S.optional(S.String), + }), +).annotate({ + identifier: "BulkEmploymentImportJobLegalEntity", +}) as any as S.Schema; + +/** The stage of the import job. * `creation` - The import job is in the creation stage, which means the rows are being created. * `column_mapping` - The import job is in the column mapping stage, which means the CSV headers are being mapped to JSON schema fields. * `validation` - The import job is in the validation stage, which means the rows are being validated. * `submission` - The import job is in the submission stage, which means the rows are being submitted. */ +export type BulkEmploymentImportJobStage = + | "creation" + | "column_mapping" + | "validation" + | "submission"; +export const BulkEmploymentImportJobStage = /*@__PURE__*/ S.String; + +/** * `draft` - **Deprecated**, the import job data has been uploaded and the job created, but not yet started * `uploaded` - **Deprecated**, replaced by the `draft` status * `in_progress` - Data is actively being imported * `finished` - The import job has finished processing * `failed` - The import job has failed completely, nothing has been imported */ +export type BulkEmploymentImportJobStatus = + | "draft" + | "uploaded" + | "in_progress" + | "finished" + | "failed"; +export const BulkEmploymentImportJobStatus = /*@__PURE__*/ S.String; + +export interface BulkEmploymentImportJob { + /** The column mapping for the import job. For times when imported data columns do not match the schema fields and need to be manually mapped to the correct schema fields. */ + column_mapping?: BulkEmploymentImportJobColumnMapping | null; + /** The name to be displayed for the user interface */ + display_name?: string; + errors?: BulkEmploymentImportJobErrorsList; + /** The number of rows that failed to be processed */ + failed_count: number; + finished_at: string | null; + id: string; + /** The number of rows that have been imported in previous submission stages */ + imported_count?: number; + inserted_at: string; + /** Someone registered in Remote using a unique email address. */ + inserted_by: BulkEmploymentImportJobInsertedBy; + legal_entity?: BulkEmploymentImportJobLegalEntity | null; + /** The metadata for the import job */ + metadata: unknown; + name: string; + /** The number of processed rows, regardless of success or failure */ + processed_count: number; + /** The stage of the import job. * `creation` - The import job is in the creation stage, which means the rows are being created. * `column_mapping` - The import job is in the column mapping stage, which means the CSV headers are being mapped to JSON schema fields. * `validation` - The import job is in the validation stage, which means the rows are being validated. * `submission` - The import job is in the submission stage, which means the rows are being submitted. */ + stage: BulkEmploymentImportJobStage; + /** * `draft` - **Deprecated**, the import job data has been uploaded and the job created, but not yet started * `uploaded` - **Deprecated**, replaced by the `draft` status * `in_progress` - Data is actively being imported * `finished` - The import job has finished processing * `failed` - The import job has failed completely, nothing has been imported */ + status: BulkEmploymentImportJobStatus; + /** The total number of rows to import */ + total_count: number; + updated_at: string; +} +export const BulkEmploymentImportJob = /*@__PURE__*/ S.suspend(() => + S.Struct({ + column_mapping: S.optional(S.NullOr(BulkEmploymentImportJobColumnMapping)), + display_name: S.optional(S.String), + errors: S.optional(BulkEmploymentImportJobErrorsList), + failed_count: S.Number, + finished_at: S.NullOr(S.String), + id: S.String, + imported_count: S.optional(S.Number), + inserted_at: S.String, + inserted_by: BulkEmploymentImportJobInsertedBy, + legal_entity: S.optional(S.NullOr(BulkEmploymentImportJobLegalEntity)), + metadata: S.Unknown, + name: S.String, + processed_count: S.Number, + stage: BulkEmploymentImportJobStage, + status: BulkEmploymentImportJobStatus, + total_count: S.Number, + updated_at: S.String, + }), +).annotate({ + identifier: "BulkEmploymentImportJob", +}) as any as S.Schema; + +export interface BulkEmploymentImportJobResponse { + data: BulkEmploymentImportJob; +} +export const BulkEmploymentImportJobResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BulkEmploymentImportJob, + }), +).annotate({ + identifier: "BulkEmploymentImportJobResponse", +}) as any as S.Schema; + +export interface GetV1BulkEmploymentJobsJobIdRowsRequest { + /** Bulk employment job id */ + job_id: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1BulkEmploymentJobsJobIdRowsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + job_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/bulk-employment-jobs/{job_id}/rows", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1BulkEmploymentJobsJobIdRowsRequest", +}) as any as S.Schema; + +export interface ImportJobRowsResponseDataCountsByColumnValue { + error: number; + valid: number; +} +export const ImportJobRowsResponseDataCountsByColumnValue = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + error: S.Number, + valid: S.Number, + }), + ).annotate({ + identifier: "ImportJobRowsResponseDataCountsByColumnValue", + }) as any as S.Schema; + +/** Per-column error and valid row counts across all rows, keyed by the column's field path */ +export type ImportJobRowsResponseDataCountsByColumnMap = { + [key: string]: ImportJobRowsResponseDataCountsByColumnValue | undefined; +}; +export const ImportJobRowsResponseDataCountsByColumnMap = + /*@__PURE__*/ S.Record( + S.String, + ImportJobRowsResponseDataCountsByColumnValue, + ) as any as S.Schema; + +export interface ImportJobRowsResponseDataCountsByStatus { + deleted: number; + error: number; + imported: number; + pending: number; + retryable: number; + skipped: number; + successful: number; + unprocessable: number; +} +export const ImportJobRowsResponseDataCountsByStatus = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + deleted: S.Number, + error: S.Number, + imported: S.Number, + pending: S.Number, + retryable: S.Number, + skipped: S.Number, + successful: S.Number, + unprocessable: S.Number, + }), +).annotate({ + identifier: "ImportJobRowsResponseDataCountsByStatus", +}) as any as S.Schema; + +export type ImportJobRowsResponseDataOrderedRowsList = Array; +export const ImportJobRowsResponseDataOrderedRowsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type ImportDataRow = { [key: string]: unknown | undefined }; +export const ImportDataRow = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** An array of error messages for the given field */ +export type ImportJobRowErrorsValueCase0List = Array; +export const ImportJobRowErrorsValueCase0List = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type ImportJobRowErrorsValue = + | ImportJobRowErrorsValueCase0List + | unknown; +export const ImportJobRowErrorsValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Fields with their error messages */ +export type ImportJobRowErrorsMap = { + [key: string]: ImportJobRowErrorsValue | undefined; +}; +export const ImportJobRowErrorsMap = /*@__PURE__*/ S.Record( + S.String, + ImportJobRowErrorsValue, +) as any as S.Schema; + +export interface ImportJobRowMetadataLoginEmailSignalsPersonal { + registered?: boolean; +} +export const ImportJobRowMetadataLoginEmailSignalsPersonal = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + registered: S.optional(S.Boolean), + }), + ).annotate({ + identifier: "ImportJobRowMetadataLoginEmailSignalsPersonal", + }) as any as S.Schema; + +export type ImportJobRowMetadataLoginEmailSignalsWork = + ImportJobRowMetadataLoginEmailSignalsPersonal; +export const ImportJobRowMetadataLoginEmailSignalsWork = + ImportJobRowMetadataLoginEmailSignalsPersonal; + +/** Per-row review-step signals for login email selection, present only when the feature is enabled. `sso_enforced` reflects whether SSO login is enforced for the row's category. `personal` and `work` report, for each provided email, whether it is already registered on another account. */ +export interface ImportJobRowMetadataLoginEmailSignals { + personal?: ImportJobRowMetadataLoginEmailSignalsPersonal; + sso_enforced?: boolean; + work?: ImportJobRowMetadataLoginEmailSignalsPersonal; +} +export const ImportJobRowMetadataLoginEmailSignals = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + personal: S.optional(ImportJobRowMetadataLoginEmailSignalsPersonal), + sso_enforced: S.optional(S.Boolean), + work: S.optional(ImportJobRowMetadataLoginEmailSignalsPersonal), + }), +).annotate({ + identifier: "ImportJobRowMetadataLoginEmailSignals", +}) as any as S.Schema; + +/** Row metadata. For login-email-selection-enabled imports (e.g. EOR bulk invite), each reviewed row carries a `login_email_signals` object with the per-row login-email review signals. */ +export interface ImportJobRowMetadata { + /** Per-row review-step signals for login email selection, present only when the feature is enabled. `sso_enforced` reflects whether SSO login is enforced for the row's category. `personal` and `work` report, for each provided email, whether it is already registered on another account. */ + login_email_signals?: ImportJobRowMetadataLoginEmailSignals; +} +export const ImportJobRowMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + login_email_signals: S.optional(ImportJobRowMetadataLoginEmailSignals), + }), +).annotate({ + identifier: "ImportJobRowMetadata", +}) as any as S.Schema; + +export interface ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy { + name: string; + slug: string; +} +export const ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + slug: S.String, + }), + ).annotate({ + identifier: "ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy", + }) as any as S.Schema; + +export interface ImportJobRowRowErrorDetailsAmbiguousItem { + amount: number | null; + created_by: ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy | null; + effective_date: string | null; + employee_identifier: string | null; + end_date: string | null; + inserted_at: string | null; + occurrence: string | null; + pay_item: string | null; + slug: string; +} +export const ImportJobRowRowErrorDetailsAmbiguousItem = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + amount: S.NullOr(S.Number), + created_by: S.NullOr(ImportJobRowRowErrorDetailsAmbiguousItemCreatedBy), + effective_date: S.NullOr(S.String), + employee_identifier: S.NullOr(S.String), + end_date: S.NullOr(S.String), + inserted_at: S.NullOr(S.String), + occurrence: S.NullOr(S.String), + pay_item: S.NullOr(S.String), + slug: S.String, + }), +).annotate({ + identifier: "ImportJobRowRowErrorDetailsAmbiguousItem", +}) as any as S.Schema; + +export type ImportJobRowRowErrorDetailsAmbiguousList = + Array; +export const ImportJobRowRowErrorDetailsAmbiguousList = /*@__PURE__*/ S.Array( + ImportJobRowRowErrorDetailsAmbiguousItem, +) as any as S.Schema; + +export interface ImportJobRowRowErrorDetails { + ambiguous?: ImportJobRowRowErrorDetailsAmbiguousList; +} +export const ImportJobRowRowErrorDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + ambiguous: S.optional(ImportJobRowRowErrorDetailsAmbiguousList), + }), +).annotate({ + identifier: "ImportJobRowRowErrorDetails", +}) as any as S.Schema; + +export type ImportJobRowStatus = + | "successful" + | "imported" + | "error" + | "unprocessable" + | "pending" + | "deleted" + | "skipped" + | "retryable"; +export const ImportJobRowStatus = /*@__PURE__*/ S.String; + +export type ImportJobRowErrorMessagesList = Array; +export const ImportJobRowErrorMessagesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface ImportJobRowError { + error?: string | null; + field_name?: string | null; + messages: ImportJobRowErrorMessagesList; +} +export const ImportJobRowError = /*@__PURE__*/ S.suspend(() => + S.Struct({ + error: S.optional(S.NullOr(S.String)), + field_name: S.optional(S.NullOr(S.String)), + messages: ImportJobRowErrorMessagesList, + }), +).annotate({ + identifier: "ImportJobRowError", +}) as any as S.Schema; + +export type ImportJobRowSubmissionErrorsList = Array; +export const ImportJobRowSubmissionErrorsList = /*@__PURE__*/ S.Array( + ImportJobRowError, +) as any as S.Schema; + +export interface ImportJobRow { + data: ImportDataRow; + /** Fields with their error messages */ + errors: ImportJobRowErrorsMap; + /** Row metadata. For login-email-selection-enabled imports (e.g. EOR bulk invite), each reviewed row carries a `login_email_signals` object with the per-row login-email review signals. */ + metadata?: ImportJobRowMetadata; + row_error_details?: ImportJobRowRowErrorDetails; + row_errors?: unknown; + row_number: number; + status?: ImportJobRowStatus; + submission_errors?: ImportJobRowSubmissionErrorsList; +} +export const ImportJobRow = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ImportDataRow, + errors: ImportJobRowErrorsMap, + metadata: S.optional(ImportJobRowMetadata), + row_error_details: S.optional(ImportJobRowRowErrorDetails), + row_errors: S.optional(S.Unknown), + row_number: S.Number, + status: S.optional(ImportJobRowStatus), + submission_errors: S.optional(ImportJobRowSubmissionErrorsList), + }), +).annotate({ identifier: "ImportJobRow" }) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsFailuresList = Array; +export const ImportJobRowsResponseDataRowsFailuresList = /*@__PURE__*/ S.Array( + ImportJobRow, +) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsImportedList = Array; +export const ImportJobRowsResponseDataRowsImportedList = /*@__PURE__*/ S.Array( + ImportJobRow, +) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsPendingList = Array; +export const ImportJobRowsResponseDataRowsPendingList = /*@__PURE__*/ S.Array( + ImportJobRow, +) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsRetryableList = Array; +export const ImportJobRowsResponseDataRowsRetryableList = /*@__PURE__*/ S.Array( + ImportJobRow, +) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsSkippedList = Array; +export const ImportJobRowsResponseDataRowsSkippedList = /*@__PURE__*/ S.Array( + ImportJobRow, +) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsSuccessesList = Array; +export const ImportJobRowsResponseDataRowsSuccessesList = /*@__PURE__*/ S.Array( + ImportJobRow, +) as any as S.Schema; + +export type ImportJobRowsResponseDataRowsUnprocessableList = + Array; +export const ImportJobRowsResponseDataRowsUnprocessableList = + /*@__PURE__*/ S.Array( + ImportJobRow, + ) as any as S.Schema; + +export interface ImportJobRowsResponseDataRows { + failures: ImportJobRowsResponseDataRowsFailuresList; + imported: ImportJobRowsResponseDataRowsImportedList; + pending: ImportJobRowsResponseDataRowsPendingList; + retryable: ImportJobRowsResponseDataRowsRetryableList; + skipped: ImportJobRowsResponseDataRowsSkippedList; + successes: ImportJobRowsResponseDataRowsSuccessesList; + unprocessable: ImportJobRowsResponseDataRowsUnprocessableList; +} +export const ImportJobRowsResponseDataRows = /*@__PURE__*/ S.suspend(() => + S.Struct({ + failures: ImportJobRowsResponseDataRowsFailuresList, + imported: ImportJobRowsResponseDataRowsImportedList, + pending: ImportJobRowsResponseDataRowsPendingList, + retryable: ImportJobRowsResponseDataRowsRetryableList, + skipped: ImportJobRowsResponseDataRowsSkippedList, + successes: ImportJobRowsResponseDataRowsSuccessesList, + unprocessable: ImportJobRowsResponseDataRowsUnprocessableList, + }), +).annotate({ + identifier: "ImportJobRowsResponseDataRows", +}) as any as S.Schema; + +export interface ImportJobRowsResponseData { + /** Per-column error and valid row counts across all rows, keyed by the column's field path */ + counts_by_column?: ImportJobRowsResponseDataCountsByColumnMap; + counts_by_status: ImportJobRowsResponseDataCountsByStatus; + current_page: number; + ordered_rows?: ImportJobRowsResponseDataOrderedRowsList; + rows: ImportJobRowsResponseDataRows; + total_count: number; + total_pages: number; +} +export const ImportJobRowsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + counts_by_column: S.optional(ImportJobRowsResponseDataCountsByColumnMap), + counts_by_status: ImportJobRowsResponseDataCountsByStatus, + current_page: S.Number, + ordered_rows: S.optional(ImportJobRowsResponseDataOrderedRowsList), + rows: ImportJobRowsResponseDataRows, + total_count: S.Number, + total_pages: S.Number, + }), +).annotate({ + identifier: "ImportJobRowsResponseData", +}) as any as S.Schema; + +export interface ImportJobRowsResponse { + data: ImportJobRowsResponseData; +} +export const ImportJobRowsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ImportJobRowsResponseData, + }), +).annotate({ + identifier: "ImportJobRowsResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesRequest { + /** External ID */ + external_id?: string; +} +export const GetV1CompaniesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + external_id: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/companies", code: 200 })), +).annotate({ + identifier: "GetV1CompaniesRequest", +}) as any as S.Schema; + +/** The credit risk status of the company default legal entity. - `not_started`: The credit risk assessment has not started yet. - `ready`: The credit risk assessment is ready to be started. - `in_progress`: The automated credit risk assessment is in progress. - `referred`: The credit risk assessment has been referred to a human reviewer. - `fail`: The credit risk assessment has failed and the company will be archived. - `deposit_required`: The company default legal entity requires a deposit before onboarding new employees. - `no_deposit_required`: The company default legal entity does not require a deposit before onboarding new employees. */ +export type CompanyDefaultLegalEntityCreditRiskStatus = + | "not_started" + | "ready" + | "in_progress" + | "referred" + | "fail" + | "deposit_required" + | "no_deposit_required"; +export const CompanyDefaultLegalEntityCreditRiskStatus = /*@__PURE__*/ S.String; + +/** The company status determines what a company is allowed to do: - `pending`: The company has been created and the company owner invited. Remote is waiting for the company owner to complete onboarding. - `review`: The company is under review. In rare occasions, a company may not automatically get created in `active` status because Remote needs to manually review the company that was created. The company will become `active` once the review is completed and no further action is necessary through the Remote API. - `active`: The company owner has completed onboarding and the company is ready to employ. - `archived`: The company is no longer active on the Remote platform and no changes can be made to the company. */ +export type CompanyStatus = "pending" | "review" | "active" | "archived"; +export const CompanyStatus = /*@__PURE__*/ S.String; + +export interface Company { + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `address_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + address_details: unknown; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `bank_account_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + bank_account_details?: 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. - `not_started`: The credit risk assessment has not started yet. - `ready`: The credit risk assessment is ready to be started. - `in_progress`: The automated credit risk assessment is in progress. - `referred`: The credit risk assessment has been referred to a human reviewer. - `fail`: The credit risk assessment has failed and the company will be archived. - `deposit_required`: The company default legal entity requires a deposit before onboarding new employees. - `no_deposit_required`: The company default legal entity does not require a deposit before onboarding new employees. */ + default_legal_entity_credit_risk_status: CompanyDefaultLegalEntityCreditRiskStatus; + /** 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: - `pending`: The company has been created and the company owner invited. Remote is waiting for the company owner to complete onboarding. - `review`: The company is under review. In rare occasions, a company may not automatically get created in `active` status because Remote needs to manually review the company that was created. The company will become `active` once the review is completed and no further action is necessary through the Remote API. - `active`: The company owner has completed onboarding and the company is ready to employ. - `archived`: The company is no longer active on the Remote platform and no changes can be made to the company. */ + status: CompanyStatus; + /** 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; +} +export const Company = /*@__PURE__*/ S.suspend(() => + S.Struct({ + address_details: S.Unknown, + bank_account_details: S.optional(S.Unknown), + company_owner_email: S.String, + company_owner_name: S.optional(S.String), + company_owner_user_id: S.String, + country_code: S.String, + created_at: S.String, + default_legal_entity_credit_risk_status: + CompanyDefaultLegalEntityCreditRiskStatus, + desired_currency: S.String, + external_id: S.optional(S.NullOr(S.String)), + id: S.String, + name: S.String, + phone_number: S.optional(S.String), + registration_number: S.optional(S.NullOr(S.String)), + status: CompanyStatus, + tax_number: S.optional(S.NullOr(S.String)), + terms_of_service_accepted_at: S.String, + updated_at: S.String, + }), +).annotate({ identifier: "Company" }) as any as S.Schema; + +export type CompaniesResponseCompaniesList = Array; +export const CompaniesResponseCompaniesList = /*@__PURE__*/ S.Array( + Company, +) as any as S.Schema; + +/** Shows a list of companies */ +export interface CompaniesResponse { + companies?: CompaniesResponseCompaniesList; +} +export const CompaniesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + companies: S.optional(CompaniesResponseCompaniesList), + }), +).annotate({ + identifier: "CompaniesResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdRequest { + /** Company ID */ + company_id: string; +} +export const GetV1CompaniesCompanyIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/companies/{company_id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1CompaniesCompanyIdRequest", +}) as any as S.Schema; + +export interface CompanyResponseData { + company?: Company; +} +export const CompanyResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company: S.optional(Company), + }), +).annotate({ + identifier: "CompanyResponseData", +}) as any as S.Schema; + +/** Shows a company */ +export interface CompanyResponse { + data: CompanyResponseData; +} +export const CompanyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CompanyResponseData, + }), +).annotate({ + identifier: "CompanyResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdActionsRequest { + /** Company ID */ + company_id: string; +} +export const GetV1CompaniesCompanyIdActionsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/actions", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1CompaniesCompanyIdActionsRequest", +}) as any as S.Schema; + +/** The action the company still needs to complete. */ +export type CompanyActionType = "verify_company" | "setup_remote_payments"; +export const CompanyActionType = /*@__PURE__*/ S.String; + +/** A pending company-level action (e.g. for Contractor Management Review-step banners). */ +export interface CompanyAction { + /** The legal entity that needs Remote Payments setup. Present only for setup_remote_payments actions. */ + legal_entity_id?: string | null; + /** Whether the action must be completed. */ + required: boolean; + /** The action the company still needs to complete. */ + type: CompanyActionType; +} +export const CompanyAction = /*@__PURE__*/ S.suspend(() => + S.Struct({ + legal_entity_id: S.optional(S.NullOr(S.String)), + required: S.Boolean, + type: CompanyActionType, + }), +).annotate({ identifier: "CompanyAction" }) as any as S.Schema; + +export type CompanyActionsResponseDataActionsList = Array; +export const CompanyActionsResponseDataActionsList = /*@__PURE__*/ S.Array( + CompanyAction, +) as any as S.Schema; + +export interface CompanyActionsResponseData { + actions?: CompanyActionsResponseDataActionsList; +} +export const CompanyActionsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + actions: S.optional(CompanyActionsResponseDataActionsList), + }), +).annotate({ + identifier: "CompanyActionsResponseData", +}) as any as S.Schema; + +/** Lists a company's pending actions */ +export interface CompanyActionsResponse { + data: CompanyActionsResponseData; +} +export const CompanyActionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CompanyActionsResponseData, + }), +).annotate({ + identifier: "CompanyActionsResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdComplianceProfileRequest { + /** Company ID */ + company_id: string; +} +export const GetV1CompaniesCompanyIdComplianceProfileRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/compliance-profile", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CompaniesCompanyIdComplianceProfileRequest", + }) as any as S.Schema; + +/** Credit risk status of the LegalEntity */ +export type CompanyComplianceProfileCreditRiskStatus = + | "not_started" + | "ready" + | "in_progress" + | "referred" + | "fail" + | "deposit_required" + | "no_deposit_required"; +export const CompanyComplianceProfileCreditRiskStatus = /*@__PURE__*/ S.String; + +/** Status of the LegalEntity's internal KYB/BOC process */ +export type CompanyComplianceProfileKybStatus = + | "not_started" + | "ready" + | "referred" + | "in_progress" + | "pass" + | "fail" + | "unresponsive"; +export const CompanyComplianceProfileKybStatus = /*@__PURE__*/ S.String; + +export interface CompanyComplianceProfile { + /** Credit risk status of the LegalEntity */ + credit_risk_status: CompanyComplianceProfileCreditRiskStatus; + /** Status of the LegalEntity's internal KYB/BOC process */ + kyb_status: CompanyComplianceProfileKybStatus; +} +export const CompanyComplianceProfile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + credit_risk_status: CompanyComplianceProfileCreditRiskStatus, + kyb_status: CompanyComplianceProfileKybStatus, + }), +).annotate({ + identifier: "CompanyComplianceProfile", +}) as any as S.Schema; + +export interface CompanyComplianceProfileResponseData { + compliance_profile: CompanyComplianceProfile; +} +export const CompanyComplianceProfileResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + compliance_profile: CompanyComplianceProfile, + }), +).annotate({ + identifier: "CompanyComplianceProfileResponseData", +}) as any as S.Schema; + +export interface CompanyComplianceProfileResponse { + data?: CompanyComplianceProfileResponseData; +} +export const CompanyComplianceProfileResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(CompanyComplianceProfileResponseData), + }), +).annotate({ + identifier: "CompanyComplianceProfileResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest { + /** Company ID */ + company_id: string; + /** Employment ID */ + employment_id: string; +} +export const GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest", + }) as any as S.Schema; + +/** List of applicable onboarding reserves policies */ +export type OnboardingReservesStatusPoliciesList = Array; +export const OnboardingReservesStatusPoliciesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Onboarding reserves status (same as credit risk status but takes onboarding reserves policies into account) */ +export type OnboardingReservesStatusStatus = + | "not_started" + | "ready" + | "in_progress" + | "referred" + | "fail" + | "deposit_required" + | "no_deposit_required"; +export const OnboardingReservesStatusStatus = /*@__PURE__*/ S.String; + +export interface OnboardingReservesStatus { + /** List of applicable onboarding reserves policies */ + policies: OnboardingReservesStatusPoliciesList; + /** Onboarding reserves status (same as credit risk status but takes onboarding reserves policies into account) */ + status: OnboardingReservesStatusStatus; +} +export const OnboardingReservesStatus = /*@__PURE__*/ S.suspend(() => + S.Struct({ + policies: OnboardingReservesStatusPoliciesList, + status: OnboardingReservesStatusStatus, + }), +).annotate({ + identifier: "OnboardingReservesStatus", +}) as any as S.Schema; + +export interface OnboardingReservesStatusResponse { + data: OnboardingReservesStatus; +} +export const OnboardingReservesStatusResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: OnboardingReservesStatus, + }), +).annotate({ + identifier: "OnboardingReservesStatusResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdLegalEntitiesRequest { + /** Company ID */ + company_id: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1CompaniesCompanyIdLegalEntitiesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/legal-entities", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CompaniesCompanyIdLegalEntitiesRequest", + }) as any as S.Schema; + +export interface 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 */ + id: string; + /** Indicates if this is the default legal entity for the company */ + is_default?: boolean; + /** The registered name of the legal entity. */ + name: string; +} +export const CompanyLegalEntity = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.optional(S.NullOr(S.String)), + global_payroll_enabled: S.Boolean, + id: S.String, + is_default: S.optional(S.Boolean), + name: S.String, + }), +).annotate({ + identifier: "CompanyLegalEntity", +}) as any as S.Schema; + +export type ListCompanyLegalEntitiesResponseDataLegalEntitiesList = + Array; +export const ListCompanyLegalEntitiesResponseDataLegalEntitiesList = + /*@__PURE__*/ S.Array( + CompanyLegalEntity, + ) as any as S.Schema; + +export interface ListCompanyLegalEntitiesResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + legal_entities?: ListCompanyLegalEntitiesResponseDataLegalEntitiesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListCompanyLegalEntitiesResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + current_page: S.optional(S.Number), + legal_entities: S.optional( + ListCompanyLegalEntitiesResponseDataLegalEntitiesList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListCompanyLegalEntitiesResponseData", +}) as any as S.Schema; + +/** Response schema listing many legal_entities */ +export interface ListCompanyLegalEntitiesResponse { + data?: ListCompanyLegalEntitiesResponseData; +} +export const ListCompanyLegalEntitiesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListCompanyLegalEntitiesResponseData), + }), +).annotate({ + identifier: "ListCompanyLegalEntitiesResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest { + /** Company ID */ + company_id: string; + /** Legal entity ID */ + legal_entity_id: string; +} +export const GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest", + }) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse { + data: unknown; +} +export const GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.Unknown, + }), + ).annotate({ + identifier: + "GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse", + }) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest { + /** Company ID */ + company_id: string; + /** Legal entity ID */ + legal_entity_id: string; +} +export const GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/contractor-eligibility", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest", + }) as any as S.Schema; + +export type ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsCorList = + Array; +export const ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsCorList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsPlusList = + Array; +export const ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsPlusList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsStandardList = + Array; +export const ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsStandardList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Per-product lists of reasons why the legal entity is ineligible. Empty list means eligible. */ +export interface ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons { + cor: ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsCorList; + plus: ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsPlusList; + standard: ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsStandardList; +} +export const ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cor: ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsCorList, + plus: ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsPlusList, + standard: + ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasonsStandardList, + }), + ).annotate({ + identifier: + "ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons", + }) as any as S.Schema; + +/** Which contractor products the legal entity can use (standard, plus, cor). */ +export interface ContractorEligibilityResponseDataContractorEligibility { + cor: boolean; + /** Per-product lists of reasons why the legal entity is ineligible. Empty list means eligible. */ + ineligibility_reasons: ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons; + plus: boolean; + standard: boolean; +} +export const ContractorEligibilityResponseDataContractorEligibility = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cor: S.Boolean, + ineligibility_reasons: + ContractorEligibilityResponseDataContractorEligibilityIneligibilityReasons, + plus: S.Boolean, + standard: S.Boolean, + }), + ).annotate({ + identifier: "ContractorEligibilityResponseDataContractorEligibility", + }) as any as S.Schema; + +/** ISO 3166-1 alpha-3 country codes where COR is supported for this legal entity. Empty when not COR-eligible. */ +export type ContractorEligibilityResponseDataCorSupportedCountryCodesList = + Array; +export const ContractorEligibilityResponseDataCorSupportedCountryCodesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface ContractorEligibilityResponseData { + /** Which contractor products the legal entity can use (standard, plus, cor). */ + contractor_eligibility: ContractorEligibilityResponseDataContractorEligibility; + /** ISO 3166-1 alpha-3 country codes where COR is supported for this legal entity. Empty when not COR-eligible. */ + cor_supported_country_codes: ContractorEligibilityResponseDataCorSupportedCountryCodesList; +} +export const ContractorEligibilityResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contractor_eligibility: + ContractorEligibilityResponseDataContractorEligibility, + cor_supported_country_codes: + ContractorEligibilityResponseDataCorSupportedCountryCodesList, + }), +).annotate({ + identifier: "ContractorEligibilityResponseData", +}) as any as S.Schema; + +export interface ContractorEligibilityResponse { + data: ContractorEligibilityResponseData; +} +export const ContractorEligibilityResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractorEligibilityResponseData, + }), +).annotate({ + identifier: "ContractorEligibilityResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest { + /** Company ID */ + company_id: string; + /** Legal entity ID */ + legal_entity_id: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/pay-codes", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest", + }) as any as S.Schema; + +export interface PayCode { + /** Pay element category (e.g. time_and_attendance, bonus) */ + category: string; + /** Code to use in the `code` field of POST /v1/pay-items/bulk */ + code: string; + /** Description of the pay code */ + description?: string | null; + /** Customer-specific code used for bulk import mapping */ + external_import_code?: string | null; + /** Human-readable name of the pay code */ + name: string; + /** Unique identifier for this pay code */ + slug: string; + /** How the `amount` field on POST /v1/pay-items/bulk must be encoded for this pay code: `amount` in cents, `percentage` in basis points, `unit` as a raw count, `hours` as a whole number of hours, `duration` in seconds. */ + type: string; +} +export const PayCode = /*@__PURE__*/ S.suspend(() => + S.Struct({ + category: S.String, + code: S.String, + description: S.optional(S.NullOr(S.String)), + external_import_code: S.optional(S.NullOr(S.String)), + name: S.String, + slug: S.String, + type: S.String, + }), +).annotate({ identifier: "PayCode" }) as any as S.Schema; + +export type ListPayCodesResponseDataPayCodesList = Array; +export const ListPayCodesResponseDataPayCodesList = /*@__PURE__*/ S.Array( + PayCode, +) as any as S.Schema; + +export interface ListPayCodesResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + pay_codes?: ListPayCodesResponseDataPayCodesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListPayCodesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + pay_codes: S.optional(ListPayCodesResponseDataPayCodesList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListPayCodesResponseData", +}) as any as S.Schema; + +/** Response schema listing many pay_codes */ +export interface ListPayCodesResponse { + data?: ListPayCodesResponseData; +} +export const ListPayCodesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListPayCodesResponseData), + }), +).annotate({ + identifier: "ListPayCodesResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdPricingPlansRequest { + /** Company ID */ + company_id: string; +} +export const GetV1CompaniesCompanyIdPricingPlansRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/pricing-plans", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CompaniesCompanyIdPricingPlansRequest", + }) as any as S.Schema; + +/** Currency object without a UUID identifier */ +export interface CurrencyDefinition { + code: string; + name: string; + symbol: string; +} +export const CurrencyDefinition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + name: S.String, + symbol: S.String, + }), +).annotate({ + identifier: "CurrencyDefinition", +}) as any as S.Schema; + +/** A monetary amount with its currency, used for pricing plan costs. */ +export interface Price { + /** Amount in cents */ + amount: number; + currency: CurrencyDefinition; +} +export const Price = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + currency: CurrencyDefinition, + }), +).annotate({ identifier: "Price" }) as any as S.Schema; + +/** Features included in this product tier. */ +export type ProductFeaturesList = Array; +export const ProductFeaturesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** A Remote product offering (e.g., EOR, Contractor Management) with its tier and billing frequency. */ +export interface Product { + /** A description of the product. */ + description?: string; + /** Features included in this product tier. */ + features?: ProductFeaturesList; + /** 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; +} +export const Product = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.String), + features: S.optional(ProductFeaturesList), + frequency: S.String, + identifier: S.optional(S.String), + name: S.String, + short_name: S.optional(S.String), + tier: S.String, + }), +).annotate({ identifier: "Product" }) as any as S.Schema; + +/** A pricing plan assigned to a company, defining the product, billing frequency, and cost. */ +export interface PricingPlan { + base_price: Price; + /** 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; + /** 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; +} +export const PricingPlan = /*@__PURE__*/ S.suspend(() => + S.Struct({ + base_price: Price, + end_date: S.NullOr(S.String), + id: S.String, + price: Price, + product: Product, + start_date: S.String, + type: S.String, + }), +).annotate({ identifier: "PricingPlan" }) as any as S.Schema; + +export type ListCompanyPricingPlansResponseDataPricingPlansList = + Array; +export const ListCompanyPricingPlansResponseDataPricingPlansList = + /*@__PURE__*/ S.Array( + PricingPlan, + ) as any as S.Schema; + +export interface ListCompanyPricingPlansResponseData { + pricing_plans: ListCompanyPricingPlansResponseDataPricingPlansList; +} +export const ListCompanyPricingPlansResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pricing_plans: ListCompanyPricingPlansResponseDataPricingPlansList, + }), +).annotate({ + identifier: "ListCompanyPricingPlansResponseData", +}) as any as S.Schema; + +/** Company pricing plans */ +export interface ListCompanyPricingPlansResponse { + data: ListCompanyPricingPlansResponseData; +} +export const ListCompanyPricingPlansResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListCompanyPricingPlansResponseData, + }), +).annotate({ + identifier: "ListCompanyPricingPlansResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdProductPricesRequest { + /** Company ID */ + company_id: string; +} +export const GetV1CompaniesCompanyIdProductPricesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/product-prices", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CompaniesCompanyIdProductPricesRequest", + }) as any as S.Schema; + +export interface ProductPrice { + base_price: Price; + /** The product price id */ + id: string; + /** The product price name */ + name: string; +} +export const ProductPrice = /*@__PURE__*/ S.suspend(() => + S.Struct({ + base_price: Price, + id: S.String, + name: S.String, + }), +).annotate({ identifier: "ProductPrice" }) as any as S.Schema; + +export type ListProductPricesResponseDataProductPricesList = + Array; +export const ListProductPricesResponseDataProductPricesList = + /*@__PURE__*/ S.Array( + ProductPrice, + ) as any as S.Schema; + +export interface ListProductPricesResponseData { + product_prices: ListProductPricesResponseDataProductPricesList; +} +export const ListProductPricesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + product_prices: ListProductPricesResponseDataProductPricesList, + }), +).annotate({ + identifier: "ListProductPricesResponseData", +}) as any as S.Schema; + +export interface ListProductPricesResponse { + data: ListProductPricesResponseData; +} +export const ListProductPricesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListProductPricesResponseData, + }), +).annotate({ + identifier: "ListProductPricesResponse", +}) as any as S.Schema; + +export interface GetV1CompaniesCompanyIdWebhookCallbacksRequest { + /** Company ID */ + company_id: string; +} +export const GetV1CompaniesCompanyIdWebhookCallbacksRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/companies/{company_id}/webhook-callbacks", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CompaniesCompanyIdWebhookCallbacksRequest", + }) as any as S.Schema; + +/** The setting to be enabled. */ +export type WebhookCallbackSubscribedEventsItem = + | "background_check.status.updated" + | "benefit_renewal_request.created" + | "billing_document.issued" + | "company.activated" + | "company.manager_created" + | "company.manager_deleted" + | "company.manager_updated" + | "company.owner_changed" + | "company.archived" + | "company.eor_hiring.additional_information_required" + | "company.eor_hiring.reserve_payment_requested" + | "company.eor_hiring.no_reserve_payment_requested" + | "company.eor_hiring.referred" + | "company.eor_hiring.verification_completed" + | "company.partner_offboarded" + | "company.pricing_plan.updated" + | "contract_amendment.canceled" + | "contract_amendment.deleted" + | "contract_amendment.done" + | "contract_amendment.review_started" + | "contract_amendment.submitted" + | "contract.termination_date_reached" + | "contract_document.status.changed" + | "contractor_invoice.employer_paid" + | "contractor_invoice.issued" + | "contractor_invoice.paid_out" + | "contractor_invoice.payment_initiated" + | "custom_field.value_updated" + | "employment.benefits.selected" + | "employment_company_structure_node.updated" + | "employment_contract.active_contract_updated" + | "employment_contract.adjusted_during_onboarding" + | "employment.account.updated" + | "employment.administrative_details.updated" + | "employment_basic_information.updated" + | "employment.contractor_management_plan.updated" + | "employment.contractor_of_record_termination.cancelled" + | "employment.contractor_of_record_termination.executed" + | "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" + | "employment.onboarding_task.completed" + | "employment.onboarding.cancelled" + | "employment.onboarding.completed" + | "employment.onboarding.started" + | "employment.personal_information.updated" + | "employment.probation_completion_letter.cancelled" + | "employment.probation_completion_letter.completed" + | "employment.probation_completion_letter.submitted" + | "employment.probation.period_ending_reminder_sent" + | "employment.probation_period_extension.cancelled" + | "employment.probation_period_extension.completed" + | "employment.probation_period_extension.submitted" + | "employment.start_date.changed" + | "employment.status.updated" + | "employment.updated" + | "employment.user_status.activated" + | "employment.user_status.deactivated" + | "employment.user_status.initiated" + | "employment.user_status.invited" + | "employment.work_email.updated" + | "expense.approved" + | "expense.declined" + | "expense.deleted" + | "expense.reimbursed" + | "expense.submitted" + | "expense.updated" + | "identity_verification.verification_required" + | "incentive.created" + | "incentive.deleted" + | "incentive.paid" + | "incentive.processing_started" + | "incentive.updated" + | "offboarding.completed" + | "offboarding.deleted" + | "offboarding.done" + | "offboarding.review_started" + | "offboarding.submitted_to_payroll" + | "offboarding.submitted" + | "payslip.released" + | "sso_configuration.disabled" + | "sso_configuration.enabled" + | "sso_configuration.updated" + | "timeoff.approved" + | "timeoff.canceled" + | "timeoff.cancellation_requested" + | "timeoff.date_changed" + | "timeoff.declined" + | "timeoff.requested" + | "timeoff.started" + | "timeoff.taken" + | "timeoff.updated" + | "timesheet.submitted" + | "timesheet.in_calibration" + | "travel_letter.approved_by_manager" + | "travel_letter.approved_by_remote" + | "travel_letter.declined_by_manager" + | "travel_letter.declined_by_remote" + | "travel_letter.requested" + | "work_authorization.approved_by_manager" + | "work_authorization.approved_by_remote" + | "work_authorization.cancelled" + | "work_authorization.declined_by_manager" + | "work_authorization.declined_by_remote" + | "work_authorization.requested"; +export const WebhookCallbackSubscribedEventsItem = /*@__PURE__*/ S.String; + +export type WebhookCallbackSubscribedEventsList = + Array; +export const WebhookCallbackSubscribedEventsList = /*@__PURE__*/ S.Array( + WebhookCallbackSubscribedEventsItem, +) as any as S.Schema; + +/** A registered webhook callback endpoint. Remote sends HTTP POST requests to the configured URL when subscribed events occur. */ +export interface 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 send to the `url` you provided for this webhook callback. The webhook signature will be included in a custom header, `X-Remote-Signature`. You can use this signature to verify that requests are coming from Remote and not some unauthorized third-party. */ + signing_key?: string; + /** When true, this callback is subscribed to all current and future event types. `subscribed_events` then lists every currently supported event. */ + subscribe_to_all_events?: boolean; + subscribed_events?: WebhookCallbackSubscribedEventsList; + /** The HTTPS URL where Remote will send webhook event payloads. */ + url: string; +} +export const WebhookCallback = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + signing_key: S.optional(S.String), + subscribe_to_all_events: S.optional(S.Boolean), + subscribed_events: S.optional(WebhookCallbackSubscribedEventsList), + url: S.String, + }), +).annotate({ + identifier: "WebhookCallback", +}) as any as S.Schema; + +export type ListWebhookCallbacksResponseDataList = Array; +export const ListWebhookCallbacksResponseDataList = /*@__PURE__*/ S.Array( + WebhookCallback, +) as any as S.Schema; + +export interface ListWebhookCallbacksResponse { + data: ListWebhookCallbacksResponseDataList; +} +export const ListWebhookCallbacksResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListWebhookCallbacksResponseDataList, + }), +).annotate({ + identifier: "ListWebhookCallbacksResponse", +}) as any as S.Schema; + +export type GetV1CompaniesSchemaRequestForm = "address_details"; +export const GetV1CompaniesSchemaRequestForm = /*@__PURE__*/ S.String; + +/** Use latest version */ +export type GetV1CompaniesSchemaRequestJsonSchemaVersionCase1 = "latest"; +export const GetV1CompaniesSchemaRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1CompaniesSchemaRequestJsonSchemaVersion = + | number + | GetV1CompaniesSchemaRequestJsonSchemaVersionCase1; +export const GetV1CompaniesSchemaRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1CompaniesSchemaRequest { + /** Country code according to ISO 3-digit alphabetic codes. */ + country_code: string; + /** Name of the desired form */ + form: GetV1CompaniesSchemaRequestForm | (string & {}); + /** Version of the form schema */ + json_schema_version?: GetV1CompaniesSchemaRequestJsonSchemaVersion; +} +export const GetV1CompaniesSchemaRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String.pipe(T.Query()), + form: GetV1CompaniesSchemaRequestForm.pipe(T.Query()), + json_schema_version: S.optional( + GetV1CompaniesSchemaRequestJsonSchemaVersion.pipe(T.Query()), + ), + }).pipe(T.Http({ method: "GET", uri: "/v1/companies/schema", code: 200 })), +).annotate({ + identifier: "GetV1CompaniesSchemaRequest", +}) as any as S.Schema; + +/** Object with required and optional fields, its descriptions and suggested presentation */ +export interface CompanyFormResponse { + data?: unknown; +} +export const CompanyFormResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(S.Unknown), + }), +).annotate({ + identifier: "CompanyFormResponse", +}) as any as S.Schema; + +export type GetV1CompanyCompanyIdCostCenterAllocationsRequestStatus = + | "active" + | "scheduled" + | "expired"; +export const GetV1CompanyCompanyIdCostCenterAllocationsRequestStatus = + /*@__PURE__*/ S.String; + +export interface GetV1CompanyCompanyIdCostCenterAllocationsRequest { + /** Company ID */ + company_id: string; + /** Filters allocations by status. When omitted, allocations of every status are returned. */ + status?: + | GetV1CompanyCompanyIdCostCenterAllocationsRequestStatus + | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1CompanyCompanyIdCostCenterAllocationsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + status: S.optional( + GetV1CompanyCompanyIdCostCenterAllocationsRequestStatus.pipe(T.Query()), + ), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/company/{company_id}/cost-center-allocations", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CompanyCompanyIdCostCenterAllocationsRequest", + }) as any as S.Schema; + +/** The cost center an employment is allocated to. */ +export interface CostCenter { + /** Cost center code. Typically used as the join key to an external general ledger. */ + code: string | null; + /** Cost center name. */ + name: string; + /** Unique identifier of the cost center. */ + slug: string; +} +export const CostCenter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.NullOr(S.String), + name: S.String, + slug: S.String, + }), +).annotate({ identifier: "CostCenter" }) as any as S.Schema; + +/** Allocation status, derived from the effective period. */ +export type CostCenterAllocationStatus = "active" | "scheduled" | "expired"; +export const CostCenterAllocationStatus = /*@__PURE__*/ S.String; + +/** A cost center allocation for an employment, including the allocated percentage and effective period. */ +export interface CostCenterAllocation { + cost_center: CostCenter; + /** Date the allocation becomes effective. */ + effective_from: string | null; + /** Date the allocation stops being effective. */ + effective_to: string | null; + /** Unique identifier of the cost center allocation. */ + id: string; + /** Percentage of the employment's cost allocated to this cost center (0-100). */ + percentage: number; + /** Allocation status, derived from the effective period. */ + status: CostCenterAllocationStatus; +} +export const CostCenterAllocation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cost_center: CostCenter, + effective_from: S.NullOr(S.String), + effective_to: S.NullOr(S.String), + id: S.String, + percentage: S.Number, + status: CostCenterAllocationStatus, + }), +).annotate({ + identifier: "CostCenterAllocation", +}) as any as S.Schema; + +/** The cost center allocations for this employment. */ +export type EmploymentWithCostCenterAllocationsCostCenterAllocationsList = + Array; +export const EmploymentWithCostCenterAllocationsCostCenterAllocationsList = + /*@__PURE__*/ S.Array( + CostCenterAllocation, + ) as any as S.Schema; + +/** An employment under the company with its cost center allocations. */ +export interface EmploymentWithCostCenterAllocations { + /** Unique identifier of the legal entity this employment is billed to. */ + bill_to_legal_entity_id?: string | null; + /** The cost center allocations for this employment. */ + cost_center_allocations: EmploymentWithCostCenterAllocationsCostCenterAllocationsList; + /** Unique identifier of the employment. */ + employment_id: string; + /** Unique identifier of the legal entity that employs this employment. */ + engaged_by_legal_entity_id?: string | null; +} +export const EmploymentWithCostCenterAllocations = /*@__PURE__*/ S.suspend(() => + S.Struct({ + bill_to_legal_entity_id: S.optional(S.NullOr(S.String)), + cost_center_allocations: + EmploymentWithCostCenterAllocationsCostCenterAllocationsList, + employment_id: S.String, + engaged_by_legal_entity_id: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "EmploymentWithCostCenterAllocations", +}) as any as S.Schema; + +export type ListCompanyCostCenterAllocationsResponseDataEmploymentsList = + Array; +export const ListCompanyCostCenterAllocationsResponseDataEmploymentsList = + /*@__PURE__*/ S.Array( + EmploymentWithCostCenterAllocations, + ) as any as S.Schema; + +export interface ListCompanyCostCenterAllocationsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + employments?: ListCompanyCostCenterAllocationsResponseDataEmploymentsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListCompanyCostCenterAllocationsResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + employments: S.optional( + ListCompanyCostCenterAllocationsResponseDataEmploymentsList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), + ).annotate({ + identifier: "ListCompanyCostCenterAllocationsResponseData", + }) as any as S.Schema; + +/** Response schema listing many employments */ +export interface ListCompanyCostCenterAllocationsResponse { + data?: ListCompanyCostCenterAllocationsResponseData; +} +export const ListCompanyCostCenterAllocationsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: S.optional(ListCompanyCostCenterAllocationsResponseData), + }), +).annotate({ + identifier: "ListCompanyCostCenterAllocationsResponse", +}) as any as S.Schema; + +export interface GetV1CompanyCurrenciesRequest {} +export const GetV1CompanyCurrenciesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/company-currencies", code: 200 }), + ), +).annotate({ + identifier: "GetV1CompanyCurrenciesRequest", +}) as any as S.Schema; + +/** A currency available for use by a company on the Remote platform. */ +export interface 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; +} +export const CompanyCurrency = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + slug: S.String, + }), +).annotate({ + identifier: "CompanyCurrency", +}) as any as S.Schema; + +export type CompanyCurrenciesResponseDataCompanyCurrenciesList = + Array; +export const CompanyCurrenciesResponseDataCompanyCurrenciesList = + /*@__PURE__*/ S.Array( + CompanyCurrency, + ) as any as S.Schema; + +export interface CompanyCurrenciesResponseData { + company_currencies: CompanyCurrenciesResponseDataCompanyCurrenciesList; +} +export const CompanyCurrenciesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_currencies: CompanyCurrenciesResponseDataCompanyCurrenciesList, + }), +).annotate({ + identifier: "CompanyCurrenciesResponseData", +}) as any as S.Schema; + +/** Company currencies */ +export interface CompanyCurrenciesResponse { + data?: CompanyCurrenciesResponseData; +} +export const CompanyCurrenciesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(CompanyCurrenciesResponseData), + }), +).annotate({ + identifier: "CompanyCurrenciesResponse", +}) as any as S.Schema; + +export interface GetV1CompanyDepartmentsRequest { + /** 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; +} +export const GetV1CompanyDepartmentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Query()), + paginate: S.optional(S.Boolean.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/company-departments", code: 200 })), +).annotate({ + identifier: "GetV1CompanyDepartmentsRequest", +}) as any as S.Schema; + +export interface CompanyDepartment { + /** 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; +} +export const CompanyDepartment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String, + id: S.String, + name: S.String, + }), +).annotate({ + identifier: "CompanyDepartment", +}) as any as S.Schema; + +export type ListCompanyDepartmentsPaginatedResponseDataCompanyDepartmentsList = + Array; +export const ListCompanyDepartmentsPaginatedResponseDataCompanyDepartmentsList = + /*@__PURE__*/ S.Array( + CompanyDepartment, + ) as any as S.Schema; + +export interface ListCompanyDepartmentsPaginatedResponseData { + company_departments: ListCompanyDepartmentsPaginatedResponseDataCompanyDepartmentsList; +} +export const ListCompanyDepartmentsPaginatedResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_departments: + ListCompanyDepartmentsPaginatedResponseDataCompanyDepartmentsList, + }), + ).annotate({ + identifier: "ListCompanyDepartmentsPaginatedResponseData", + }) as any as S.Schema; + +export interface ListCompanyDepartmentsPaginatedResponse { + current_page: number; + data: ListCompanyDepartmentsPaginatedResponseData; + total_count: number; + total_pages: number; +} +export const ListCompanyDepartmentsPaginatedResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + current_page: S.Number, + data: ListCompanyDepartmentsPaginatedResponseData, + total_count: S.Number, + total_pages: S.Number, + }), +).annotate({ + identifier: "ListCompanyDepartmentsPaginatedResponse", +}) as any as S.Schema; + +export interface GetV1CompanyManagersRequest { + /** A Company ID to filter the results (only applicable for Integration Partners). */ + company_id?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Change the amount of records returned per page, defaults to 20, limited to 100 */ + page_size?: number; +} +export const GetV1CompanyManagersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/company-managers", code: 200 })), +).annotate({ + identifier: "GetV1CompanyManagersRequest", +}) as any as S.Schema; + +export interface CompanyManagerBillingContactStatus { + /** Whether this manager will become the primary billing contact once they have an active login */ + is_pending_primary_billing_contact: boolean; + /** Whether this manager is the primary billing contact for the legal entity */ + is_primary_billing_contact: boolean; + /** Slug of the legal entity */ + legal_entity_slug: string; +} +export const CompanyManagerBillingContactStatus = /*@__PURE__*/ S.suspend(() => + S.Struct({ + is_pending_primary_billing_contact: S.Boolean, + is_primary_billing_contact: S.Boolean, + legal_entity_slug: S.String, + }), +).annotate({ + identifier: "CompanyManagerBillingContactStatus", +}) as any as S.Schema; + +/** The legal entities this manager is a billing contact for. */ +export type CompanyManagerBillingContactsList = + Array; +export const CompanyManagerBillingContactsList = /*@__PURE__*/ S.Array( + CompanyManagerBillingContactStatus, +) as any as S.Schema; + +export interface CompanyManager { + /** The legal entities this manager is a billing contact for. */ + billing_contacts: CompanyManagerBillingContactsList; + /** Company ID */ + company_id: string; + /** Company Manager role. */ + role: string; + /** User Email */ + user_email: string; + /** User ID */ + user_id: string; + /** User's name */ + user_name: string; +} +export const CompanyManager = /*@__PURE__*/ S.suspend(() => + S.Struct({ + billing_contacts: CompanyManagerBillingContactsList, + company_id: S.String, + role: S.String, + user_email: S.String, + user_id: S.String, + user_name: S.String, + }), +).annotate({ identifier: "CompanyManager" }) as any as S.Schema; + +export type CompanyManagersResponseDataCompanyManagersList = + Array; +export const CompanyManagersResponseDataCompanyManagersList = + /*@__PURE__*/ S.Array( + CompanyManager, + ) as any as S.Schema; + +export interface CompanyManagersResponseData { + company_managers?: CompanyManagersResponseDataCompanyManagersList; + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const CompanyManagersResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_managers: S.optional( + CompanyManagersResponseDataCompanyManagersList, + ), + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "CompanyManagersResponseData", +}) as any as S.Schema; + +/** Response schema listing many company_managers */ +export interface CompanyManagersResponse { + data?: CompanyManagersResponseData; +} +export const CompanyManagersResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(CompanyManagersResponseData), + }), +).annotate({ + identifier: "CompanyManagersResponse", +}) as any as S.Schema; + +export interface GetV1CompanyManagersUserIdRequest { + /** User ID */ + user_id: string; +} +export const GetV1CompanyManagersUserIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + user_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/company-managers/{user_id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1CompanyManagersUserIdRequest", +}) as any as S.Schema; + +export interface CompanyManagerData { + company_manager: CompanyManager; +} +export const CompanyManagerData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_manager: CompanyManager, + }), +).annotate({ + identifier: "CompanyManagerData", +}) as any as S.Schema; + +export interface CompanyManagerResponse { + data: CompanyManagerData; +} +export const CompanyManagerResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CompanyManagerData, + }), +).annotate({ + identifier: "CompanyManagerResponse", +}) as any as S.Schema; + +/** 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" + | "in_review" + | "done" + | "canceled" + | "deleted"; +export const ContractAmendmentStatus = /*@__PURE__*/ S.String; + +export interface GetV1ContractAmendmentsRequest { + /** Employment ID */ + employment_id?: string; + /** Contract Amendment status */ + status?: ContractAmendmentStatus | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1ContractAmendmentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + status: S.optional(ContractAmendmentStatus.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/contract-amendments", code: 200 })), +).annotate({ + identifier: "GetV1ContractAmendmentsRequest", +}) as any as S.Schema; + +export type MinimalContractAmendmentReasonForChange = + | "annual_pay_adjustment" + | "country_rule_change" + | "error_correction" + | "job_change_reevaluation" + | "promotion" + | "other"; +export const MinimalContractAmendmentReasonForChange = /*@__PURE__*/ S.String; + +/** A lightweight contract amendment representation used in list responses. */ +export interface 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: MinimalContractAmendmentReasonForChange; + /** 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; +} +export const MinimalContractAmendment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + id: S.String, + job_title: S.optional(S.String), + reason_for_change: MinimalContractAmendmentReasonForChange, + requested_by: S.String, + requested_effective_date: S.String, + status: ContractAmendmentStatus, + submitted_at: S.String, + }), +).annotate({ + identifier: "MinimalContractAmendment", +}) as any as S.Schema; + +export type ListContractAmendmentResponseDataContractAmendmentsList = + Array; +export const ListContractAmendmentResponseDataContractAmendmentsList = + /*@__PURE__*/ S.Array( + MinimalContractAmendment, + ) as any as S.Schema; + +export interface ListContractAmendmentResponseData { + contract_amendments?: ListContractAmendmentResponseDataContractAmendmentsList; + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListContractAmendmentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_amendments: S.optional( + ListContractAmendmentResponseDataContractAmendmentsList, + ), + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListContractAmendmentResponseData", +}) as any as S.Schema; + +/** Response schema listing many contract_amendments */ +export interface ListContractAmendmentResponse { + data?: ListContractAmendmentResponseData; +} +export const ListContractAmendmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListContractAmendmentResponseData), + }), +).annotate({ + identifier: "ListContractAmendmentResponse", +}) as any as S.Schema; + +export interface GetV1ContractAmendmentsIdRequest { + /** Contract amendment request ID */ + id: string; +} +export const GetV1ContractAmendmentsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/contract-amendments/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1ContractAmendmentsIdRequest", +}) as any as S.Schema; + +export type RequestDetailsReasonForChange = + | "annual_pay_adjustment" + | "country_rule_change" + | "error_correction" + | "job_change_reevaluation" + | "promotion" + | "other"; +export const RequestDetailsReasonForChange = /*@__PURE__*/ S.String; + +export type SalaryDecreaseDetailsSalaryDecreaseReason = + | "change_in_working_hours" + | "trade_salary_for_equity" + | "error_in_initial_salary" + | "role_change_or_demotion" + | "compensation_restructure" + | "other"; +export const SalaryDecreaseDetailsSalaryDecreaseReason = /*@__PURE__*/ S.String; + +/** The details of the salary decrease request if there is one */ +export interface SalaryDecreaseDetails { + salary_decrease_reason?: SalaryDecreaseDetailsSalaryDecreaseReason; + salary_decrease_reason_description?: string | null; + was_employee_informed?: string; +} +export const SalaryDecreaseDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + salary_decrease_reason: S.optional( + SalaryDecreaseDetailsSalaryDecreaseReason, + ), + salary_decrease_reason_description: S.optional(S.NullOr(S.String)), + was_employee_informed: S.optional(S.String), + }), +).annotate({ + identifier: "SalaryDecreaseDetails", +}) as any as S.Schema; + +/** The details of the requested changes for the contract amendment. */ +export interface RequestDetails { + additional_comments?: string | null; + effective_date?: string; + reason_for_change?: RequestDetailsReasonForChange | null; + /** This is filled when the reason_for_change is 'other'. */ + reason_for_change_description?: string | null; + salary_decrease_details?: SalaryDecreaseDetails | null; +} +export const RequestDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_comments: S.optional(S.NullOr(S.String)), + effective_date: S.optional(S.String), + reason_for_change: S.optional(S.NullOr(RequestDetailsReasonForChange)), + reason_for_change_description: S.optional(S.NullOr(S.String)), + salary_decrease_details: S.optional(S.NullOr(SalaryDecreaseDetails)), + }), +).annotate({ identifier: "RequestDetails" }) as any as S.Schema; + +/** A full contract amendment record, including the requested changes with their previous and current values. */ +export interface 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. */ + changes: 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; +} +export const ContractAmendment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amendment_contract_id: S.NullOr(S.String), + changes: S.Unknown, + employment_id: S.String, + id: S.String, + request_details: RequestDetails, + requested_by: S.String, + status: ContractAmendmentStatus, + submitted_at: S.String, + zendesk_ticket_url: S.NullOr(S.String), + }), +).annotate({ + identifier: "ContractAmendment", +}) as any as S.Schema; + +export interface ContractAmendmentResponseData { + contract_amendment: ContractAmendment; +} +export const ContractAmendmentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_amendment: ContractAmendment, + }), +).annotate({ + identifier: "ContractAmendmentResponseData", +}) as any as S.Schema; + +/** Contract Amendment response */ +export interface ContractAmendmentResponse { + data?: ContractAmendmentResponseData; +} +export const ContractAmendmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ContractAmendmentResponseData), + }), +).annotate({ + identifier: "ContractAmendmentResponse", +}) as any as S.Schema; + +export type GetV1ContractAmendmentsSchemaRequestForm = "contract_amendment"; +export const GetV1ContractAmendmentsSchemaRequestForm = /*@__PURE__*/ S.String; + +/** Use latest version */ +export type GetV1ContractAmendmentsSchemaRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1ContractAmendmentsSchemaRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1ContractAmendmentsSchemaRequestJsonSchemaVersion = + | number + | GetV1ContractAmendmentsSchemaRequestJsonSchemaVersionCase1; +export const GetV1ContractAmendmentsSchemaRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1ContractAmendmentsSchemaRequest { + /** 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?: GetV1ContractAmendmentsSchemaRequestForm | (string & {}); + /** Version of the form schema */ + json_schema_version?: GetV1ContractAmendmentsSchemaRequestJsonSchemaVersion; +} +export const GetV1ContractAmendmentsSchemaRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Query()), + country_code: S.String.pipe(T.Query()), + form: S.optional( + GetV1ContractAmendmentsSchemaRequestForm.pipe(T.Query()), + ), + json_schema_version: S.optional( + GetV1ContractAmendmentsSchemaRequestJsonSchemaVersion.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contract-amendments/schema", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1ContractAmendmentsSchemaRequest", +}) as any as S.Schema; + +/** Object with required and optional fields, its descriptions and suggested presentation */ +export interface ContractAmendmentFormResponse { + data?: unknown; +} +export const ContractAmendmentFormResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(S.Unknown), + }), +).annotate({ + identifier: "ContractAmendmentFormResponse", +}) as any as S.Schema; + +/** Current record state. - `enqueued`: An outstanding payment is enqueued to complete the invoice payment. - `externally_paid`: The invoice was paid outside the platform and the employer reported that the contractor was paid. - `issued`: This invoice has been uploaded by the contractor. - `in_review`: This invoice has been uploaded by the contractor and is in the process of review by Remote. This is only expected for Contractor of Record invoices. - `paid_out`: This invoice has been paid out to contractor. This is the final expected stage of a contractor invoice. - `pay_out_failed`: There were issues paying out to the contractor. This is usually caused by a balance issue, an issue with the contractor's bank account, or another type error that comes from payment partner. - `pending_payment`: An outstanding payment has been created for this invoice and is awaiting the company payment before payout begins. - `processing`: The invoice is being processed for pay out. This status should only exist for a few seconds. - `rejected`: This invoice has been rejected by the the company or Remote support team, when requested by customers. It cannot be rejected if it's already paid. - `rejected_by_remote`: This invoice has been rejected by Remote during the Contractor of Record approval process. - `funds_returned`: A pay out was successfully attempted for the invoice, but the funds were rejected by the contractor's bank, either due to incorrect details or some other reason. - `manual_payout`: The invoice is not supported by our automated systems and must instead be manually paid by internal Remote teams. - `blocked`: The invoice is marked as blocked. It will not be paid out. */ +export type ContractorInvoiceStatus = + | "issued" + | "draft" + | "approved" + | "pending_payment" + | "in_review" + | "externally_paid" + | "rejected" + | "rejected_by_remote" + | "blocked" + | "compliance_review" + | "compliance_failed" + | "pay_out_scheduled" + | "enqueued" + | "processing" + | "manual_payout" + | "paid_out" + | "pay_out_failed" + | "funds_returned"; +export const ContractorInvoiceStatus = /*@__PURE__*/ S.String; + +export type GetV1ContractorInvoicesRequestSortBy = + | "date" + | "due_date" + | "approved_at" + | "paid_out_at"; +export const GetV1ContractorInvoicesRequestSortBy = /*@__PURE__*/ S.String; + +export type GetV1ContractorInvoicesRequestOrder = "asc" | "desc"; +export const GetV1ContractorInvoicesRequestOrder = /*@__PURE__*/ S.String; + +export interface GetV1ContractorInvoicesRequest { + /** Filters contractor invoices by status matching the value. */ + status?: ContractorInvoiceStatus | (string & {}); + /** Filters contractor invoices by invoice schedule ID matching the value. */ + contractor_invoice_schedule_id?: string; + /** Filters contractor invoices by date greater than or equal to the value. */ + date_from?: string; + /** Filters contractor invoices by date less than or equal to the value. */ + date_to?: string; + /** Filters contractor invoices by due date greater than or equal to the value. */ + due_date_from?: string; + /** Filters contractor invoices by due date less than or equal to the value. */ + due_date_to?: string; + /** Filters contractor invoices by approved date greater than or equal to the value. */ + approved_date_from?: string; + /** Filters contractor invoices by approved date less than or equal to the value. */ + approved_date_to?: string; + /** Filters contractor invoices by paid out date greater than or equal to the value. */ + paid_out_date_from?: string; + /** Filters contractor invoices by paid out date less than or equal to the value. */ + paid_out_date_to?: string; + /** Field to sort by */ + sort_by?: GetV1ContractorInvoicesRequestSortBy | (string & {}); + /** Sort order */ + order?: GetV1ContractorInvoicesRequestOrder | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1ContractorInvoicesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(ContractorInvoiceStatus.pipe(T.Query())), + contractor_invoice_schedule_id: S.optional(S.String.pipe(T.Query())), + date_from: S.optional(S.String.pipe(T.Query())), + date_to: S.optional(S.String.pipe(T.Query())), + due_date_from: S.optional(S.String.pipe(T.Query())), + due_date_to: S.optional(S.String.pipe(T.Query())), + approved_date_from: S.optional(S.String.pipe(T.Query())), + approved_date_to: S.optional(S.String.pipe(T.Query())), + paid_out_date_from: S.optional(S.String.pipe(T.Query())), + paid_out_date_to: S.optional(S.String.pipe(T.Query())), + sort_by: S.optional(GetV1ContractorInvoicesRequestSortBy.pipe(T.Query())), + order: S.optional(GetV1ContractorInvoicesRequestOrder.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/contractor-invoices", code: 200 })), +).annotate({ + identifier: "GetV1ContractorInvoicesRequest", +}) as any as S.Schema; + +/** Current types. - `manual`: Item manually entered when creating invoice. - `time_tracking`: Item generated by time tracking. - `expense`: Item that represents an expense included in the invoice. */ +export type ContractorInvoiceItemType = "manual" | "time_tracking" | "expense"; +export const ContractorInvoiceItemType = /*@__PURE__*/ S.String; + +/** Line Item schema for a Contractor Invoice. */ +export interface ContractorInvoiceItem { + /** Amount, in cents. */ + amount: number; + /** Describes invoice item intent. */ + description: string; + type: ContractorInvoiceItemType; +} +export const ContractorInvoiceItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + description: S.String, + type: ContractorInvoiceItemType, + }), +).annotate({ + identifier: "ContractorInvoiceItem", +}) as any as S.Schema; + +/** Invoice line items. */ +export type ContractorInvoiceItemsList = Array; +export const ContractorInvoiceItemsList = /*@__PURE__*/ S.Array( + ContractorInvoiceItem, +) as any as S.Schema; + +/** Payment method used for the payout: local (e.g. bank transfer), swift (SHA), or swift_our (OUR). Only present for guaranteed payout invoices. */ +export type ContractorInvoicePayOutMethod = "local" | "swift" | "swift_our"; +export const ContractorInvoicePayOutMethod = /*@__PURE__*/ S.String; + +/** Entity responsible for paying the SWIFT fee. Only present when processing_fee is set. */ +export type ContractorInvoiceProcessingFeePayer = "company" | "contractor"; +export const ContractorInvoiceProcessingFeePayer = /*@__PURE__*/ S.String; + +/** Contractor Invoice */ +export interface ContractorInvoice { + /** Overall amount that is calculated by summing all invoice items. */ + amount: number; + /** The datetime which contractor invoice has been approved and it's pending for payment. */ + approved_at?: string | null; + /** Invoice schedule that might have generated contractor invoice. */ + contractor_invoice_schedule_id?: string | null; + currency: string | null; + /** The issuance date specified by a contractor. */ + date: string; + /** Custom defined description. */ + description?: string | null; + /** The payment deadline chosen by the contractor while creating an invoice. */ + due_date?: string | null; + /** Employment identifier associated with the contractor invoice. */ + employment_id?: string; + /** The guaranteed FX rate applied for the payment. Only present for guaranteed payout invoices. */ + fx_rate?: number | null; + /** Contractor Invoice identifier. */ + id: string; + /** Invoice line items. */ + items: ContractorInvoiceItemsList; + /** Invoice identifier. */ + number?: string | null; + /** Date and time which invoice was paid to contractor. */ + paid_out_at?: string | null; + /** Payment method used for the payout: local (e.g. bank transfer), swift (SHA), or swift_our (OUR). Only present for guaranteed payout invoices. */ + pay_out_method?: ContractorInvoicePayOutMethod | null; + /** SWIFT fee amount in cents. Only present when pay_out_method is swift or swift_our. */ + processing_fee?: number | null; + /** Currency code of the SWIFT fee. Only present when processing_fee is set. */ + processing_fee_currency?: string | null; + /** Entity responsible for paying the SWIFT fee. Only present when processing_fee is set. */ + processing_fee_payer?: ContractorInvoiceProcessingFeePayer | null; + /** The amount the company needs to pay (pay in amount). */ + source_amount: number; + source_currency: string | null; + status: ContractorInvoiceStatus; + /** The amount the contractor receives (pay out amount). Can be null if pay out is not guaranteed. */ + target_amount?: number | null; + /** Currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. */ + target_currency?: string | null; +} +export const ContractorInvoice = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + approved_at: S.optional(S.NullOr(S.String)), + contractor_invoice_schedule_id: S.optional(S.NullOr(S.String)), + currency: S.NullOr(S.String), + date: S.String, + description: S.optional(S.NullOr(S.String)), + due_date: S.optional(S.NullOr(S.String)), + employment_id: S.optional(S.String), + fx_rate: S.optional(S.NullOr(S.Number)), + id: S.String, + items: ContractorInvoiceItemsList, + number: S.optional(S.NullOr(S.String)), + paid_out_at: S.optional(S.NullOr(S.String)), + pay_out_method: S.optional(S.NullOr(ContractorInvoicePayOutMethod)), + processing_fee: S.optional(S.NullOr(S.Number)), + processing_fee_currency: S.optional(S.NullOr(S.String)), + processing_fee_payer: S.optional( + S.NullOr(ContractorInvoiceProcessingFeePayer), + ), + source_amount: S.Number, + source_currency: S.NullOr(S.String), + status: ContractorInvoiceStatus, + target_amount: S.optional(S.NullOr(S.Number)), + target_currency: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "ContractorInvoice", +}) as any as S.Schema; + +export type ListContractorInvoicesResponseDataContractorInvoicesList = + Array; +export const ListContractorInvoicesResponseDataContractorInvoicesList = + /*@__PURE__*/ S.Array( + ContractorInvoice, + ) as any as S.Schema; + +export interface ListContractorInvoicesResponseData { + contractor_invoices?: ListContractorInvoicesResponseDataContractorInvoicesList; + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListContractorInvoicesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contractor_invoices: S.optional( + ListContractorInvoicesResponseDataContractorInvoicesList, + ), + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListContractorInvoicesResponseData", +}) as any as S.Schema; + +/** Paginated response schema listing all Contractor Invoices. */ +export interface ListContractorInvoicesResponse { + data?: ListContractorInvoicesResponseData; +} +export const ListContractorInvoicesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListContractorInvoicesResponseData), + }), +).annotate({ + identifier: "ListContractorInvoicesResponse", +}) as any as S.Schema; + +/** Status to filter contractor invoice schedules by. Skipped schedules (`deleted`) are always excluded from listings, so `deleted` is not a valid filter value here — see `ContractorInvoiceScheduleStatus` for the full set of states a schedule can report. - `active`: Once an invoice is generated, and a withdrawal method has been set, then it's set to active. - `processing`: Ephemeral status indicating that we are currently attempting to generate a contractor invoice from the scheduled contractor invoice. - `pending_company_action`: Company needs to trigger some actions related to payment configuration. - `pending_contractor_action`: When schedule is blocked by contractor onboarding or invoice generation failed due to withdrawal methods issues that needs contractor action. - `generation_failed_unrelated_to_withdrawal_method`: Generation failed for any other reason. - `completed`: Number of generated contractor invoices has been reached. - `inactive`: Does not create any further contractor invoices but it's still possible for the employer to activate it again. */ +export type ContractorInvoiceScheduleStatusFilter = + | "inactive" + | "completed" + | "active" + | "processing" + | "pending_company_action" + | "pending_contractor_action" + | "generation_failed_unrelated_to_withdrawal_method"; +export const ContractorInvoiceScheduleStatusFilter = /*@__PURE__*/ S.String; + +/** Defines how often contractor invoices will be generated. - `bi_weekly`: Invoices will be generated every other week, on the given day of the week based on the start date. - `monthly`: Invoices will be generated once a month. - `semi_monthly`: Invoices will be generated at fixed dates twice a month (with 14 days of difference between each other), depending on the start date. In months with just 30 days, if `start_date` is set to the 31st day, then generation occurs in the last of day of the month. - `weekly`: Invoices will be generated each week. */ +export type ContractorInvoiceSchedulePeriodicity = + | "bi_weekly" + | "monthly" + | "semi_monthly" + | "weekly"; +export const ContractorInvoiceSchedulePeriodicity = /*@__PURE__*/ S.String; + +export type GetV1ContractorInvoiceSchedulesRequestSortBy = + | "number" + | "total_amount" + | "next_invoice_at" + | "start_date" + | "nr_occurrences"; +export const GetV1ContractorInvoiceSchedulesRequestSortBy = + /*@__PURE__*/ S.String; + +export type GetV1ContractorInvoiceSchedulesRequestOrder = "asc" | "desc"; +export const GetV1ContractorInvoiceSchedulesRequestOrder = + /*@__PURE__*/ S.String; + +export interface GetV1ContractorInvoiceSchedulesRequest { + /** Filters contractor invoice schedules by start date greater than or equal to the value. */ + start_date_from?: string; + /** Filters contractor invoice schedules by start date less than or equal to the value. */ + start_date_to?: string; + /** Filters contractor invoice schedules by next invoice date greater than or equal to the value. */ + next_invoice_date_from?: string; + /** Filters contractor invoice schedules by next invoice date less than or equal to the value. */ + next_invoice_date_to?: string; + /** Filters contractor invoice schedules by status matching the value. */ + status?: ContractorInvoiceScheduleStatusFilter | (string & {}); + /** Filters contractor invoice schedules by employment id matching the value. */ + employment_id?: string; + /** Filters contractor invoice schedules by periodicity matching the value. */ + periodicity?: ContractorInvoiceSchedulePeriodicity | (string & {}); + /** Filters contractor invoice schedules by currency matching the value. */ + currency?: string; + /** Field to sort by */ + sort_by?: GetV1ContractorInvoiceSchedulesRequestSortBy | (string & {}); + /** Sort order */ + order?: GetV1ContractorInvoiceSchedulesRequestOrder | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1ContractorInvoiceSchedulesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + start_date_from: S.optional(S.String.pipe(T.Query())), + start_date_to: S.optional(S.String.pipe(T.Query())), + next_invoice_date_from: S.optional(S.String.pipe(T.Query())), + next_invoice_date_to: S.optional(S.String.pipe(T.Query())), + status: S.optional(ContractorInvoiceScheduleStatusFilter.pipe(T.Query())), + employment_id: S.optional(S.String.pipe(T.Query())), + periodicity: S.optional( + ContractorInvoiceSchedulePeriodicity.pipe(T.Query()), + ), + currency: S.optional(S.String.pipe(T.Query())), + sort_by: S.optional( + GetV1ContractorInvoiceSchedulesRequestSortBy.pipe(T.Query()), + ), + order: S.optional( + GetV1ContractorInvoiceSchedulesRequestOrder.pipe(T.Query()), + ), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractor-invoice-schedules", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1ContractorInvoiceSchedulesRequest", +}) as any as S.Schema; + +/** Line Item schema for a Contractor Invoice Schedule */ +export interface ContractorInvoiceScheduleItem { + /** Amount, in cents. */ + amount: number; + /** Describes invoice item intent. */ + description: string; +} +export const ContractorInvoiceScheduleItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + description: S.String, + }), +).annotate({ + identifier: "ContractorInvoiceScheduleItem", +}) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type ContractorInvoiceScheduleItemsList = + Array; +export const ContractorInvoiceScheduleItemsList = /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, +) as any as S.Schema; + +/** Current record state. - `active`: Once an invoice is generated, and a withdrawal method has been set, then it's set to active. - `processing`: Ephemeral status indicating that we are currently attempting to generate a contractor invoice from the scheduled contractor invoice. - `pending_company_action`: Company needs to trigger some actions related to payment configuration. - `pending_contractor_action`: When schedule is blocked by contractor onboarding or invoice generation failed due to withdrawal methods issues that needs contractor action. - `generation_failed_unrelated_to_withdrawal_method`: Generation failed for any other reason. - `completed`: Number of generated contractor invoices has been reached. - `inactive`: Does not create any further contractor invoices but it's still possible for the employer to activate it again. - `deleted`: The schedule was cancelled and will not generate any further contractor invoices. */ +export type ContractorInvoiceScheduleStatus = + | "inactive" + | "deleted" + | "completed" + | "active" + | "processing" + | "pending_company_action" + | "pending_contractor_action" + | "generation_failed_unrelated_to_withdrawal_method"; +export const ContractorInvoiceScheduleStatus = /*@__PURE__*/ S.String; + +/** Contractor Invoice Schedule. */ +export interface ContractorInvoiceSchedule { + currency: string | null; + /** Employment identifier. */ + employment_id: string; + /** Schedule identifier. */ + id: string; + /** List of invoice items that composes the overall invoice amount. */ + items: ContractorInvoiceScheduleItemsList; + /** Date time which next invoice will be generated. */ + next_invoice_at?: string | null; + /** Custom defined note. */ + note?: string | null; + /** Count of remaining invoices that should be generated. */ + nr_occurrences?: number | null; + /** Invoice identifier. */ + number?: string | null; + periodicity: ContractorInvoiceSchedulePeriodicity; + /** Date which invoices generation will start. */ + start_date: string; + status: ContractorInvoiceScheduleStatus; + /** Overall amount that is calculated by summing all invoice items. */ + total_amount: number; +} +export const ContractorInvoiceSchedule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currency: S.NullOr(S.String), + employment_id: S.String, + id: S.String, + items: ContractorInvoiceScheduleItemsList, + next_invoice_at: S.optional(S.NullOr(S.String)), + note: S.optional(S.NullOr(S.String)), + nr_occurrences: S.optional(S.NullOr(S.Number)), + number: S.optional(S.NullOr(S.String)), + periodicity: ContractorInvoiceSchedulePeriodicity, + start_date: S.String, + status: ContractorInvoiceScheduleStatus, + total_amount: S.Number, + }), +).annotate({ + identifier: "ContractorInvoiceSchedule", +}) as any as S.Schema; + +export type ListContractorInvoiceSchedulesResponseDataContractorInvoiceSchedulesList = + Array; +export const ListContractorInvoiceSchedulesResponseDataContractorInvoiceSchedulesList = + /*@__PURE__*/ S.Array( + ContractorInvoiceSchedule, + ) as any as S.Schema; + +export interface ListContractorInvoiceSchedulesResponseData { + contractor_invoice_schedules?: ListContractorInvoiceSchedulesResponseDataContractorInvoiceSchedulesList; + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListContractorInvoiceSchedulesResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + contractor_invoice_schedules: S.optional( + ListContractorInvoiceSchedulesResponseDataContractorInvoiceSchedulesList, + ), + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), + ).annotate({ + identifier: "ListContractorInvoiceSchedulesResponseData", + }) as any as S.Schema; + +/** Paginated response schema listing all Contractor Invoice Schedules. */ +export interface ListContractorInvoiceSchedulesResponse { + data?: ListContractorInvoiceSchedulesResponseData; +} +export const ListContractorInvoiceSchedulesResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: S.optional(ListContractorInvoiceSchedulesResponseData), + }), +).annotate({ + identifier: "ListContractorInvoiceSchedulesResponse", +}) as any as S.Schema; + +export interface GetV1ContractorInvoiceSchedulesIdRequest { + /** Resource unique identifier */ + id: string; +} +export const GetV1ContractorInvoiceSchedulesIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractor-invoice-schedules/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1ContractorInvoiceSchedulesIdRequest", +}) as any as S.Schema; + +export interface ContractorInvoiceScheduleResponseData { + contractor_invoice_schedule: ContractorInvoiceSchedule; +} +export const ContractorInvoiceScheduleResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + contractor_invoice_schedule: ContractorInvoiceSchedule, + }), +).annotate({ + identifier: "ContractorInvoiceScheduleResponseData", +}) as any as S.Schema; + +/** Response schema to show a Contractor Invoice Schedule */ +export interface ContractorInvoiceScheduleResponse { + data: ContractorInvoiceScheduleResponseData; +} +export const ContractorInvoiceScheduleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractorInvoiceScheduleResponseData, + }), +).annotate({ + identifier: "ContractorInvoiceScheduleResponse", +}) as any as S.Schema; + +export interface GetV1ContractorInvoicesIdRequest { + /** Resource unique identifier */ + id: string; +} +export const GetV1ContractorInvoicesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/contractor-invoices/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1ContractorInvoicesIdRequest", +}) as any as S.Schema; + +export interface ContractorInvoiceResponseData { + contractor_invoice: ContractorInvoice; +} +export const ContractorInvoiceResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contractor_invoice: ContractorInvoice, + }), +).annotate({ + identifier: "ContractorInvoiceResponseData", +}) as any as S.Schema; + +/** Response schema to show a Contractor Invoice */ +export interface ContractorInvoiceResponse { + data: ContractorInvoiceResponseData; +} +export const ContractorInvoiceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractorInvoiceResponseData, + }), +).annotate({ + identifier: "ContractorInvoiceResponse", +}) as any as S.Schema; + +export type GetV1ContractorsCorTerminationRequestsRequestStatus = + | "initiated" + | "executed" + | "cancelled"; +export const GetV1ContractorsCorTerminationRequestsRequestStatus = + /*@__PURE__*/ S.String; + +export interface GetV1ContractorsCorTerminationRequestsRequest { + /** Filter termination requests by employment ID. */ + employment_id?: string; + /** Filter termination requests by status. */ + status?: GetV1ContractorsCorTerminationRequestsRequestStatus | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1ContractorsCorTerminationRequestsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + status: S.optional( + GetV1ContractorsCorTerminationRequestsRequestStatus.pipe(T.Query()), + ), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/cor-termination-requests", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1ContractorsCorTerminationRequestsRequest", + }) as any as S.Schema; + +/** Current status of the termination request. */ +export type CorTerminationRequestStatus = + | "initiated" + | "executed" + | "cancelled"; +export const CorTerminationRequestStatus = /*@__PURE__*/ S.String; + +export interface CorTerminationRequest { + /** Timestamp of when the termination was cancelled. Null if not cancelled. */ + cancelled_at: string | null; + /** The date on which the contractor employment will be deactivated. */ + employment_deactivation_date: string | null; + /** Identifier of the employment being terminated. */ + employment_id: string; + /** Timestamp of when the termination was executed. Null if not yet executed. */ + executed_at: string | null; + /** Unique identifier of the termination request. */ + id: string; + /** Timestamp of when the termination request was initiated. */ + initiated_at: string | null; + /** Current status of the termination request. */ + status: CorTerminationRequestStatus; + /** The date when the termination was initiated. */ + termination_date: string | null; +} +export const CorTerminationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cancelled_at: S.NullOr(S.String), + employment_deactivation_date: S.NullOr(S.String), + employment_id: S.String, + executed_at: S.NullOr(S.String), + id: S.String, + initiated_at: S.NullOr(S.String), + status: CorTerminationRequestStatus, + termination_date: S.NullOr(S.String), + }), +).annotate({ + identifier: "CorTerminationRequest", +}) as any as S.Schema; + +export type IndexCorTerminationRequestsResponseDataTerminationRequestsList = + Array; +export const IndexCorTerminationRequestsResponseDataTerminationRequestsList = + /*@__PURE__*/ S.Array( + CorTerminationRequest, + ) as any as S.Schema; + +export interface IndexCorTerminationRequestsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + termination_requests?: IndexCorTerminationRequestsResponseDataTerminationRequestsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const IndexCorTerminationRequestsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + current_page: S.optional(S.Number), + termination_requests: S.optional( + IndexCorTerminationRequestsResponseDataTerminationRequestsList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "IndexCorTerminationRequestsResponseData", +}) as any as S.Schema; + +/** Response schema listing many termination_requests */ +export interface IndexCorTerminationRequestsResponse { + data?: IndexCorTerminationRequestsResponseData; +} +export const IndexCorTerminationRequestsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(IndexCorTerminationRequestsResponseData), + }), +).annotate({ + identifier: "IndexCorTerminationRequestsResponse", +}) as any as S.Schema; + +export interface GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest { + /** Employment ID */ + employment_id: string; + /** Document ID */ + id: string; +} +export const GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/employments/{employment_id}/contract-documents/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest", + }) as any as S.Schema; + +/** Signing method used by this signatory */ +export type SignatorySignatureMethod = "in_platform" | "docusign"; +export const SignatorySignatureMethod = /*@__PURE__*/ S.String; + +/** Legal signature level applied when signing */ +export type SignatorySignatureType = "standard" | "qes" | "aes" | "ses"; +export const SignatorySignatureType = /*@__PURE__*/ S.String; + +/** Current signing status of this signatory */ +export type SignatoryStatus = "pending" | "signed" | "unassigned"; +export const SignatoryStatus = /*@__PURE__*/ S.String; + +/** The role of this signatory in the contract signing process */ +export type SignatoryType = + | "company" + | "employee" + | "admin" + | "external" + | "unknown"; +export const SignatoryType = /*@__PURE__*/ S.String; + +/** A signatory on a contract document. For company and employee signatories, `user_id` is provided. For other signatory types, `user_id` is null. */ +export interface Signatory { + /** Email address of the signatory */ + email?: string | null; + /** Full name of the signatory */ + name?: string | null; + /** Signature image as a data URI (e.g. `data:image/png;base64,...`), null if not yet signed */ + signature?: string | null; + /** Signing method used by this signatory */ + signature_method?: SignatorySignatureMethod; + /** Legal signature level applied when signing */ + signature_type?: SignatorySignatureType; + /** Timestamp when the signatory signed the document, null if not yet signed */ + signed_at?: string | null; + status: SignatoryStatus; + type: SignatoryType; + /** User identifier for internal signatories, null for external signatories */ + user_id?: string | null; +} +export const Signatory = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + signature: S.optional(S.NullOr(S.String)), + signature_method: S.optional(SignatorySignatureMethod), + signature_type: S.optional(SignatorySignatureType), + signed_at: S.optional(S.NullOr(S.String)), + status: SignatoryStatus, + type: SignatoryType, + user_id: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "Signatory" }) as any as S.Schema; + +export type ContractDocumentResponseDataContractDocumentSignatoriesList = + Array; +export const ContractDocumentResponseDataContractDocumentSignatoriesList = + /*@__PURE__*/ S.Array( + Signatory, + ) as any as S.Schema; + +/** 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" + | "awaiting_signatures" + | "finished"; +export const ContractorContractDocumentStatus = /*@__PURE__*/ S.String; + +export interface ContractDocumentResponseDataContractDocument { + content: string; + name: string; + signatories: ContractDocumentResponseDataContractDocumentSignatoriesList; + status: ContractorContractDocumentStatus; +} +export const ContractDocumentResponseDataContractDocument = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + signatories: ContractDocumentResponseDataContractDocumentSignatoriesList, + status: ContractorContractDocumentStatus, + }), + ).annotate({ + identifier: "ContractDocumentResponseDataContractDocument", + }) as any as S.Schema; + +export interface ContractDocumentResponseData { + contract_document: ContractDocumentResponseDataContractDocument; +} +export const ContractDocumentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_document: ContractDocumentResponseDataContractDocument, + }), +).annotate({ + identifier: "ContractDocumentResponseData", +}) as any as S.Schema; + +/** Return a base64 encoded contract document */ +export interface ContractDocumentResponse { + data: ContractDocumentResponseData; +} +export const ContractDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractDocumentResponseData, + }), +).annotate({ + identifier: "ContractDocumentResponse", +}) as any as S.Schema; + +export interface GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest { + /** Employment ID */ + employment_id: string; + /** Restrict to currencies which payout is guaranteed (default: true) */ + restrict_to_guaranteed_pay_out_currencies?: boolean; +} +export const GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + restrict_to_guaranteed_pay_out_currencies: S.optional( + S.Boolean.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/employments/{employment_id}/contractor-currencies", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest", + }) as any as S.Schema; + +export interface ContractorCurrencyItem { + code: string; + source: string; +} +export const ContractorCurrencyItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + source: S.String, + }), +).annotate({ + identifier: "ContractorCurrencyItem", +}) as any as S.Schema; + +export type ContractorCurrencyResponseDataList = Array; +export const ContractorCurrencyResponseDataList = /*@__PURE__*/ S.Array( + ContractorCurrencyItem, +) as any as S.Schema; + +/** Schema for listing contractor currencies */ +export interface ContractorCurrencyResponse { + data: ContractorCurrencyResponseDataList; +} +export const ContractorCurrencyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractorCurrencyResponseDataList, + }), +).annotate({ + identifier: "ContractorCurrencyResponse", +}) as any as S.Schema; + +export interface GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/employments/{employment_id}/contractor-subscriptions", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest", + }) as any as S.Schema; + +export interface ContractorSubscriptionsSummaryCompanyProduct { + slug?: string; +} +export const ContractorSubscriptionsSummaryCompanyProduct = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + slug: S.optional(S.String), + }), + ).annotate({ + identifier: "ContractorSubscriptionsSummaryCompanyProduct", + }) as any as S.Schema; + +export interface ContractorSubscriptionsSummaryCompanyProductDiscount { + expiration_date?: string; + percent?: string; +} +export const ContractorSubscriptionsSummaryCompanyProductDiscount = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + expiration_date: S.optional(S.String), + percent: S.optional(S.String), + }), + ).annotate({ + identifier: "ContractorSubscriptionsSummaryCompanyProductDiscount", + }) as any as S.Schema; + +export type EligibilityQuestionnaireType = "contractor_of_record"; +export const EligibilityQuestionnaireType = /*@__PURE__*/ S.String; + +export interface EligibilityQuestionnaire { + /** Whether the questionnaire blocks further progress if failed */ + is_blocking: boolean; + /** The questions in the questionnaire */ + questions: unknown; + /** The responses to the questionnaire */ + responses: unknown; + slug: string; + submitted_at: string; + type: EligibilityQuestionnaireType; +} +export const EligibilityQuestionnaire = /*@__PURE__*/ S.suspend(() => + S.Struct({ + is_blocking: S.Boolean, + questions: S.Unknown, + responses: S.Unknown, + slug: S.String, + submitted_at: S.String, + type: EligibilityQuestionnaireType, + }), +).annotate({ + identifier: "EligibilityQuestionnaire", +}) as any as S.Schema; + +export interface ContractorSubscriptionsSummaryPrice { + amount?: number; + /** The price after applying the company discount, in cents */ + final_amount?: number; +} +export const ContractorSubscriptionsSummaryPrice = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(S.Number), + final_amount: S.optional(S.Number), + }), +).annotate({ + identifier: "ContractorSubscriptionsSummaryPrice", +}) as any as S.Schema; + +export interface ContractorSubscriptionsSummary { + company_product: ContractorSubscriptionsSummaryCompanyProduct; + company_product_discount: ContractorSubscriptionsSummaryCompanyProductDiscount; + currency: Currency; + eligibility_questionnaire?: EligibilityQuestionnaire; + is_termination_fees_enabled?: boolean; + price: ContractorSubscriptionsSummaryPrice; + product: Product; + total_amount: number | null; + total_discount?: number; + total_in_advance?: number; + total_prorated?: number; +} +export const ContractorSubscriptionsSummary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_product: ContractorSubscriptionsSummaryCompanyProduct, + company_product_discount: + ContractorSubscriptionsSummaryCompanyProductDiscount, + currency: Currency, + eligibility_questionnaire: S.optional(EligibilityQuestionnaire), + is_termination_fees_enabled: S.optional(S.Boolean), + price: ContractorSubscriptionsSummaryPrice, + product: Product, + total_amount: S.NullOr(S.Number), + total_discount: S.optional(S.Number), + total_in_advance: S.optional(S.Number), + total_prorated: S.optional(S.Number), + }), +).annotate({ + identifier: "ContractorSubscriptionsSummary", +}) as any as S.Schema; + +export type ContractorSubscriptionSummariesResponseDataList = + Array; +export const ContractorSubscriptionSummariesResponseDataList = + /*@__PURE__*/ S.Array( + ContractorSubscriptionsSummary, + ) as any as S.Schema; + +/** Summaries of contractor subscriptions */ +export interface ContractorSubscriptionSummariesResponse { + data: ContractorSubscriptionSummariesResponseDataList; +} +export const ContractorSubscriptionSummariesResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: ContractorSubscriptionSummariesResponseDataList, + }), +).annotate({ + identifier: "ContractorSubscriptionSummariesResponse", +}) as any as S.Schema; + +export interface GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest { + /** Employment ID */ + employment_id: string; + /** Termination Request ID */ + termination_request_id: string; +} +export const GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + termination_request_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/employments/{employment_id}/cor-termination-requests/{termination_request_id}", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest", + }) as any as S.Schema; + +export interface CorTerminationRequestResponse { + data: CorTerminationRequest; +} +export const CorTerminationRequestResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CorTerminationRequest, + }), +).annotate({ + identifier: "CorTerminationRequestResponse", +}) as any as S.Schema; + +export interface GetV1ContractorsEmploymentsEmploymentIdRatesRequest { + /** Contractor employment ID */ + employment_id: string; +} +export const GetV1ContractorsEmploymentsEmploymentIdRatesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/employments/{employment_id}/rates", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1ContractorsEmploymentsEmploymentIdRatesRequest", + }) as any as S.Schema; + +/** Currency structure without the slug, eg: built from ex_money */ +export type CurrencyWithoutSlug = CurrencyDefinition; +export const CurrencyWithoutSlug = CurrencyDefinition; + +/** Monetary amount and currency. `amount` is a decimal string in the major unit, e.g. 109.87. */ +export interface MoneyResponse { + amount: string; + currency: CurrencyDefinition; +} +export const MoneyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.String, + currency: CurrencyDefinition, + }), +).annotate({ identifier: "MoneyResponse" }) as any as S.Schema; + +/** How often the contractor is paid. Always null for `one_off` rates. */ +export type ContractorRatePayFrequency = + | "weekly" + | "bi_weekly" + | "semi_monthly" + | "monthly"; +export const ContractorRatePayFrequency = /*@__PURE__*/ S.String; + +/** The unit the amount is paid per. */ +export type ContractorRateType = + | "hourly" + | "daily" + | "weekly" + | "monthly" + | "one_off"; +export const ContractorRateType = /*@__PURE__*/ S.String; + +/** A rate configured for a contractor, with the dates of the contract it is paid under. `type` discriminates the payment mode: `one_off` is a single payment on completion of services; any other value is paid per pay period, where `type` is the calculation unit and `pay_frequency` the invoicing cadence. `type` and `pay_frequency` are open enums: new values may be added, so treat an unrecognised value as opaque rather than an error. */ +export interface ContractorRate { + amount: MoneyResponse; + /** Expiration date of the contractor's active contract (or the last active one for ended engagements). This is not a termination date. Null for an open-ended contract, and when the contractor has no contract on record. */ + contract_expiration_date: string | null; + /** Date the contractor started working under their active contract (or the last active one for ended engagements). This is the work start date, which can precede the date the contract became effective. Null when the contractor has no contract on record. */ + contract_start_date: string | null; + /** Unique identifier of the rate. */ + id: string; + /** How often the contractor is paid. Always null for `one_off` rates. */ + pay_frequency: ContractorRatePayFrequency | null; + /** The unit the amount is paid per. */ + type: ContractorRateType; +} +export const ContractorRate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: MoneyResponse, + contract_expiration_date: S.NullOr(S.String), + contract_start_date: S.NullOr(S.String), + id: S.String, + pay_frequency: S.NullOr(ContractorRatePayFrequency), + type: ContractorRateType, + }), +).annotate({ identifier: "ContractorRate" }) as any as S.Schema; + +export type ListContractorRatesResponseDataRatesList = Array; +export const ListContractorRatesResponseDataRatesList = /*@__PURE__*/ S.Array( + ContractorRate, +) as any as S.Schema; + +export interface ListContractorRatesResponseData { + rates: ListContractorRatesResponseDataRatesList; +} +export const ListContractorRatesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rates: ListContractorRatesResponseDataRatesList, + }), +).annotate({ + identifier: "ListContractorRatesResponseData", +}) as any as S.Schema; + +/** Response listing the rates configured for a contractor. */ +export interface ListContractorRatesResponse { + data: ListContractorRatesResponseData; +} +export const ListContractorRatesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListContractorRatesResponseData, + }), +).annotate({ + identifier: "ListContractorRatesResponse", +}) as any as S.Schema; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireRequestType = + "contractor_of_record"; +export const GetV1ContractorsSchemasEligibilityQuestionnaireRequestType = + /*@__PURE__*/ S.String; + +/** Use latest version */ +export type GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersion = + | number + | GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersionCase1; +export const GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1ContractorsSchemasEligibilityQuestionnaireRequest { + /** Type of eligibility questionnaire */ + type: + | GetV1ContractorsSchemasEligibilityQuestionnaireRequestType + | (string & {}); + /** Version of the form schema */ + json_schema_version?: GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersion; +} +export const GetV1ContractorsSchemasEligibilityQuestionnaireRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: GetV1ContractorsSchemasEligibilityQuestionnaireRequestType.pipe( + T.Query(), + ), + json_schema_version: S.optional( + GetV1ContractorsSchemasEligibilityQuestionnaireRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/contractors/schemas/eligibility-questionnaire", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1ContractorsSchemasEligibilityQuestionnaireRequest", + }) as any as S.Schema; + +export interface EligibilityQuestionnaireJSONSchemaResponseData { + /** Permissions related to the schema */ + permissions?: unknown; + /** The JSON Schema definition */ + schema?: unknown; + /** The version of the JSON Schema */ + version?: number; +} +export const EligibilityQuestionnaireJSONSchemaResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + permissions: S.optional(S.Unknown), + schema: S.optional(S.Unknown), + version: S.optional(S.Number), + }), + ).annotate({ + identifier: "EligibilityQuestionnaireJSONSchemaResponseData", + }) as any as S.Schema; + +/** JSON Schema definition for eligibility questionnaire */ +export interface EligibilityQuestionnaireJSONSchemaResponse { + data?: EligibilityQuestionnaireJSONSchemaResponseData; +} +export const EligibilityQuestionnaireJSONSchemaResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(EligibilityQuestionnaireJSONSchemaResponseData), + }), + ).annotate({ + identifier: "EligibilityQuestionnaireJSONSchemaResponse", + }) as any as S.Schema; + +export interface GetV1CostCalculatorCountriesRequest { + /** If the premium benefits should be included in the response */ + include_premium_benefits?: boolean; +} +export const GetV1CostCalculatorCountriesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include_premium_benefits: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/cost-calculator/countries", code: 200 }), + ), +).annotate({ + identifier: "GetV1CostCalculatorCountriesRequest", +}) as any as S.Schema; + +/** - active: country is ready to onboard employee - coming_soon: country is in process of getting ready */ +export type CostCalculatorCountryAvailability = "active" | "coming_soon"; +export const CostCalculatorCountryAvailability = /*@__PURE__*/ S.String; + +export type MinimalRegionChildRegionsList = Array; +export const MinimalRegionChildRegionsList = /*@__PURE__*/ S.Array( + S.suspend(() => MinimalRegion), +) as any as S.Schema; + +export type RegionStatus = "active" | "inactive"; +export const RegionStatus = /*@__PURE__*/ S.String; + +export interface MinimalRegion { + child_regions?: MinimalRegionChildRegionsList; + code?: string | null; + name: string; + slug: string; + status?: RegionStatus | null; +} +export const MinimalRegion = /*@__PURE__*/ S.suspend(() => + S.Struct({ + child_regions: S.optional(MinimalRegionChildRegionsList), + code: S.optional(S.NullOr(S.String)), + name: S.String, + slug: S.String, + status: S.optional(S.NullOr(RegionStatus)), + }), +).annotate({ identifier: "MinimalRegion" }) as any as S.Schema; + +export type CostCalculatorCountryLevelRegionChildRegionsList = + Array; +export const CostCalculatorCountryLevelRegionChildRegionsList = + /*@__PURE__*/ S.Array( + MinimalRegion, + ) as any as S.Schema; + +/** A supported country on Remote */ +export interface CostCalculatorCountryLevelRegion { + availability: CostCalculatorCountryAvailability; + child_regions: CostCalculatorCountryLevelRegionChildRegionsList; + code: string; + currency: Currency; + has_additional_fields?: boolean; + name: string; + original_country_slug: string; + region_slug: string; +} +export const CostCalculatorCountryLevelRegion = /*@__PURE__*/ S.suspend(() => + S.Struct({ + availability: CostCalculatorCountryAvailability, + child_regions: CostCalculatorCountryLevelRegionChildRegionsList, + code: S.String, + currency: Currency, + has_additional_fields: S.optional(S.Boolean), + name: S.String, + original_country_slug: S.String, + region_slug: S.String, + }), +).annotate({ + identifier: "CostCalculatorCountryLevelRegion", +}) as any as S.Schema; + +export type CostCalculatorListCountryResponseDataList = + Array; +export const CostCalculatorListCountryResponseDataList = /*@__PURE__*/ S.Array( + CostCalculatorCountryLevelRegion, +) as any as S.Schema; + +export interface CostCalculatorListCountryResponse { + data: CostCalculatorListCountryResponseDataList; +} +export const CostCalculatorListCountryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CostCalculatorListCountryResponseDataList, + }), +).annotate({ + identifier: "CostCalculatorListCountryResponse", +}) as any as S.Schema; + +export interface GetV1CostCalculatorRegionsSlugFieldsRequest { + /** Slug */ + slug: string; + /** If the premium benefits should be included in the response */ + include_premium_benefits?: boolean; +} +export const GetV1CostCalculatorRegionsSlugFieldsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + slug: S.String.pipe(T.Label()), + include_premium_benefits: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/cost-calculator/regions/{slug}/fields", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CostCalculatorRegionsSlugFieldsRequest", + }) as any as S.Schema; + +export type JSONSchemaResponseDataSchemaPropertiesMap = { + [key: string]: unknown | undefined; +}; +export const JSONSchemaResponseDataSchemaPropertiesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export type JSONSchemaResponseDataSchemaRequiredList = Array; +export const JSONSchemaResponseDataSchemaRequiredList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type JSONSchemaResponseDataSchemaXJsfOrderList = Array; +export const JSONSchemaResponseDataSchemaXJsfOrderList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface JSONSchemaResponseDataSchema { + properties: JSONSchemaResponseDataSchemaPropertiesMap; + required?: JSONSchemaResponseDataSchemaRequiredList; + x_jsf_order?: JSONSchemaResponseDataSchemaXJsfOrderList; +} +export const JSONSchemaResponseDataSchema = /*@__PURE__*/ S.suspend(() => + S.Struct({ + properties: JSONSchemaResponseDataSchemaPropertiesMap, + required: S.optional(JSONSchemaResponseDataSchemaRequiredList), + x_jsf_order: S.optional( + JSONSchemaResponseDataSchemaXJsfOrderList.pipe(T.Body("x-jsf-order")), + ), + }), +).annotate({ + identifier: "JSONSchemaResponseDataSchema", +}) as any as S.Schema; + +/** JSON Schema */ +export interface JSONSchemaResponseData { + schema?: JSONSchemaResponseDataSchema; + version?: number; +} +export const JSONSchemaResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + schema: S.optional(JSONSchemaResponseDataSchema), + version: S.optional(S.Number), + }), +).annotate({ + identifier: "JSONSchemaResponseData", +}) as any as S.Schema; + +/** JSON Schema Response */ +export interface JSONSchemaResponse { + /** JSON Schema */ + data?: JSONSchemaResponseData; +} +export const JSONSchemaResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(JSONSchemaResponseData), + }), +).annotate({ + identifier: "JSONSchemaResponse", +}) as any as S.Schema; + +export interface GetV1CountriesRequest {} +export const GetV1CountriesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/countries", code: 200 })), +).annotate({ + identifier: "GetV1CountriesRequest", +}) as any as S.Schema; + +export type CountriesResponseDataList = Array; +export const CountriesResponseDataList = /*@__PURE__*/ S.Array( + Country, +) as any as S.Schema; + +/** List of countries supported by Remote API */ +export interface CountriesResponse { + data?: CountriesResponseDataList; +} +export const CountriesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(CountriesResponseDataList), + }), +).annotate({ + identifier: "CountriesResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersion = + | number + | GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersionCase1; +export const GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1CountriesCountryCodeContractorContractDetailsRequest { + /** Country code according to ISO 3-digit alphabetic codes */ + country_code: string; + /** Employment ID */ + employment_id?: string; + /** Version of the form schema */ + json_schema_version?: GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersion; +} +export const GetV1CountriesCountryCodeContractorContractDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String.pipe(T.Label()), + employment_id: S.optional(S.String.pipe(T.Query())), + json_schema_version: S.optional( + GetV1CountriesCountryCodeContractorContractDetailsRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/countries/{country_code}/contractor-contract-details", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CountriesCountryCodeContractorContractDetailsRequest", + }) as any as S.Schema; + +/** Contract details schema object with variable fields based on country */ +export type ContractorContractDetailsResponseDataSchemaMap = { + [key: string]: unknown | undefined; +}; +export const ContractorContractDetailsResponseDataSchemaMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Contractor contract details response data */ +export interface ContractorContractDetailsResponseData { + /** Contract details schema object with variable fields based on country */ + schema: ContractorContractDetailsResponseDataSchemaMap; + /** JSON schema version number */ + version: number; +} +export const ContractorContractDetailsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + schema: ContractorContractDetailsResponseDataSchemaMap, + version: S.Number, + }), +).annotate({ + identifier: "ContractorContractDetailsResponseData", +}) as any as S.Schema; + +/** Response for contractor contract details */ +export interface ContractorContractDetailsResponse { + /** Contractor contract details response data */ + data?: ContractorContractDetailsResponseData; +} +export const ContractorContractDetailsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ContractorContractDetailsResponseData), + }), +).annotate({ + identifier: "ContractorContractDetailsResponse", +}) as any as S.Schema; + +export interface GetV1CountriesCountryCodeEngagementAgreementDetailsRequest { + /** Country code according to ISO 3-digit alphabetic codes */ + country_code: string; +} +export const GetV1CountriesCountryCodeEngagementAgreementDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/countries/{country_code}/engagement-agreement-details", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CountriesCountryCodeEngagementAgreementDetailsRequest", + }) as any as S.Schema; + +/** Engagement agreement details schema object with variable fields based on country */ +export type EngagementAgreementDetailsResponseDataSchemaMap = { + [key: string]: unknown | undefined; +}; +export const EngagementAgreementDetailsResponseDataSchemaMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Engagement agreement details response data */ +export interface EngagementAgreementDetailsResponseData { + /** Engagement agreement details schema object with variable fields based on country */ + schema: EngagementAgreementDetailsResponseDataSchemaMap; + /** JSON schema version number */ + version: number; +} +export const EngagementAgreementDetailsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + schema: EngagementAgreementDetailsResponseDataSchemaMap, + version: S.Number, + }), +).annotate({ + identifier: "EngagementAgreementDetailsResponseData", +}) as any as S.Schema; + +/** Response for engagement agreement details */ +export interface EngagementAgreementDetailsResponse { + /** Engagement agreement details response data */ + data?: EngagementAgreementDetailsResponseData; +} +export const EngagementAgreementDetailsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(EngagementAgreementDetailsResponseData), + }), +).annotate({ + identifier: "EngagementAgreementDetailsResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1CountriesCountryCodeFormRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1CountriesCountryCodeFormRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1CountriesCountryCodeFormRequestJsonSchemaVersion = + | number + | GetV1CountriesCountryCodeFormRequestJsonSchemaVersionCase1; +export const GetV1CountriesCountryCodeFormRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1CountriesCountryCodeFormRequest { + /** Country code according to ISO 3-digit alphabetic codes */ + country_code: string; + /** Name of the desired form */ + form: string; + /** Required for `contract_amendment` and `global_payroll_state_taxes` forms */ + employment_id?: string; + /** Two-letter US state code. Required for `global_payroll_state_taxes` (e.g. `NY`). */ + jurisdiction?: 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 */ + json_schema_version?: GetV1CountriesCountryCodeFormRequestJsonSchemaVersion; +} +export const GetV1CountriesCountryCodeFormRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + country_code: S.String.pipe(T.Label()), + form: S.String.pipe(T.Label()), + employment_id: S.optional(S.String.pipe(T.Query())), + jurisdiction: S.optional(S.String.pipe(T.Query())), + only_for_testing_include_scheduled_benefit_groups: S.optional( + S.Boolean.pipe(T.Query()), + ), + skip_benefits: S.optional(S.Boolean.pipe(T.Query())), + json_schema_version: S.optional( + GetV1CountriesCountryCodeFormRequestJsonSchemaVersion.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/countries/{country_code}/{form}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1CountriesCountryCodeFormRequest", +}) as any as S.Schema; + +/** Object with required and optional fields, its descriptions and suggested presentation */ +export interface CountryFormResponse { + data?: unknown; +} +export const CountryFormResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(S.Unknown), + }), +).annotate({ + identifier: "CountryFormResponse", +}) as any as S.Schema; + +export interface GetV1CountriesCountryCodeHolidaysYearRequest { + /** Country code according to ISO 3166-1 3-digit alphabetic codes */ + country_code: string; + /** Year for the holidays */ + year: string; + /** Country subdivision code according to ISO 3166-2 codes */ + country_subdivision_code?: string; +} +export const GetV1CountriesCountryCodeHolidaysYearRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String.pipe(T.Label()), + year: S.String.pipe(T.Label()), + country_subdivision_code: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/countries/{country_code}/holidays/{year}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CountriesCountryCodeHolidaysYearRequest", + }) as any as S.Schema; + +export interface Holiday { + /** Date of the holiday */ + day: string; + /** Name of the holiday */ + name: string; + /** Notes about the holiday */ + note?: string | null; + /** Date when the holiday is observed */ + observed_day?: string | null; +} +export const Holiday = /*@__PURE__*/ S.suspend(() => + S.Struct({ + day: S.String, + name: S.String, + note: S.optional(S.NullOr(S.String)), + observed_day: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "Holiday" }) as any as S.Schema; + +export type HolidaysResponseDataList = Array; +export const HolidaysResponseDataList = /*@__PURE__*/ S.Array( + Holiday, +) as any as S.Schema; + +/** Holidays response */ +export interface HolidaysResponse { + data?: HolidaysResponseDataList; +} +export const HolidaysResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(HolidaysResponseDataList), + }), +).annotate({ + identifier: "HolidaysResponse", +}) as any as S.Schema; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormRequestProductType = + | "peo" + | "global_payroll" + | "e2e_payroll"; +export const GetV1CountriesCountryCodeLegalEntityFormsFormRequestProductType = + /*@__PURE__*/ S.String; + +/** Use latest version */ +export type GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersion = + | number + | GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersionCase1; +export const GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1CountriesCountryCodeLegalEntityFormsFormRequest { + /** Country code according to ISO 3-digit alphabetic codes */ + country_code: string; + /** Name of the desired form */ + form: string; + /** Product type. Default value is global_payroll. */ + product_type?: + | GetV1CountriesCountryCodeLegalEntityFormsFormRequestProductType + | (string & {}); + /** Legal entity id for admistrative_details of e2e payroll products in GBR */ + legal_entity_id?: string; + /** Version of the form schema */ + json_schema_version?: GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersion; +} +export const GetV1CountriesCountryCodeLegalEntityFormsFormRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String.pipe(T.Label()), + form: S.String.pipe(T.Label()), + product_type: S.optional( + GetV1CountriesCountryCodeLegalEntityFormsFormRequestProductType.pipe( + T.Query(), + ), + ), + legal_entity_id: S.optional(S.String.pipe(T.Query())), + json_schema_version: S.optional( + GetV1CountriesCountryCodeLegalEntityFormsFormRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/countries/{country_code}/legal_entity_forms/{form}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CountriesCountryCodeLegalEntityFormsFormRequest", + }) as any as S.Schema; + +export interface GetV1CustomFieldsRequest { + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1CustomFieldsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/custom-fields", code: 200 })), +).annotate({ + identifier: "GetV1CustomFieldsRequest", +}) as any as S.Schema; + +/** 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" + | "employee_only" + | "everyone"; +export const CustomFieldDataEntryAccess = /*@__PURE__*/ S.String; + +/** The datatype of the custom field */ +export type CustomFieldDataType = + | "string" + | "text" + | "integer" + | "date" + | "boolean" + | "percentage" + | "decimal" + | "link" + | "currency" + | "single_select"; +export const CustomFieldDataType = /*@__PURE__*/ S.String; + +/** Who can see this custom field and its values. Controls visibility across different user roles. */ +export type CustomFieldVisibilityScope = "company_admin_only" | "everyone"; +export const CustomFieldVisibilityScope = /*@__PURE__*/ S.String; + +/** 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 interface 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: 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; +} +export const EmploymentCustomField = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data_entry_access: CustomFieldDataEntryAccess, + id: S.String, + metadata: S.NullOr(S.Unknown), + name: S.String, + required: S.Boolean, + type: CustomFieldDataType, + visibility_scope: CustomFieldVisibilityScope, + }), +).annotate({ + identifier: "EmploymentCustomField", +}) as any as S.Schema; + +export type ListEmploymentCustomFieldsResponseDataCustomFieldsList = + Array; +export const ListEmploymentCustomFieldsResponseDataCustomFieldsList = + /*@__PURE__*/ S.Array( + EmploymentCustomField, + ) as any as S.Schema; + +export interface ListEmploymentCustomFieldsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + custom_fields?: ListEmploymentCustomFieldsResponseDataCustomFieldsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListEmploymentCustomFieldsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + current_page: S.optional(S.Number), + custom_fields: S.optional( + ListEmploymentCustomFieldsResponseDataCustomFieldsList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListEmploymentCustomFieldsResponseData", +}) as any as S.Schema; + +/** Response schema listing many custom_fields */ +export interface ListEmploymentCustomFieldsResponse { + data?: ListEmploymentCustomFieldsResponseData; +} +export const ListEmploymentCustomFieldsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListEmploymentCustomFieldsResponseData), + }), +).annotate({ + identifier: "ListEmploymentCustomFieldsResponse", +}) as any as S.Schema; + +export interface GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest { + /** Custom field ID */ + custom_field_id: string; + /** Employment ID */ + employment_id: string; +} +export const GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + custom_field_id: S.String.pipe(T.Label()), + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/custom-fields/{custom_field_id}/values/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest", + }) as any as S.Schema; + +/** The value for a single-select custom field, containing both the option ID and its human-readable label. */ +export interface 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; +} +export const EmploymentCustomFieldValueJsonValue = /*@__PURE__*/ S.suspend(() => + S.Struct({ + selected_option: S.String, + selected_option_label: S.String, + }), +).annotate({ + identifier: "EmploymentCustomFieldValueJsonValue", +}) as any as S.Schema; + +export type EmploymentCustomFieldValueValue = + | string + | number + | boolean + | number + | EmploymentCustomFieldValueJsonValue; +export const EmploymentCustomFieldValueValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** The value of a custom field for a specific employment. The type of `value` depends on the custom field's data type. */ +export interface EmploymentCustomFieldValue { + /** The unique identifier (UUID) of the custom field definition this value belongs to. */ + custom_field_id: string; + value: EmploymentCustomFieldValueValue | null; +} +export const EmploymentCustomFieldValue = /*@__PURE__*/ S.suspend(() => + S.Struct({ + custom_field_id: S.String, + value: S.NullOr(EmploymentCustomFieldValueValue), + }), +).annotate({ + identifier: "EmploymentCustomFieldValue", +}) as any as S.Schema; + +export interface EmploymentCustomFieldValueResponseData { + custom_field_value: EmploymentCustomFieldValue; +} +export const EmploymentCustomFieldValueResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + custom_field_value: EmploymentCustomFieldValue, + }), +).annotate({ + identifier: "EmploymentCustomFieldValueResponseData", +}) as any as S.Schema; + +/** Response containing a single custom field value for an employment. */ +export interface EmploymentCustomFieldValueResponse { + data: EmploymentCustomFieldValueResponseData; +} +export const EmploymentCustomFieldValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentCustomFieldValueResponseData, + }), +).annotate({ + identifier: "EmploymentCustomFieldValueResponse", +}) as any as S.Schema; + +export type GetV1DirectOffboardingsRequestEmploymentModel = "global_payroll"; +export const GetV1DirectOffboardingsRequestEmploymentModel = + /*@__PURE__*/ S.String; + +export interface GetV1DirectOffboardingsRequest { + /** Filter by employment ID */ + employment_id?: string; + /** Filter by employment model. Currently only 'global_payroll' is supported. */ + employment_model?: + | GetV1DirectOffboardingsRequestEmploymentModel + | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1DirectOffboardingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + employment_model: S.optional( + GetV1DirectOffboardingsRequestEmploymentModel.pipe(T.Query()), + ), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/direct-offboardings", code: 200 })), +).annotate({ + identifier: "GetV1DirectOffboardingsRequest", +}) as any as S.Schema; + +/** The current status of the offboarding. */ +export type DirectOffboardingStatus = + | "submitted" + | "in_review" + | "rejected" + | "pending_payment_details" + | "pending_payment" + | "completed"; +export const DirectOffboardingStatus = /*@__PURE__*/ S.String; + +/** The type of offboarding. */ +export type DirectOffboardingType = + | "termination" + | "resignation" + | "mutual_agreement" + | "retirement" + | "end_of_contract"; +export const DirectOffboardingType = /*@__PURE__*/ S.String; + +/** A Global Payroll employment's offboarding record. */ +export interface DirectOffboarding { + /** The unique identifier (UUID) of the employment being offboarded. */ + employment_id: string; + /** The unique identifier (UUID) of the offboarding. */ + id: string; + /** Whether the termination is confidential. */ + is_confidential_termination: boolean | null; + /** Last working day of the employee. */ + last_working_day?: string | null; + /** The current status of the offboarding. */ + status: DirectOffboardingStatus; + /** Date when the employment terminates. */ + termination_date?: string | null; + /** The type of offboarding. */ + type: DirectOffboardingType; +} +export const DirectOffboarding = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + id: S.String, + is_confidential_termination: S.NullOr(S.Boolean), + last_working_day: S.optional(S.NullOr(S.String)), + status: DirectOffboardingStatus, + termination_date: S.optional(S.NullOr(S.String)), + type: DirectOffboardingType, + }), +).annotate({ + identifier: "DirectOffboarding", +}) as any as S.Schema; + +export type ListDirectOffboardingResponseDataDirectOffboardingsList = + Array; +export const ListDirectOffboardingResponseDataDirectOffboardingsList = + /*@__PURE__*/ S.Array( + DirectOffboarding, + ) as any as S.Schema; + +export interface ListDirectOffboardingResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + direct_offboardings?: ListDirectOffboardingResponseDataDirectOffboardingsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListDirectOffboardingResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + direct_offboardings: S.optional( + ListDirectOffboardingResponseDataDirectOffboardingsList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListDirectOffboardingResponseData", +}) as any as S.Schema; + +/** Response schema listing many direct_offboardings */ +export interface ListDirectOffboardingResponse { + data?: ListDirectOffboardingResponseData; +} +export const ListDirectOffboardingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListDirectOffboardingResponseData), + }), +).annotate({ + identifier: "ListDirectOffboardingResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion = + | number + | GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1; +export const GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1EmployeeAddressRequest { + /** Version of the address_details form schema */ + address_details_json_schema_version?: GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion; +} +export const GetV1EmployeeAddressRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + address_details_json_schema_version: S.optional( + GetV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe(T.Http({ method: "GET", uri: "/v1/employee/address", code: 200 })), +).annotate({ + identifier: "GetV1EmployeeAddressRequest", +}) as any as S.Schema; + +export type EmploymentDetailsOnlyResponseDataEmploymentBankAccountDetailsList = + Array; +export const EmploymentDetailsOnlyResponseDataEmploymentBankAccountDetailsList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +/** Origin of the employment contract. Returned by the basic information endpoint. */ +export type EmploymentDetailsOnlyResponseDataEmploymentContractOrigin = + | "remote_contract" + | "custom_remote_contract" + | "provided_by_customer"; +export const EmploymentDetailsOnlyResponseDataEmploymentContractOrigin = + /*@__PURE__*/ S.String; + +/** 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" + | "created" + | "pre_hire" + | "created_awaiting_reserve" + | "created_reserve_paid" + | "initiated" + | "invited" + | "pending" + | "review" + | "job_title_review" + | "pending_post_self_enrollment_actions" + | "offboarding" + | "archived" + | "deleted"; +export const EmploymentStatus = /*@__PURE__*/ S.String; + +/** The type of employment. */ +export type EmploymentDetailsOnlyResponseDataEmploymentType = + | "employee" + | "contractor" + | "direct_employee" + | "global_payroll_employee"; +export const EmploymentDetailsOnlyResponseDataEmploymentType = + /*@__PURE__*/ S.String; + +/** 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" + | "created" + | "initiated" + | "cancelled" + | "inactive" + | "deleted"; +export const UserStatus = /*@__PURE__*/ S.String; + +export interface EmploymentDetailsOnlyResponseDataEmployment { + /** Home address information. Its properties may vary depending on the country. Null if the employee has not submitted their address yet. */ + address_details?: unknown | null; + /** Administrative information. Its properties may vary depending on the country. */ + administrative_details?: unknown; + bank_account_details?: EmploymentDetailsOnlyResponseDataEmploymentBankAccountDetailsList; + /** Basic information. Its properties may vary depending on the country. When present, `login_email` indicates which address the employee logs in with: `"personal"` or `"work"`. */ + basic_information?: unknown; + /** Billing address information. Its properties may vary depending on the country. */ + billing_address_details?: unknown; + /** Contract details information. Its properties may vary depending on the country. */ + contract_details?: unknown; + /** Origin of the employment contract. Returned by the basic information endpoint. */ + contract_origin?: EmploymentDetailsOnlyResponseDataEmploymentContractOrigin | null; + /** Emergency contact information. Its properties may vary depending on the country. Null if the employee has not submitted their emergency contact yet. */ + emergency_contact_details?: unknown | null; + /** The unique identifier (UUID) of the employment. */ + id: string; + /** Personal details information. Its properties may vary depending on the country. Null if the employee has not submitted their personal details yet. */ + personal_details?: unknown | null; + /** Pricing plan information. */ + pricing_plan_details?: unknown; + status: EmploymentStatus; + /** The type of employment. */ + type: EmploymentDetailsOnlyResponseDataEmploymentType; + /** The timestamp when this employment record was last updated. */ + updated_at: string; + user_status: UserStatus; +} +export const EmploymentDetailsOnlyResponseDataEmployment = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + address_details: S.optional(S.NullOr(S.Unknown)), + administrative_details: S.optional(S.Unknown), + bank_account_details: S.optional( + EmploymentDetailsOnlyResponseDataEmploymentBankAccountDetailsList, + ), + basic_information: S.optional(S.Unknown), + billing_address_details: S.optional(S.Unknown), + contract_details: S.optional(S.Unknown), + contract_origin: S.optional( + S.NullOr(EmploymentDetailsOnlyResponseDataEmploymentContractOrigin), + ), + emergency_contact_details: S.optional(S.NullOr(S.Unknown)), + id: S.String, + personal_details: S.optional(S.NullOr(S.Unknown)), + pricing_plan_details: S.optional(S.Unknown), + status: EmploymentStatus, + type: EmploymentDetailsOnlyResponseDataEmploymentType, + updated_at: S.String, + user_status: UserStatus, + }), + ).annotate({ + identifier: "EmploymentDetailsOnlyResponseDataEmployment", + }) as any as S.Schema; + +export interface EmploymentDetailsOnlyResponseData { + employment?: EmploymentDetailsOnlyResponseDataEmployment; +} +export const EmploymentDetailsOnlyResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment: S.optional(EmploymentDetailsOnlyResponseDataEmployment), + }), +).annotate({ + identifier: "EmploymentDetailsOnlyResponseData", +}) as any as S.Schema; + +/** Response containing only the updated details struct plus base employment fields (id, status, type, updated_at, user_status). Exactly one of the details properties is present per response. */ +export interface EmploymentDetailsOnlyResponse { + data: EmploymentDetailsOnlyResponseData; +} +export const EmploymentDetailsOnlyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentDetailsOnlyResponseData, + }), +).annotate({ + identifier: "EmploymentDetailsOnlyResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion = + | number + | GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1; +export const GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1EmployeeBankAccountRequest { + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion; +} +export const GetV1EmployeeBankAccountRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + bank_account_details_json_schema_version: S.optional( + GetV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ method: "GET", uri: "/v1/employee/bank-account", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeeBankAccountRequest", +}) as any as S.Schema; + +export interface GetV1EmployeeCurrentRequest {} +export const GetV1EmployeeCurrentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/employee/current", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeeCurrentRequest", +}) as any as S.Schema; + +export type GetV1EmployeeDocumentsRequestSortBy = + | "description" + | "document_source" + | "inserted_at" + | "name" + | "type" + | "uploaded_by_role" + | "related_to" + | "sub_type" + | "uploaded_by"; +export const GetV1EmployeeDocumentsRequestSortBy = /*@__PURE__*/ S.String; + +export type GetV1EmployeeDocumentsRequestOrder = "asc" | "desc"; +export const GetV1EmployeeDocumentsRequestOrder = /*@__PURE__*/ S.String; + +export interface GetV1EmployeeDocumentsRequest { + /** 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?: string; + /** Filters the results that were uploaded before a given date */ + inserted_before?: string; + /** Field to sort by */ + sort_by?: GetV1EmployeeDocumentsRequestSortBy | (string & {}); + /** Sort order */ + order?: GetV1EmployeeDocumentsRequestOrder | (string & {}); +} +export const GetV1EmployeeDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + name: S.optional(S.String.pipe(T.Query())), + inserted_after: S.optional(S.String.pipe(T.Query())), + inserted_before: S.optional(S.String.pipe(T.Query())), + sort_by: S.optional(GetV1EmployeeDocumentsRequestSortBy.pipe(T.Query())), + order: S.optional(GetV1EmployeeDocumentsRequestOrder.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/employee/documents", code: 200 })), +).annotate({ + identifier: "GetV1EmployeeDocumentsRequest", +}) as any as S.Schema; + +/** A file associated with an employment, such as a contract, tax form, or identity document. */ +export interface File { + /** The unique identifier (UUID) of the file. */ + id: string; + inserted_at: string; + /** 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; +} +export const File = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + inserted_at: S.String, + name: S.String, + sub_type: S.optional(S.NullOr(S.String)), + type: S.String, + }), +).annotate({ identifier: "File" }) as any as S.Schema; + +export type ListDocumentsResponseDataDocumentsList = Array; +export const ListDocumentsResponseDataDocumentsList = /*@__PURE__*/ S.Array( + File, +) as any as S.Schema; + +export interface ListDocumentsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + documents?: ListDocumentsResponseDataDocumentsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListDocumentsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + documents: S.optional(ListDocumentsResponseDataDocumentsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListDocumentsResponseData", +}) as any as S.Schema; + +/** Response schema listing many documents */ +export interface ListDocumentsResponse { + data?: ListDocumentsResponseData; +} +export const ListDocumentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListDocumentsResponseData), + }), +).annotate({ + identifier: "ListDocumentsResponse", +}) as any as S.Schema; + +export interface GetV1EmployeeDocumentsIdRequest { + /** Document ID */ + id: string; +} +export const GetV1EmployeeDocumentsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/employee/documents/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeeDocumentsIdRequest", +}) as any as S.Schema; + +export interface DownloadDocumentResponseDataDocument { + /** The document content, base64-encoded. */ + content?: string; + /** The unique identifier (UUID) of the document. */ + id?: string; + inserted_at?: string; + /** 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; +} +export const DownloadDocumentResponseDataDocument = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + content: S.optional(S.String), + id: S.optional(S.String), + inserted_at: S.optional(S.String), + name: S.optional(S.String), + sub_type: S.optional(S.NullOr(S.String)), + type: S.optional(S.String), + }), +).annotate({ + identifier: "DownloadDocumentResponseDataDocument", +}) as any as S.Schema; + +export interface DownloadDocumentResponseData { + document?: DownloadDocumentResponseDataDocument; +} +export const DownloadDocumentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document: S.optional(DownloadDocumentResponseDataDocument), + }), +).annotate({ + identifier: "DownloadDocumentResponseData", +}) as any as S.Schema; + +/** Response containing a document's metadata and its base64-encoded content for download. */ +export interface DownloadDocumentResponse { + data: DownloadDocumentResponseData; +} +export const DownloadDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: DownloadDocumentResponseData, + }), +).annotate({ + identifier: "DownloadDocumentResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + "latest"; +export const GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion = + | number + | GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1; +export const GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1EmployeeEmergencyContactRequest { + /** Version of the emergency_contact_details form schema */ + emergency_contact_details_json_schema_version?: GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion; +} +export const GetV1EmployeeEmergencyContactRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + emergency_contact_details_json_schema_version: S.optional( + GetV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employee/emergency-contact", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmployeeEmergencyContactRequest", +}) as any as S.Schema; + +export interface GetV1EmployeeExpenseCategoriesRequest { + /** Include parent (non-selectable) categories in addition to selectable leaves */ + include_parents?: boolean; + /** Expense ID (slug) whose category should be included in the result, even if it is not selectable by default */ + expense_id?: string; +} +export const GetV1EmployeeExpenseCategoriesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + include_parents: S.optional(S.Boolean.pipe(T.Query())), + expense_id: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employee/expense-categories", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmployeeExpenseCategoriesRequest", +}) as any as S.Schema; + +/** Parent category information if this is a child category */ +export interface ExpenseCategoryNodeParent { + /** Parent category code */ + code?: string; + /** Parent category slug */ + slug?: string; + /** Parent category title */ + title?: string; +} +export const ExpenseCategoryNodeParent = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.optional(S.String), + slug: S.optional(S.String), + title: S.optional(S.String), + }), +).annotate({ + identifier: "ExpenseCategoryNodeParent", +}) as any as S.Schema; + +/** A single expense category in the flat list structure */ +export interface ExpenseCategoryNode { + /** Category code (e.g., 'travel.flights') */ + code?: string; + /** Category description */ + description?: string | null; + /** Instructions for using this category */ + instructions?: string | null; + /** Whether this category can be selected */ + is_selectable?: boolean; + /** Parent category information if this is a child category */ + parent?: ExpenseCategoryNodeParent | null; + /** Prompt for user guidance */ + prompt?: string | null; + /** Category scope (global, country, company, legal_entity) */ + scope?: string; + /** Unique identifier for the category */ + slug?: string; + /** Category status (active, inactive) */ + status?: string; + /** Human-readable category name */ + title?: string; +} +export const ExpenseCategoryNode = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.optional(S.String), + description: S.optional(S.NullOr(S.String)), + instructions: S.optional(S.NullOr(S.String)), + is_selectable: S.optional(S.Boolean), + parent: S.optional(S.NullOr(ExpenseCategoryNodeParent)), + prompt: S.optional(S.NullOr(S.String)), + scope: S.optional(S.String), + slug: S.optional(S.String), + status: S.optional(S.String), + title: S.optional(S.String), + }), +).annotate({ + identifier: "ExpenseCategoryNode", +}) as any as S.Schema; + +export type ListExpenseCategoriesResponseDataList = Array; +export const ListExpenseCategoriesResponseDataList = /*@__PURE__*/ S.Array( + ExpenseCategoryNode, +) as any as S.Schema; + +/** Response containing a flat list of expense categories. Parent categories have is_selectable: false, while leaf categories have is_selectable: true. Child categories include parent_slug information. */ +export interface ListExpenseCategoriesResponse { + data?: ListExpenseCategoriesResponseDataList; +} +export const ListExpenseCategoriesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListExpenseCategoriesResponseDataList), + }), +).annotate({ + identifier: "ListExpenseCategoriesResponse", +}) as any as S.Schema; + +export interface GetV1EmployeeExpensesRequest {} +export const GetV1EmployeeExpensesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/employee/expenses", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeeExpensesRequest", +}) as any as S.Schema; + +export interface GetV1EmployeeIncentivesRequest {} +export const GetV1EmployeeIncentivesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/employee/incentives", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeeIncentivesRequest", +}) as any as S.Schema; + +export interface GetV1EmployeeLeavePoliciesRequest {} +export const GetV1EmployeeLeavePoliciesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/employee/leave-policies", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeeLeavePoliciesRequest", +}) as any as S.Schema; + +export type LeavePolicyDetailsLeavePolicyVariantIdCase1 = + | "time_off" + | "sick_leave" + | "public_holiday" + | "unpaid_leave" + | "extended_leave" + | "in_lieu_time" + | "maternity_leave" + | "paternity_leave" + | "parental_leave" + | "bereavement" + | "military_leave" + | "other" + | "paid_time_off" + | "custom_company_leave" + | "rtt" + | "casual_leave" + | "rol" + | "ex_festivita"; +export const LeavePolicyDetailsLeavePolicyVariantIdCase1 = + /*@__PURE__*/ S.String; + +/** The ID of the leave policy variant */ +export type LeavePolicyDetailsLeavePolicyVariantId = + | string + | LeavePolicyDetailsLeavePolicyVariantIdCase1; +export const LeavePolicyDetailsLeavePolicyVariantId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Leave Policy Details */ +export interface LeavePolicyDetails { + custom: boolean; + /** The ID of the leave policy variant */ + leave_policy_variant_id: LeavePolicyDetailsLeavePolicyVariantId; + name: string; + /** Whether leave balance is determined by accruals */ + uses_accrual_as_balance?: boolean; +} +export const LeavePolicyDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + custom: S.Boolean, + leave_policy_variant_id: LeavePolicyDetailsLeavePolicyVariantId, + name: S.String, + uses_accrual_as_balance: S.optional(S.Boolean), + }), +).annotate({ + identifier: "LeavePolicyDetails", +}) as any as S.Schema; + +export type ListLeavePoliciesDetailsResponseDataList = + Array; +export const ListLeavePoliciesDetailsResponseDataList = /*@__PURE__*/ S.Array( + LeavePolicyDetails, +) as any as S.Schema; + +/** Response schema for listing leave policies details */ +export interface ListLeavePoliciesDetailsResponse { + data: ListLeavePoliciesDetailsResponseDataList; +} +export const ListLeavePoliciesDetailsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListLeavePoliciesDetailsResponseDataList, + }), +).annotate({ + identifier: "ListLeavePoliciesDetailsResponse", +}) as any as S.Schema; + +export interface GetV1EmployeeLeavePoliciesSummaryRequest {} +export const GetV1EmployeeLeavePoliciesSummaryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/v1/employee/leave-policies/summary", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmployeeLeavePoliciesSummaryRequest", +}) as any as S.Schema; + +export type UnlimitedDaysandHoursResponseType = "unlimited"; +export const UnlimitedDaysandHoursResponseType = /*@__PURE__*/ S.String; + +export interface UnlimitedDaysandHoursResponse { + type: UnlimitedDaysandHoursResponseType; +} +export const UnlimitedDaysandHoursResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: UnlimitedDaysandHoursResponseType, + }), +).annotate({ + identifier: "UnlimitedDaysandHoursResponse", +}) as any as S.Schema; + +export type LimitedDaysandHoursResponseType = "limited"; +export const LimitedDaysandHoursResponseType = /*@__PURE__*/ S.String; + +/** Includes requested timeoffs (not approved) in the past or in the future. */ +export interface LimitedDaysandHoursResponse { + days: number; + hours: number; + type: LimitedDaysandHoursResponseType; +} +export const LimitedDaysandHoursResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LimitedDaysandHoursResponseType, + }), +).annotate({ + identifier: "LimitedDaysandHoursResponse", +}) as any as S.Schema; + +/** The annual balance represents the balance for the current entitlement period. Unlike the regular balance, it does not account for accrued value and only considers the annual entitlement as the basis for calculations. */ +export type LeavePolicySummaryAnnualBalance = + | UnlimitedDaysandHoursResponse + | LimitedDaysandHoursResponse; +export const LeavePolicySummaryAnnualBalance = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** The annual entitlement represents what an employee is entitled to in the current entitlement period. It does not account for any accrued value. */ +export type LeavePolicySummaryAnnualEntitlement = + | UnlimitedDaysandHoursResponse + | LimitedDaysandHoursResponse; +export const LeavePolicySummaryAnnualEntitlement = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** The balance is the entitlement minus the taken timeoff (i.e 10 entitlement - 3 taken = 7 balance) */ +export type LeavePolicySummaryBalance = + | UnlimitedDaysandHoursResponse + | LimitedDaysandHoursResponse; +export const LeavePolicySummaryBalance = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type LeavePolicySummaryBookedType = "limited"; +export const LeavePolicySummaryBookedType = /*@__PURE__*/ S.String; + +/** Includes all upcoming requested time off. */ +export interface LeavePolicySummaryBooked { + days: number; + hours: number; + type: LeavePolicySummaryBookedType; +} +export const LeavePolicySummaryBooked = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LeavePolicySummaryBookedType, + }), +).annotate({ + identifier: "LeavePolicySummaryBooked", +}) as any as S.Schema; + +/** The current entitlement is the accrued time entitled for the employee plus any other extra entitlements (such as carryover). */ +export type LeavePolicySummaryCurrentEntitlement = + | UnlimitedDaysandHoursResponse + | LimitedDaysandHoursResponse; +export const LeavePolicySummaryCurrentEntitlement = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type EmployeeLeavePolicyLeavePolicyVariantIdCase1 = + | "time_off" + | "sick_leave" + | "public_holiday" + | "unpaid_leave" + | "extended_leave" + | "in_lieu_time" + | "maternity_leave" + | "paternity_leave" + | "parental_leave" + | "bereavement" + | "military_leave" + | "other" + | "paid_time_off" + | "custom_company_leave" + | "rtt" + | "casual_leave" + | "rol" + | "ex_festivita"; +export const EmployeeLeavePolicyLeavePolicyVariantIdCase1 = + /*@__PURE__*/ S.String; + +/** The ID of the leave policy variant */ +export type EmployeeLeavePolicyLeavePolicyVariantId = + | string + | EmployeeLeavePolicyLeavePolicyVariantIdCase1; +export const EmployeeLeavePolicyLeavePolicyVariantId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type TimeoffType = + | "time_off" + | "sick_leave" + | "public_holiday" + | "unpaid_leave" + | "extended_leave" + | "in_lieu_time" + | "maternity_leave" + | "paternity_leave" + | "parental_leave" + | "bereavement" + | "military_leave" + | "other" + | "paid_time_off" + | "custom_company_leave" + | "rtt" + | "casual_leave" + | "rol" + | "ex_festivita"; +export const TimeoffType = /*@__PURE__*/ S.String; + +export type EmployeeLeavePolicyUnit = "days" | "hours" | "unlimited"; +export const EmployeeLeavePolicyUnit = /*@__PURE__*/ S.String; + +/** Leave Policy abstraction representation for the employee */ +export interface EmployeeLeavePolicy { + description: string | null; + /** The ID of the leave policy variant */ + leave_policy_variant_id: EmployeeLeavePolicyLeavePolicyVariantId; + leave_type: TimeoffType; + name: string; + unit: EmployeeLeavePolicyUnit; +} +export const EmployeeLeavePolicy = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.NullOr(S.String), + leave_policy_variant_id: EmployeeLeavePolicyLeavePolicyVariantId, + leave_type: TimeoffType, + name: S.String, + unit: EmployeeLeavePolicyUnit, + }), +).annotate({ + identifier: "EmployeeLeavePolicy", +}) as any as S.Schema; + +export type LeavePolicySummaryPendingApprovalType = "limited"; +export const LeavePolicySummaryPendingApprovalType = /*@__PURE__*/ S.String; + +/** Includes requested timeoffs (not approved) in the past or in the future. */ +export interface LeavePolicySummaryPendingApproval { + days: number; + hours: number; + type: LeavePolicySummaryPendingApprovalType; +} +export const LeavePolicySummaryPendingApproval = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LeavePolicySummaryPendingApprovalType, + }), +).annotate({ + identifier: "LeavePolicySummaryPendingApproval", +}) as any as S.Schema; + +export type LeavePolicySummaryTakenType = "limited"; +export const LeavePolicySummaryTakenType = /*@__PURE__*/ S.String; + +/** Includes all time off (past and future, pending or approved). */ +export interface LeavePolicySummaryTaken { + days: number; + hours: number; + type: LeavePolicySummaryTakenType; +} +export const LeavePolicySummaryTaken = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LeavePolicySummaryTakenType, + }), +).annotate({ + identifier: "LeavePolicySummaryTaken", +}) as any as S.Schema; + +export type LeavePolicySummaryUpcomingApprovedType = "limited"; +export const LeavePolicySummaryUpcomingApprovedType = /*@__PURE__*/ S.String; + +/** Includes all upcoming approved time off. */ +export interface LeavePolicySummaryUpcomingApproved { + days: number; + hours: number; + type: LeavePolicySummaryUpcomingApprovedType; +} +export const LeavePolicySummaryUpcomingApproved = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LeavePolicySummaryUpcomingApprovedType, + }), +).annotate({ + identifier: "LeavePolicySummaryUpcomingApproved", +}) as any as S.Schema; + +export type LeavePolicySummaryUpcomingRequestedType = "limited"; +export const LeavePolicySummaryUpcomingRequestedType = /*@__PURE__*/ S.String; + +/** Includes all upcoming requested time off. */ +export interface LeavePolicySummaryUpcomingRequested { + days: number; + hours: number; + type: LeavePolicySummaryUpcomingRequestedType; +} +export const LeavePolicySummaryUpcomingRequested = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LeavePolicySummaryUpcomingRequestedType, + }), +).annotate({ + identifier: "LeavePolicySummaryUpcomingRequested", +}) as any as S.Schema; + +export type LeavePolicySummaryUsedType = "limited"; +export const LeavePolicySummaryUsedType = /*@__PURE__*/ S.String; + +/** Includes only approved time off in the past. */ +export interface LeavePolicySummaryUsed { + days: number; + hours: number; + type: LeavePolicySummaryUsedType; +} +export const LeavePolicySummaryUsed = /*@__PURE__*/ S.suspend(() => + S.Struct({ + days: S.Number, + hours: S.Number, + type: LeavePolicySummaryUsedType, + }), +).annotate({ + identifier: "LeavePolicySummaryUsed", +}) as any as S.Schema; + +/** Leave Policy Summary */ +export interface LeavePolicySummary { + /** The annual balance represents the balance for the current entitlement period. Unlike the regular balance, it does not account for accrued value and only considers the annual entitlement as the basis for calculations. */ + annual_balance: LeavePolicySummaryAnnualBalance; + /** The annual entitlement represents what an employee is entitled to in the current entitlement period. It does not account for any accrued value. */ + annual_entitlement: LeavePolicySummaryAnnualEntitlement; + /** The balance is the entitlement minus the taken timeoff (i.e 10 entitlement - 3 taken = 7 balance) */ + balance: LeavePolicySummaryBalance; + /** Includes all upcoming requested time off. */ + booked: LeavePolicySummaryBooked; + /** The current entitlement is the accrued time entitled for the employee plus any other extra entitlements (such as carryover). */ + current_entitlement: LeavePolicySummaryCurrentEntitlement; + leave_policy: EmployeeLeavePolicy; + /** Includes requested timeoffs (not approved) in the past or in the future. */ + pending_approval: LeavePolicySummaryPendingApproval; + /** Includes all time off (past and future, pending or approved). */ + taken: LeavePolicySummaryTaken; + /** Includes all upcoming approved time off. */ + upcoming_approved: LeavePolicySummaryUpcomingApproved; + /** Includes all upcoming requested time off. */ + upcoming_requested: LeavePolicySummaryUpcomingRequested; + /** Includes only approved time off in the past. */ + used: LeavePolicySummaryUsed; + working_hours_per_day: number; +} +export const LeavePolicySummary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + annual_balance: LeavePolicySummaryAnnualBalance, + annual_entitlement: LeavePolicySummaryAnnualEntitlement, + balance: LeavePolicySummaryBalance, + booked: LeavePolicySummaryBooked, + current_entitlement: LeavePolicySummaryCurrentEntitlement, + leave_policy: EmployeeLeavePolicy, + pending_approval: LeavePolicySummaryPendingApproval, + taken: LeavePolicySummaryTaken, + upcoming_approved: LeavePolicySummaryUpcomingApproved, + upcoming_requested: LeavePolicySummaryUpcomingRequested, + used: LeavePolicySummaryUsed, + working_hours_per_day: S.Number, + }), +).annotate({ + identifier: "LeavePolicySummary", +}) as any as S.Schema; + +export type ListLeavePoliciesSummaryResponseDataList = + Array; +export const ListLeavePoliciesSummaryResponseDataList = /*@__PURE__*/ S.Array( + LeavePolicySummary, +) as any as S.Schema; + +/** Response schema for listing leave policies summary */ +export interface ListLeavePoliciesSummaryResponse { + data: ListLeavePoliciesSummaryResponseDataList; +} +export const ListLeavePoliciesSummaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListLeavePoliciesSummaryResponseDataList, + }), +).annotate({ + identifier: "ListLeavePoliciesSummaryResponse", +}) as any as S.Schema; + +export interface GetV1EmployeePayslipFilesRequest { + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmployeePayslipFilesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/employee/payslip-files", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeePayslipFilesRequest", +}) as any as S.Schema; + +export interface PayslipFileCurrency { + code: string | null; + /** The currency symbol */ + symbol: string; +} +export const PayslipFileCurrency = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.NullOr(S.String), + symbol: S.String, + }), +).annotate({ + identifier: "PayslipFileCurrency", +}) as any as S.Schema; + +/** Net salary amount including source/converted amounts, currencies and conversion rate. Shape produced by `Tiger.Billing.Value.Amount.build/1`. */ +export interface PayslipFileNetSalary { + converted_amount?: number | null; + converter?: string | null; + fee?: string; + rate?: string; + source_amount?: number | null; +} +export const PayslipFileNetSalary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + converted_amount: S.optional(S.NullOr(S.Number)), + converter: S.optional(S.NullOr(S.String)), + fee: S.optional(S.String), + rate: S.optional(S.String), + source_amount: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "PayslipFileNetSalary", +}) as any as S.Schema; + +/** A single payslip file with its associated payroll run metadata. */ +export interface PayslipFile { + currency?: PayslipFileCurrency | null; + id: string; + /** Original filename of the payslip */ + name: string; + net_salary?: PayslipFileNetSalary | null; + period_end?: string | null; + period_start?: string | null; +} +export const PayslipFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currency: S.optional(S.NullOr(PayslipFileCurrency)), + id: S.String, + name: S.String, + net_salary: S.optional(S.NullOr(PayslipFileNetSalary)), + period_end: S.optional(S.NullOr(S.String)), + period_start: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "PayslipFile" }) as any as S.Schema; + +export type ListPayslipFilesResponseDataPayslipFilesList = Array; +export const ListPayslipFilesResponseDataPayslipFilesList = + /*@__PURE__*/ S.Array( + PayslipFile, + ) as any as S.Schema; + +export interface ListPayslipFilesResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + payslip_files?: ListPayslipFilesResponseDataPayslipFilesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListPayslipFilesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + payslip_files: S.optional(ListPayslipFilesResponseDataPayslipFilesList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListPayslipFilesResponseData", +}) as any as S.Schema; + +/** Response schema listing many payslip_files */ +export interface ListPayslipFilesResponse { + data?: ListPayslipFilesResponseData; +} +export const ListPayslipFilesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListPayslipFilesResponseData), + }), +).annotate({ + identifier: "ListPayslipFilesResponse", +}) as any as S.Schema; + +export interface GetV1EmployeePayslipsRequest { + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmployeePayslipsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/employee/payslips", code: 200 })), +).annotate({ + identifier: "GetV1EmployeePayslipsRequest", +}) as any as S.Schema; + +/** File metadata */ +export interface PayslipItemFile { + inserted_at?: string; + name?: string; + slug?: string; +} +export const PayslipItemFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + inserted_at: S.optional(S.String), + name: S.optional(S.String), + slug: S.optional(S.String), + }), +).annotate({ + identifier: "PayslipItemFile", +}) as any as S.Schema; + +/** Payroll run metadata */ +export interface PayslipItemPayrollRun { + expected_payout_date?: string | null; + period_end?: string; + period_start?: string; + type?: string; +} +export const PayslipItemPayrollRun = /*@__PURE__*/ S.suspend(() => + S.Struct({ + expected_payout_date: S.optional(S.NullOr(S.String)), + period_end: S.optional(S.String), + period_start: S.optional(S.String), + type: S.optional(S.String), + }), +).annotate({ + identifier: "PayslipItemPayrollRun", +}) as any as S.Schema; + +/** Payslip data */ +export interface PayslipItemPayslip { + /** Active compensation at the time of the payslip */ + active_compensation?: unknown | null; + has_content_layout?: boolean; + /** Net salary amount */ + net_salary?: unknown | null; + slug?: string; +} +export const PayslipItemPayslip = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active_compensation: S.optional(S.NullOr(S.Unknown)), + has_content_layout: S.optional(S.Boolean), + net_salary: S.optional(S.NullOr(S.Unknown)), + slug: S.optional(S.String), + }), +).annotate({ + identifier: "PayslipItemPayslip", +}) as any as S.Schema; + +/** A payslip with file, payslip, payroll run, and payroll output metadata. */ +export interface PayslipItem { + /** File metadata */ + file: PayslipItemFile; + has_employee_payroll_overviews: boolean; + /** Payroll output breakdown */ + payroll_output?: unknown | null; + /** Payroll run metadata */ + payroll_run?: PayslipItemPayrollRun | null; + /** Payslip data */ + payslip: PayslipItemPayslip; +} +export const PayslipItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + file: PayslipItemFile, + has_employee_payroll_overviews: S.Boolean, + payroll_output: S.optional(S.NullOr(S.Unknown)), + payroll_run: S.optional(S.NullOr(PayslipItemPayrollRun)), + payslip: PayslipItemPayslip, + }), +).annotate({ identifier: "PayslipItem" }) as any as S.Schema; + +export type ListEmployeePayslipsResponseDataPayslipsList = Array; +export const ListEmployeePayslipsResponseDataPayslipsList = + /*@__PURE__*/ S.Array( + PayslipItem, + ) as any as S.Schema; + +export interface ListEmployeePayslipsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + payslips?: ListEmployeePayslipsResponseDataPayslipsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListEmployeePayslipsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + payslips: S.optional(ListEmployeePayslipsResponseDataPayslipsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListEmployeePayslipsResponseData", +}) as any as S.Schema; + +/** Response schema listing many payslips */ +export interface ListEmployeePayslipsResponse { + data?: ListEmployeePayslipsResponseData; +} +export const ListEmployeePayslipsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListEmployeePayslipsResponseData), + }), +).annotate({ + identifier: "ListEmployeePayslipsResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1 = + "latest"; +export const GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion = + | number + | GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1; +export const GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1EmployeePersonalDetailsRequest { + /** Version of the personal_details form schema */ + personal_details_json_schema_version?: GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion; +} +export const GetV1EmployeePersonalDetailsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + personal_details_json_schema_version: S.optional( + GetV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ method: "GET", uri: "/v1/employee/personal-details", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmployeePersonalDetailsRequest", +}) as any as S.Schema; + +export interface GetV1EmployeePersonalInformationRequest {} +export const GetV1EmployeePersonalInformationRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/v1/employee/personal-information", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmployeePersonalInformationRequest", +}) as any as S.Schema; + +export interface GetV1EmployeeTimeoffRequest { + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmployeeTimeoffRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/employee/timeoff", code: 200 })), +).annotate({ + identifier: "GetV1EmployeeTimeoffRequest", +}) as any as S.Schema; + +/** The leave policy associated with a time off request. Policies define the rules and entitlements for specific types of leave. */ +export interface 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; +} +export const LeavePolicy = /*@__PURE__*/ S.suspend(() => + S.Struct({ + leave_policy_variant_slug: S.String, + leave_type: TimeoffType, + name: S.String, + }), +).annotate({ identifier: "LeavePolicy" }) as any as S.Schema; + +/** 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 = + | "requested" + | "approved" + | "cancelled" + | "declined" + | "taken" + | "cancel_requested"; +export const TimeoffStatus = /*@__PURE__*/ S.String; + +/** A single day within a time off request, specifying the date and the number of hours taken off that day. */ +export interface TimeoffDay { + day: string; + /** The number of hours taken off on this day (e.g., 8 for a full day, 4 for a half day). For minute-precision durations (e.g., 7 hours 30 minutes), use `minutes`. */ + hours: number; + /** The number of minutes taken off on this day (e.g., 480 for a full 8-hour day, 450 for 7 hours 30 minutes). Minute-precision counterpart of `hours`. */ + minutes: number; +} +export const TimeoffDay = /*@__PURE__*/ S.suspend(() => + S.Struct({ + day: S.String, + hours: S.Number, + minutes: S.Number, + }), +).annotate({ identifier: "TimeoffDay" }) as any as S.Schema; + +/** The individual days and hours within this time off period. */ +export type TimeoffTimeoffDaysList = Array; +export const TimeoffTimeoffDaysList = /*@__PURE__*/ S.Array( + TimeoffDay, +) as any as S.Schema; + +/** A time off record for an employee, representing a period of leave (e.g., vacation, sick leave, parental leave). */ +export interface Timeoff { + /** The timestamp when the time off was approved. Null if not yet approved. */ + approved_at?: string | null; + approver_id?: string | null; + /** 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?: string | null; + 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; + /** UUID of the custom company leave policy variant associated with this time off. Null for standard leave types. */ + leave_policy_variant_id?: string | null; + /** 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: TimeoffStatus; + /** The individual days and hours within this time off period. */ + timeoff_days: TimeoffTimeoffDaysList; + timeoff_type: TimeoffType; + timezone: string; + /** The total number of minutes taken off across all `timeoff_days`. Always equals the sum of the per-day `minutes` values. */ + total_minutes: number; +} +export const Timeoff = /*@__PURE__*/ S.suspend(() => + S.Struct({ + approved_at: S.optional(S.NullOr(S.String)), + approver_id: S.optional(S.NullOr(S.String)), + automatic: S.optional(S.Boolean), + cancel_reason: S.optional(S.NullOr(S.String)), + cancelled_at: S.optional(S.NullOr(S.String)), + document: S.optional(File), + employment_id: S.String, + end_date: S.String, + id: S.String, + leave_policy: LeavePolicy, + leave_policy_variant_id: S.optional(S.NullOr(S.String)), + notes: S.optional(S.NullOr(S.String)), + start_date: S.String, + status: TimeoffStatus, + timeoff_days: TimeoffTimeoffDaysList, + timeoff_type: TimeoffType, + timezone: S.String, + total_minutes: S.Number, + }), +).annotate({ identifier: "Timeoff" }) as any as S.Schema; + +export type ListTimeoffResponseDataTimeoffsList = Array; +export const ListTimeoffResponseDataTimeoffsList = /*@__PURE__*/ S.Array( + Timeoff, +) as any as S.Schema; + +export interface ListTimeoffResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + timeoffs?: ListTimeoffResponseDataTimeoffsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListTimeoffResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + timeoffs: S.optional(ListTimeoffResponseDataTimeoffsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListTimeoffResponseData", +}) as any as S.Schema; + +/** Response schema listing many timeoffs */ +export interface ListTimeoffResponse { + data?: ListTimeoffResponseData; +} +export const ListTimeoffResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListTimeoffResponseData), + }), +).annotate({ + identifier: "ListTimeoffResponse", +}) as any as S.Schema; + +export interface GetV1EmployeeTimesheetsRequest { + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmployeeTimesheetsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/employee/timesheets", code: 200 })), +).annotate({ + identifier: "GetV1EmployeeTimesheetsRequest", +}) as any as S.Schema; + +export interface GetV1EmploymentContractsRequest { + /** Employment ID */ + employment_id: string; + /** Only Active */ + only_active?: boolean; +} +export const GetV1EmploymentContractsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Query()), + only_active: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/employment-contracts", code: 200 }), + ), +).annotate({ + identifier: "GetV1EmploymentContractsRequest", +}) as any as S.Schema; + +/** Whether the employee is paid hourly or on a salary basis. Null if not yet set. */ +export type CompensationWageType = "hourly" | "salary"; +export const CompensationWageType = /*@__PURE__*/ S.String; + +export interface 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: CompensationWageType | null; +} +export const Compensation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.NullOr(S.Number), + currency_code: S.NullOr(S.String), + wage_type: S.NullOr(CompensationWageType), + }), +).annotate({ identifier: "Compensation" }) as any as S.Schema; + +/** The status of the employment contract. */ +export type EmploymentContractStatus = "active" | "inactive" | "pending"; +export const EmploymentContractStatus = /*@__PURE__*/ S.String; + +export interface EmploymentContract { + activated_at: string; + /** The id of the employment contract that was amended by this employment contract, if any. */ + amendment_contract_id: string | null; + compensation: Compensation; + /** Contract information. Its properties may vary depending on the country. */ + contract_details: unknown; + /** The unique identifier (UUID) of this contract. */ + contract_id: string; + country: Country; + effective_at: string; + /** The job title as specified in this contract. */ + job_title: string; + status: EmploymentContractStatus; +} +export const EmploymentContract = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activated_at: S.String, + amendment_contract_id: S.NullOr(S.String), + compensation: Compensation, + contract_details: S.Unknown, + contract_id: S.String, + country: Country, + effective_at: S.String, + job_title: S.String, + status: EmploymentContractStatus, + }), +).annotate({ + identifier: "EmploymentContract", +}) as any as S.Schema; + +export type ListEmploymentContractResponseDataEmploymentContractsList = + Array; +export const ListEmploymentContractResponseDataEmploymentContractsList = + /*@__PURE__*/ S.Array( + EmploymentContract, + ) as any as S.Schema; + +export interface ListEmploymentContractResponseData { + employment_contracts: ListEmploymentContractResponseDataEmploymentContractsList; +} +export const ListEmploymentContractResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_contracts: + ListEmploymentContractResponseDataEmploymentContractsList, + }), +).annotate({ + identifier: "ListEmploymentContractResponseData", +}) as any as S.Schema; + +export interface ListEmploymentContractResponse { + data: ListEmploymentContractResponseData; +} +export const ListEmploymentContractResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListEmploymentContractResponseData, + }), +).annotate({ + identifier: "ListEmploymentContractResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentContractsEmploymentIdPendingChangesRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentContractsEmploymentIdPendingChangesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employment-contracts/{employment_id}/pending-changes", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentContractsEmploymentIdPendingChangesRequest", + }) as any as S.Schema; + +export interface ContractPendingChanges { + /** Describes all the changes requested for the contract and contract details with all their previous and current values. Its properties may vary depending on the country. */ + changes: unknown; + contract_id: string; + effective_at: string; + /** Indicates if the contract is pending an action to be activated when effective_at is reached. If true, it means that an action needs to be performed, either a verification by Remote or a signature from the employer or the employee. If false, then the contract will be active when effective_at is reached. */ + pending_action_for_activation?: boolean; +} +export const ContractPendingChanges = /*@__PURE__*/ S.suspend(() => + S.Struct({ + changes: S.Unknown, + contract_id: S.String, + effective_at: S.String, + pending_action_for_activation: S.optional(S.Boolean), + }), +).annotate({ + identifier: "ContractPendingChanges", +}) as any as S.Schema; + +export type EmploymentContractPendingChangesResponseDataPendingChangesList = + Array; +export const EmploymentContractPendingChangesResponseDataPendingChangesList = + /*@__PURE__*/ S.Array( + ContractPendingChanges, + ) as any as S.Schema; + +export interface EmploymentContractPendingChangesResponseData { + pending_changes: EmploymentContractPendingChangesResponseDataPendingChangesList; +} +export const EmploymentContractPendingChangesResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + pending_changes: + EmploymentContractPendingChangesResponseDataPendingChangesList, + }), + ).annotate({ + identifier: "EmploymentContractPendingChangesResponseData", + }) as any as S.Schema; + +export interface EmploymentContractPendingChangesResponse { + data: EmploymentContractPendingChangesResponseData; +} +export const EmploymentContractPendingChangesResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: EmploymentContractPendingChangesResponseData, + }), +).annotate({ + identifier: "EmploymentContractPendingChangesResponse", +}) as any as S.Schema; + +export type GetV1EmploymentsRequestEmploymentModel = + | "global_payroll" + | "peo" + | "eor"; +export const GetV1EmploymentsRequestEmploymentModel = /*@__PURE__*/ S.String; + +export interface GetV1EmploymentsRequest { + /** Company ID */ + company_id?: string; + /** Filters the results by employments whose login email matches the value */ + email?: string; + /** Filters the results by employments whose status matches the value. Supports multiple values separated by commas. Also supports the value `incomplete` to get all employments that are not onboarded yet. */ + status?: string; + /** Filters the results by employments whose employment product type matches the value */ + employment_type?: string; + /** Filters the results by employments whose employment model matches the value. Possible values: `global_payroll`, `peo`, `eor` */ + employment_model?: GetV1EmploymentsRequestEmploymentModel | (string & {}); + /** Filters the results by the employment's short ID. Returns at most one result. */ + short_id?: string; + /** Filters the results by the `partner_external_id` value the calling integration holds for the employment; another integration's identifiers are never matched. Matching is exact, including case. The same value may be set on several employments (for example a rehire), so several results may be returned. */ + partner_external_id?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmploymentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.optional(S.String.pipe(T.Query())), + email: S.optional(S.String.pipe(T.Query())), + status: S.optional(S.String.pipe(T.Query())), + employment_type: S.optional(S.String.pipe(T.Query())), + employment_model: S.optional( + GetV1EmploymentsRequestEmploymentModel.pipe(T.Query()), + ), + short_id: S.optional(S.String.pipe(T.Query())), + partner_external_id: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/employments", code: 200 })), +).annotate({ + identifier: "GetV1EmploymentsRequest", +}) as any as S.Schema; + +export type NullableCountryContractorProductsAvailableItem = + | "standard" + | "plus" + | "cor"; +export const NullableCountryContractorProductsAvailableItem = + /*@__PURE__*/ S.String; + +/** Contractor product names available for this country */ +export type NullableCountryContractorProductsAvailableList = + Array; +export const NullableCountryContractorProductsAvailableList = + /*@__PURE__*/ S.Array( + NullableCountryContractorProductsAvailableItem, + ) as any as S.Schema; + +/** Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services. */ +export type NullableCountryCountrySubdivisionsList = Array; +export const NullableCountryCountrySubdivisionsList = /*@__PURE__*/ S.Array( + CountrySubdivision, +) as any as S.Schema; + +/** 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. */ +export type NullableCountrySupportedJsonSchemasList = Array; +export const NullableCountrySupportedJsonSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** A supported country on Remote */ +export interface 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?: NullableCountryContractorProductsAvailableList; + /** Administrative subdivisions of the country (e.g., states, provinces, districts). Null if the country has no subdivisions relevant to Remote's services. */ + country_subdivisions?: NullableCountryCountrySubdivisionsList | null; + /** Whether an Employment Agreement preview is available for this country. */ + employment_agreement_preview_available?: boolean; + /** Whether EOR (Employer of Record) onboarding is available in this country. */ + 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?: NullableCountrySupportedJsonSchemasList; +} +export const NullableCountry = /*@__PURE__*/ S.suspend(() => + S.Struct({ + alpha_2_code: S.String, + code: S.String, + contractor_products_available: S.optional( + NullableCountryContractorProductsAvailableList, + ), + country_subdivisions: S.optional( + S.NullOr(NullableCountryCountrySubdivisionsList), + ), + employment_agreement_preview_available: S.optional(S.Boolean), + eor_onboarding: S.optional(S.Boolean), + locked_benefits: S.optional(S.String), + name: S.String, + region: S.optional(S.String), + subregion: S.optional(S.NullOr(S.String)), + supported_json_schemas: S.optional(NullableCountrySupportedJsonSchemasList), + }), +).annotate({ + identifier: "NullableCountry", +}) as any as S.Schema; + +/** The stage of employment lifecycle. When it's `onboarded` means the employee is ready to commence or has already commenced. */ +export type EmploymentLifecycleStage = + | "employment_creation" + | "employee_self_enrollment" + | "right_to_work_check" + | "contract_signing" + | "remote_enrollment" + | "onboarded" + | "offboarded"; +export const EmploymentLifecycleStage = /*@__PURE__*/ S.String; + +/** The employment model. `eor` (Employer of Record), `peo` (Professional Employer Organization), or `global_payroll`. */ +export type MinimalEmploymentEmploymentModel = "eor" | "peo" | "global_payroll"; +export const MinimalEmploymentEmploymentModel = /*@__PURE__*/ S.String; + +/** The type of employment. */ +export type MinimalEmploymentType = + | "employee" + | "contractor" + | "direct_employee" + | "global_payroll_employee"; +export const MinimalEmploymentType = /*@__PURE__*/ S.String; + +/** 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 interface MinimalEmployment { + country: NullableCountry | null; + /** Name of related department, if any. Otherwise, null. */ + department?: string | null; + /** Unique ID of related department, if any. Otherwise, null. */ + department_id?: string | null; + employment_lifecycle_stage: EmploymentLifecycleStage; + /** The employment model. `eor` (Employer of Record), `peo` (Professional Employer Organization), or `global_payroll`. */ + employment_model: MinimalEmploymentEmploymentModel | null; + /** 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; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Null when the integration has not set one. */ + partner_external_id: string | null; + /** The employee's personal email address. */ + personal_email: string; + short_id: string; + status: EmploymentStatus; + /** The type of employment. */ + type: MinimalEmploymentType; + /** Work address information. Its properties may vary depending on the country. */ + work_address_details: unknown; + /** The employee's work email address. Null if not set. */ + work_email: string | null; +} +export const MinimalEmployment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country: S.NullOr(NullableCountry), + department: S.optional(S.NullOr(S.String)), + department_id: S.optional(S.NullOr(S.String)), + employment_lifecycle_stage: EmploymentLifecycleStage, + employment_model: S.NullOr(MinimalEmploymentEmploymentModel), + external_id: S.NullOr(S.String), + full_name: S.String, + id: S.String, + job_title: S.String, + login_email: S.String, + partner_external_id: S.NullOr(S.String), + personal_email: S.String, + short_id: S.String, + status: EmploymentStatus, + type: MinimalEmploymentType, + work_address_details: S.Unknown, + work_email: S.NullOr(S.String), + }), +).annotate({ + identifier: "MinimalEmployment", +}) as any as S.Schema; + +export type ListEmploymentsResponseDataEmploymentsList = + Array; +export const ListEmploymentsResponseDataEmploymentsList = /*@__PURE__*/ S.Array( + MinimalEmployment, +) as any as S.Schema; + +export interface ListEmploymentsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + employments?: ListEmploymentsResponseDataEmploymentsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListEmploymentsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + employments: S.optional(ListEmploymentsResponseDataEmploymentsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListEmploymentsResponseData", +}) as any as S.Schema; + +/** Response schema listing many employments */ +export interface ListEmploymentsResponse { + data?: ListEmploymentsResponseData; +} +export const ListEmploymentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListEmploymentsResponseData), + }), +).annotate({ + identifier: "ListEmploymentsResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsBulkRequest { + /** Company ID */ + company_id?: string; + /** Opaque pagination cursor returned as `next_cursor` from a previous page. */ + cursor?: string; + /** Number of employments to return per page (max 100, default 50). */ + limit?: number; +} +export const GetV1EmploymentsBulkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.optional(S.String.pipe(T.Query())), + cursor: S.optional(S.String.pipe(T.Query())), + limit: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/employments/bulk", code: 200 })), +).annotate({ + identifier: "GetV1EmploymentsBulkRequest", +}) as any as S.Schema; + +/** How often Remote bills the employer for management fees. Annual billing typically offers a discount. */ +export type PricingPlanDetailsFrequency = "annually" | "monthly"; +export const PricingPlanDetailsFrequency = /*@__PURE__*/ S.String; + +/** Selected type of payment. */ +export interface PricingPlanDetails { + /** How often Remote bills the employer for management fees. Annual billing typically offers a discount. */ + frequency: PricingPlanDetailsFrequency; +} +export const PricingPlanDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + frequency: PricingPlanDetailsFrequency, + }), +).annotate({ + identifier: "PricingPlanDetails", +}) as any as S.Schema; + +/** For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ +export type EmploymentType = + | "employee" + | "contractor" + | "direct_employee" + | "global_payroll_employee"; +export const EmploymentType = /*@__PURE__*/ S.String; + +/** Contractor-specific settings. Only present for contractor employments. */ +export interface EmploymentContractorSettings { + /** Whether the contractor requires work confirmation before submitting invoices. */ + requires_work_confirmation?: boolean; +} +export const EmploymentContractorSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + requires_work_confirmation: S.optional(S.Boolean), + }), +).annotate({ + identifier: "EmploymentContractorSettings", +}) as any as S.Schema; + +/** Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus. */ +export type EmploymentContractorType = "standard" | "cor" | "plus"; +export const EmploymentContractorType = /*@__PURE__*/ S.String; + +export interface EmploymentContractorRateAmountCurrency { + /** Currency code (e.g., USD, EUR) */ + code?: string; +} +export const EmploymentContractorRateAmountCurrency = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + code: S.optional(S.String), + }), +).annotate({ + identifier: "EmploymentContractorRateAmountCurrency", +}) as any as S.Schema; + +export interface EmploymentContractorRateAmount { + /** Rate amount as decimal */ + amount?: number; + currency?: EmploymentContractorRateAmountCurrency; +} +export const EmploymentContractorRateAmount = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(S.Number), + currency: S.optional(EmploymentContractorRateAmountCurrency), + }), +).annotate({ + identifier: "EmploymentContractorRateAmount", +}) as any as S.Schema; + +/** Payment frequency cadence */ +export type EmploymentContractorRatePayFrequency = + | "weekly" + | "bi_weekly" + | "semi_monthly" + | "monthly"; +export const EmploymentContractorRatePayFrequency = /*@__PURE__*/ S.String; + +/** Rate type indicating billing frequency */ +export type EmploymentContractorRateType = + | "hourly" + | "daily" + | "weekly" + | "monthly" + | "one_off"; +export const EmploymentContractorRateType = /*@__PURE__*/ S.String; + +/** Contractor compensation rate details. Only present for contractor employments when rate is configured. */ +export interface EmploymentContractorRate { + amount?: EmploymentContractorRateAmount; + /** Payment frequency cadence */ + pay_frequency?: EmploymentContractorRatePayFrequency | null; + /** Unique identifier for the contractor rate */ + slug?: string; + /** Rate type indicating billing frequency */ + type?: EmploymentContractorRateType; +} +export const EmploymentContractorRate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(EmploymentContractorRateAmount), + pay_frequency: S.optional(S.NullOr(EmploymentContractorRatePayFrequency)), + slug: S.optional(S.String), + type: S.optional(EmploymentContractorRateType), + }), +).annotate({ + identifier: "EmploymentContractorRate", +}) as any as S.Schema; + +/** For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ +export type EmploymentEmploymentModel = "global_payroll" | "peo" | "eor"; +export const EmploymentEmploymentModel = /*@__PURE__*/ S.String; + +export type EmploymentBankAccountDetailsList = Array; +export const EmploymentBankAccountDetailsList = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +/** Documents associated with this employment (e.g., contracts, tax forms, identity documents). */ +export type EmploymentFilesList = Array; +export const EmploymentFilesList = /*@__PURE__*/ S.Array( + File, +) as any as S.Schema; + +/** The status of the task */ +export type TaskDescriptionStatus = "completed" | "pending"; +export const TaskDescriptionStatus = /*@__PURE__*/ S.String; + +/** Description and status of an onboarding task. */ +export interface TaskDescription { + /** A human-readable description of what this onboarding task requires. */ + description?: string; + /** The status of the task */ + status?: TaskDescriptionStatus; +} +export const TaskDescription = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.String), + status: S.optional(TaskDescriptionStatus), + }), +).annotate({ + identifier: "TaskDescription", +}) as any as S.Schema; + +/** All tasks that need to be completed before marking the employment as ready */ +export interface OnboardingTasks { + address_details: TaskDescription; + administrative_details: TaskDescription; + bank_account_details: TaskDescription; + billing_address_details: TaskDescription; + contract_details: TaskDescription; + emergency_contact_details: TaskDescription; + employment_document_details: TaskDescription; + personal_details: TaskDescription; + pricing_plan_details: TaskDescription; +} +export const OnboardingTasks = /*@__PURE__*/ S.suspend(() => + S.Struct({ + address_details: TaskDescription, + administrative_details: TaskDescription, + bank_account_details: TaskDescription, + billing_address_details: TaskDescription, + contract_details: TaskDescription, + emergency_contact_details: TaskDescription, + employment_document_details: TaskDescription, + personal_details: TaskDescription, + pricing_plan_details: TaskDescription, + }), +).annotate({ + identifier: "OnboardingTasks", +}) as any as S.Schema; + +/** 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 interface Employment { + /** Personal details information. Its properties may vary depending on the country. */ + personal_details: unknown; + short_id?: string; + /** 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?: string; + /** Home address information. Its properties may vary depending on the country. */ + address_details: unknown; + pricing_plan_details: PricingPlanDetails; + /** The employee's full name. */ + full_name: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Null when the integration has not set one. */ + partner_external_id?: string | null; + /** For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ + type: EmploymentType; + /** Contractor-specific settings. Only present for contractor employments. */ + contractor_settings?: EmploymentContractorSettings | null; + employment_lifecycle_stage: EmploymentLifecycleStage; + /** Administrative information. Its properties may vary depending on the country. */ + administrative_details: unknown; + /** Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus. */ + contractor_type?: EmploymentContractorType | null; + /** Contractor compensation rate details. Only present for contractor employments when rate is configured. */ + contractor_rate?: EmploymentContractorRate | null; + /** The unique identifier (UUID) of the company this employment belongs to. */ + company_id: string; + /** The planned service end date for contractor of record (COR) employments. For signed COR contractors, this date is stored on the contract record (not in `contract_details`). It is `null` for employee employments or unsigned contractor agreements. Date format is ISO 8601 without the time component (e.g. "2024-12-31"). */ + expiration_date?: string | null; + /** Work address information. Its properties may vary depending on the country. */ + work_address_details: unknown; + /** The unique identifier (UUID) of the legal entity that is billed for this employment. */ + bill_to_legal_entity_id?: string | null; + /** 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. When present, `login_email` indicates which address the employee logs in with: `"personal"` or `"work"`. */ + basic_information?: 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; + /** 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. */ + external_id?: string | null; + /** For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ + employment_model: EmploymentEmploymentModel | null; + /** The employee's personal email address, used for account-related communications. */ + personal_email: string; + country: NullableCountry | null; + user_status?: UserStatus; + seniority_date?: string; + bank_account_details: EmploymentBankAccountDetailsList; + /** Documents associated with this employment (e.g., contracts, tax forms, identity documents). */ + files: EmploymentFilesList; + /** The unique identifier (UUID) of the currently active contract for this employment. */ + active_contract_id?: string; + /** The unique identifier (UUID) of the legal entity that engaged this employment. */ + engaged_by_legal_entity_id?: string | null; + /** Billing address information. Its properties may vary depending on the country. */ + billing_address_details: unknown; + onboarding_tasks: OnboardingTasks; + /** Contract information. Its properties may vary depending on the country. */ + contract_details: unknown; + /** Emergency contact information. Its properties may vary depending on the country. */ + emergency_contact_details: 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; +} +export const Employment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + personal_details: S.Unknown, + short_id: S.optional(S.String), + department: S.optional(S.NullOr(S.String)), + manager_email: S.NullOr(S.String), + provisional_start_date: S.optional(S.String), + address_details: S.Unknown, + pricing_plan_details: PricingPlanDetails, + full_name: S.String, + partner_external_id: S.optional(S.NullOr(S.String)), + type: EmploymentType, + contractor_settings: S.optional(S.NullOr(EmploymentContractorSettings)), + employment_lifecycle_stage: EmploymentLifecycleStage, + administrative_details: S.Unknown, + contractor_type: S.optional(S.NullOr(EmploymentContractorType)), + contractor_rate: S.optional(S.NullOr(EmploymentContractorRate)), + company_id: S.String, + expiration_date: S.optional(S.NullOr(S.String)), + work_address_details: S.Unknown, + bill_to_legal_entity_id: S.optional(S.NullOr(S.String)), + work_email: S.String, + status: EmploymentStatus, + updated_at: S.String, + basic_information: S.optional(S.Unknown), + job_title: S.NullOr(S.String), + id: S.String, + probation_period_end_date: S.optional(S.String), + department_id: S.optional(S.NullOr(S.String)), + manager: S.optional(S.String), + login_email: S.String, + external_id: S.optional(S.NullOr(S.String)), + employment_model: S.NullOr(EmploymentEmploymentModel), + personal_email: S.String, + country: S.NullOr(NullableCountry), + user_status: S.optional(UserStatus), + seniority_date: S.optional(S.String), + bank_account_details: EmploymentBankAccountDetailsList, + files: EmploymentFilesList, + active_contract_id: S.optional(S.String), + engaged_by_legal_entity_id: S.optional(S.NullOr(S.String)), + billing_address_details: S.Unknown, + onboarding_tasks: OnboardingTasks, + contract_details: S.Unknown, + emergency_contact_details: S.Unknown, + eligible_for_onboarding_cancellation: S.Boolean, + manager_employment_id: S.NullOr(S.String), + created_at: S.String, + }), +).annotate({ identifier: "Employment" }) as any as S.Schema; + +export type EmploymentsBulkResponseDataList = Array; +export const EmploymentsBulkResponseDataList = /*@__PURE__*/ S.Array( + Employment, +) as any as S.Schema; + +/** A keyset-paginated page of full-detail employment records. */ +export interface EmploymentsBulkResponse { + data: EmploymentsBulkResponseDataList; + /** Opaque cursor to pass as the `cursor` query parameter to fetch the next page. `null` once the last page has been reached. */ + next_cursor: string | null; +} +export const EmploymentsBulkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentsBulkResponseDataList, + next_cursor: S.NullOr(S.String), + }), +).annotate({ + identifier: "EmploymentsBulkResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdRequest { + /** Employment ID */ + employment_id: string; + /** Whether files should be excluded */ + exclude_files?: boolean; +} +export const GetV1EmploymentsEmploymentIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + exclude_files: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmploymentsEmploymentIdRequest", +}) as any as S.Schema; + +/** For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ +export type EmploymentShowResponseDataEmploymentType = + | "employee" + | "contractor" + | "direct_employee" + | "global_payroll_employee"; +export const EmploymentShowResponseDataEmploymentType = /*@__PURE__*/ S.String; + +/** Contractor-specific settings. Only present for contractor employments. */ +export type EmploymentShowResponseDataEmploymentContractorSettings = + EmploymentContractorSettings; +export const EmploymentShowResponseDataEmploymentContractorSettings = + EmploymentContractorSettings; + +/** Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus. */ +export type EmploymentShowResponseDataEmploymentContractorType = + | "standard" + | "cor" + | "plus"; +export const EmploymentShowResponseDataEmploymentContractorType = + /*@__PURE__*/ S.String; + +export type EmploymentShowResponseDataEmploymentContractorRateAmountCurrency = + EmploymentContractorRateAmountCurrency; +export const EmploymentShowResponseDataEmploymentContractorRateAmountCurrency = + EmploymentContractorRateAmountCurrency; + +export type EmploymentShowResponseDataEmploymentContractorRateAmount = + EmploymentContractorRateAmount; +export const EmploymentShowResponseDataEmploymentContractorRateAmount = + EmploymentContractorRateAmount; + +/** Payment frequency cadence */ +export type EmploymentShowResponseDataEmploymentContractorRatePayFrequency = + | "weekly" + | "bi_weekly" + | "semi_monthly" + | "monthly"; +export const EmploymentShowResponseDataEmploymentContractorRatePayFrequency = + /*@__PURE__*/ S.String; + +/** Rate type indicating billing frequency */ +export type EmploymentShowResponseDataEmploymentContractorRateType = + | "hourly" + | "daily" + | "weekly" + | "monthly" + | "one_off"; +export const EmploymentShowResponseDataEmploymentContractorRateType = + /*@__PURE__*/ S.String; + +/** Contractor compensation rate details. Only present for contractor employments when rate is configured. */ +export interface EmploymentShowResponseDataEmploymentContractorRate { + amount?: EmploymentContractorRateAmount; + /** Payment frequency cadence */ + pay_frequency?: EmploymentShowResponseDataEmploymentContractorRatePayFrequency | null; + /** Unique identifier for the contractor rate */ + slug?: string; + /** Rate type indicating billing frequency */ + type?: EmploymentShowResponseDataEmploymentContractorRateType; +} +export const EmploymentShowResponseDataEmploymentContractorRate = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(EmploymentContractorRateAmount), + pay_frequency: S.optional( + S.NullOr( + EmploymentShowResponseDataEmploymentContractorRatePayFrequency, + ), + ), + slug: S.optional(S.String), + type: S.optional(EmploymentShowResponseDataEmploymentContractorRateType), + }), + ).annotate({ + identifier: "EmploymentShowResponseDataEmploymentContractorRate", + }) as any as S.Schema; + +/** For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ +export type EmploymentShowResponseDataEmploymentEmploymentModel = + | "global_payroll" + | "peo" + | "eor"; +export const EmploymentShowResponseDataEmploymentEmploymentModel = + /*@__PURE__*/ S.String; + +export type EmploymentShowResponseDataEmploymentBankAccountDetailsList = + Array; +export const EmploymentShowResponseDataEmploymentBankAccountDetailsList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +/** Documents associated with this employment (e.g., contracts, tax forms, identity documents). */ +export type EmploymentShowResponseDataEmploymentFilesList = Array; +export const EmploymentShowResponseDataEmploymentFilesList = + /*@__PURE__*/ S.Array( + File, + ) as any as S.Schema; + +export interface EmploymentShowResponseDataEmployment { + /** Personal details information. Its properties may vary depending on the country. */ + personal_details: unknown; + short_id?: string; + /** 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?: string; + /** Home address information. Its properties may vary depending on the country. */ + address_details: unknown; + pricing_plan_details: PricingPlanDetails; + /** The employee's full name. */ + full_name: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Null when the integration has not set one. */ + partner_external_id?: string | null; + /** For the employment types `contractor`, `global_payroll_employee` and `direct_employee`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ + type: EmploymentShowResponseDataEmploymentType; + /** Contractor-specific settings. Only present for contractor employments. */ + contractor_settings?: EmploymentContractorSettings | null; + employment_lifecycle_stage: EmploymentLifecycleStage; + /** Administrative information. Its properties may vary depending on the country. */ + administrative_details: unknown; + /** Type of contractor product. Only present for contractor employments. 'standard' for Contractor Standard, 'cor' for Contractor of Record, 'plus' for Contractor Plus. */ + contractor_type?: EmploymentShowResponseDataEmploymentContractorType | null; + /** Contractor compensation rate details. Only present for contractor employments when rate is configured. */ + contractor_rate?: EmploymentShowResponseDataEmploymentContractorRate | null; + /** The unique identifier (UUID) of the company this employment belongs to. */ + company_id: string; + /** The planned service end date for contractor of record (COR) employments. For signed COR contractors, this date is stored on the contract record (not in `contract_details`). It is `null` for employee employments or unsigned contractor agreements. Date format is ISO 8601 without the time component (e.g. "2024-12-31"). */ + expiration_date?: string | null; + /** Work address information. Its properties may vary depending on the country. */ + work_address_details: unknown; + /** The unique identifier (UUID) of the legal entity that is billed for this employment. */ + bill_to_legal_entity_id?: string | null; + /** 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. When present, `login_email` indicates which address the employee logs in with: `"personal"` or `"work"`. */ + basic_information?: 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; + /** 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. */ + external_id?: string | null; + /** For the employment models `peo` and `global_payroll`, only [List employments](#operation/get_index_employment) and [Show employment](#operation/get_show_employment) operations are available. */ + employment_model: EmploymentShowResponseDataEmploymentEmploymentModel | null; + /** The employee's personal email address, used for account-related communications. */ + personal_email: string; + country: NullableCountry | null; + user_status?: UserStatus; + seniority_date?: string; + bank_account_details: EmploymentShowResponseDataEmploymentBankAccountDetailsList; + /** Documents associated with this employment (e.g., contracts, tax forms, identity documents). */ + files: EmploymentShowResponseDataEmploymentFilesList; + /** The unique identifier (UUID) of the currently active contract for this employment. */ + active_contract_id?: string; + /** The unique identifier (UUID) of the legal entity that engaged this employment. */ + engaged_by_legal_entity_id?: string | null; + /** Billing address information. Its properties may vary depending on the country. */ + billing_address_details: unknown; + onboarding_tasks: OnboardingTasks; + /** Contract information. Its properties may vary depending on the country. */ + contract_details: unknown; + /** Emergency contact information. Its properties may vary depending on the country. */ + emergency_contact_details: 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; + /** 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; +} +export const EmploymentShowResponseDataEmployment = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + personal_details: S.Unknown, + short_id: S.optional(S.String), + department: S.optional(S.NullOr(S.String)), + manager_email: S.NullOr(S.String), + provisional_start_date: S.optional(S.String), + address_details: S.Unknown, + pricing_plan_details: PricingPlanDetails, + full_name: S.String, + partner_external_id: S.optional(S.NullOr(S.String)), + type: EmploymentShowResponseDataEmploymentType, + contractor_settings: S.optional(S.NullOr(EmploymentContractorSettings)), + employment_lifecycle_stage: EmploymentLifecycleStage, + administrative_details: S.Unknown, + contractor_type: S.optional( + S.NullOr(EmploymentShowResponseDataEmploymentContractorType), + ), + contractor_rate: S.optional( + S.NullOr(EmploymentShowResponseDataEmploymentContractorRate), + ), + company_id: S.String, + expiration_date: S.optional(S.NullOr(S.String)), + work_address_details: S.Unknown, + bill_to_legal_entity_id: S.optional(S.NullOr(S.String)), + work_email: S.String, + status: EmploymentStatus, + updated_at: S.String, + basic_information: S.optional(S.Unknown), + job_title: S.NullOr(S.String), + id: S.String, + probation_period_end_date: S.optional(S.String), + department_id: S.optional(S.NullOr(S.String)), + manager: S.optional(S.String), + login_email: S.String, + external_id: S.optional(S.NullOr(S.String)), + employment_model: S.NullOr( + EmploymentShowResponseDataEmploymentEmploymentModel, + ), + personal_email: S.String, + country: S.NullOr(NullableCountry), + user_status: S.optional(UserStatus), + seniority_date: S.optional(S.String), + bank_account_details: + EmploymentShowResponseDataEmploymentBankAccountDetailsList, + files: EmploymentShowResponseDataEmploymentFilesList, + active_contract_id: S.optional(S.String), + engaged_by_legal_entity_id: S.optional(S.NullOr(S.String)), + billing_address_details: S.Unknown, + onboarding_tasks: OnboardingTasks, + contract_details: S.Unknown, + emergency_contact_details: S.Unknown, + eligible_for_onboarding_cancellation: S.Boolean, + manager_employment_id: S.NullOr(S.String), + created_at: S.String, + termination_date: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "EmploymentShowResponseDataEmployment", +}) as any as S.Schema; + +export interface EmploymentShowResponseData { + employment?: EmploymentShowResponseDataEmployment; +} +export const EmploymentShowResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment: S.optional(EmploymentShowResponseDataEmployment), + }), +).annotate({ + identifier: "EmploymentShowResponseData", +}) as any as S.Schema; + +/** Response containing the full employment record, including the termination date if the employment has an active offboarding. */ +export interface EmploymentShowResponse { + data: EmploymentShowResponseData; +} +export const EmploymentShowResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentShowResponseData, + }), +).annotate({ + identifier: "EmploymentShowResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest { + /** Employment Id */ + employment_id: string; + /** Background Check Id */ + background_check_id: string; +} +export const GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + background_check_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/background-checks/{background_check_id}", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest", + }) as any as S.Schema; + +/** Status of the background check item */ +export type BackgroundChecksBackgroundCheckRequestItemStatus = + | "employer_requested" + | "in_progress" + | "needs_employee_response" + | "needs_employer_review" + | "needs_remote_review" + | "approved" + | "rejected" + | "canceled"; +export const BackgroundChecksBackgroundCheckRequestItemStatus = + /*@__PURE__*/ S.String; + +export interface BackgroundChecksBackgroundCheckRequestItem { + /** Unique identifier of the background check request item */ + id: string; + /** Status of the background check item */ + status: BackgroundChecksBackgroundCheckRequestItemStatus; + /** Display title of the background check item */ + title: string; + /** Type of background check (e.g. criminal, education) */ + type: string; +} +export const BackgroundChecksBackgroundCheckRequestItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + status: BackgroundChecksBackgroundCheckRequestItemStatus, + title: S.String, + type: S.String, + }), + ).annotate({ + identifier: "BackgroundChecksBackgroundCheckRequestItem", + }) as any as S.Schema; + +/** Individual checks that make up this background check request */ +export type BackgroundChecksBackgroundCheckBackgroundCheckRequestItemsList = + Array; +export const BackgroundChecksBackgroundCheckBackgroundCheckRequestItemsList = + /*@__PURE__*/ S.Array( + BackgroundChecksBackgroundCheckRequestItem, + ) as any as S.Schema; + +/** Overall status of the background check request */ +export type BackgroundChecksBackgroundCheckStatus = + | "employer_requested" + | "in_progress" + | "needs_review" + | "complete" + | "rejected" + | "canceled" + | "submission_failed"; +export const BackgroundChecksBackgroundCheckStatus = /*@__PURE__*/ S.String; + +export interface BackgroundChecksBackgroundCheck { + /** Individual checks that make up this background check request */ + background_check_request_items: BackgroundChecksBackgroundCheckBackgroundCheckRequestItemsList; + created_at: string; + /** Unique identifier of the associated employment */ + employment_id: string; + /** Unique identifier of the background check request */ + id: string; + /** Overall status of the background check request */ + status: BackgroundChecksBackgroundCheckStatus; +} +export const BackgroundChecksBackgroundCheck = /*@__PURE__*/ S.suspend(() => + S.Struct({ + background_check_request_items: + BackgroundChecksBackgroundCheckBackgroundCheckRequestItemsList, + created_at: S.String, + employment_id: S.String, + id: S.String, + status: BackgroundChecksBackgroundCheckStatus, + }), +).annotate({ + identifier: "BackgroundChecksBackgroundCheck", +}) as any as S.Schema; + +export interface BackgroundChecksBackgroundCheckResponseData { + background_check: BackgroundChecksBackgroundCheck; +} +export const BackgroundChecksBackgroundCheckResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + background_check: BackgroundChecksBackgroundCheck, + }), + ).annotate({ + identifier: "BackgroundChecksBackgroundCheckResponseData", + }) as any as S.Schema; + +/** Background Check Response */ +export interface BackgroundChecksBackgroundCheckResponse { + data: BackgroundChecksBackgroundCheckResponseData; +} +export const BackgroundChecksBackgroundCheckResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: BackgroundChecksBackgroundCheckResponseData, + }), +).annotate({ + identifier: "BackgroundChecksBackgroundCheckResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdBenefitOffersRequest { + /** Unique identifier of the employment */ + employment_id: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmploymentsEmploymentIdBenefitOffersRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/benefit-offers", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdBenefitOffersRequest", + }) as any as S.Schema; + +export interface UnifiedMinimalBenefitGroup { + name: string | null; + slug: string; +} +export const UnifiedMinimalBenefitGroup = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.NullOr(S.String), + slug: S.String, + }), +).annotate({ + identifier: "UnifiedMinimalBenefitGroup", +}) as any as S.Schema; + +export interface UnifiedEmploymentBenefitGroup { + filter: UnifiedMinimalBenefitGroup | null; + name: string | null; + slug: string; +} +export const UnifiedEmploymentBenefitGroup = /*@__PURE__*/ S.suspend(() => + S.Struct({ + filter: S.NullOr(UnifiedMinimalBenefitGroup), + name: S.NullOr(S.String), + slug: S.String, + }), +).annotate({ + identifier: "UnifiedEmploymentBenefitGroup", +}) as any as S.Schema; + +export interface UnifiedEmploymentBenefitTier { + display_cost?: string | null; + name?: string; + slug?: string; +} +export const UnifiedEmploymentBenefitTier = /*@__PURE__*/ S.suspend(() => + S.Struct({ + display_cost: S.optional(S.NullOr(S.String)), + name: S.optional(S.String), + slug: S.optional(S.String), + }), +).annotate({ + identifier: "UnifiedEmploymentBenefitTier", +}) as any as S.Schema; + +/** The benefit offer for an employment schema */ +export interface UnifiedEmploymentBenefitOffer { + benefit_group: UnifiedEmploymentBenefitGroup; + benefit_tier: UnifiedEmploymentBenefitTier | null; +} +export const UnifiedEmploymentBenefitOffer = /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_group: UnifiedEmploymentBenefitGroup, + benefit_tier: S.NullOr(UnifiedEmploymentBenefitTier), + }), +).annotate({ + identifier: "UnifiedEmploymentBenefitOffer", +}) as any as S.Schema; + +export type EmploymentsBenefitOffersListBenefitOffersDataList = + Array; +export const EmploymentsBenefitOffersListBenefitOffersDataList = + /*@__PURE__*/ S.Array( + UnifiedEmploymentBenefitOffer, + ) as any as S.Schema; + +/** The list of benefit offers for an employment schema */ +export interface EmploymentsBenefitOffersListBenefitOffers { + data: EmploymentsBenefitOffersListBenefitOffersDataList; +} +export const EmploymentsBenefitOffersListBenefitOffers = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentsBenefitOffersListBenefitOffersDataList, + }), + ).annotate({ + identifier: "EmploymentsBenefitOffersListBenefitOffers", + }) as any as S.Schema; + +/** Use latest version */ +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersionCase1 = + "latest"; +export const GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersion = + | number + | GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersionCase1; +export const GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest { + /** Unique identifier of the employment */ + employment_id: string; + /** Version of the form schema */ + json_schema_version?: GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersion; +} +export const GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + json_schema_version: S.optional( + GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/benefit-offers/schema", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest", + }) as any as S.Schema; + +export type UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaPropertiesMap = + { [key: string]: unknown | undefined }; +export const UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaPropertiesMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export type UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaRequiredList = + Array; +export const UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaRequiredList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaXJsfOrderList = + Array; +export const UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaXJsfOrderList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema { + properties: UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaPropertiesMap; + required?: UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaRequiredList; + x_jsf_order?: UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaXJsfOrderList; +} +export const UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + properties: + UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaPropertiesMap, + required: S.optional( + UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaRequiredList, + ), + x_jsf_order: S.optional( + UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchemaXJsfOrderList.pipe( + T.Body("x-jsf-order"), + ), + ), + }), + ).annotate({ + identifier: "UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema", + }) as any as S.Schema; + +/** JSON Schema */ +export interface UnifiedEmploymentsBenefitOffersJSONSchemaResponseData { + schema?: UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema; + version?: number; +} +export const UnifiedEmploymentsBenefitOffersJSONSchemaResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + schema: S.optional( + UnifiedEmploymentsBenefitOffersJSONSchemaResponseDataSchema, + ), + version: S.optional(S.Number), + }), + ).annotate({ + identifier: "UnifiedEmploymentsBenefitOffersJSONSchemaResponseData", + }) as any as S.Schema; + +/** JSON schema response for benefit offers */ +export interface UnifiedEmploymentsBenefitOffersJSONSchemaResponse { + /** JSON Schema */ + data?: UnifiedEmploymentsBenefitOffersJSONSchemaResponseData; +} +export const UnifiedEmploymentsBenefitOffersJSONSchemaResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(UnifiedEmploymentsBenefitOffersJSONSchemaResponseData), + }), + ).annotate({ + identifier: "UnifiedEmploymentsBenefitOffersJSONSchemaResponse", + }) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/company-structure-nodes", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest", + }) as any as S.Schema; + +/** Arbitrary attributes including legal entity code */ +export type CompanyStructureNodeAttributesMap = { + [key: string]: unknown | undefined; +}; +export const CompanyStructureNodeAttributesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface CompanyStructureNodeCompanyStructure { + id?: string; + name?: string; +} +export const CompanyStructureNodeCompanyStructure = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.optional(S.String), + name: S.optional(S.String), + }), +).annotate({ + identifier: "CompanyStructureNodeCompanyStructure", +}) as any as S.Schema; + +/** Arbitrary attributes including cost_center */ +export type CompanyStructureNodeParentAttributesMap = { + [key: string]: unknown | undefined; +}; +export const CompanyStructureNodeParentAttributesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface CompanyStructureNodeParent { + /** Arbitrary attributes including cost_center */ + attributes?: CompanyStructureNodeParentAttributesMap; + id?: string; + name?: string; +} +export const CompanyStructureNodeParent = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attributes: S.optional(CompanyStructureNodeParentAttributesMap), + id: S.optional(S.String), + name: S.optional(S.String), + }), +).annotate({ + identifier: "CompanyStructureNodeParent", +}) as any as S.Schema; + +export interface CompanyStructureNode { + /** Arbitrary attributes including legal entity code */ + attributes?: CompanyStructureNodeAttributesMap; + company_structure?: CompanyStructureNodeCompanyStructure; + id: string; + parent?: CompanyStructureNodeParent | null; +} +export const CompanyStructureNode = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attributes: S.optional(CompanyStructureNodeAttributesMap), + company_structure: S.optional(CompanyStructureNodeCompanyStructure), + id: S.String, + parent: S.optional(S.NullOr(CompanyStructureNodeParent)), + }), +).annotate({ + identifier: "CompanyStructureNode", +}) as any as S.Schema; + +export type CompanyStructureNodesResponseDataCompanyStructureNodesList = + Array; +export const CompanyStructureNodesResponseDataCompanyStructureNodesList = + /*@__PURE__*/ S.Array( + CompanyStructureNode, + ) as any as S.Schema; + +export interface CompanyStructureNodesResponseData { + company_structure_nodes: CompanyStructureNodesResponseDataCompanyStructureNodesList; +} +export const CompanyStructureNodesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_structure_nodes: + CompanyStructureNodesResponseDataCompanyStructureNodesList, + }), +).annotate({ + identifier: "CompanyStructureNodesResponseData", +}) as any as S.Schema; + +export interface CompanyStructureNodesResponse { + data: CompanyStructureNodesResponseData; +} +export const CompanyStructureNodesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CompanyStructureNodesResponseData, + }), +).annotate({ + identifier: "CompanyStructureNodesResponse", +}) as any as S.Schema; + +export type GetV1EmploymentsEmploymentIdContractDocumentsRequestStatusesList = + Array; +export const GetV1EmploymentsEmploymentIdContractDocumentsRequestStatusesList = + /*@__PURE__*/ S.Array( + ContractorContractDocumentStatus, + ) as any as S.Schema; + +export type GetV1EmploymentsEmploymentIdContractDocumentsRequestExceptStatusesList = + Array; +export const GetV1EmploymentsEmploymentIdContractDocumentsRequestExceptStatusesList = + /*@__PURE__*/ S.Array( + ContractorContractDocumentStatus, + ) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdContractDocumentsRequest { + /** Employment ID */ + employment_id: string; + /** Filter by contract document statuses */ + statuses?: GetV1EmploymentsEmploymentIdContractDocumentsRequestStatusesList; + /** Exclude contract documents with specific statuses */ + except_statuses?: GetV1EmploymentsEmploymentIdContractDocumentsRequestExceptStatusesList; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmploymentsEmploymentIdContractDocumentsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + statuses: S.optional( + GetV1EmploymentsEmploymentIdContractDocumentsRequestStatusesList.pipe( + T.Query(), + ), + ), + except_statuses: S.optional( + GetV1EmploymentsEmploymentIdContractDocumentsRequestExceptStatusesList.pipe( + T.Query(), + ), + ), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/contract-documents", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdContractDocumentsRequest", + }) as any as S.Schema; + +/** Signing method used by this signatory */ +export type ListSignatorySignatureMethod = "in_platform" | "docusign"; +export const ListSignatorySignatureMethod = /*@__PURE__*/ S.String; + +/** Legal signature level applied when signing */ +export type ListSignatorySignatureType = "standard" | "qes" | "aes" | "ses"; +export const ListSignatorySignatureType = /*@__PURE__*/ S.String; + +/** A signatory on a contract document. For company and employee signatories, `user_id` is provided. For other signatory types, `user_id` is null. */ +export interface ListSignatory { + /** Email address of the signatory */ + email?: string | null; + /** Full name of the signatory */ + name?: string | null; + /** Signing method used by this signatory */ + signature_method?: ListSignatorySignatureMethod; + /** Legal signature level applied when signing */ + signature_type?: ListSignatorySignatureType; + /** Timestamp when the signatory signed the document, null if not yet signed */ + signed_at?: string | null; + status: SignatoryStatus; + type: SignatoryType; + /** User identifier for internal signatories, null for external signatories */ + user_id?: string | null; +} +export const ListSignatory = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + signature_method: S.optional(ListSignatorySignatureMethod), + signature_type: S.optional(ListSignatorySignatureType), + signed_at: S.optional(S.NullOr(S.String)), + status: SignatoryStatus, + type: SignatoryType, + user_id: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "ListSignatory" }) as any as S.Schema; + +/** List of signatories for this contract document */ +export type ContractDocumentItemSignatoriesList = Array; +export const ContractDocumentItemSignatoriesList = /*@__PURE__*/ S.Array( + ListSignatory, +) as any as S.Schema; + +/** Contract document item in list response */ +export interface ContractDocumentItem { + /** Contract document slug/ID */ + id: string; + /** Created timestamp */ + inserted_at: string; + /** Contract document name */ + name: string | null; + /** List of signatories for this contract document */ + signatories: ContractDocumentItemSignatoriesList; + status: ContractorContractDocumentStatus; + /** Contract document type */ + type: string; + /** Last updated timestamp */ + updated_at: string | null; +} +export const ContractDocumentItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + inserted_at: S.String, + name: S.NullOr(S.String), + signatories: ContractDocumentItemSignatoriesList, + status: ContractorContractDocumentStatus, + type: S.String, + updated_at: S.NullOr(S.String), + }), +).annotate({ + identifier: "ContractDocumentItem", +}) as any as S.Schema; + +/** Array of contract documents */ +export type IndexContractDocumentsContractDocumentsList = + Array; +export const IndexContractDocumentsContractDocumentsList = + /*@__PURE__*/ S.Array( + ContractDocumentItem, + ) as any as S.Schema; + +/** Paginated list of contract documents */ +export interface IndexContractDocuments { + /** Array of contract documents */ + contract_documents: IndexContractDocumentsContractDocumentsList; + /** Current page number */ + current_page: number; + /** Total number of contract documents */ + total_count: number; + /** Total number of pages */ + total_pages: number; +} +export const IndexContractDocuments = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_documents: IndexContractDocumentsContractDocumentsList, + current_page: S.Number, + total_count: S.Number, + total_pages: S.Number, + }), +).annotate({ + identifier: "IndexContractDocuments", +}) as any as S.Schema; + +/** Paginated list of contract documents */ +export interface IndexContractDocumentsResponse { + data: IndexContractDocuments; +} +export const IndexContractDocumentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: IndexContractDocuments, + }), +).annotate({ + identifier: "IndexContractDocumentsResponse", +}) as any as S.Schema; + +export type GetV1EmploymentsEmploymentIdCostCenterAllocationsRequestStatus = + | "active" + | "scheduled" + | "expired"; +export const GetV1EmploymentsEmploymentIdCostCenterAllocationsRequestStatus = + /*@__PURE__*/ S.String; + +export interface GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest { + /** Employment ID */ + employment_id: string; + /** Filters allocations by status. When omitted, allocations of every status are returned. */ + status?: + | GetV1EmploymentsEmploymentIdCostCenterAllocationsRequestStatus + | (string & {}); +} +export const GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + status: S.optional( + GetV1EmploymentsEmploymentIdCostCenterAllocationsRequestStatus.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/cost-center-allocations", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest", + }) as any as S.Schema; + +export type ListCostCenterAllocationsResponseDataCostCenterAllocationsList = + Array; +export const ListCostCenterAllocationsResponseDataCostCenterAllocationsList = + /*@__PURE__*/ S.Array( + CostCenterAllocation, + ) as any as S.Schema; + +export interface ListCostCenterAllocationsResponseData { + cost_center_allocations: ListCostCenterAllocationsResponseDataCostCenterAllocationsList; +} +export const ListCostCenterAllocationsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + cost_center_allocations: + ListCostCenterAllocationsResponseDataCostCenterAllocationsList, + }), +).annotate({ + identifier: "ListCostCenterAllocationsResponseData", +}) as any as S.Schema; + +/** Response listing the cost center allocations for an employment. */ +export interface ListCostCenterAllocationsResponse { + data: ListCostCenterAllocationsResponseData; +} +export const ListCostCenterAllocationsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListCostCenterAllocationsResponseData, + }), +).annotate({ + identifier: "ListCostCenterAllocationsResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdCustomFieldsRequest { + /** Employment ID */ + employment_id: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1EmploymentsEmploymentIdCustomFieldsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/custom-fields", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdCustomFieldsRequest", + }) as any as S.Schema; + +export type ListEmploymentCustomFieldValueResponseValue = + | string + | number + | boolean + | number + | EmploymentCustomFieldValueJsonValue; +export const ListEmploymentCustomFieldValueResponseValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** A custom field value as returned in list responses, including the field definition details alongside the value. */ +export interface 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: ListEmploymentCustomFieldValueResponseValue | null; +} +export const ListEmploymentCustomFieldValueResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + custom_field_id: S.String, + name: S.String, + type: S.String, + value: S.NullOr(ListEmploymentCustomFieldValueResponseValue), + }), +).annotate({ + identifier: "ListEmploymentCustomFieldValueResponse", +}) as any as S.Schema; + +export type ListEmploymentCustomFieldValuePaginatedResponseDataCustomFieldValuesList = + Array; +export const ListEmploymentCustomFieldValuePaginatedResponseDataCustomFieldValuesList = + /*@__PURE__*/ S.Array( + ListEmploymentCustomFieldValueResponse, + ) as any as S.Schema; + +export interface ListEmploymentCustomFieldValuePaginatedResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + custom_field_values?: ListEmploymentCustomFieldValuePaginatedResponseDataCustomFieldValuesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListEmploymentCustomFieldValuePaginatedResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + custom_field_values: S.optional( + ListEmploymentCustomFieldValuePaginatedResponseDataCustomFieldValuesList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), + ).annotate({ + identifier: "ListEmploymentCustomFieldValuePaginatedResponseData", + }) as any as S.Schema; + +/** Response schema listing many custom_field_values */ +export interface ListEmploymentCustomFieldValuePaginatedResponse { + data?: ListEmploymentCustomFieldValuePaginatedResponseData; +} +export const ListEmploymentCustomFieldValuePaginatedResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListEmploymentCustomFieldValuePaginatedResponseData), + }), + ).annotate({ + identifier: "ListEmploymentCustomFieldValuePaginatedResponse", + }) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/employment-agreement/download", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest", + }) as any as S.Schema; + +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse = + string; +export const GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse = + /*@__PURE__*/ S.suspend(() => S.String.pipe(T.RawResponseRoot())).annotate({ + identifier: + "GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse", + }) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/employment-agreement/preview", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest", + }) as any as S.Schema; + +export interface EmploymentAgreementPreviewResponseDataEmploymentAgreement { + content: string; + name: string; +} +export const EmploymentAgreementPreviewResponseDataEmploymentAgreement = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + }), + ).annotate({ + identifier: "EmploymentAgreementPreviewResponseDataEmploymentAgreement", + }) as any as S.Schema; + +export interface EmploymentAgreementPreviewResponseData { + employment_agreement: EmploymentAgreementPreviewResponseDataEmploymentAgreement; +} +export const EmploymentAgreementPreviewResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_agreement: + EmploymentAgreementPreviewResponseDataEmploymentAgreement, + }), +).annotate({ + identifier: "EmploymentAgreementPreviewResponseData", +}) as any as S.Schema; + +/** Return a base64 encoded Employment Agreement preview document */ +export interface EmploymentAgreementPreviewResponse { + data: EmploymentAgreementPreviewResponseData; +} +export const EmploymentAgreementPreviewResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentAgreementPreviewResponseData, + }), +).annotate({ + identifier: "EmploymentAgreementPreviewResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/engagement-agreement-details", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest", + }) as any as S.Schema; + +export type EmploymentEngagementAgreementDetailsResponseDataDetailsAllowancesDetailsList = + Array; +export const EmploymentEngagementAgreementDetailsResponseDataDetailsAllowancesDetailsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** A file attached to the engagement agreement details. */ +export interface EngagementAgreementDetailsFile { + /** ID of the file. Send it back when upserting to keep the file. */ + id: string; + /** The file name, including its extension. */ + name: string; +} +export const EngagementAgreementDetailsFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + name: S.String, + }), +).annotate({ + identifier: "EngagementAgreementDetailsFile", +}) as any as S.Schema; + +export type EmploymentEngagementAgreementDetailsResponseDataDetailsCbaDocumentList = + Array; +export const EmploymentEngagementAgreementDetailsResponseDataDetailsCbaDocumentList = + /*@__PURE__*/ S.Array( + EngagementAgreementDetailsFile, + ) as any as S.Schema; + +export type EmploymentEngagementAgreementDetailsResponseDataDetailsCovenantsList = + Array; +export const EmploymentEngagementAgreementDetailsResponseDataDetailsCovenantsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type EmploymentEngagementAgreementDetailsResponseDataDetailsWorkingDaysList = + Array; +export const EmploymentEngagementAgreementDetailsResponseDataDetailsWorkingDaysList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface EmploymentEngagementAgreementDetailsResponseDataDetails { + allowances_details?: EmploymentEngagementAgreementDetailsResponseDataDetailsAllowancesDetailsList | null; + available_pto?: number | null; + break_time_per_day?: number | null; + business_expenses?: string | null; + cba?: string | null; + cba_document?: EmploymentEngagementAgreementDetailsResponseDataDetailsCbaDocumentList | null; + covenants?: EmploymentEngagementAgreementDetailsResponseDataDetailsCovenantsList | null; + has_allowances?: string | null; + has_bonus?: string | null; + has_business_expenses?: string | null; + has_business_presence?: string; + has_cba?: string | null; + has_commissions?: string | null; + has_covenants?: string | null; + has_illness_remuneration?: string | null; + has_overtime_compensation?: string | null; + has_pension_scheme?: string | null; + has_signing_bonus?: string | null; + has_similar_roles?: string; + has_similar_work_conditions?: string | null; + illness_remuneration_details?: string | null; + max_annual_gross_salary?: number | null; + min_annual_gross_salary?: number | null; + overtime_compensation_begins?: number | null; + overtime_compensation_type?: string | null; + overtime_pay_percentage?: number | null; + pension_scheme?: string | null; + similar_roles?: string | null; + similar_work_conditions_details?: string | null; + work_hours_per_week?: number | null; + working_days?: EmploymentEngagementAgreementDetailsResponseDataDetailsWorkingDaysList | null; +} +export const EmploymentEngagementAgreementDetailsResponseDataDetails = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + allowances_details: S.optional( + S.NullOr( + EmploymentEngagementAgreementDetailsResponseDataDetailsAllowancesDetailsList, + ), + ), + available_pto: S.optional(S.NullOr(S.Number)), + break_time_per_day: S.optional(S.NullOr(S.Number)), + business_expenses: S.optional(S.NullOr(S.String)), + cba: S.optional(S.NullOr(S.String)), + cba_document: S.optional( + S.NullOr( + EmploymentEngagementAgreementDetailsResponseDataDetailsCbaDocumentList, + ), + ), + covenants: S.optional( + S.NullOr( + EmploymentEngagementAgreementDetailsResponseDataDetailsCovenantsList, + ), + ), + has_allowances: S.optional(S.NullOr(S.String)), + has_bonus: S.optional(S.NullOr(S.String)), + has_business_expenses: S.optional(S.NullOr(S.String)), + has_business_presence: S.optional(S.String), + has_cba: S.optional(S.NullOr(S.String)), + has_commissions: S.optional(S.NullOr(S.String)), + has_covenants: S.optional(S.NullOr(S.String)), + has_illness_remuneration: S.optional(S.NullOr(S.String)), + has_overtime_compensation: S.optional(S.NullOr(S.String)), + has_pension_scheme: S.optional(S.NullOr(S.String)), + has_signing_bonus: S.optional(S.NullOr(S.String)), + has_similar_roles: S.optional(S.String), + has_similar_work_conditions: S.optional(S.NullOr(S.String)), + illness_remuneration_details: S.optional(S.NullOr(S.String)), + max_annual_gross_salary: S.optional(S.NullOr(S.Number)), + min_annual_gross_salary: S.optional(S.NullOr(S.Number)), + overtime_compensation_begins: S.optional(S.NullOr(S.Number)), + overtime_compensation_type: S.optional(S.NullOr(S.String)), + overtime_pay_percentage: S.optional(S.NullOr(S.Number)), + pension_scheme: S.optional(S.NullOr(S.String)), + similar_roles: S.optional(S.NullOr(S.String)), + similar_work_conditions_details: S.optional(S.NullOr(S.String)), + work_hours_per_week: S.optional(S.NullOr(S.Number)), + working_days: S.optional( + S.NullOr( + EmploymentEngagementAgreementDetailsResponseDataDetailsWorkingDaysList, + ), + ), + }), + ).annotate({ + identifier: "EmploymentEngagementAgreementDetailsResponseDataDetails", + }) as any as S.Schema; + +export interface EmploymentEngagementAgreementDetailsResponseData { + details: EmploymentEngagementAgreementDetailsResponseDataDetails; + slug: string; +} +export const EmploymentEngagementAgreementDetailsResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: EmploymentEngagementAgreementDetailsResponseDataDetails, + slug: S.String, + }), + ).annotate({ + identifier: "EmploymentEngagementAgreementDetailsResponseData", + }) as any as S.Schema; + +export interface EmploymentEngagementAgreementDetailsResponse { + data: EmploymentEngagementAgreementDetailsResponseData; +} +export const EmploymentEngagementAgreementDetailsResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentEngagementAgreementDetailsResponseData, + }), + ).annotate({ + identifier: "EmploymentEngagementAgreementDetailsResponse", + }) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdFilesRequest { + /** Employment ID */ + employment_id: string; + /** 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; +} +export const GetV1EmploymentsEmploymentIdFilesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + type: S.optional(S.String.pipe(T.Query())), + sub_type: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/files", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmploymentsEmploymentIdFilesRequest", +}) as any as S.Schema; + +export type ListFilesResponseDataFilesList = Array; +export const ListFilesResponseDataFilesList = /*@__PURE__*/ S.Array( + File, +) as any as S.Schema; + +export interface ListFilesResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + files?: ListFilesResponseDataFilesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListFilesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + files: S.optional(ListFilesResponseDataFilesList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListFilesResponseData", +}) as any as S.Schema; + +/** Response schema listing many files */ +export interface ListFilesResponse { + data?: ListFilesResponseData; +} +export const ListFilesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListFilesResponseData), + }), +).annotate({ + identifier: "ListFilesResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdJobRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentsEmploymentIdJobRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/job", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1EmploymentsEmploymentIdJobRequest", +}) as any as S.Schema; + +/** A reference to a related job classification entity (job family, sub-family, career track, or job level). Null if not assigned. */ +export interface JobAssociation { + /** The unique identifier (UUID) of the associated entity. */ + id?: string; + /** The human-readable name of the associated entity. */ + label?: string; +} +export const JobAssociation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.String), + label: S.optional(S.String), + }), +).annotate({ identifier: "JobAssociation" }) as any as S.Schema; + +export interface JobCustomFieldValuesItemDefinition { + id?: string; + title?: string; + type?: string; +} +export const JobCustomFieldValuesItemDefinition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.String), + title: S.optional(S.String), + type: S.optional(S.String), + }), +).annotate({ + identifier: "JobCustomFieldValuesItemDefinition", +}) as any as S.Schema; + +export type JobCustomFieldValuesItemValue = string | number | boolean; +export const JobCustomFieldValuesItemValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface JobCustomFieldValuesItem { + definition?: JobCustomFieldValuesItemDefinition; + value?: JobCustomFieldValuesItemValue; +} +export const JobCustomFieldValuesItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + definition: S.optional(JobCustomFieldValuesItemDefinition), + value: S.optional(JobCustomFieldValuesItemValue), + }), +).annotate({ + identifier: "JobCustomFieldValuesItem", +}) as any as S.Schema; + +export type JobCustomFieldValuesList = Array; +export const JobCustomFieldValuesList = /*@__PURE__*/ S.Array( + JobCustomFieldValuesItem, +) as any as S.Schema; + +/** 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 interface Job { + career_track?: JobAssociation | null; + /** An optional company-defined code for this job (e.g., "JOB-0"). Null if not set. */ + code?: string | null; + custom_field_values?: JobCustomFieldValuesList; + /** 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 | null; + job_level?: JobAssociation | null; + job_sub_family?: JobAssociation | null; + /** The display name of the job (e.g., "Senior Backend Engineer"). */ + label: string; +} +export const Job = /*@__PURE__*/ S.suspend(() => + S.Struct({ + career_track: S.optional(S.NullOr(JobAssociation)), + code: S.optional(S.NullOr(S.String)), + custom_field_values: S.optional(JobCustomFieldValuesList), + description: S.optional(S.NullOr(S.String)), + id: S.String, + identifier: S.String, + job_family: S.optional(S.NullOr(JobAssociation)), + job_level: S.optional(S.NullOr(JobAssociation)), + job_sub_family: S.optional(S.NullOr(JobAssociation)), + label: S.String, + }), +).annotate({ identifier: "Job" }) as any as S.Schema; + +export interface EmploymentJobResponse { + data: Job; +} +export const EmploymentJobResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: Job, + }), +).annotate({ + identifier: "EmploymentJobResponse", +}) as any as S.Schema; + +export interface GetV1EmploymentsEmploymentIdOnboardingStepsRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1EmploymentsEmploymentIdOnboardingStepsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/employments/{employment_id}/onboarding-steps", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1EmploymentsEmploymentIdOnboardingStepsRequest", + }) as any as S.Schema; + +/** Step status */ +export type StepStatus = "not_started" | "in_progress" | "completed" | "failed"; +export const StepStatus = /*@__PURE__*/ S.String; + +/** Substep status */ +export type SubStepStatus = + | "not_started" + | "in_progress" + | "completed" + | "failed"; +export const SubStepStatus = /*@__PURE__*/ S.String; + +export interface SubStep { + completed_at?: string | null; + /** Unique identifier for this substep */ + id: string; + /** Human-readable substep name */ + label: string; + /** Whether this substep is optional */ + optional: boolean; + started_at?: string | null; + /** Substep status */ + status: SubStepStatus; + /** Optional UI tag */ + tag?: string | null; + /** Substep type identifier */ + type: string; +} +export const SubStep = /*@__PURE__*/ S.suspend(() => + S.Struct({ + completed_at: S.optional(S.NullOr(S.String)), + id: S.String, + label: S.String, + optional: S.Boolean, + started_at: S.optional(S.NullOr(S.String)), + status: SubStepStatus, + tag: S.optional(S.NullOr(S.String)), + type: S.String, + }), +).annotate({ identifier: "SubStep" }) as any as S.Schema; + +/** Ordered list of substeps for this step */ +export type StepSubStepsList = Array; +export const StepSubStepsList = /*@__PURE__*/ S.Array( + SubStep, +) as any as S.Schema; + +export interface Step { + completed_at?: string | null; + description?: string | null; + /** Unique identifier for this step instance */ + id: string; + /** Human-readable step name */ + label: string; + started_at?: string | null; + /** Step status */ + status: StepStatus; + /** Ordered list of substeps for this step */ + sub_steps: StepSubStepsList; + /** Step type identifier */ + type: string; +} +export const Step = /*@__PURE__*/ S.suspend(() => + S.Struct({ + completed_at: S.optional(S.NullOr(S.String)), + description: S.optional(S.NullOr(S.String)), + id: S.String, + label: S.String, + started_at: S.optional(S.NullOr(S.String)), + status: StepStatus, + sub_steps: StepSubStepsList, + type: S.String, + }), +).annotate({ identifier: "Step" }) as any as S.Schema; + +export type EmploymentOnboardingStepsResponseDataStepsList = Array; +export const EmploymentOnboardingStepsResponseDataStepsList = + /*@__PURE__*/ S.Array( + Step, + ) as any as S.Schema; + +export interface EmploymentOnboardingStepsResponseData { + steps: EmploymentOnboardingStepsResponseDataStepsList; +} +export const EmploymentOnboardingStepsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + steps: EmploymentOnboardingStepsResponseDataStepsList, + }), +).annotate({ + identifier: "EmploymentOnboardingStepsResponseData", +}) as any as S.Schema; + +export interface EmploymentOnboardingStepsResponse { + data: EmploymentOnboardingStepsResponseData; +} +export const EmploymentOnboardingStepsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentOnboardingStepsResponseData, + }), +).annotate({ + identifier: "EmploymentOnboardingStepsResponse", +}) as any as S.Schema; + +export interface GetV1ExpensesRequest { + /** 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; +} +export const GetV1ExpensesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/expenses", code: 200 })), +).annotate({ + identifier: "GetV1ExpensesRequest", +}) as any as S.Schema; + +/** Categories allowed for an expense (legacy, deprecated) */ +export type ExpenseCategory = + | "car_rental" + | "coworking_office" + | "education_training" + | "entertainment" + | "flight" + | "fuel" + | "gifts" + | "insurance" + | "lodging" + | "meals" + | "mileage" + | "other" + | "parking_toll" + | "per_diem" + | "subscription" + | "tech_equipment" + | "telecommunication" + | "transport" + | "utilities" + | "vaccination_testing" + | "visa" + | "wellness" + | "coworking" + | "home_office" + | "phone_utilities" + | "travel"; +export const ExpenseCategory = /*@__PURE__*/ S.String; + +/** New hierarchical expense category (recommended) */ +export interface ExpenseExpenseCategory { + /** Internal category code (e.g., 'travel.flights') */ + code?: string; + /** Unique identifier for the category */ + slug?: string; + /** Human-readable category name */ + title?: string; +} +export const ExpenseExpenseCategory = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.optional(S.String), + slug: S.optional(S.String), + title: S.optional(S.String), + }), +).annotate({ + identifier: "ExpenseExpenseCategory", +}) as any as S.Schema; + +/** Uploaded receipt files for this expense. Maximum 5 receipts. */ +export type ExpenseReceiptsList = Array; +export const ExpenseReceiptsList = /*@__PURE__*/ S.Array( + File, +) as any as S.Schema; + +/** The person who reviewed (approved or declined) this expense. Null if not yet reviewed. */ +export interface ExpenseReviewer { + /** 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; +} +export const ExpenseReviewer = /*@__PURE__*/ S.suspend(() => + S.Struct({ + user_email: S.optional(S.String), + user_id: S.optional(S.String), + user_name: S.optional(S.String), + }), +).annotate({ + identifier: "ExpenseReviewer", +}) as any as S.Schema; + +/** 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. */ +export type ExpenseStatus = + | "canceled" + | "pending" + | "declined" + | "approved" + | "processing" + | "reimbursed"; +export const ExpenseStatus = /*@__PURE__*/ S.String; + +/** A submitted expense record with complete data. All monetary amounts are integers in the currency's minor unit (cents). */ +export interface Expense { + /** The expense amount in the original currency, in cents. */ + amount: number; + /** Categories allowed for an expense (legacy, deprecated) */ + category?: ExpenseCategory | null; + /** 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) */ + expense_category?: ExpenseExpenseCategory | 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?: ExpenseReceiptsList; + /** 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?: ExpenseReviewer | null; + /** 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?: ExpenseStatus; + /** 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; +} +export const Expense = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + category: S.optional(S.NullOr(ExpenseCategory)), + converted_amount: S.Number, + converted_currency: CurrencyDefinition, + converted_tax_amount: S.Number, + currency: CurrencyDefinition, + employment_id: S.String, + expense_category: S.optional(S.NullOr(ExpenseExpenseCategory)), + expense_date: S.String, + id: S.String, + invoice_period: S.optional(S.NullOr(S.String)), + notes: S.optional(S.NullOr(S.String)), + reason: S.optional(S.NullOr(S.String)), + receipts: S.optional(ExpenseReceiptsList), + reviewed_at: S.optional(S.NullOr(S.String)), + reviewer: S.optional(S.NullOr(ExpenseReviewer)), + status: S.optional(ExpenseStatus), + tax_amount: S.Number, + title: S.String, + }), +).annotate({ identifier: "Expense" }) as any as S.Schema; + +/** Categories allowed for an expense (legacy, deprecated) */ +export type DraftExpenseCategory = + | "car_rental" + | "coworking_office" + | "education_training" + | "entertainment" + | "flight" + | "fuel" + | "gifts" + | "insurance" + | "lodging" + | "meals" + | "mileage" + | "other" + | "parking_toll" + | "per_diem" + | "subscription" + | "tech_equipment" + | "telecommunication" + | "transport" + | "utilities" + | "vaccination_testing" + | "visa" + | "wellness" + | "coworking" + | "home_office" + | "phone_utilities" + | "travel"; +export const DraftExpenseCategory = /*@__PURE__*/ S.String; + +/** New hierarchical expense category (recommended) */ +export type DraftExpenseExpenseCategory = ExpenseExpenseCategory; +export const DraftExpenseExpenseCategory = ExpenseExpenseCategory; + +/** Uploaded receipt files. May be empty for drafts. Maximum 5 receipts. */ +export type DraftExpenseReceiptsList = Array; +export const DraftExpenseReceiptsList = /*@__PURE__*/ S.Array( + File, +) as any as S.Schema; + +/** Not applicable for draft expenses. Always null. */ +export type DraftExpenseReviewer = ExpenseReviewer; +export const DraftExpenseReviewer = ExpenseReviewer; + +/** 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. */ +export type DraftExpenseStatus = "draft" | "archived"; +export const DraftExpenseStatus = /*@__PURE__*/ S.String; + +/** 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 interface 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) */ + category?: DraftExpenseCategory | null; + /** 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) */ + expense_category?: ExpenseExpenseCategory | 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?: DraftExpenseReceiptsList; + /** Not applicable for draft expenses. Always null. */ + reviewed_at?: string | null; + /** Not applicable for draft expenses. Always null. */ + reviewer?: ExpenseReviewer | null; + /** 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?: DraftExpenseStatus; + /** 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; +} +export const DraftExpense = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.NullOr(S.Number), + category: S.optional(S.NullOr(DraftExpenseCategory)), + converted_amount: S.NullOr(S.Number), + converted_currency: S.NullOr(CurrencyDefinition), + converted_tax_amount: S.NullOr(S.Number), + currency: S.NullOr(CurrencyDefinition), + employment_id: S.String, + expense_category: S.optional(S.NullOr(ExpenseExpenseCategory)), + expense_date: S.NullOr(S.String), + id: S.String, + invoice_period: S.optional(S.NullOr(S.String)), + notes: S.optional(S.NullOr(S.String)), + reason: S.optional(S.NullOr(S.String)), + receipts: S.optional(DraftExpenseReceiptsList), + reviewed_at: S.optional(S.NullOr(S.String)), + reviewer: S.optional(S.NullOr(ExpenseReviewer)), + status: S.optional(DraftExpenseStatus), + tax_amount: S.NullOr(S.Number), + title: S.NullOr(S.String), + }), +).annotate({ identifier: "DraftExpense" }) as any as S.Schema; + +/** An expense or a draft object, depending on the status. Drafts (status `draft` or `archived`) may have incomplete(null) data. The expense status `draft` occurs when users want to save expenses but don't want them to be considered for approval just yet. Only expenses in `pending` status can be approved or declined. It is possible to update a pending expense to status draft, or vice versa. There are no flows that change the status of an expense to `draft` automatically. This is purely a manual action by the employee. */ +export type ExpenseOrDraft = Expense | DraftExpense; +export const ExpenseOrDraft = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type ListExpenseResponseDataExpensesList = Array; +export const ListExpenseResponseDataExpensesList = /*@__PURE__*/ S.Array( + ExpenseOrDraft, +) as any as S.Schema; + +export interface ListExpenseResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + expenses?: ListExpenseResponseDataExpensesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListExpenseResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + expenses: S.optional(ListExpenseResponseDataExpensesList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListExpenseResponseData", +}) as any as S.Schema; + +/** Response schema listing many expenses */ +export interface ListExpenseResponse { + data?: ListExpenseResponseData; +} +export const ListExpenseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListExpenseResponseData), + }), +).annotate({ + identifier: "ListExpenseResponse", +}) as any as S.Schema; + +export interface GetV1ExpensesCategoriesRequest { + /** The employment ID for which to list categories. Required if neither expense_id nor country_code is 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; + /** Include un-selectable intermediate categories in the response */ + include_parents?: boolean; + /** Filter categories by country (ISO 3166-1 alpha-3 code, e.g. "GBR"). Only used when neither employment_id nor expense_id is provided. */ + country_code?: string; +} +export const GetV1ExpensesCategoriesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + expense_id: S.optional(S.String.pipe(T.Query())), + include_parents: S.optional(S.Boolean.pipe(T.Query())), + country_code: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/expenses/categories", code: 200 })), +).annotate({ + identifier: "GetV1ExpensesCategoriesRequest", +}) as any as S.Schema; + +export interface GetV1ExpensesExpenseIdReceiptsReceiptIdRequest { + /** The expense ID */ + expense_id: string; + /** The receipt ID */ + receipt_id: string; +} +export const GetV1ExpensesExpenseIdReceiptsReceiptIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + expense_id: S.String.pipe(T.Label()), + receipt_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/expenses/{expense_id}/receipts/{receipt_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1ExpensesExpenseIdReceiptsReceiptIdRequest", + }) as any as S.Schema; + +export interface GetV1ExpensesExpenseIdReceiptsReceiptIdResponse {} +export const GetV1ExpensesExpenseIdReceiptsReceiptIdResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetV1ExpensesExpenseIdReceiptsReceiptIdResponse", + }) as any as S.Schema; + +export interface GetV1ExpensesIdRequest { + /** Expense ID */ + id: string; +} +export const GetV1ExpensesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/expenses/{id}", code: 200 })), +).annotate({ + identifier: "GetV1ExpensesIdRequest", +}) as any as S.Schema; + +export interface ExpenseResponseData { + expense: ExpenseOrDraft; +} +export const ExpenseResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + expense: ExpenseOrDraft, + }), +).annotate({ + identifier: "ExpenseResponseData", +}) as any as S.Schema; + +/** Response containing a single expense record. */ +export interface ExpenseResponse { + data: ExpenseResponseData; +} +export const ExpenseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ExpenseResponseData, + }), +).annotate({ + identifier: "ExpenseResponse", +}) as any as S.Schema; + +export interface GetV1FilesIdRequest { + /** File ID */ + id: string; +} +export const GetV1FilesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/files/{id}", code: 200 })), +).annotate({ + identifier: "GetV1FilesIdRequest", +}) as any as S.Schema; + +export interface DownloadFileResponseDataFile { + content: string; + id: string; + inserted_at: string; + name: string; + sub_type?: string | null; + type: string; +} +export const DownloadFileResponseDataFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + id: S.String, + inserted_at: S.String, + name: S.String, + sub_type: S.optional(S.NullOr(S.String)), + type: S.String, + }), +).annotate({ + identifier: "DownloadFileResponseDataFile", +}) as any as S.Schema; + +export interface DownloadFileResponseData { + file: DownloadFileResponseDataFile; +} +export const DownloadFileResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + file: DownloadFileResponseDataFile, + }), +).annotate({ + identifier: "DownloadFileResponseData", +}) as any as S.Schema; + +/** Response containing the file's metadata and its base64-encoded content for download. */ +export interface DownloadFileResponse { + data: DownloadFileResponseData; +} +export const DownloadFileResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: DownloadFileResponseData, + }), +).annotate({ + identifier: "DownloadFileResponse", +}) as any as S.Schema; + +export interface GetV1HelpCenterArticlesIdRequest { + /** Help Center Article Zendesk ID */ + id: number; +} +export const GetV1HelpCenterArticlesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/help-center-articles/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1HelpCenterArticlesIdRequest", +}) as any as S.Schema; + +/** Help Center Article */ +export interface HelpCenterArticle { + /** Body of the article */ + body: string; + /** HTML URL of the article */ + html_url: string; + /** Title of the article */ + title: string; + /** Zendesk ID of the article */ + zendesk_id: number; +} +export const HelpCenterArticle = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.String, + html_url: S.String, + title: S.String, + zendesk_id: S.Number, + }), +).annotate({ + identifier: "HelpCenterArticle", +}) as any as S.Schema; + +export interface HelpCenterArticleResponseData { + help_center_article: HelpCenterArticle; +} +export const HelpCenterArticleResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + help_center_article: HelpCenterArticle, + }), +).annotate({ + identifier: "HelpCenterArticleResponseData", +}) as any as S.Schema; + +/** Help Center Article Response */ +export interface HelpCenterArticleResponse { + data: HelpCenterArticleResponseData; +} +export const HelpCenterArticleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: HelpCenterArticleResponseData, + }), +).annotate({ + identifier: "HelpCenterArticleResponse", +}) as any as S.Schema; + +export interface GetV1IdentityCurrentRequest {} +export const GetV1IdentityCurrentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/identity/current", code: 200 }), + ), +).annotate({ + identifier: "GetV1IdentityCurrentRequest", +}) as any as S.Schema; + +/** Details about the integration partner associated with the current authentication token. */ +export interface 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; +} +export const IdentityIntegration = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contact_email: S.String, + display_name: S.String, + name: S.String, + }), +).annotate({ + identifier: "IdentityIntegration", +}) as any as S.Schema; + +export interface IdentityClientCredentialsResponseData { + /** The OAuth2 client ID used to obtain this token. */ + client_id: string; + integration: IdentityIntegration; +} +export const IdentityClientCredentialsResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + client_id: S.String, + integration: IdentityIntegration, + }), +).annotate({ + identifier: "IdentityClientCredentialsResponseData", +}) as any as S.Schema; + +/** 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 interface IdentityClientCredentialsResponse { + data: IdentityClientCredentialsResponseData; +} +export const IdentityClientCredentialsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: IdentityClientCredentialsResponseData, + }), +).annotate({ + identifier: "IdentityClientCredentialsResponse", +}) as any as S.Schema; + +/** The company that the current authentication token is scoped to. Only present when using a company-scoped access token or customer API token. */ +export interface 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; +} +export const IdentityCompany = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + name: S.String, + }), +).annotate({ + identifier: "IdentityCompany", +}) as any as S.Schema; + +/** The user (company manager) associated with the current authentication token. Represents the person who authorized access to the company's data. */ +export interface 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; +} +export const IdentityUser = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.String, + id: S.String, + name: S.String, + status: S.String, + }), +).annotate({ identifier: "IdentityUser" }) as any as S.Schema; + +export interface IdentityCompanyAccessTokenResponseData { + /** The OAuth2 client ID of the integration partner that obtained this token. */ + client_id: string; + company: IdentityCompany; + integration: IdentityIntegration; + user: IdentityUser; +} +export const IdentityCompanyAccessTokenResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + client_id: S.String, + company: IdentityCompany, + integration: IdentityIntegration, + user: IdentityUser, + }), +).annotate({ + identifier: "IdentityCompanyAccessTokenResponseData", +}) as any as S.Schema; + +/** 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 interface IdentityCompanyAccessTokenResponse { + data: IdentityCompanyAccessTokenResponseData; +} +export const IdentityCompanyAccessTokenResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: IdentityCompanyAccessTokenResponseData, + }), +).annotate({ + identifier: "IdentityCompanyAccessTokenResponse", +}) as any as S.Schema; + +export interface IdentityCustomerAccessTokenResponseData { + company: IdentityCompany; + user: IdentityUser; +} +export const IdentityCustomerAccessTokenResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + company: IdentityCompany, + user: IdentityUser, + }), +).annotate({ + identifier: "IdentityCustomerAccessTokenResponseData", +}) as any as S.Schema; + +/** 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 interface IdentityCustomerAccessTokenResponse { + data: IdentityCustomerAccessTokenResponseData; +} +export const IdentityCustomerAccessTokenResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: IdentityCustomerAccessTokenResponseData, + }), +).annotate({ + identifier: "IdentityCustomerAccessTokenResponse", +}) as any as S.Schema; + +/** 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 + | IdentityCompanyAccessTokenResponse + | IdentityCustomerAccessTokenResponse; +export const IdentityCurrentResponse = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetV1IdentityCurrentResponse = IdentityCurrentResponse; +export const GetV1IdentityCurrentResponse = /*@__PURE__*/ S.suspend(() => + IdentityCurrentResponse.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetV1IdentityCurrentResponse", +}) as any as S.Schema; + +export interface GetV1IdentityVerificationEmploymentIdRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1IdentityVerificationEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/identity-verification/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1IdentityVerificationEmploymentIdRequest", + }) as any as S.Schema; + +/** A file associated with an employment, such as a contract, tax form, or identity document. */ +export type EmploymentDocument = File; +export const EmploymentDocument = File; + +/** A file associated with an employment, such as a contract, tax form, or identity document. */ +export type EmploymentImage = File; +export const EmploymentImage = File; + +/** Identity Verification */ +export interface IdentityVerification { + contract_id: string; + employment_document: File | null; + employment_image: File | null; + status: string; +} +export const IdentityVerification = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_id: S.String, + employment_document: S.NullOr(File), + employment_image: S.NullOr(File), + status: S.String, + }), +).annotate({ + identifier: "IdentityVerification", +}) as any as S.Schema; + +export interface IdentityVerificationResponseData { + identity_verification_data?: IdentityVerification; +} +export const IdentityVerificationResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity_verification_data: S.optional(IdentityVerification), + }), +).annotate({ + identifier: "IdentityVerificationResponseData", +}) as any as S.Schema; + +/** Identity Verification response */ +export interface IdentityVerificationResponse { + data: IdentityVerificationResponseData; +} +export const IdentityVerificationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: IdentityVerificationResponseData, + }), +).annotate({ + identifier: "IdentityVerificationResponse", +}) as any as S.Schema; + +export interface GetV1IncentivesRequest { + /** Filter by Employment ID */ + employment_id?: string; + /** Filter by Incentive status */ + status?: string; + /** Filter by Recurring Incentive id */ + recurring_incentive_id?: string; + /** Filter by Incentive type. Defaults to all self-serve incentive types (the types creatable through this API) when omitted. Pass this explicitly (e.g. `severance`) to also retrieve types that are entered outside of self-serve, such as severance. Pass `all` to retrieve every incentive type, including those types. */ + type?: 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; +} +export const GetV1IncentivesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + status: S.optional(S.String.pipe(T.Query())), + recurring_incentive_id: S.optional(S.String.pipe(T.Query())), + type: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/incentives", code: 200 })), +).annotate({ + identifier: "GetV1IncentivesRequest", +}) as any as S.Schema; + +export type ListIncentivesResponseDataIncentivesList = Array; +export const ListIncentivesResponseDataIncentivesList = /*@__PURE__*/ S.Array( + Incentive, +) as any as S.Schema; + +export interface ListIncentivesResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + incentives?: ListIncentivesResponseDataIncentivesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListIncentivesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + incentives: S.optional(ListIncentivesResponseDataIncentivesList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListIncentivesResponseData", +}) as any as S.Schema; + +/** Response schema listing many incentives */ +export interface ListIncentivesResponse { + data?: ListIncentivesResponseData; +} +export const ListIncentivesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListIncentivesResponseData), + }), +).annotate({ + identifier: "ListIncentivesResponse", +}) as any as S.Schema; + +export interface GetV1IncentivesIdRequest { + /** Incentive ID */ + id: string; +} +export const GetV1IncentivesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/incentives/{id}", code: 200 })), +).annotate({ + identifier: "GetV1IncentivesIdRequest", +}) as any as S.Schema; + +export interface IncentiveResponseData { + incentive: Incentive; +} +export const IncentiveResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + incentive: Incentive, + }), +).annotate({ + identifier: "IncentiveResponseData", +}) as any as S.Schema; + +/** Response containing a single incentive record. */ +export interface IncentiveResponse { + data?: IncentiveResponseData; +} +export const IncentiveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(IncentiveResponseData), + }), +).annotate({ + identifier: "IncentiveResponse", +}) as any as S.Schema; + +export interface GetV1IncentivesRecurringRequest { + /** 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; +} +export const GetV1IncentivesRecurringRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(S.String.pipe(T.Query())), + type: S.optional(S.String.pipe(T.Query())), + note: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/incentives/recurring", code: 200 }), + ), +).annotate({ + identifier: "GetV1IncentivesRecurringRequest", +}) as any as S.Schema; + +/** Whether this recurring incentive is currently active and generating payments, or inactive (paused/ended). */ +export type RecurringIncentiveStatus = "active" | "inactive"; +export const RecurringIncentiveStatus = /*@__PURE__*/ S.String; + +/** The type of recurring incentive (e.g., "meal_allowance", "housing_allowance"). */ +export type RecurringIncentiveType = + | "acting_up_allowance" + | "allowance" + | "car_allowance" + | "health_and_wellness_allowance" + | "internet_allowance" + | "meal_allowance" + | "on_call_allowance" + | "parenthood_allowance" + | "phone_allowance" + | "relocation_allowance" + | "travel_allowance" + | "work_from_home_allowance" + | "bonus" + | "holiday_bonus" + | "referral_bonus" + | "retention_bonus" + | "commission" + | "other" + | "overtime" + | "stipend"; +export const RecurringIncentiveType = /*@__PURE__*/ S.String; + +/** A recurring incentive (e.g., monthly meal allowance, housing stipend) that automatically generates individual incentive payments on a monthly schedule. */ +export interface 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: RecurringIncentiveStatus; + /** The type of recurring incentive (e.g., "meal_allowance", "housing_allowance"). */ + type: RecurringIncentiveType; +} +export const RecurringIncentive = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + amount_tax_type: AmountTaxType, + employment_id: S.String, + end_date: S.optional(S.NullOr(S.String)), + id: S.String, + note: S.optional(S.NullOr(S.String)), + start_date: S.String, + status: RecurringIncentiveStatus, + type: RecurringIncentiveType, + }), +).annotate({ + identifier: "RecurringIncentive", +}) as any as S.Schema; + +export type ListRecurringIncentivesResponseDataRecurringIncentivesList = + Array; +export const ListRecurringIncentivesResponseDataRecurringIncentivesList = + /*@__PURE__*/ S.Array( + RecurringIncentive, + ) as any as S.Schema; + +export interface ListRecurringIncentivesResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + recurring_incentives?: ListRecurringIncentivesResponseDataRecurringIncentivesList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListRecurringIncentivesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + recurring_incentives: S.optional( + ListRecurringIncentivesResponseDataRecurringIncentivesList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListRecurringIncentivesResponseData", +}) as any as S.Schema; + +/** Response schema listing many recurring_incentives */ +export interface ListRecurringIncentivesResponse { + data?: ListRecurringIncentivesResponseData; +} +export const ListRecurringIncentivesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListRecurringIncentivesResponseData), + }), +).annotate({ + identifier: "ListRecurringIncentivesResponse", +}) as any as S.Schema; + +export interface GetV1LeavePoliciesDetailsEmploymentIdRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1LeavePoliciesDetailsEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/leave-policies/details/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1LeavePoliciesDetailsEmploymentIdRequest", + }) as any as S.Schema; + +export interface GetV1LeavePoliciesSummaryEmploymentIdRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1LeavePoliciesSummaryEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/leave-policies/summary/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1LeavePoliciesSummaryEmploymentIdRequest", + }) as any as S.Schema; + +export interface GetV1OffboardingsRequest { + /** 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; +} +export const GetV1OffboardingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + type: S.optional(S.String.pipe(T.Query())), + include_confidential: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/offboardings", code: 200 })), +).annotate({ + identifier: "GetV1OffboardingsRequest", +}) as any as S.Schema; + +/** The reason the employee gave for their resignation. */ +export type ResignationOffboardingResignationReason = + | "cancellation_before_start_date" + | "company_culture_or_values" + | "conversion_to_contractor" + | "conversion_to_global_payroll" + | "conversion_to_peo" + | "dissatisfaction_with_remote_service" + | "incapacity_to_perform_inherent_duties" + | "infrastructure_challenges" + | "lack_of_recognition" + | "leadership" + | "mutual_agreement" + | "other" + | "other_job_opportunity" + | "personal_reasons" + | "position_does_not_meet_expectations" + | "relationship_with_coworkers" + | "relocation_from_entity_to_entity_by_employee" + | "relocation_leaving_remote" + | "remuneration_and_benefits" + | "retirement" + | "transfer_and_relocation_new_customer_and_new_country" + | "transfer_between_remote_customer" + | "transfer_from_remote_to_customer" + | "transfer_from_remote_to_other_eor"; +export const ResignationOffboardingResignationReason = /*@__PURE__*/ S.String; + +/** 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. */ +export type ResignationOffboardingStatus = + | "submitted" + | "in_review" + | "done" + | "canceled"; +export const ResignationOffboardingStatus = /*@__PURE__*/ S.String; + +/** The type of offboarding. Always `"resignation"` for employee-initiated resignations. */ +export type ResignationOffboardingType = "resignation"; +export const ResignationOffboardingType = /*@__PURE__*/ S.String; + +/** 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 interface 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 unique identifier (UUID) of the offboarding record. When present, this can be used to query `GET /api/eor/v2/offboardings/{id}` for the v2 offboarding shape. */ + offboarding_id?: string | null; + /** 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: ResignationOffboardingResignationReason; + /** 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: ResignationOffboardingStatus; + /** 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: ResignationOffboardingType; +} +export const ResignationOffboarding = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_comments: S.optional(S.NullOr(S.String)), + agrees_to_pto_amount: S.optional(S.Boolean), + employer_awareness: S.optional(S.String), + employment_id: S.String, + id: S.String, + offboarding_id: S.optional(S.NullOr(S.String)), + proposed_last_working_day: S.String, + reason_description: S.optional(S.String), + requested_by: S.String, + resignation_reason: ResignationOffboardingResignationReason, + status: ResignationOffboardingStatus, + submitted_at: S.String, + termination_date: S.NullOr(S.String), + type: ResignationOffboardingType, + }), +).annotate({ + identifier: "ResignationOffboarding", +}) as any as S.Schema; + +/** 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. */ +export interface TerminationOffboardingEmployeeAwareness { + /** 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; +} +export const TerminationOffboardingEmployeeAwareness = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + date: S.optional(S.NullOr(S.String)), + note: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "TerminationOffboardingEmployeeAwareness", +}) as any as S.Schema; + +export type TerminationOffboardingRiskAssessmentReasonsItem = + | "caring_responsibilities" + | "disabled_or_health_condition" + | "family_leave" + | "member_of_union_or_works_council" + | "none_of_these" + | "pregnant_or_breastfeeding" + | "reported_concerns_with_workplace" + | "requested_medical_or_family_leave" + | "sick_leave"; +export const TerminationOffboardingRiskAssessmentReasonsItem = + /*@__PURE__*/ S.String; + +/** Reasons that may increase the legal risk of this termination (e.g., the employee is pregnant, on family leave, etc.). */ +export type TerminationOffboardingRiskAssessmentReasonsList = + Array; +export const TerminationOffboardingRiskAssessmentReasonsList = + /*@__PURE__*/ S.Array( + TerminationOffboardingRiskAssessmentReasonsItem, + ) as any as S.Schema; + +/** 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. */ +export type TerminationOffboardingStatus = + | "submitted" + | "in_review" + | "done" + | "canceled"; +export const TerminationOffboardingStatus = /*@__PURE__*/ S.String; + +/** The reason for the termination, as submitted by the employer. */ +export type TerminationOffboardingTerminationReason = + | "cancellation_before_start_date" + | "compliance_issue" + | "conversion_to_contractor" + | "dissatisfaction_with_remote_service" + | "end_of_fixed_term_contract_compliance_issue" + | "end_of_fixed_term_contract_incapacity_to_perform_inherent_duties" + | "end_of_fixed_term_contract_local_regulations_max_term_reached" + | "end_of_fixed_term_contract_misconduct" + | "end_of_fixed_term_contract_operational_reasons" + | "end_of_fixed_term_contract_other" + | "end_of_fixed_term_contract_performance" + | "end_of_fixed_term_contract_redundancy" + | "end_of_fixed_term_contract_values" + | "gross_misconduct" + | "incapacity_to_perform_inherent_duties" + | "job_abandonment" + | "mutual_agreement" + | "other" + | "performance" + | "values" + | "workforce_reduction"; +export const TerminationOffboardingTerminationReason = /*@__PURE__*/ S.String; + +/** The type of offboarding. Always `"termination"` for employer-initiated terminations. */ +export type TerminationOffboardingType = "termination"; +export const TerminationOffboardingType = /*@__PURE__*/ S.String; + +/** 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 interface 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?: TerminationOffboardingEmployeeAwareness; + /** The unique identifier (UUID) of the employment being terminated. */ + employment_id: string; + /** The unique identifier (UUID) of the offboarding request. */ + id: string; + /** The unique identifier (UUID) of the offboarding record. When present, this can be used to query `GET /api/eor/v2/offboardings/{id}` for the v2 offboarding shape. */ + offboarding_id?: string | null; + /** Remote will use this email address for post-termination communication. If it is not provided, this field will be derived from the employment record. Therefore, it is important to ensure that it is not a company email. */ + 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: TerminationOffboardingRiskAssessmentReasonsList; + /** 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: TerminationOffboardingStatus; + /** 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: TerminationOffboardingTerminationReason; + /** The type of offboarding. Always `"termination"` for employer-initiated terminations. */ + type: TerminationOffboardingType; + /** 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; +} +export const TerminationOffboarding = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_comments: S.NullOr(S.String), + agrees_to_pto_amount: S.optional(S.Boolean), + confidential: S.Boolean, + employee_awareness: S.optional(TerminationOffboardingEmployeeAwareness), + employment_id: S.String, + id: S.String, + offboarding_id: S.optional(S.NullOr(S.String)), + personal_email: S.optional(S.String), + proposed_termination_date: S.String, + reason_description: S.String, + requested_by: S.String, + risk_assessment_reasons: TerminationOffboardingRiskAssessmentReasonsList, + status: TerminationOffboardingStatus, + submitted_at: S.String, + termination_date: S.NullOr(S.String), + termination_reason: TerminationOffboardingTerminationReason, + type: TerminationOffboardingType, + will_challenge_termination: S.Boolean, + will_challenge_termination_description: S.optional(S.String), + }), +).annotate({ + identifier: "TerminationOffboarding", +}) as any as S.Schema; + +export type ResignationOrTerminationOffboarding = + | ResignationOffboarding + | TerminationOffboarding; +export const ResignationOrTerminationOffboarding = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type ListOffboardingResponseDataOffboardingsList = + Array; +export const ListOffboardingResponseDataOffboardingsList = + /*@__PURE__*/ S.Array( + ResignationOrTerminationOffboarding, + ) as any as S.Schema; + +export interface ListOffboardingResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + offboardings?: ListOffboardingResponseDataOffboardingsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListOffboardingResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + offboardings: S.optional(ListOffboardingResponseDataOffboardingsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListOffboardingResponseData", +}) as any as S.Schema; + +/** Response schema listing many offboardings */ +export interface ListOffboardingResponse { + data?: ListOffboardingResponseData; +} +export const ListOffboardingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListOffboardingResponseData), + }), +).annotate({ + identifier: "ListOffboardingResponse", +}) as any as S.Schema; + +export interface GetV1OffboardingsEmploymentsEmploymentIdRequest { + /** Employment ID */ + employment_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; +} +export const GetV1OffboardingsEmploymentsEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/offboardings/employments/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1OffboardingsEmploymentsEmploymentIdRequest", + }) as any as S.Schema; + +export interface GetV1OffboardingsIdRequest { + /** Offboarding request ID */ + id: string; +} +export const GetV1OffboardingsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/offboardings/{id}", code: 200 })), +).annotate({ + identifier: "GetV1OffboardingsIdRequest", +}) as any as S.Schema; + +/** A wrapper containing an offboarding record, which can be either a termination (employer-initiated) or a resignation (employee-initiated). */ +export interface Offboarding { + offboarding?: ResignationOrTerminationOffboarding; +} +export const Offboarding = /*@__PURE__*/ S.suspend(() => + S.Struct({ + offboarding: S.optional(ResignationOrTerminationOffboarding), + }), +).annotate({ identifier: "Offboarding" }) as any as S.Schema; + +/** Response containing a single offboarding record with full details. */ +export interface OffboardingResponse { + data?: Offboarding; +} +export const OffboardingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(Offboarding), + }), +).annotate({ + identifier: "OffboardingResponse", +}) as any as S.Schema; + +export interface GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest { + /** Employment ID */ + employment_id: string; + /** Pre-onboarding document ID */ + id: string; +} +export const GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest", + }) as any as S.Schema; + +/** Parties that must sign or have signed the document. */ +export type ShowPreOnboardingDocumentResponseDataPreOnboardingDocumentSignatoriesList = + Array; +export const ShowPreOnboardingDocumentResponseDataPreOnboardingDocumentSignatoriesList = + /*@__PURE__*/ S.Array( + Signatory, + ) as any as S.Schema; + +export interface ShowPreOnboardingDocumentResponseDataPreOnboardingDocument { + /** Base64-encoded PDF, prefixed with `data:application/pdf;base64,`. */ + content: string; + /** File name of the rendered document. */ + name: string; + /** Parties that must sign or have signed the document. */ + signatories: ShowPreOnboardingDocumentResponseDataPreOnboardingDocumentSignatoriesList; + status: ContractorContractDocumentStatus; +} +export const ShowPreOnboardingDocumentResponseDataPreOnboardingDocument = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + signatories: + ShowPreOnboardingDocumentResponseDataPreOnboardingDocumentSignatoriesList, + status: ContractorContractDocumentStatus, + }), + ).annotate({ + identifier: "ShowPreOnboardingDocumentResponseDataPreOnboardingDocument", + }) as any as S.Schema; + +export interface ShowPreOnboardingDocumentResponseData { + pre_onboarding_document: ShowPreOnboardingDocumentResponseDataPreOnboardingDocument; +} +export const ShowPreOnboardingDocumentResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + pre_onboarding_document: + ShowPreOnboardingDocumentResponseDataPreOnboardingDocument, + }), +).annotate({ + identifier: "ShowPreOnboardingDocumentResponseData", +}) as any as S.Schema; + +/** Returns the rendered contract PDF (base64) and signatories for a pre-onboarding document. */ +export interface ShowPreOnboardingDocumentResponse { + data: ShowPreOnboardingDocumentResponseData; +} +export const ShowPreOnboardingDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ShowPreOnboardingDocumentResponseData, + }), +).annotate({ + identifier: "ShowPreOnboardingDocumentResponse", +}) as any as S.Schema; + +export interface GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest", + }) as any as S.Schema; + +/** Current status of this requirement for the given employment. */ +export type PreOnboardingRequirementStatus = + | "blocked" + | "awaiting" + | "finished" + | "revised"; +export const PreOnboardingRequirementStatus = /*@__PURE__*/ S.String; + +/** The requirement type. */ +export type PreOnboardingRequirementType = "document" | "acknowledgement"; +export const PreOnboardingRequirementType = /*@__PURE__*/ S.String; + +/** A pre-onboarding requirement (document or acknowledgement) that must be fulfilled before an employee can be onboarded. */ +export interface PreOnboardingRequirement { + /** The requirement that must be fulfilled before this one becomes available (if any). */ + depends_on_requirement: PreOnboardingRequirement | null; + /** Human-readable description; rich HTML for acknowledgement requirements. */ + description: string; + /** Whether the employment data is frozen because this requirement is finished. */ + freeze_employment_data: boolean | null; + /** Human-readable name of the requirement. */ + name: string; + /** Email address to contact for help with redlining (document requirements only). */ + redlining_help_email: string | null; + slug: string; + /** Current status of this requirement for the given employment. */ + status: PreOnboardingRequirementStatus | null; + /** Whether the requirement supports redlining (document requirements only). */ + supports_redlining: boolean | null; + /** The requirement type. */ + type: PreOnboardingRequirementType; +} +export const PreOnboardingRequirement = /*@__PURE__*/ S.suspend(() => + S.Struct({ + depends_on_requirement: S.NullOr(PreOnboardingRequirement), + description: S.String, + freeze_employment_data: S.NullOr(S.Boolean), + name: S.String, + redlining_help_email: S.NullOr(S.String), + slug: S.String, + status: S.NullOr(PreOnboardingRequirementStatus), + supports_redlining: S.NullOr(S.Boolean), + type: PreOnboardingRequirementType, + }), +).annotate({ + identifier: "PreOnboardingRequirement", +}) as any as S.Schema; + +export type IndexPreOnboardingRequirementsResponseDataList = + Array; +export const IndexPreOnboardingRequirementsResponseDataList = + /*@__PURE__*/ S.Array( + PreOnboardingRequirement, + ) as any as S.Schema; + +/** List of pre-onboarding requirements for an employment. */ +export interface IndexPreOnboardingRequirementsResponse { + data: IndexPreOnboardingRequirementsResponseDataList; +} +export const IndexPreOnboardingRequirementsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: IndexPreOnboardingRequirementsResponseDataList, + }), +).annotate({ + identifier: "IndexPreOnboardingRequirementsResponse", +}) as any as S.Schema; + +export interface GetV1PayItemsRequest { + /** Filter by employment slug */ + employment_slug?: string; + /** Filter pay items with effective_date >= given date (YYYY-MM-DD) */ + effective_from?: string; + /** Filter pay items with effective_date <= given date (YYYY-MM-DD) */ + effective_to?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1PayItemsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_slug: S.optional(S.String.pipe(T.Query())), + effective_from: S.optional(S.String.pipe(T.Query())), + effective_to: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/pay-items", code: 200 })), +).annotate({ + identifier: "GetV1PayItemsRequest", +}) as any as S.Schema; + +export interface PayItemProviderData { + /** Correction date for a previously submitted day (YYYY-MM-DD) */ + adjustment_effective_date?: string; + /** Hourly rate in cents */ + hourly_rate?: number; + hourly_rate_currency_code?: string | null; + /** Whether payout_amount should be considered a deduction */ + is_deduction?: boolean; + /** Overtime rate multiplier (e.g. 1.5) */ + pay_rate?: number; + /** Associated payout or deduction in cents */ + payout_amount?: number; + payout_currency_code?: string | null; + /** Shift identifier from partner system */ + shift_code?: string; + /** Expected work day duration in seconds */ + work_day_duration?: number; +} +export const PayItemProviderData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + adjustment_effective_date: S.optional(S.String), + hourly_rate: S.optional(S.Number), + hourly_rate_currency_code: S.optional(S.NullOr(S.String)), + is_deduction: S.optional(S.Boolean), + pay_rate: S.optional(S.Number), + payout_amount: S.optional(S.Number), + payout_currency_code: S.optional(S.NullOr(S.String)), + shift_code: S.optional(S.String), + work_day_duration: S.optional(S.Number), + }), +).annotate({ + identifier: "PayItemProviderData", +}) as any as S.Schema; + +/** Ids of pay items this one has replaced, oldest first. Empty if this pay item has never been edited. */ +export type PayItemReplacedIdsList = Array; +export const PayItemReplacedIdsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PayItem { + /** Value of the pay item. Its unit depends on the `type` of the pay code (see GET /v1/companies/:company_id/legal-entities/:legal_entity_id/pay-codes): `amount` in cents, `percentage` in basis points, `unit` as a raw count, `hours` as a whole number of hours, `duration` in seconds. */ + amount: number; + /** Pay item type code */ + code: string; + /** Working day date (YYYY-MM-DD) */ + effective_date: string; + /** Employment UUID */ + employment_id: string; + /** Pay item's unique identifier */ + id: string; + provider_data: PayItemProviderData; + /** Ids of pay items this one has replaced, oldest first. Empty if this pay item has never been edited. */ + replaced_ids: PayItemReplacedIdsList; +} +export const PayItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + code: S.String, + effective_date: S.String, + employment_id: S.String, + id: S.String, + provider_data: PayItemProviderData, + replaced_ids: PayItemReplacedIdsList, + }), +).annotate({ identifier: "PayItem" }) as any as S.Schema; + +/** List of pay items */ +export type ListPayItemsResponseDataDataList = Array; +export const ListPayItemsResponseDataDataList = /*@__PURE__*/ S.Array( + PayItem, +) as any as S.Schema; + +export interface ListPayItemsResponseData { + /** Current page number */ + current_page: number; + /** List of pay items */ + data: ListPayItemsResponseDataDataList; + /** Total number of pay items */ + total_count: number; + /** Total number of pages */ + total_pages: number; +} +export const ListPayItemsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.Number, + data: ListPayItemsResponseDataDataList, + total_count: S.Number, + total_pages: S.Number, + }), +).annotate({ + identifier: "ListPayItemsResponseData", +}) as any as S.Schema; + +export interface ListPayItemsResponse { + data: ListPayItemsResponseData; +} +export const ListPayItemsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ListPayItemsResponseData, + }), +).annotate({ + identifier: "ListPayItemsResponse", +}) as any as S.Schema; + +export interface GetV1PayrollCalendarsRequest { + /** Filter payroll calendars by country code */ + country_code?: string; + /** Filter payroll calendars by year */ + year?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1PayrollCalendarsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.optional(S.String.pipe(T.Query())), + year: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/payroll-calendars", code: 200 })), +).annotate({ + identifier: "GetV1PayrollCalendarsRequest", +}) as any as S.Schema; + +/** The frequency at which the payroll calendar is run. */ +export type CycleFrequency = "monthly" | "bi_monthly" | "bi_weekly" | "weekly"; +export const CycleFrequency = /*@__PURE__*/ S.String; + +export interface Cycle { + employee_inclusion_cutoff_date?: string; + end_date?: string; + input_cutoff_date?: string; + payment_date?: string; + start_date?: string; +} +export const Cycle = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employee_inclusion_cutoff_date: S.optional(S.String), + end_date: S.optional(S.String), + input_cutoff_date: S.optional(S.String), + payment_date: S.optional(S.String), + start_date: S.optional(S.String), + }), +).annotate({ identifier: "Cycle" }) as any as S.Schema; + +export type PayrollCalendarEORCyclesList = Array; +export const PayrollCalendarEORCyclesList = /*@__PURE__*/ S.Array( + Cycle, +) as any as S.Schema; + +export interface PayrollCalendarEOR { + country: Country; + cycle_frequency: CycleFrequency; + cycles: PayrollCalendarEORCyclesList; + id: string; +} +export const PayrollCalendarEOR = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country: Country, + cycle_frequency: CycleFrequency, + cycles: PayrollCalendarEORCyclesList, + id: S.String, + }), +).annotate({ + identifier: "PayrollCalendarEOR", +}) as any as S.Schema; + +export type PayrollCalendarsEORResponseDataPayrollCalendarsList = + Array; +export const PayrollCalendarsEORResponseDataPayrollCalendarsList = + /*@__PURE__*/ S.Array( + PayrollCalendarEOR, + ) as any as S.Schema; + +export interface PayrollCalendarsEORResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + payroll_calendars?: PayrollCalendarsEORResponseDataPayrollCalendarsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const PayrollCalendarsEORResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + payroll_calendars: S.optional( + PayrollCalendarsEORResponseDataPayrollCalendarsList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "PayrollCalendarsEORResponseData", +}) as any as S.Schema; + +/** Response schema listing many payroll_calendars */ +export interface PayrollCalendarsEORResponse { + data?: PayrollCalendarsEORResponseData; +} +export const PayrollCalendarsEORResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(PayrollCalendarsEORResponseData), + }), +).annotate({ + identifier: "PayrollCalendarsEORResponse", +}) as any as S.Schema; + +export interface GetV1PayrollCalendarsCycleRequest { + /** The cycle for which to list the payroll calendars. Format: YYYY-MM */ + cycle: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1PayrollCalendarsCycleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cycle: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/payroll-calendars/{cycle}", code: 200 }), + ), +).annotate({ + identifier: "GetV1PayrollCalendarsCycleRequest", +}) as any as S.Schema; + +export type PayrollCalendarCyclesList = Array; +export const PayrollCalendarCyclesList = /*@__PURE__*/ S.Array( + Cycle, +) as any as S.Schema; + +export interface PayrollCalendar { + country: Country; + cycle_frequency: CycleFrequency; + cycles: PayrollCalendarCyclesList; + owned_by_remote: boolean; +} +export const PayrollCalendar = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country: Country, + cycle_frequency: CycleFrequency, + cycles: PayrollCalendarCyclesList, + owned_by_remote: S.Boolean, + }), +).annotate({ + identifier: "PayrollCalendar", +}) as any as S.Schema; + +export type PayrollCalendarsResponseDataPayrollCalendarsList = + Array; +export const PayrollCalendarsResponseDataPayrollCalendarsList = + /*@__PURE__*/ S.Array( + PayrollCalendar, + ) as any as S.Schema; + +export interface PayrollCalendarsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + payroll_calendars?: PayrollCalendarsResponseDataPayrollCalendarsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const PayrollCalendarsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + payroll_calendars: S.optional( + PayrollCalendarsResponseDataPayrollCalendarsList, + ), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "PayrollCalendarsResponseData", +}) as any as S.Schema; + +/** Response schema listing many payroll_calendars */ +export interface PayrollCalendarsResponse { + data?: PayrollCalendarsResponseData; +} +export const PayrollCalendarsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(PayrollCalendarsResponseData), + }), +).annotate({ + identifier: "PayrollCalendarsResponse", +}) as any as S.Schema; + +export interface GetV1PayrollRunsRequest { + /** Filters payroll runs where period_start or period_end match the given date */ + payroll_period?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1PayrollRunsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_period: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/payroll-runs", code: 200 })), +).annotate({ + identifier: "GetV1PayrollRunsRequest", +}) as any as S.Schema; + +/** 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. */ +export type MinimalPayrollRunStatus = + | "preparing" + | "processing" + | "completed" + | "finalized" + | "waiting_for_customer_approval" + | "rejected"; +export const MinimalPayrollRunStatus = /*@__PURE__*/ S.String; + +/** 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. */ +export type MinimalPayrollRunType = + | "main" + | "one_off" + | "pro_forma" + | "tax_documents" + | "expenses" + | "parallel"; +export const MinimalPayrollRunType = /*@__PURE__*/ S.String; + +/** 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 interface MinimalPayrollRun { + approval_date: string | null; + country: Country; + currency_code: string | null; + cutoff_date?: string | null; + expected_payout_date: string; + /** The unique identifier of the payroll run. */ + id: string; + period_end: string; + period_start: string; + /** 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: MinimalPayrollRunStatus; + /** 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: MinimalPayrollRunType; +} +export const MinimalPayrollRun = /*@__PURE__*/ S.suspend(() => + S.Struct({ + approval_date: S.NullOr(S.String), + country: Country, + currency_code: S.NullOr(S.String), + cutoff_date: S.optional(S.NullOr(S.String)), + expected_payout_date: S.String, + id: S.String, + period_end: S.String, + period_start: S.String, + status: MinimalPayrollRunStatus, + total_payroll_cost: S.Number, + type: MinimalPayrollRunType, + }), +).annotate({ + identifier: "MinimalPayrollRun", +}) as any as S.Schema; + +/** List of payroll runs matching the query filters. */ +export type ListPayrollRunResponsePayrollRunsList = Array; +export const ListPayrollRunResponsePayrollRunsList = /*@__PURE__*/ S.Array( + MinimalPayrollRun, +) as any as S.Schema; + +/** Response containing a list of payroll runs for the company. Each payroll run includes summary information but not per-employee breakdowns. */ +export interface ListPayrollRunResponse { + /** List of payroll runs matching the query filters. */ + payroll_runs?: ListPayrollRunResponsePayrollRunsList; +} +export const ListPayrollRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_runs: S.optional(ListPayrollRunResponsePayrollRunsList), + }), +).annotate({ + identifier: "ListPayrollRunResponse", +}) as any as S.Schema; + +export interface GetV1PayrollRunsPayrollRunIdRequest { + /** Payroll run ID */ + payroll_run_id: string; +} +export const GetV1PayrollRunsPayrollRunIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_run_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/payroll-runs/{payroll_run_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1PayrollRunsPayrollRunIdRequest", +}) as any as S.Schema; + +/** 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. */ +export interface EmployeeDetailsBaseSalary { + /** Amount in cents. */ + amount?: number; + /** ISO 4217 currency code. */ + currency?: string; +} +export const EmployeeDetailsBaseSalary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(S.Number), + currency: S.optional(S.String), + }), +).annotate({ + identifier: "EmployeeDetailsBaseSalary", +}) as any as S.Schema; + +/** Total cost of employee benefits (health insurance, pension, etc.) for this payroll run. Amount in cents. */ +export type EmployeeDetailsBenefits = EmployeeDetailsBaseSalary; +export const EmployeeDetailsBenefits = EmployeeDetailsBaseSalary; + +/** Total deductions from the employee's gross pay, including taxes and social contributions. Amount in cents. */ +export type EmployeeDetailsDeductions = EmployeeDetailsBaseSalary; +export const EmployeeDetailsDeductions = EmployeeDetailsBaseSalary; + +/** Total employer-side contributions and costs (employer social contributions, taxes, etc.) beyond the employee's gross pay. Amount in cents. */ +export type EmployeeDetailsEmployerCosts = EmployeeDetailsBaseSalary; +export const EmployeeDetailsEmployerCosts = EmployeeDetailsBaseSalary; + +/** Total approved expenses reimbursed to the employee in this payroll run. Amount in cents. */ +export type EmployeeDetailsExpenses = EmployeeDetailsBaseSalary; +export const EmployeeDetailsExpenses = EmployeeDetailsBaseSalary; + +/** The employee's gross pay before any deductions. Amount in cents. */ +export type EmployeeDetailsGrossPay = EmployeeDetailsBaseSalary; +export const EmployeeDetailsGrossPay = EmployeeDetailsBaseSalary; + +/** Total incentives (bonuses, commissions, etc.) paid to the employee in this payroll run. Amount in cents. */ +export type EmployeeDetailsIncentives = EmployeeDetailsBaseSalary; +export const EmployeeDetailsIncentives = EmployeeDetailsBaseSalary; + +/** The net amount paid to the employee after all deductions (taxes, social contributions, etc.). Amount in cents. */ +export type EmployeeDetailsNetPay = EmployeeDetailsBaseSalary; +export const EmployeeDetailsNetPay = EmployeeDetailsBaseSalary; + +/** Any other payroll components not categorized as salary, benefits, expenses, or incentives. Amount in cents. */ +export type EmployeeDetailsOther = EmployeeDetailsBaseSalary; +export const EmployeeDetailsOther = EmployeeDetailsBaseSalary; + +/** The total cost to the employer for this employee in this payroll run, including salary, benefits, employer contributions, expenses, and incentives. Amount in cents. */ +export type EmployeeDetailsTotalCost = EmployeeDetailsBaseSalary; +export const EmployeeDetailsTotalCost = EmployeeDetailsBaseSalary; + +/** 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 interface EmployeeDetails { + /** 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: EmployeeDetailsBaseSalary; + /** Total cost of employee benefits (health insurance, pension, etc.) for this payroll run. Amount in cents. */ + benefits: EmployeeDetailsBaseSalary; + /** Total deductions from the employee's gross pay, including taxes and social contributions. Amount in cents. */ + deductions: EmployeeDetailsBaseSalary; + /** Total employer-side contributions and costs (employer social contributions, taxes, etc.) beyond the employee's gross pay. Amount in cents. */ + employer_costs: EmployeeDetailsBaseSalary; + /** 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: EmployeeDetailsBaseSalary; + /** 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: EmployeeDetailsBaseSalary; + /** Total incentives (bonuses, commissions, etc.) paid to the employee in this payroll run. Amount in cents. */ + incentives: EmployeeDetailsBaseSalary; + /** The net amount paid to the employee after all deductions (taxes, social contributions, etc.). Amount in cents. */ + net_pay: EmployeeDetailsBaseSalary; + /** Any other payroll components not categorized as salary, benefits, expenses, or incentives. Amount in cents. */ + other: EmployeeDetailsBaseSalary; + /** 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: EmployeeDetailsBaseSalary; +} +export const EmployeeDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + base_salary: EmployeeDetailsBaseSalary, + benefits: EmployeeDetailsBaseSalary, + deductions: EmployeeDetailsBaseSalary, + employer_costs: EmployeeDetailsBaseSalary, + employment_id: S.optional(S.String), + expenses: EmployeeDetailsBaseSalary, + full_name: S.NullOr(S.String), + gross_pay: EmployeeDetailsBaseSalary, + incentives: EmployeeDetailsBaseSalary, + net_pay: EmployeeDetailsBaseSalary, + other: EmployeeDetailsBaseSalary, + payslip_id: S.NullOr(S.String), + total_cost: EmployeeDetailsBaseSalary, + }), +).annotate({ + identifier: "EmployeeDetails", +}) as any as S.Schema; + +/** 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. */ +export type PayrollRunEmployeeDetailsList = Array; +export const PayrollRunEmployeeDetailsList = /*@__PURE__*/ S.Array( + EmployeeDetails, +) as any as S.Schema; + +/** 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. */ +export type PayrollRunStatus = + | "preparing" + | "processing" + | "completed" + | "finalized" + | "waiting_for_customer_approval" + | "rejected"; +export const PayrollRunStatus = /*@__PURE__*/ S.String; + +/** 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. */ +export type PayrollRunType = + | "main" + | "one_off" + | "pro_forma" + | "tax_documents" + | "expenses" + | "parallel"; +export const PayrollRunType = /*@__PURE__*/ S.String; + +/** 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 interface PayrollRun { + approval_date: string | null; + /** The total benefits cost across all employees in this payroll run. Amount in cents. */ + benefits_total: number; + country: Country; + currency_code: string | null; + cutoff_date?: string | null; + /** 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. */ + employee_details: PayrollRunEmployeeDetailsList; + /** The total employer-side contributions (social contributions, employer taxes, etc.) across all employees. Amount in cents. */ + employer_contributions_total: number; + expected_payout_date: string; + /** The total reimbursed expenses across all employees in this payroll run. Amount in cents. */ + expenses_total: number; + /** 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: string; + period_start: string; + /** 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: PayrollRunStatus; + /** 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?: PayrollRunType; +} +export const PayrollRun = /*@__PURE__*/ S.suspend(() => + S.Struct({ + approval_date: S.NullOr(S.String), + benefits_total: S.Number, + country: Country, + currency_code: S.NullOr(S.String), + cutoff_date: S.optional(S.NullOr(S.String)), + employee_details: PayrollRunEmployeeDetailsList, + employer_contributions_total: S.Number, + expected_payout_date: S.String, + expenses_total: S.Number, + id: S.String, + incentives_total: S.Number, + other_total: S.Number, + period_end: S.String, + period_start: S.String, + salary_total: S.Number, + status: PayrollRunStatus, + total_payroll_cost: S.Number, + type: S.optional(PayrollRunType), + }), +).annotate({ identifier: "PayrollRun" }) as any as S.Schema; + +/** Response containing a single payroll run with full details including cost totals and employee breakdowns. */ +export interface PayrollRunResponse { + payroll_run?: PayrollRun; +} +export const PayrollRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_run: S.optional(PayrollRun), + }), +).annotate({ + identifier: "PayrollRunResponse", +}) as any as S.Schema; + +export interface GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest { + /** Payroll run ID */ + payroll_run_id: string; + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_run_id: S.String.pipe(T.Label()), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/payroll-runs/{payroll_run_id}/employee-details", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest", + }) as any as S.Schema; + +/** List of per-employee cost breakdowns for the payroll run. */ +export type EmployeeDetailsResponseDataEmployeeDetailsList = + Array; +export const EmployeeDetailsResponseDataEmployeeDetailsList = + /*@__PURE__*/ S.Array( + EmployeeDetails, + ) as any as S.Schema; + +export interface EmployeeDetailsResponseData { + /** List of per-employee cost breakdowns for the payroll run. */ + employee_details: EmployeeDetailsResponseDataEmployeeDetailsList; +} +export const EmployeeDetailsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employee_details: EmployeeDetailsResponseDataEmployeeDetailsList, + }), +).annotate({ + identifier: "EmployeeDetailsResponseData", +}) as any as S.Schema; + +/** Paginated response containing per-employee payroll cost breakdowns for a specific payroll run. */ +export interface EmployeeDetailsResponse { + data: EmployeeDetailsResponseData; +} +export const EmployeeDetailsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmployeeDetailsResponseData, + }), +).annotate({ + identifier: "EmployeeDetailsResponse", +}) as any as S.Schema; + +export interface GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest { + /** The payroll run's ID */ + payroll_run_id: string; + /** The GL report's ID */ + gl_report_id: string; +} +export const GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_run_id: S.String.pipe(T.Label()), + gl_report_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/payroll-runs/{payroll_run_id}/gl-reports/{gl_report_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest", + }) as any as S.Schema; + +/** Current generation status of the report. */ +export type GLReportStatus = "pending" | "completed" | "failed"; +export const GLReportStatus = /*@__PURE__*/ S.String; + +/** The type of GL report. */ +export type GLReportType = "summary" | "by_department" | "employee_detail"; +export const GLReportType = /*@__PURE__*/ S.String; + +/** A General Ledger report generation request and its current status. */ +export interface GLReport { + /** Unique identifier of the GL report. */ + id: string; + /** Timestamp when the report was requested. */ + inserted_at: string; + /** Current generation status of the report. */ + status: GLReportStatus; + /** The type of GL report. */ + type: GLReportType; +} +export const GLReport = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + inserted_at: S.String, + status: GLReportStatus, + type: GLReportType, + }), +).annotate({ identifier: "GLReport" }) as any as S.Schema; + +export interface GLReportResponseData { + gl_report?: GLReport; +} +export const GLReportResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + gl_report: S.optional(GLReport), + }), +).annotate({ + identifier: "GLReportResponseData", +}) as any as S.Schema; + +export interface GLReportResponse { + data?: GLReportResponseData; +} +export const GLReportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(GLReportResponseData), + }), +).annotate({ + identifier: "GLReportResponse", +}) as any as S.Schema; + +export interface GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest { + /** The payroll run's ID */ + payroll_run_id: string; + /** The GL report's ID */ + gl_report_id: string; +} +export const GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_run_id: S.String.pipe(T.Label()), + gl_report_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/payroll-runs/{payroll_run_id}/gl-reports/{gl_report_id}/download", + code: 200, + }), + ), + ).annotate({ + identifier: + "GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest", + }) as any as S.Schema; + +export type GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse = + string; +export const GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse = + /*@__PURE__*/ S.suspend(() => S.String.pipe(T.RawResponseRoot())).annotate({ + identifier: + "GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse", + }) as any as S.Schema; + +export interface GetV1PayslipsRequest { + /** Employment ID */ + employment_id?: string; + /** Filters by payslips `issued_at` field, after or on the same day than the given date */ + start_date?: string; + /** Filters by payslips `issued_at` field, before or or the same day than the given date */ + end_date?: string; + /** Filters by payslips `expected_payout_date` field, after or on the same day than the given date */ + expected_payout_start_date?: string; + /** Filters by payslips `expected_payout_date` field, before or or the same day than the given date */ + expected_payout_end_date?: string; + /** Starts fetching records after the given page */ + page?: number; + /** Change the amount of records returned per page, defaults to 20, limited to 100 */ + page_size?: number; +} +export const GetV1PayslipsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + start_date: S.optional(S.String.pipe(T.Query())), + end_date: S.optional(S.String.pipe(T.Query())), + expected_payout_start_date: S.optional(S.String.pipe(T.Query())), + expected_payout_end_date: S.optional(S.String.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/payslips", code: 200 })), +).annotate({ + identifier: "GetV1PayslipsRequest", +}) as any as S.Schema; + +/** A payslip issued to an employee for a specific payroll period. */ +export interface Payslip { + /** The unique identifier (UUID) of the employment this payslip belongs to. */ + employment_id: string; + expected_payout_date?: string; + /** The unique identifier (UUID) of the payslip. */ + id: string; + /** The date the payslip was issued. */ + issued_at: string; + /** The net pay amount converted to the company's billing currency, in cents. Only shown if available. */ + net_pay_converted_amount?: number; + /** The net pay amount in the source (local) currency, in cents. Only shown if available. */ + net_pay_source_amount?: number; +} +export const Payslip = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + expected_payout_date: S.optional(S.String), + id: S.String, + issued_at: S.String, + net_pay_converted_amount: S.optional(S.Number), + net_pay_source_amount: S.optional(S.Number), + }), +).annotate({ identifier: "Payslip" }) as any as S.Schema; + +export type ListPayslipsResponseDataPayslipsList = Array; +export const ListPayslipsResponseDataPayslipsList = /*@__PURE__*/ S.Array( + Payslip, +) as any as S.Schema; + +export interface ListPayslipsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + payslips?: ListPayslipsResponseDataPayslipsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListPayslipsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + payslips: S.optional(ListPayslipsResponseDataPayslipsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListPayslipsResponseData", +}) as any as S.Schema; + +/** Response schema listing many payslips */ +export interface ListPayslipsResponse { + data?: ListPayslipsResponseData; +} +export const ListPayslipsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListPayslipsResponseData), + }), +).annotate({ + identifier: "ListPayslipsResponse", +}) as any as S.Schema; + +export interface GetV1PayslipsPayslipIdPdfRequest { + /** Payslip ID */ + payslip_id: string; +} +export const GetV1PayslipsPayslipIdPdfRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + payslip_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/payslips/{payslip_id}/pdf", code: 200 }), + ), +).annotate({ + identifier: "GetV1PayslipsPayslipIdPdfRequest", +}) as any as S.Schema; + +export type GetV1PayslipsPayslipIdPdfResponse = string; +export const GetV1PayslipsPayslipIdPdfResponse = /*@__PURE__*/ S.suspend(() => + S.String.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetV1PayslipsPayslipIdPdfResponse", +}) as any as S.Schema; + +export interface GetV1PricingPlanPartnerTemplatesRequest {} +export const GetV1PricingPlanPartnerTemplatesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/v1/pricing-plan-partner-templates", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1PricingPlanPartnerTemplatesRequest", +}) as any as S.Schema; + +/** Pricing plan partner template */ +export interface PricingPlanPartnerTemplate { + base_price: Price; + id: string; + /** The period in months for the template, 0 means unlimited */ + period?: number; + price: Price; + product: Product; + /** Whether the template is unlimited in time (do not expire) */ + unlimited?: boolean; +} +export const PricingPlanPartnerTemplate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + base_price: Price, + id: S.String, + period: S.optional(S.Number), + price: Price, + product: Product, + unlimited: S.optional(S.Boolean), + }), +).annotate({ + identifier: "PricingPlanPartnerTemplate", +}) as any as S.Schema; + +export type ListPricingPlanPartnerTemplatesResponseDataPricingPlanPartnerTemplatesList = + Array; +export const ListPricingPlanPartnerTemplatesResponseDataPricingPlanPartnerTemplatesList = + /*@__PURE__*/ S.Array( + PricingPlanPartnerTemplate, + ) as any as S.Schema; + +export interface ListPricingPlanPartnerTemplatesResponseData { + pricing_plan_partner_templates: ListPricingPlanPartnerTemplatesResponseDataPricingPlanPartnerTemplatesList; +} +export const ListPricingPlanPartnerTemplatesResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + pricing_plan_partner_templates: + ListPricingPlanPartnerTemplatesResponseDataPricingPlanPartnerTemplatesList, + }), + ).annotate({ + identifier: "ListPricingPlanPartnerTemplatesResponseData", + }) as any as S.Schema; + +/** List of pricing plan partner templates */ +export interface ListPricingPlanPartnerTemplatesResponse { + data: ListPricingPlanPartnerTemplatesResponseData; +} +export const ListPricingPlanPartnerTemplatesResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: ListPricingPlanPartnerTemplatesResponseData, + }), +).annotate({ + identifier: "ListPricingPlanPartnerTemplatesResponse", +}) as any as S.Schema; + +export interface GetV1ProbationCompletionLetterIdRequest { + /** probation completion letter ID */ + id: string; +} +export const GetV1ProbationCompletionLetterIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/probation-completion-letter/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1ProbationCompletionLetterIdRequest", +}) as any as S.Schema; + +/** A file associated with an employment, such as a contract, tax form, or identity document. */ +export type ProbationCompletionLetterFile = File; +export const ProbationCompletionLetterFile = File; + +export type ProbationCompletionLetterStatus = + | "submitted" + | "in_review" + | "done" + | "canceled" + | "deleted"; +export const ProbationCompletionLetterStatus = /*@__PURE__*/ S.String; + +/** Probation completion letter request */ +export interface ProbationCompletionLetter { + employment_id: string; + id: string; + letter: File | null; + status: ProbationCompletionLetterStatus; + submitted_at: string; + zendesk_ticket_url: string | null; +} +export const ProbationCompletionLetter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + id: S.String, + letter: S.NullOr(File), + status: ProbationCompletionLetterStatus, + submitted_at: S.String, + zendesk_ticket_url: S.NullOr(S.String), + }), +).annotate({ + identifier: "ProbationCompletionLetter", +}) as any as S.Schema; + +export interface ProbationCompletionLetterResponseData { + probation_completion_letter: ProbationCompletionLetter; +} +export const ProbationCompletionLetterResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + probation_completion_letter: ProbationCompletionLetter, + }), +).annotate({ + identifier: "ProbationCompletionLetterResponseData", +}) as any as S.Schema; + +/** Probation completion letter request response */ +export interface ProbationCompletionLetterResponse { + data: ProbationCompletionLetterResponseData; +} +export const ProbationCompletionLetterResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ProbationCompletionLetterResponseData, + }), +).annotate({ + identifier: "ProbationCompletionLetterResponse", +}) as any as S.Schema; + +export interface GetV1ProbationExtensionsIdRequest { + /** Probation Extension Request ID */ + id: string; +} +export const GetV1ProbationExtensionsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/v1/probation-extensions/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetV1ProbationExtensionsIdRequest", +}) as any as S.Schema; + +/** 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" + | "in_review" + | "done" + | "canceled" + | "deleted"; +export const ProbationExtensionStatus = /*@__PURE__*/ S.String; + +/** A request to extend an employee's probation period. Requires Remote's review for compliance with local labor laws. */ +export interface 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; +} +export const ProbationExtension = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + id: S.String, + requested_by: S.String, + status: ProbationExtensionStatus, + submitted_at: S.String, + zendesk_ticket_url: S.NullOr(S.String), + }), +).annotate({ + identifier: "ProbationExtension", +}) as any as S.Schema; + +export interface ProbationExtensionResponseData { + probation_extension: ProbationExtension; +} +export const ProbationExtensionResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + probation_extension: ProbationExtension, + }), +).annotate({ + identifier: "ProbationExtensionResponseData", +}) as any as S.Schema; + +/** Probation Extension Response */ +export interface ProbationExtensionResponse { + data?: ProbationExtensionResponseData; +} +export const ProbationExtensionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ProbationExtensionResponseData), + }), +).annotate({ + identifier: "ProbationExtensionResponse", +}) as any as S.Schema; + +export interface GetV1ResignationsOffboardingRequestIdRequest { + /** Offboarding request ID */ + offboarding_request_id: string; +} +export const GetV1ResignationsOffboardingRequestIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + offboarding_request_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/resignations/{offboarding_request_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1ResignationsOffboardingRequestIdRequest", + }) as any as S.Schema; + +/** Resignation details for an employee who resigned before their employment start date. Contains basic contract and resignation information only. */ +export interface 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; + /** 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; +} +export const ResignationBeforeStartDate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_job_title: S.String, + contract_start_date: S.String, + resignation_date: S.String, + resignation_reason_label: S.String, + }), +).annotate({ + identifier: "ResignationBeforeStartDate", +}) as any as S.Schema; + +/** 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"). */ +export type ResignationAfterStartDatePaidTimeoffsBreakdownLabelsList = + Array; +export const ResignationAfterStartDatePaidTimeoffsBreakdownLabelsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** 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 interface 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: ResignationAfterStartDatePaidTimeoffsBreakdownLabelsList; + /** The employee's proposed last working day, calculated based on the notice period and local labor laws. */ + proposed_last_day: string; + /** 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; +} +export const ResignationAfterStartDate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_currency_code: S.String, + contract_job_title: S.String, + contract_proabtion_period_passed: S.Boolean, + contract_probation_period_end_date: S.NullOr(S.String), + contract_start_date: S.String, + days_of_notice: S.Number, + paid_timeoffs_breakdown_labels: + ResignationAfterStartDatePaidTimeoffsBreakdownLabelsList, + proposed_last_day: S.String, + resignation_date: S.String, + resignation_reason_label: S.String, + }), +).annotate({ + identifier: "ResignationAfterStartDate", +}) as any as S.Schema; + +export type ResignationResignation = + | ResignationBeforeStartDate + | ResignationAfterStartDate; +export const ResignationResignation = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Resignation details for an offboarding request. The shape depends on whether the employee resigned before or after their employment start date. */ +export interface Resignation { + resignation?: ResignationResignation; +} +export const Resignation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + resignation: S.optional(ResignationResignation), + }), +).annotate({ identifier: "Resignation" }) as any as S.Schema; + +/** Resignation response */ +export interface ResignationResponse { + data?: Resignation; +} +export const ResignationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(Resignation), + }), +).annotate({ + identifier: "ResignationResponse", +}) as any as S.Schema; + +export interface GetV1ResignationsOffboardingRequestIdResignationLetterRequest { + /** Offboarding request ID */ + offboarding_request_id: string; +} +export const GetV1ResignationsOffboardingRequestIdResignationLetterRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + offboarding_request_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/resignations/{offboarding_request_id}/resignation-letter", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV1ResignationsOffboardingRequestIdResignationLetterRequest", + }) as any as S.Schema; + +export interface GetV1ResignationsOffboardingRequestIdResignationLetterResponse {} +export const GetV1ResignationsOffboardingRequestIdResignationLetterResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: + "GetV1ResignationsOffboardingRequestIdResignationLetterResponse", + }) as any as S.Schema; + +export interface GetV1ScimV2GroupsRequest { + /** 1-based index of the first result */ + startIndex?: number; + /** Maximum number of results per page */ + count?: number; + /** Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) */ + filter?: string; +} +export const GetV1ScimV2GroupsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startIndex: S.optional(S.Number.pipe(T.Query())), + count: S.optional(S.Number.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/scim/v2/Groups", code: 200 })), +).annotate({ + identifier: "GetV1ScimV2GroupsRequest", +}) as any as S.Schema; + +export interface IntegrationsScimGroupMembersItem { + /** URI of the user resource */ + _ref?: string; + /** Display name of the user */ + display?: string; + /** User ID (slug) */ + value: string; +} +export const IntegrationsScimGroupMembersItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + _ref: S.optional(S.String.pipe(T.Body("$ref"))), + display: S.optional(S.String), + value: S.String, + }), +).annotate({ + identifier: "IntegrationsScimGroupMembersItem", +}) as any as S.Schema; + +/** Array of group members (per RFC 7643) */ +export type IntegrationsScimGroupMembersList = + Array; +export const IntegrationsScimGroupMembersList = /*@__PURE__*/ S.Array( + IntegrationsScimGroupMembersItem, +) as any as S.Schema; + +export interface IntegrationsScimGroupMeta { + /** Creation timestamp */ + created?: string; + /** Last modification timestamp */ + lastModified?: string; + /** Resource type */ + resourceType?: string; +} +export const IntegrationsScimGroupMeta = /*@__PURE__*/ S.suspend(() => + S.Struct({ + created: S.optional(S.String), + lastModified: S.optional(S.String), + resourceType: S.optional(S.String), + }), +).annotate({ + identifier: "IntegrationsScimGroupMeta", +}) as any as S.Schema; + +/** SCIM schema identifiers */ +export type IntegrationsScimGroupSchemasList = Array; +export const IntegrationsScimGroupSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface IntegrationsScimGroup { + /** Display name of the group */ + displayName: string; + /** Unique identifier for the group */ + id: string; + /** Array of group members (per RFC 7643) */ + members: IntegrationsScimGroupMembersList; + meta?: IntegrationsScimGroupMeta; + /** SCIM schema identifiers */ + schemas: IntegrationsScimGroupSchemasList; +} +export const IntegrationsScimGroup = /*@__PURE__*/ S.suspend(() => + S.Struct({ + displayName: S.String, + id: S.String, + members: IntegrationsScimGroupMembersList, + meta: S.optional(IntegrationsScimGroupMeta), + schemas: IntegrationsScimGroupSchemasList, + }), +).annotate({ + identifier: "IntegrationsScimGroup", +}) as any as S.Schema; + +/** Array of group resources */ +export type IntegrationsScimGroupListResponseResourcesList = + Array; +export const IntegrationsScimGroupListResponseResourcesList = + /*@__PURE__*/ S.Array( + IntegrationsScimGroup, + ) as any as S.Schema; + +/** SCIM schema identifiers */ +export type IntegrationsScimGroupListResponseSchemasList = Array; +export const IntegrationsScimGroupListResponseSchemasList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface IntegrationsScimGroupListResponse { + /** Array of group resources */ + Resources: IntegrationsScimGroupListResponseResourcesList; + /** Number of results returned in the current set */ + itemsPerPage: number; + /** SCIM schema identifiers */ + schemas: IntegrationsScimGroupListResponseSchemasList; + /** 1-based index of the first result in the current set */ + startIndex: number; + /** Total number of results matching the query */ + totalResults: number; +} +export const IntegrationsScimGroupListResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + Resources: IntegrationsScimGroupListResponseResourcesList, + itemsPerPage: S.Number, + schemas: IntegrationsScimGroupListResponseSchemasList, + startIndex: S.Number, + totalResults: S.Number, + }), +).annotate({ + identifier: "IntegrationsScimGroupListResponse", +}) as any as S.Schema; + +export interface GetV1ScimV2GroupsIdRequest { + /** Group ID (slug) */ + id: string; +} +export const GetV1ScimV2GroupsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/scim/v2/Groups/{id}", code: 200 })), +).annotate({ + identifier: "GetV1ScimV2GroupsIdRequest", +}) as any as S.Schema; + +export interface GetV1ScimV2UsersRequest { + /** 1-based index of the first result */ + startIndex?: number; + /** Maximum number of results per page */ + count?: number; + /** Filter expression for attributes (supports eq, ne, co, sw, ew, pr, lt, le, gt, ge) */ + filter?: string; +} +export const GetV1ScimV2UsersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startIndex: S.optional(S.Number.pipe(T.Query())), + count: S.optional(S.Number.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/scim/v2/Users", code: 200 })), +).annotate({ + identifier: "GetV1ScimV2UsersRequest", +}) as any as S.Schema; + +export interface IntegrationsScimUserEmailsItem { + /** Whether this is the primary email */ + primary?: boolean; + /** Type of email (e.g., 'work') */ + type: string; + /** Email address */ + value: string; +} +export const IntegrationsScimUserEmailsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + primary: S.optional(S.Boolean), + type: S.String, + value: S.String, + }), +).annotate({ + identifier: "IntegrationsScimUserEmailsItem", +}) as any as S.Schema; + +export type IntegrationsScimUserEmailsList = + Array; +export const IntegrationsScimUserEmailsList = /*@__PURE__*/ S.Array( + IntegrationsScimUserEmailsItem, +) as any as S.Schema; + +export type IntegrationsScimUserMeta = IntegrationsScimGroupMeta; +export const IntegrationsScimUserMeta = IntegrationsScimGroupMeta; + +export interface IntegrationsScimUserName { + /** Last name */ + familyName: string; + /** Full name */ + formatted?: string; + /** First name */ + givenName: string; + /** Salutation, e.g. 'Ms', 'Mr' */ + honorificPrefix?: string; +} +export const IntegrationsScimUserName = /*@__PURE__*/ S.suspend(() => + S.Struct({ + familyName: S.String, + formatted: S.optional(S.String), + givenName: S.String, + honorificPrefix: S.optional(S.String), + }), +).annotate({ + identifier: "IntegrationsScimUserName", +}) as any as S.Schema; + +/** SCIM schema identifiers */ +export type IntegrationsScimUserSchemasList = Array; +export const IntegrationsScimUserSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** The user's manager */ +export interface IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager { + /** The URI of the SCIM resource representing the user's manager */ + _ref?: string; + /** The displayName of the user's manager */ + displayName?: string; + /** The id of the SCIM resource representing the user's manager */ + value?: string; +} +export const IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + _ref: S.optional(S.String.pipe(T.Body("$ref"))), + displayName: S.optional(S.String), + value: S.optional(S.String), + }), + ).annotate({ + identifier: + "IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager", + }) as any as S.Schema; + +/** Enterprise User extension attributes (RFC 7643 §4.3) */ +export interface IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User { + /** Identifies the name of a department */ + department?: string; + /** Numeric or alphanumeric identifier assigned to a person */ + employeeNumber?: string | null; + /** The user's manager */ + manager?: IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager; +} +export const IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + department: S.optional(S.String), + employeeNumber: S.optional(S.NullOr(S.String)), + manager: S.optional( + IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20UserManager, + ), + }), + ).annotate({ + identifier: + "IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User", + }) as any as S.Schema; + +export interface IntegrationsScimUser { + /** Whether the user is active */ + active: boolean; + /** The name to display for the user */ + displayName?: string; + emails: IntegrationsScimUserEmailsList; + /** Unique identifier for the user */ + id: string; + meta?: IntegrationsScimGroupMeta; + name: IntegrationsScimUserName; + /** The casual/preferred name for the user */ + nickName?: string; + /** SCIM schema identifiers */ + schemas: IntegrationsScimUserSchemasList; + /** Enterprise User extension attributes (RFC 7643 §4.3) */ + urn_ietf_params_scim_schemas_extension_enterprise_2_0_User?: IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User; + /** Username for the user */ + userName: string; +} +export const IntegrationsScimUser = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.Boolean, + displayName: S.optional(S.String), + emails: IntegrationsScimUserEmailsList, + id: S.String, + meta: S.optional(IntegrationsScimGroupMeta), + name: IntegrationsScimUserName, + nickName: S.optional(S.String), + schemas: IntegrationsScimUserSchemasList, + urn_ietf_params_scim_schemas_extension_enterprise_2_0_User: S.optional( + IntegrationsScimUserUrnIetfParamsScimSchemasExtensionEnterprise20User.pipe( + T.Body("urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"), + ), + ), + userName: S.String, + }), +).annotate({ + identifier: "IntegrationsScimUser", +}) as any as S.Schema; + +/** Array of user resources */ +export type IntegrationsScimUserListResponseResourcesList = + Array; +export const IntegrationsScimUserListResponseResourcesList = + /*@__PURE__*/ S.Array( + IntegrationsScimUser, + ) as any as S.Schema; + +/** SCIM schema identifiers */ +export type IntegrationsScimUserListResponseSchemasList = Array; +export const IntegrationsScimUserListResponseSchemasList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface IntegrationsScimUserListResponse { + /** Array of user resources */ + Resources: IntegrationsScimUserListResponseResourcesList; + /** Number of results returned in the current set */ + itemsPerPage: number; + /** SCIM schema identifiers */ + schemas: IntegrationsScimUserListResponseSchemasList; + /** 1-based index of the first result in the current set */ + startIndex: number; + /** Total number of results matching the query */ + totalResults: number; +} +export const IntegrationsScimUserListResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + Resources: IntegrationsScimUserListResponseResourcesList, + itemsPerPage: S.Number, + schemas: IntegrationsScimUserListResponseSchemasList, + startIndex: S.Number, + totalResults: S.Number, + }), +).annotate({ + identifier: "IntegrationsScimUserListResponse", +}) as any as S.Schema; + +export interface GetV1ScimV2UsersIdRequest { + /** User ID (slug) */ + id: string; +} +export const GetV1ScimV2UsersIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/scim/v2/Users/{id}", code: 200 })), +).annotate({ + identifier: "GetV1ScimV2UsersIdRequest", +}) as any as S.Schema; + +export interface GetV1SsoConfigurationRequest {} +export const GetV1SsoConfigurationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/sso-configuration", code: 200 }), + ), +).annotate({ + identifier: "GetV1SsoConfigurationRequest", +}) as any as S.Schema; + +/** 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 interface 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; +} +export const SSOConfiguration = /*@__PURE__*/ S.suspend(() => + S.Struct({ + audience_uri: S.String, + domain: S.String, + identity_provider_url: S.String, + sso_url: S.String, + }), +).annotate({ + identifier: "SSOConfiguration", +}) as any as S.Schema; + +/** SSO Configuration response */ +export interface SSOConfigurationResponse { + data?: SSOConfiguration; +} +export const SSOConfigurationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(SSOConfiguration), + }), +).annotate({ + identifier: "SSOConfigurationResponse", +}) as any as S.Schema; + +export interface GetV1SsoConfigurationDetailsRequest {} +export const GetV1SsoConfigurationDetailsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/v1/sso-configuration/details", code: 200 }), + ), +).annotate({ + identifier: "GetV1SsoConfigurationDetailsRequest", +}) as any as S.Schema; + +/** The SSO configuration details needed to set up your identity provider (IdP) to connect with Remote. */ +export interface 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; +} +export const SSOConfigurationDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + audience_uri: S.String, + sso_url: S.String, + }), +).annotate({ + identifier: "SSOConfigurationDetails", +}) as any as S.Schema; + +/** SSO Configuration Details response */ +export interface SSOConfigurationDetailsResponse { + data?: SSOConfigurationDetails; +} +export const SSOConfigurationDetailsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(SSOConfigurationDetails), + }), +).annotate({ + identifier: "SSOConfigurationDetailsResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV1TestSchemaRequestJsonSchemaVersionCase1 = "latest"; +export const GetV1TestSchemaRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV1TestSchemaRequestJsonSchemaVersion = + | number + | GetV1TestSchemaRequestJsonSchemaVersionCase1; +export const GetV1TestSchemaRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV1TestSchemaRequest { + /** Version of the form schema */ + json_schema_version?: GetV1TestSchemaRequestJsonSchemaVersion; +} +export const GetV1TestSchemaRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + json_schema_version: S.optional( + GetV1TestSchemaRequestJsonSchemaVersion.pipe(T.Query()), + ), + }).pipe(T.Http({ method: "GET", uri: "/v1/test-schema", code: 200 })), +).annotate({ + identifier: "GetV1TestSchemaRequest", +}) as any as S.Schema; + +/** 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 TimeoffStatus2 = + | "approved" + | "cancelled" + | "declined" + | "requested" + | "taken" + | "cancel_requested"; +export const TimeoffStatus2 = /*@__PURE__*/ S.String; + +export type GetV1TimeoffRequestOrder = "asc" | "desc"; +export const GetV1TimeoffRequestOrder = /*@__PURE__*/ S.String; + +export type GetV1TimeoffRequestSortBy = "timeoff_type" | "status"; +export const GetV1TimeoffRequestSortBy = /*@__PURE__*/ S.String; + +export interface GetV1TimeoffRequest { + /** Only show time off for a specific employment */ + employment_id?: string; + /** Filter time off by its type */ + timeoff_type?: TimeoffType | (string & {}); + /** Filter time off by its status */ + status?: TimeoffStatus2 | (string & {}); + /** ISO 8601 date. When combined with `end_date`, returns all time off records that overlap the `[start_date, end_date]` window — including records that only partially overlap at either boundary. When used alone, returns records whose `start_date` is on or after this date. */ + start_date?: string; + /** ISO 8601 date. When combined with `start_date`, returns all time off records that overlap the `[start_date, end_date]` window — including records that only partially overlap at either boundary. When used alone, returns records whose `end_date` is on or before this date. */ + end_date?: string; + /** Sort order */ + order?: GetV1TimeoffRequestOrder | (string & {}); + /** Field to sort by */ + sort_by?: GetV1TimeoffRequestSortBy | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1TimeoffRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + timeoff_type: S.optional(TimeoffType.pipe(T.Query())), + status: S.optional(TimeoffStatus2.pipe(T.Query())), + start_date: S.optional(S.String.pipe(T.Query())), + end_date: S.optional(S.String.pipe(T.Query())), + order: S.optional(GetV1TimeoffRequestOrder.pipe(T.Query())), + sort_by: S.optional(GetV1TimeoffRequestSortBy.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/timeoff", code: 200 })), +).annotate({ + identifier: "GetV1TimeoffRequest", +}) as any as S.Schema; + +export interface GetV1TimeoffIdRequest { + /** Timeoff ID */ + id: string; +} +export const GetV1TimeoffIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/timeoff/{id}", code: 200 })), +).annotate({ + identifier: "GetV1TimeoffIdRequest", +}) as any as S.Schema; + +export interface TimeoffResponseData { + timeoff: Timeoff; +} +export const TimeoffResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timeoff: Timeoff, + }), +).annotate({ + identifier: "TimeoffResponseData", +}) as any as S.Schema; + +/** Timeoff response */ +export interface TimeoffResponse { + data: TimeoffResponseData; +} +export const TimeoffResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: TimeoffResponseData, + }), +).annotate({ + identifier: "TimeoffResponse", +}) as any as S.Schema; + +/** Optional query parameter for the List Time Off Types endpoint. - `contractor` — time off types for contractor employments (e.g. includes `time_off`). - `full_time` — time off types for full-time employments (e.g. includes `paid_time_off`). When omitted, the response is unchanged from previous API versions (full-time types). */ +export type TimeoffTypesEmploymentType = "contractor" | "full_time"; +export const TimeoffTypesEmploymentType = /*@__PURE__*/ S.String; + +export interface GetV1TimeoffTypesRequest { + /** Optional. Employment type to list time off types for: `contractor` or `full_time`. Omit for backward-compatible behavior (full-time types). */ + type?: TimeoffTypesEmploymentType | (string & {}); +} +export const GetV1TimeoffTypesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(TimeoffTypesEmploymentType.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/timeoff/types", code: 200 })), +).annotate({ + identifier: "GetV1TimeoffTypesRequest", +}) as any as S.Schema; + +/** A single time off type with name and description */ +export interface TimeoffTypeResponse { + description?: string | null; + name: TimeoffType; +} +export const TimeoffTypeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + name: TimeoffType, + }), +).annotate({ + identifier: "TimeoffTypeResponse", +}) as any as S.Schema; + +/** List of time off types available for the requested employment type */ +export type ListTimeoffTypesResponseDataTimeoffTypesList = + Array; +export const ListTimeoffTypesResponseDataTimeoffTypesList = + /*@__PURE__*/ S.Array( + TimeoffTypeResponse, + ) as any as S.Schema; + +export interface ListTimeoffTypesResponseData { + /** List of time off types available for the requested employment type */ + timeoff_types: ListTimeoffTypesResponseDataTimeoffTypesList; +} +export const ListTimeoffTypesResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timeoff_types: ListTimeoffTypesResponseDataTimeoffTypesList, + }), +).annotate({ + identifier: "ListTimeoffTypesResponseData", +}) as any as S.Schema; + +/** Time off types response */ +export interface ListTimeoffTypesResponse { + data?: ListTimeoffTypesResponseData; +} +export const ListTimeoffTypesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListTimeoffTypesResponseData), + }), +).annotate({ + identifier: "ListTimeoffTypesResponse", +}) as any as S.Schema; + +/** 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" + | "submitted" + | "approved" + | "in_calibration" + | "processed"; +export const TimesheetStatus = /*@__PURE__*/ S.String; + +export type GetV1TimesheetsRequestOrder = "asc" | "desc"; +export const GetV1TimesheetsRequestOrder = /*@__PURE__*/ S.String; + +export type GetV1TimesheetsRequestSortBy = "submitted_at"; +export const GetV1TimesheetsRequestSortBy = /*@__PURE__*/ S.String; + +export interface GetV1TimesheetsRequest { + /** Filter timesheets by their status */ + status?: TimesheetStatus | (string & {}); + /** Sort order */ + order?: GetV1TimesheetsRequestOrder | (string & {}); + /** Field to sort by */ + sort_by?: GetV1TimesheetsRequestSortBy | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1TimesheetsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(TimesheetStatus.pipe(T.Query())), + order: S.optional(GetV1TimesheetsRequestOrder.pipe(T.Query())), + sort_by: S.optional(GetV1TimesheetsRequestSortBy.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/timesheets", code: 200 })), +).annotate({ + identifier: "GetV1TimesheetsRequest", +}) as any as S.Schema; + +/** A duration expressed as hours and minutes. */ +export interface HoursAndMinutes { + /** The number of whole hours. */ + hours?: number; + /** The number of remaining minutes (0-59). */ + minutes?: number; +} +export const HoursAndMinutes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hours: S.optional(S.Number), + minutes: S.optional(S.Number), + }), +).annotate({ + identifier: "HoursAndMinutes", +}) as any as S.Schema; + +/** Hours breakdown by type of day (regular working day, weekend, or public holiday) for a specific time of day (day or night). */ +export interface TypeOfDayBreakdown { + holiday: HoursAndMinutes; + regular: HoursAndMinutes; + weekend: HoursAndMinutes; +} +export const TypeOfDayBreakdown = /*@__PURE__*/ S.suspend(() => + S.Struct({ + holiday: HoursAndMinutes, + regular: HoursAndMinutes, + weekend: HoursAndMinutes, + }), +).annotate({ + identifier: "TypeOfDayBreakdown", +}) as any as S.Schema; + +/** 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 interface TimeBreakdown { + day: TypeOfDayBreakdown; + night: TypeOfDayBreakdown; +} +export const TimeBreakdown = /*@__PURE__*/ S.suspend(() => + S.Struct({ + day: TypeOfDayBreakdown, + night: TypeOfDayBreakdown, + }), +).annotate({ identifier: "TimeBreakdown" }) as any as S.Schema; + +/** The category of time being tracked (e.g., regular hours, overtime, on-call, break time). */ +export type TimeTrackingType = + | "regular_hours" + | "overtime" + | "on_call" + | "break" + | "unpaid_break" + | "time_off" + | "public_holiday"; +export const TimeTrackingType = /*@__PURE__*/ S.String; + +/** 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 interface TimeTracking { + clock_in: string; + clock_out: string; + /** 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: string; + total_hours: HoursAndMinutes; + /** The category of time being tracked (e.g., regular hours, overtime, on-call, break time). */ + type: TimeTrackingType; + weekend_hours: HoursAndMinutes; +} +export const TimeTracking = /*@__PURE__*/ S.suspend(() => + S.Struct({ + clock_in: S.String, + clock_out: S.String, + has_holiday_hours: S.Boolean, + has_night_hours: S.Boolean, + has_weekend_hours: S.Boolean, + holiday_hours: HoursAndMinutes, + night_hours: HoursAndMinutes, + notes: S.NullOr(S.String), + time_breakdown: TimeBreakdown, + timezone: S.String, + total_hours: HoursAndMinutes, + type: TimeTrackingType, + weekend_hours: HoursAndMinutes, + }), +).annotate({ identifier: "TimeTracking" }) as any as S.Schema; + +/** The individual time tracking entries that make up this timesheet. */ +export type TimesheetTimeTrackingsList = Array; +export const TimesheetTimeTrackingsList = /*@__PURE__*/ S.Array( + TimeTracking, +) as any as S.Schema; + +/** 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 interface 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: string; + employment_id: string; + end_date: string; + holiday_hours: HoursAndMinutes; + id: string; + 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: string; + 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: TimesheetTimeTrackingsList; + timeoff_hours?: HoursAndMinutes; + total_hours: HoursAndMinutes; + unpaid_break_hours: HoursAndMinutes; + weekend_hours: HoursAndMinutes; +} +export const Timesheet = /*@__PURE__*/ S.suspend(() => + S.Struct({ + approval_required: S.Boolean, + break_hours: HoursAndMinutes, + country_code: S.String, + employment_id: S.String, + end_date: S.String, + holiday_hours: HoursAndMinutes, + id: S.String, + night_hours: HoursAndMinutes, + notes: S.NullOr(S.String), + on_call_hours: HoursAndMinutes, + overtime_hours: HoursAndMinutes, + regular_hours: HoursAndMinutes, + start_date: S.String, + status: TimesheetStatus, + submitted_at: S.NullOr(S.String), + time_trackings: TimesheetTimeTrackingsList, + timeoff_hours: S.optional(HoursAndMinutes), + total_hours: HoursAndMinutes, + unpaid_break_hours: HoursAndMinutes, + weekend_hours: HoursAndMinutes, + }), +).annotate({ identifier: "Timesheet" }) as any as S.Schema; + +export type ListTimesheetsResponseDataTimesheetsList = Array; +export const ListTimesheetsResponseDataTimesheetsList = /*@__PURE__*/ S.Array( + Timesheet, +) as any as S.Schema; + +export interface ListTimesheetsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + timesheets?: ListTimesheetsResponseDataTimesheetsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const ListTimesheetsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + timesheets: S.optional(ListTimesheetsResponseDataTimesheetsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "ListTimesheetsResponseData", +}) as any as S.Schema; + +/** Response schema listing many timesheets */ +export interface ListTimesheetsResponse { + data?: ListTimesheetsResponseData; +} +export const ListTimesheetsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListTimesheetsResponseData), + }), +).annotate({ + identifier: "ListTimesheetsResponse", +}) as any as S.Schema; + +export interface GetV1TimesheetsIdRequest { + /** Timesheet ID */ + id: string; +} +export const GetV1TimesheetsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v1/timesheets/{id}", code: 200 })), +).annotate({ + identifier: "GetV1TimesheetsIdRequest", +}) as any as S.Schema; + +export interface TimesheetResponseData { + timesheet: Timesheet; +} +export const TimesheetResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timesheet: Timesheet, + }), +).annotate({ + identifier: "TimesheetResponseData", +}) as any as S.Schema; + +/** Response containing a full timesheet with all hour breakdowns and time tracking entries. */ +export interface TimesheetResponse { + data?: TimesheetResponseData; +} +export const TimesheetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(TimesheetResponseData), + }), +).annotate({ + identifier: "TimesheetResponse", +}) as any as S.Schema; + +export type GetV1TravelLetterRequestsRequestStatus = + | "pending" + | "cancelled" + | "declined_by_manager" + | "declined_by_remote" + | "approved_by_manager" + | "approved_by_remote"; +export const GetV1TravelLetterRequestsRequestStatus = /*@__PURE__*/ S.String; + +export type GetV1TravelLetterRequestsRequestOrder = "asc" | "desc"; +export const GetV1TravelLetterRequestsRequestOrder = /*@__PURE__*/ S.String; + +export type GetV1TravelLetterRequestsRequestSortBy = "submitted_at"; +export const GetV1TravelLetterRequestsRequestSortBy = /*@__PURE__*/ S.String; + +export interface GetV1TravelLetterRequestsRequest { + /** Filter results on the given status */ + status?: GetV1TravelLetterRequestsRequestStatus | (string & {}); + /** Filter results on the given employment slug */ + employment_id?: string; + /** Filter results on the given employee name */ + employee_name?: string; + /** Sort order */ + order?: GetV1TravelLetterRequestsRequestOrder | (string & {}); + /** Field to sort by */ + sort_by?: GetV1TravelLetterRequestsRequestSortBy | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1TravelLetterRequestsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(GetV1TravelLetterRequestsRequestStatus.pipe(T.Query())), + employment_id: S.optional(S.String.pipe(T.Query())), + employee_name: S.optional(S.String.pipe(T.Query())), + order: S.optional(GetV1TravelLetterRequestsRequestOrder.pipe(T.Query())), + sort_by: S.optional(GetV1TravelLetterRequestsRequestSortBy.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/v1/travel-letter-requests", code: 200 }), + ), +).annotate({ + identifier: "GetV1TravelLetterRequestsRequest", +}) as any as S.Schema; + +/** A user associated with a travel letter request (either the employee or the employer approver). */ +export interface TravelLetterUser { + /** The user's email address. */ + email: string; + /** The unique identifier (UUID) of the user. */ + id: string; + /** The user's full name. */ + name: string; +} +export const TravelLetterUser = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.String, + id: S.String, + name: S.String, + }), +).annotate({ + identifier: "TravelLetterUser", +}) as any as S.Schema; + +/** Who is responsible for accommodation costs during the trip. Set by the employer during approval. Null if not yet approved. */ +export type TravelLetterRequestResponsibleForAccommodationCost = + | "employee" + | "employer"; +export const TravelLetterRequestResponsibleForAccommodationCost = + /*@__PURE__*/ S.String; + +/** Who is responsible for meal costs during the trip. Set by the employer during approval. Null if not yet approved. */ +export type TravelLetterRequestResponsibleForMealCost = "employee" | "employer"; +export const TravelLetterRequestResponsibleForMealCost = /*@__PURE__*/ S.String; + +/** Who is responsible for transportation costs. Set by the employer during approval. Null if not yet approved. */ +export type TravelLetterRequestResponsibleForTravelCost = + | "employee" + | "employer"; +export const TravelLetterRequestResponsibleForTravelCost = + /*@__PURE__*/ S.String; + +/** 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. */ +export type TravelLetterRequestStatus = + | "pending" + | "cancelled" + | "declined_by_manager" + | "declined_by_remote" + | "approved_by_manager" + | "approved_by_remote"; +export const TravelLetterRequestStatus = /*@__PURE__*/ S.String; + +/** 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 interface 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 | null; + /** 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: TravelLetterRequestResponsibleForAccommodationCost | null; + /** Who is responsible for meal costs during the trip. Set by the employer during approval. Null if not yet approved. */ + responsible_for_meal_cost: TravelLetterRequestResponsibleForMealCost | null; + /** Who is responsible for transportation costs. Set by the employer during approval. Null if not yet approved. */ + responsible_for_travel_cost: TravelLetterRequestResponsibleForTravelCost | null; + /** 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: TravelLetterRequestStatus; + submitted_at: string; + /** 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: string; + travel_date_start: string; + /** 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 | null; +} +export const TravelLetterRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_information: S.String, + destination_country: Country, + embassy_address: S.String, + employer_approver: S.NullOr(TravelLetterUser), + employer_special_instructions: S.NullOr(S.String), + id: S.String, + reason: S.String, + requires_travel_address: S.Boolean, + responsible_for_accommodation_cost: S.NullOr( + TravelLetterRequestResponsibleForAccommodationCost, + ), + responsible_for_meal_cost: S.NullOr( + TravelLetterRequestResponsibleForMealCost, + ), + responsible_for_travel_cost: S.NullOr( + TravelLetterRequestResponsibleForTravelCost, + ), + status: TravelLetterRequestStatus, + submitted_at: S.String, + travel_address: S.NullOr(S.String), + travel_date_end: S.String, + travel_date_start: S.String, + travel_document_number: S.String, + travel_reason: S.String, + travel_reason_details: S.String, + user: S.NullOr(TravelLetterUser), + }), +).annotate({ + identifier: "TravelLetterRequest", +}) as any as S.Schema; + +export type ListTravelLettersResponseDataTravelLetterRequestsList = + Array; +export const ListTravelLettersResponseDataTravelLetterRequestsList = + /*@__PURE__*/ S.Array( + TravelLetterRequest, + ) as any as S.Schema; + +export interface ListTravelLettersResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; + travel_letter_requests?: ListTravelLettersResponseDataTravelLetterRequestsList; +} +export const ListTravelLettersResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + travel_letter_requests: S.optional( + ListTravelLettersResponseDataTravelLetterRequestsList, + ), + }), +).annotate({ + identifier: "ListTravelLettersResponseData", +}) as any as S.Schema; + +/** Response schema listing many travel_letter_requests */ +export interface ListTravelLettersResponse { + data?: ListTravelLettersResponseData; +} +export const ListTravelLettersResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListTravelLettersResponseData), + }), +).annotate({ + identifier: "ListTravelLettersResponse", +}) as any as S.Schema; + +export interface GetV1TravelLetterRequestsIdRequest { + /** travel letter request ID */ + id: string; +} +export const GetV1TravelLetterRequestsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/travel-letter-requests/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1TravelLetterRequestsIdRequest", +}) as any as S.Schema; + +export interface TravelLetterResponseData { + travel_letter_request: TravelLetterRequest; +} +export const TravelLetterResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + travel_letter_request: TravelLetterRequest, + }), +).annotate({ + identifier: "TravelLetterResponseData", +}) as any as S.Schema; + +/** Schema for travel letter request */ +export interface TravelLetterResponse { + data: TravelLetterResponseData; +} +export const TravelLetterResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: TravelLetterResponseData, + }), +).annotate({ + identifier: "TravelLetterResponse", +}) as any as S.Schema; + +export type GetV1WebhookEventsRequestOrder = "asc" | "desc"; +export const GetV1WebhookEventsRequestOrder = /*@__PURE__*/ S.String; + +export type GetV1WebhookEventsRequestSortBy = "first_triggered_at"; +export const GetV1WebhookEventsRequestSortBy = /*@__PURE__*/ S.String; + +export interface GetV1WebhookEventsRequest { + /** 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?: GetV1WebhookEventsRequestOrder | (string & {}); + /** Field to sort by */ + sort_by?: GetV1WebhookEventsRequestSortBy | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1WebhookEventsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + event_type: S.optional(S.String.pipe(T.Query())), + successfully_delivered: S.optional(S.Boolean.pipe(T.Query())), + company_id: S.optional(S.String.pipe(T.Query())), + before: S.optional(S.String.pipe(T.Query())), + after: S.optional(S.String.pipe(T.Query())), + order: S.optional(GetV1WebhookEventsRequestOrder.pipe(T.Query())), + sort_by: S.optional(GetV1WebhookEventsRequestSortBy.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v1/webhook-events", code: 200 })), +).annotate({ + identifier: "GetV1WebhookEventsRequest", +}) as any as S.Schema; + +export interface 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; +} +export const WebhookEvent = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String, + event_type: S.String, + first_triggered_at: S.String, + id: S.String, + last_triggered_at: S.String, + successfully_delivered: S.Boolean, + }), +).annotate({ identifier: "WebhookEvent" }) as any as S.Schema; + +export type ListWebhookEventsResponseDataWebhookEventsList = + Array; +export const ListWebhookEventsResponseDataWebhookEventsList = + /*@__PURE__*/ S.Array( + WebhookEvent, + ) as any as S.Schema; + +export interface ListWebhookEventsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; + webhook_events?: ListWebhookEventsResponseDataWebhookEventsList; +} +export const ListWebhookEventsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + webhook_events: S.optional(ListWebhookEventsResponseDataWebhookEventsList), + }), +).annotate({ + identifier: "ListWebhookEventsResponseData", +}) as any as S.Schema; + +/** Response schema listing many webhook_events */ +export interface ListWebhookEventsResponse { + data?: ListWebhookEventsResponseData; +} +export const ListWebhookEventsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ListWebhookEventsResponseData), + }), +).annotate({ + identifier: "ListWebhookEventsResponse", +}) as any as S.Schema; + +export type GetV1WorkAuthorizationRequestsRequestStatus = + | "pending" + | "cancelled" + | "declined_by_manager" + | "declined_by_remote" + | "approved_by_manager" + | "approved_by_remote"; +export const GetV1WorkAuthorizationRequestsRequestStatus = + /*@__PURE__*/ S.String; + +export type GetV1WorkAuthorizationRequestsRequestOrder = "asc" | "desc"; +export const GetV1WorkAuthorizationRequestsRequestOrder = + /*@__PURE__*/ S.String; + +export type GetV1WorkAuthorizationRequestsRequestSortBy = "submitted_at"; +export const GetV1WorkAuthorizationRequestsRequestSortBy = + /*@__PURE__*/ S.String; + +export interface GetV1WorkAuthorizationRequestsRequest { + /** Filter results on the given status */ + status?: GetV1WorkAuthorizationRequestsRequestStatus | (string & {}); + /** Filter results on the given employment slug */ + employment_id?: string; + /** Filter results on the given employee name */ + employee_name?: string; + /** Sort order */ + order?: GetV1WorkAuthorizationRequestsRequestOrder | (string & {}); + /** Field to sort by */ + sort_by?: GetV1WorkAuthorizationRequestsRequestSortBy | (string & {}); + /** Starts fetching records after the given page */ + page?: number; + /** Number of items per page */ + page_size?: number; +} +export const GetV1WorkAuthorizationRequestsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + status: S.optional( + GetV1WorkAuthorizationRequestsRequestStatus.pipe(T.Query()), + ), + employment_id: S.optional(S.String.pipe(T.Query())), + employee_name: S.optional(S.String.pipe(T.Query())), + order: S.optional( + GetV1WorkAuthorizationRequestsRequestOrder.pipe(T.Query()), + ), + sort_by: S.optional( + GetV1WorkAuthorizationRequestsRequestSortBy.pipe(T.Query()), + ), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/work-authorization-requests", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1WorkAuthorizationRequestsRequest", +}) as any as S.Schema; + +/** A user associated with a work authorization request (either the employee or the employer approver). */ +export type WorkAuthorizationUser = TravelLetterUser; +export const WorkAuthorizationUser = TravelLetterUser; + +/** 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. */ +export type WorkAuthorizationRequestStatus = + | "pending" + | "cancelled" + | "declined_by_manager" + | "declined_by_remote" + | "approved_by_manager" + | "approved_by_remote"; +export const WorkAuthorizationRequestStatus = /*@__PURE__*/ S.String; + +/** 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 interface WorkAuthorizationRequest { + /** Additional information provided by the employee about their work authorization needs. */ + additional_information: string; + destination_country: Country; + employer_approver: TravelLetterUser | null; + /** 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: WorkAuthorizationRequestStatus; + submitted_at: string; + travel_date_end: string; + travel_date_start: string; + /** The employee's travel document (passport) number. */ + travel_document_number: string; + user: TravelLetterUser | null; + /** 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; +} +export const WorkAuthorizationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_information: S.String, + destination_country: Country, + employer_approver: S.NullOr(TravelLetterUser), + employer_special_instructions: S.NullOr(S.String), + id: S.String, + reason: S.String, + status: WorkAuthorizationRequestStatus, + submitted_at: S.String, + travel_date_end: S.String, + travel_date_start: S.String, + travel_document_number: S.String, + user: S.NullOr(TravelLetterUser), + will_negotiate_or_sign_contracts: S.NullOr(S.Boolean), + work_location: S.NullOr(S.String), + }), +).annotate({ + identifier: "WorkAuthorizationRequest", +}) as any as S.Schema; + +export type ListWorkAuthorizationRequestsResponseDataWorkAuthorizationRequestsList = + Array; +export const ListWorkAuthorizationRequestsResponseDataWorkAuthorizationRequestsList = + /*@__PURE__*/ S.Array( + WorkAuthorizationRequest, + ) as any as S.Schema; + +export interface ListWorkAuthorizationRequestsResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; + work_authorization_requests?: ListWorkAuthorizationRequestsResponseDataWorkAuthorizationRequestsList; +} +export const ListWorkAuthorizationRequestsResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + work_authorization_requests: S.optional( + ListWorkAuthorizationRequestsResponseDataWorkAuthorizationRequestsList, + ), + }), + ).annotate({ + identifier: "ListWorkAuthorizationRequestsResponseData", + }) as any as S.Schema; + +/** Response schema listing many work_authorization_requests */ +export interface ListWorkAuthorizationRequestsResponse { + data?: ListWorkAuthorizationRequestsResponseData; +} +export const ListWorkAuthorizationRequestsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: S.optional(ListWorkAuthorizationRequestsResponseData), + }), +).annotate({ + identifier: "ListWorkAuthorizationRequestsResponse", +}) as any as S.Schema; + +export interface GetV1WorkAuthorizationRequestsIdRequest { + /** work authorization request ID */ + id: string; +} +export const GetV1WorkAuthorizationRequestsIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v1/work-authorization-requests/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetV1WorkAuthorizationRequestsIdRequest", +}) as any as S.Schema; + +export interface WorkAuthorizationRequestResponseData { + work_authorization_request: WorkAuthorizationRequest; +} +export const WorkAuthorizationRequestResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + work_authorization_request: WorkAuthorizationRequest, + }), +).annotate({ + identifier: "WorkAuthorizationRequestResponseData", +}) as any as S.Schema; + +/** Schema for work authorization request */ +export interface WorkAuthorizationRequestResponse { + data: WorkAuthorizationRequestResponseData; +} +export const WorkAuthorizationRequestResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: WorkAuthorizationRequestResponseData, + }), +).annotate({ + identifier: "WorkAuthorizationRequestResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1 = + "latest"; +export const GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion = + | number + | GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1; +export const GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetV2EmploymentsEmploymentIdBasicInformationRequest { + /** Employment ID */ + employment_id: string; + /** Version of the employment_basic_information form schema */ + employment_basic_information_json_schema_version?: GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion; +} +export const GetV2EmploymentsEmploymentIdBasicInformationRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + employment_basic_information_json_schema_version: S.optional( + GetV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/v2/employments/{employment_id}/basic-information", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV2EmploymentsEmploymentIdBasicInformationRequest", + }) as any as S.Schema; + +export interface GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest { + /** Employment ID */ + employment_id: string; +} +export const GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/v2/employments/{employment_id}/engagement-agreement-details", + code: 200, + }), + ), + ).annotate({ + identifier: "GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest", + }) as any as S.Schema; + +export type GetV2OffboardingsRequestType = + | "termination" + | "resignation" + | "cancellation" + | "relocation" + | "transfer" + | "conversion"; +export const GetV2OffboardingsRequestType = /*@__PURE__*/ S.String; + +export interface GetV2OffboardingsRequest { + /** Filter by Employment ID */ + employment_id?: string; + /** Filter by offboarding type. */ + type?: GetV2OffboardingsRequestType | (string & {}); + /** By default, the results do not include confidential termination requests. Send `include_confidential=true` to include confidential requests in the response. */ + include_confidential?: boolean; + /** Starts fetching records after the given page */ + page?: number; + /** Change the amount of records returned per page, defaults to 20, limited to 100 */ + page_size?: number; +} +export const GetV2OffboardingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.optional(S.String.pipe(T.Query())), + type: S.optional(GetV2OffboardingsRequestType.pipe(T.Query())), + include_confidential: S.optional(S.Boolean.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + page_size: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/v2/offboardings", code: 200 })), +).annotate({ + identifier: "GetV2OffboardingsRequest", +}) as any as S.Schema; + +/** Present only when the requester indicated they have already informed the employee about the termination. */ +export interface V2TerminationRequestEmployeeAwareness { + date?: string | null; + note?: string | null; +} +export const V2TerminationRequestEmployeeAwareness = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + date: S.optional(S.NullOr(S.String)), + note: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "V2TerminationRequestEmployeeAwareness", +}) as any as S.Schema; + +/** Risk-assessment flags submitted by the requester. */ +export type V2TerminationRequestRiskAssessmentReasonsList = Array; +export const V2TerminationRequestRiskAssessmentReasonsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Snapshot of the inputs submitted when a `termination` offboarding was created. These fields do not change as the offboarding progresses. */ +export interface V2TerminationRequest { + /** Free-text additional comments submitted by the requester. */ + additional_comments?: string | null; + /** Whether the requester agreed with the proposed PTO amount. */ + agrees_to_pto_amount?: boolean | null; + /** Present only when the requester indicated they have already informed the employee about the termination. */ + employee_awareness?: V2TerminationRequestEmployeeAwareness | null; + /** The termination date proposed by the requester. */ + proposed_termination_date?: string | null; + /** Free-text description of the termination reason submitted by the requester. */ + reason_description?: string | null; + /** Risk-assessment flags submitted by the requester. */ + risk_assessment_reasons?: V2TerminationRequestRiskAssessmentReasonsList | null; + /** Whether the requester expects the employee to challenge the termination. */ + will_challenge_termination?: boolean | null; + /** Additional context the requester provided about a potential challenge. */ + will_challenge_termination_description?: string | null; +} +export const V2TerminationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_comments: S.optional(S.NullOr(S.String)), + agrees_to_pto_amount: S.optional(S.NullOr(S.Boolean)), + employee_awareness: S.optional( + S.NullOr(V2TerminationRequestEmployeeAwareness), + ), + proposed_termination_date: S.optional(S.NullOr(S.String)), + reason_description: S.optional(S.NullOr(S.String)), + risk_assessment_reasons: S.optional( + S.NullOr(V2TerminationRequestRiskAssessmentReasonsList), + ), + will_challenge_termination: S.optional(S.NullOr(S.Boolean)), + will_challenge_termination_description: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "V2TerminationRequest", +}) as any as S.Schema; + +/** Snapshot of the inputs submitted when a `resignation` offboarding was created. These fields do not change as the offboarding progresses. */ +export interface V2ResignationRequest { + /** Free-text additional comments submitted by the employee. */ + additional_comments?: string | null; + /** Present only when the employee indicated they have already informed the employer about the resignation. */ + employer_awareness?: string | null; + /** The last working day proposed by the employee. */ + proposed_last_working_day?: string | null; + /** Free-text description of the resignation reason submitted by the employee. */ + reason_description?: string | null; +} +export const V2ResignationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_comments: S.optional(S.NullOr(S.String)), + employer_awareness: S.optional(S.NullOr(S.String)), + proposed_last_working_day: S.optional(S.NullOr(S.String)), + reason_description: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "V2ResignationRequest", +}) as any as S.Schema; + +/** The shape depends on the originating request: offboardings that originated from a termination carry a `V2TerminationRequest`; those that originated from a resignation carry a `V2ResignationRequest`. */ +export type V2OffboardingRequest = V2TerminationRequest | V2ResignationRequest; +export const V2OffboardingRequest = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** The current processing status of the offboarding. - `requested`: The offboarding request has been received and is awaiting review. - `in_review`: Remote is reviewing the request for legal compliance and risks. - `pending_payment`: The offboarding has been approved and submitted to payroll; the employee's final payment is being processed. - `completed`: The offboarding is complete and the employment has been terminated. */ +export type V2OffboardingStatus = + | "requested" + | "in_review" + | "pending_payment" + | "completed"; +export const V2OffboardingStatus = /*@__PURE__*/ S.String; + +/** The offboarding type. */ +export type V2OffboardingType = + | "termination" + | "resignation" + | "cancellation" + | "relocation" + | "transfer" + | "conversion"; +export const V2OffboardingType = /*@__PURE__*/ S.String; + +/** An offboarding record. Top-level fields hold the offboarding's lifecycle state. The nested `request` object holds the immutable creation snapshot of the inputs submitted when the offboarding was created. */ +export interface V2Offboarding { + /** Whether the offboarding is confidential. Confidential offboardings are hidden from list and show responses by default. */ + confidential?: boolean | null; + /** The unique identifier (UUID) of the employment being offboarded. */ + employment_id: string; + /** The unique identifier (UUID) of the offboarding record. */ + id: string; + /** The timestamp when the offboarding record was created. */ + inserted_at: string; + /** The reason for the offboarding. */ + reason?: string | null; + request?: V2OffboardingRequest | null; + /** The current processing status of the offboarding. - `requested`: The offboarding request has been received and is awaiting review. - `in_review`: Remote is reviewing the request for legal compliance and risks. - `pending_payment`: The offboarding has been approved and submitted to payroll; the employee's final payment is being processed. - `completed`: The offboarding is complete and the employment has been terminated. */ + status: V2OffboardingStatus; + /** The confirmed last day of employment. May be null until Remote finalizes the date. */ + termination_date?: string | null; + /** The offboarding type. */ + type: V2OffboardingType; +} +export const V2Offboarding = /*@__PURE__*/ S.suspend(() => + S.Struct({ + confidential: S.optional(S.NullOr(S.Boolean)), + employment_id: S.String, + id: S.String, + inserted_at: S.String, + reason: S.optional(S.NullOr(S.String)), + request: S.optional(S.NullOr(V2OffboardingRequest)), + status: V2OffboardingStatus, + termination_date: S.optional(S.NullOr(S.String)), + type: V2OffboardingType, + }), +).annotate({ identifier: "V2Offboarding" }) as any as S.Schema; + +export type V2ListOffboardingResponseDataOffboardingsList = + Array; +export const V2ListOffboardingResponseDataOffboardingsList = + /*@__PURE__*/ S.Array( + V2Offboarding, + ) as any as S.Schema; + +export interface V2ListOffboardingResponseData { + /** The current page among all of the total_pages */ + current_page?: number; + offboardings?: V2ListOffboardingResponseDataOffboardingsList; + /** The total number of records in the result */ + total_count?: number; + /** The total number of pages the user can go through */ + total_pages?: number; +} +export const V2ListOffboardingResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_page: S.optional(S.Number), + offboardings: S.optional(V2ListOffboardingResponseDataOffboardingsList), + total_count: S.optional(S.Number), + total_pages: S.optional(S.Number), + }), +).annotate({ + identifier: "V2ListOffboardingResponseData", +}) as any as S.Schema; + +/** Response schema listing many offboardings */ +export interface V2ListOffboardingResponse { + data?: V2ListOffboardingResponseData; +} +export const V2ListOffboardingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(V2ListOffboardingResponseData), + }), +).annotate({ + identifier: "V2ListOffboardingResponse", +}) as any as S.Schema; + +export interface GetV2OffboardingsIdRequest { + /** Offboarding ID */ + id: string; +} +export const GetV2OffboardingsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/v2/offboardings/{id}", code: 200 })), +).annotate({ + identifier: "GetV2OffboardingsIdRequest", +}) as any as S.Schema; + +export interface V2OffboardingResponseData { + offboarding?: V2Offboarding; +} +export const V2OffboardingResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + offboarding: S.optional(V2Offboarding), + }), +).annotate({ + identifier: "V2OffboardingResponseData", +}) as any as S.Schema; + +/** Response containing a single v2 offboarding record. */ +export interface V2OffboardingResponse { + data?: V2OffboardingResponseData; +} +export const V2OffboardingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(V2OffboardingResponseData), + }), +).annotate({ + identifier: "V2OffboardingResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersion = + | number + | PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersionCase1; +export const PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersion = + | number + | PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersionCase1; +export const PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country. This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it. */ +export type PatchV1CompaniesCompanyIdRequestDesiredCurrency = + | "AUD" + | "CAD" + | "CHF" + | "DKK" + | "EUR" + | "GBP" + | "JPY" + | "NOK" + | "NZD" + | "SEK" + | "SGD" + | "USD"; +export const PatchV1CompaniesCompanyIdRequestDesiredCurrency = + /*@__PURE__*/ S.String; + +export interface PatchV1CompaniesCompanyIdRequest { + /** Company ID */ + company_id: string; + /** Version of the address_details form schema */ + address_details_json_schema_version?: PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersion; + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersion; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `address_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + address_details?: unknown; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `bank_account_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + bank_account_details?: unknown; + /** Country of company address */ + country_code?: string; + /** Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country. This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it. */ + desired_currency?: + | PatchV1CompaniesCompanyIdRequestDesiredCurrency + | (string & {}); + /** This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it. */ + name?: string; + /** A phone number the company can be contacted with. */ + phone_number?: string; + /** The company registration number. This field or tax_number (but not both) should be submitted. This field is only accepted if company is in status `pending`. */ + registration_number?: string; + /** The tax identifier of the company. This field or registration_number (but not both) should be submitted. This field is only accepted if company is in status `pending`. */ + tax_number?: string; +} +export const PatchV1CompaniesCompanyIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + address_details_json_schema_version: S.optional( + PatchV1CompaniesCompanyIdRequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + bank_account_details_json_schema_version: S.optional( + PatchV1CompaniesCompanyIdRequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + address_details: S.optional(S.Unknown), + bank_account_details: S.optional(S.Unknown), + country_code: S.optional(S.String), + desired_currency: S.optional( + PatchV1CompaniesCompanyIdRequestDesiredCurrency, + ), + name: S.optional(S.String), + phone_number: S.optional(S.String), + registration_number: S.optional(S.String), + tax_number: S.optional(S.String), + }).pipe( + T.Http({ method: "PUT", uri: "/v1/companies/{company_id}", code: 200 }), + ), +).annotate({ + identifier: "PatchV1CompaniesCompanyIdRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersion = + | number + | PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersionCase1; +export const PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersion = + | number + | PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersionCase1; +export const PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country. This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it. */ +export type PatchV1CompaniesCompanyId2RequestDesiredCurrency = + | "AUD" + | "CAD" + | "CHF" + | "DKK" + | "EUR" + | "GBP" + | "JPY" + | "NOK" + | "NZD" + | "SEK" + | "SGD" + | "USD"; +export const PatchV1CompaniesCompanyId2RequestDesiredCurrency = + /*@__PURE__*/ S.String; + +export interface PatchV1CompaniesCompanyId2Request { + /** Company ID */ + company_id: string; + /** Version of the address_details form schema */ + address_details_json_schema_version?: PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersion; + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersion; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `address_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + address_details?: unknown; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `bank_account_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + bank_account_details?: unknown; + /** Country of company address */ + country_code?: string; + /** Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country. This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it. */ + desired_currency?: + | PatchV1CompaniesCompanyId2RequestDesiredCurrency + | (string & {}); + /** This field is only accepted if company is in status `pending`. Please contact Remote if you wish to update it. */ + name?: string; + /** A phone number the company can be contacted with. */ + phone_number?: string; + /** The company registration number. This field or tax_number (but not both) should be submitted. This field is only accepted if company is in status `pending`. */ + registration_number?: string; + /** The tax identifier of the company. This field or registration_number (but not both) should be submitted. This field is only accepted if company is in status `pending`. */ + tax_number?: string; +} +export const PatchV1CompaniesCompanyId2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + address_details_json_schema_version: S.optional( + PatchV1CompaniesCompanyId2RequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + bank_account_details_json_schema_version: S.optional( + PatchV1CompaniesCompanyId2RequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + address_details: S.optional(S.Unknown), + bank_account_details: S.optional(S.Unknown), + country_code: S.optional(S.String), + desired_currency: S.optional( + PatchV1CompaniesCompanyId2RequestDesiredCurrency, + ), + name: S.optional(S.String), + phone_number: S.optional(S.String), + registration_number: S.optional(S.String), + tax_number: S.optional(S.String), + }).pipe( + T.Http({ method: "PATCH", uri: "/v1/companies/{company_id}", code: 200 }), + ), +).annotate({ + identifier: "PatchV1CompaniesCompanyId2Request", +}) as any as S.Schema; + +export interface CompanyManagerBillingContact { + /** Whether this manager is the primary billing contact for the legal entity */ + is_primary_billing_contact: boolean; + /** Slug of the legal entity */ + legal_entity_slug: string; +} +export const CompanyManagerBillingContact = /*@__PURE__*/ S.suspend(() => + S.Struct({ + is_primary_billing_contact: S.Boolean, + legal_entity_slug: S.String, + }), +).annotate({ + identifier: "CompanyManagerBillingContact", +}) as any as S.Schema; + +/** The legal entities to assign or unassign this manager as billing contact for. */ +export type PatchV1CompanyManagersUserIdRequestBillingContactForList = + Array; +export const PatchV1CompanyManagersUserIdRequestBillingContactForList = + /*@__PURE__*/ S.Array( + CompanyManagerBillingContact, + ) as any as S.Schema; + +export interface PatchV1CompanyManagersUserIdRequest { + /** User ID */ + user_id: string; + /** The legal entities to assign or unassign this manager as billing contact for. */ + billing_contact_for: PatchV1CompanyManagersUserIdRequestBillingContactForList; +} +export const PatchV1CompanyManagersUserIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + user_id: S.String.pipe(T.Label()), + billing_contact_for: + PatchV1CompanyManagersUserIdRequestBillingContactForList, + }).pipe( + T.Http({ method: "PUT", uri: "/v1/company-managers/{user_id}", code: 200 }), + ), +).annotate({ + identifier: "PatchV1CompanyManagersUserIdRequest", +}) as any as S.Schema; + +/** The legal entities to assign or unassign this manager as billing contact for. */ +export type PatchV1CompanyManagersUserId2RequestBillingContactForList = + Array; +export const PatchV1CompanyManagersUserId2RequestBillingContactForList = + /*@__PURE__*/ S.Array( + CompanyManagerBillingContact, + ) as any as S.Schema; + +export interface PatchV1CompanyManagersUserId2Request { + /** User ID */ + user_id: string; + /** The legal entities to assign or unassign this manager as billing contact for. */ + billing_contact_for: PatchV1CompanyManagersUserId2RequestBillingContactForList; +} +export const PatchV1CompanyManagersUserId2Request = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + user_id: S.String.pipe(T.Label()), + billing_contact_for: + PatchV1CompanyManagersUserId2RequestBillingContactForList, + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/company-managers/{user_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV1CompanyManagersUserId2Request", +}) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type PatchV1ContractorInvoiceSchedulesIdRequestItemsList = + Array; +export const PatchV1ContractorInvoiceSchedulesIdRequestItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, + ) as any as S.Schema; + +export type PatchV1ContractorInvoiceSchedulesIdRequestStatus = + | "inactive" + | "deleted" + | "active" + | "processing"; +export const PatchV1ContractorInvoiceSchedulesIdRequestStatus = + /*@__PURE__*/ S.String; + +export interface PatchV1ContractorInvoiceSchedulesIdRequest { + /** Resource unique identifier */ + id: string; + currency?: string | null; + /** List of invoice items that composes the overall invoice amount. */ + items?: PatchV1ContractorInvoiceSchedulesIdRequestItemsList; + /** Custom defined note. */ + note?: string | null; + /** Count of remaining invoices that should be generated. */ + nr_occurrences?: number | null; + /** Invoice identifier. */ + number?: string | null; + periodicity?: ContractorInvoiceSchedulePeriodicity | (string & {}); + start_date?: string; + status?: PatchV1ContractorInvoiceSchedulesIdRequestStatus | (string & {}); +} +export const PatchV1ContractorInvoiceSchedulesIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + currency: S.optional(S.NullOr(S.String)), + items: S.optional(PatchV1ContractorInvoiceSchedulesIdRequestItemsList), + note: S.optional(S.NullOr(S.String)), + nr_occurrences: S.optional(S.NullOr(S.Number)), + number: S.optional(S.NullOr(S.String)), + periodicity: S.optional(ContractorInvoiceSchedulePeriodicity), + start_date: S.optional(S.String), + status: S.optional(PatchV1ContractorInvoiceSchedulesIdRequestStatus), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/contractor-invoice-schedules/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1ContractorInvoiceSchedulesIdRequest", + }) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type PatchV1ContractorInvoiceSchedulesId2RequestItemsList = + Array; +export const PatchV1ContractorInvoiceSchedulesId2RequestItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, + ) as any as S.Schema; + +export type PatchV1ContractorInvoiceSchedulesId2RequestStatus = + | "inactive" + | "deleted" + | "active" + | "processing"; +export const PatchV1ContractorInvoiceSchedulesId2RequestStatus = + /*@__PURE__*/ S.String; + +export interface PatchV1ContractorInvoiceSchedulesId2Request { + /** Resource unique identifier */ + id: string; + currency?: string | null; + /** List of invoice items that composes the overall invoice amount. */ + items?: PatchV1ContractorInvoiceSchedulesId2RequestItemsList; + /** Custom defined note. */ + note?: string | null; + /** Count of remaining invoices that should be generated. */ + nr_occurrences?: number | null; + /** Invoice identifier. */ + number?: string | null; + periodicity?: ContractorInvoiceSchedulePeriodicity | (string & {}); + start_date?: string; + status?: PatchV1ContractorInvoiceSchedulesId2RequestStatus | (string & {}); +} +export const PatchV1ContractorInvoiceSchedulesId2Request = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + currency: S.optional(S.NullOr(S.String)), + items: S.optional(PatchV1ContractorInvoiceSchedulesId2RequestItemsList), + note: S.optional(S.NullOr(S.String)), + nr_occurrences: S.optional(S.NullOr(S.Number)), + number: S.optional(S.NullOr(S.String)), + periodicity: S.optional(ContractorInvoiceSchedulePeriodicity), + start_date: S.optional(S.String), + status: S.optional(PatchV1ContractorInvoiceSchedulesId2RequestStatus), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/contractor-invoice-schedules/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1ContractorInvoiceSchedulesId2Request", + }) as any as S.Schema; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequestValue = + | string + | number + | boolean; +export const PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequestValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest { + /** Custom field ID */ + custom_field_id: string; + /** Employment ID */ + employment_id: string; + value: PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequestValue; +} +export const PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + custom_field_id: S.String.pipe(T.Label()), + employment_id: S.String.pipe(T.Label()), + value: PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequestValue, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/custom-fields/{custom_field_id}/values/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest", + }) as any as S.Schema; + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2RequestValue = + | string + | number + | boolean; +export const PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2RequestValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request { + /** Custom field ID */ + custom_field_id: string; + /** Employment ID */ + employment_id: string; + value: PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2RequestValue; +} +export const PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + custom_field_id: S.String.pipe(T.Label()), + employment_id: S.String.pipe(T.Label()), + value: PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2RequestValue, + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/custom-fields/{custom_field_id}/values/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request", + }) as any as S.Schema; + +/** Timeoff document params */ +export interface TimeoffDocumentParams { + /** The binary content of the file encoded with base64 */ + content: string; + /** The file name of the document */ + name: string; +} +export const TimeoffDocumentParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + }), +).annotate({ + identifier: "TimeoffDocumentParams", +}) as any as S.Schema; + +/** Timeoff days params */ +export interface TimeoffDaysParams { + day?: string; + hours?: number; +} +export const TimeoffDaysParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + day: S.optional(S.String), + hours: S.optional(S.Number), + }), +).annotate({ + identifier: "TimeoffDaysParams", +}) as any as S.Schema; + +export type PatchV1EmployeeTimeoffIdRequestTimeoffDaysList = + Array; +export const PatchV1EmployeeTimeoffIdRequestTimeoffDaysList = + /*@__PURE__*/ S.Array( + TimeoffDaysParams, + ) as any as S.Schema; + +export interface PatchV1EmployeeTimeoffIdRequest { + /** Timeoff ID */ + id: string; + document?: TimeoffDocumentParams; + /** The reason for the update. Required when updating the time off data but not changing the status. */ + edit_reason: string; + end_date?: string; + leave_policy_variant_id?: string; + notes?: string; + start_date?: string; + timeoff_days?: PatchV1EmployeeTimeoffIdRequestTimeoffDaysList; + timezone?: string; +} +export const PatchV1EmployeeTimeoffIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + document: S.optional(TimeoffDocumentParams), + edit_reason: S.String, + end_date: S.optional(S.String), + leave_policy_variant_id: S.optional(S.String), + notes: S.optional(S.String), + start_date: S.optional(S.String), + timeoff_days: S.optional(PatchV1EmployeeTimeoffIdRequestTimeoffDaysList), + timezone: S.optional(S.String), + }).pipe( + T.Http({ method: "PUT", uri: "/v1/employee/timeoff/{id}", code: 200 }), + ), +).annotate({ + identifier: "PatchV1EmployeeTimeoffIdRequest", +}) as any as S.Schema; + +export type PatchV1EmployeeTimeoffId2RequestTimeoffDaysList = + Array; +export const PatchV1EmployeeTimeoffId2RequestTimeoffDaysList = + /*@__PURE__*/ S.Array( + TimeoffDaysParams, + ) as any as S.Schema; + +export interface PatchV1EmployeeTimeoffId2Request { + /** Timeoff ID */ + id: string; + document?: TimeoffDocumentParams; + /** The reason for the update. Required when updating the time off data but not changing the status. */ + edit_reason: string; + end_date?: string; + leave_policy_variant_id?: string; + notes?: string; + start_date?: string; + timeoff_days?: PatchV1EmployeeTimeoffId2RequestTimeoffDaysList; + timezone?: string; +} +export const PatchV1EmployeeTimeoffId2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + document: S.optional(TimeoffDocumentParams), + edit_reason: S.String, + end_date: S.optional(S.String), + leave_policy_variant_id: S.optional(S.String), + notes: S.optional(S.String), + start_date: S.optional(S.String), + timeoff_days: S.optional(PatchV1EmployeeTimeoffId2RequestTimeoffDaysList), + timezone: S.optional(S.String), + }).pipe( + T.Http({ method: "PATCH", uri: "/v1/employee/timeoff/{id}", code: 200 }), + ), +).annotate({ + identifier: "PatchV1EmployeeTimeoffId2Request", +}) as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** If not provided, it will default to `employee`. */ +export type PatchV1EmploymentsEmploymentIdRequestType = + | "employee" + | "contractor"; +export const PatchV1EmploymentsEmploymentIdRequestType = /*@__PURE__*/ S.String; + +export interface PatchV1EmploymentsEmploymentIdRequest { + /** Employment ID */ + employment_id: string; + /** Version of the address_details form schema */ + address_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersion; + /** Version of the administrative_details form schema */ + administrative_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersion; + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersion; + /** Version of the employment_basic_information form schema */ + employment_basic_information_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersion; + /** Version of the billing_address_details form schema */ + billing_address_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersion; + /** Version of the contract_details form schema */ + contract_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersion; + /** Version of the emergency_contact_details form schema */ + emergency_contact_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersion; + /** Version of the personal_details form schema */ + personal_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersion; + /** Version of the pricing_plan_details form schema */ + pricing_plan_details_json_schema_version?: PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersion; + /** 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; + /** Home address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `address_details` as path parameters. */ + address_details?: unknown; + /** Administrative information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `administrative_details` as path parameters. */ + administrative_details?: unknown; + /** Bank account information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `bank_account_details` as path parameters. */ + bank_account_details?: unknown; + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + basic_information?: unknown; + /** Billing address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `billing_address_details` as path parameters. */ + billing_address_details?: 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, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `contract_details` as path parameters. */ + contract_details?: 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. When set to `null`, the employment will be unassigned from a department. */ + department_id?: string | null; + /** Emergency contact information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `emergency_contact_details` as path parameters. */ + emergency_contact_details?: unknown; + /** A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ + external_id?: string; + /** The user id of the manager, who should have an `admin`, `owner` or `people_manager` role. You can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager). **Update of this field is only available for active employments.** */ + manager_id?: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Omit the field to leave the value unchanged; send `null` to clear it. Surrounding whitespace is trimmed off. It can be set at any employment status, and the same value may be used on several employments (for example a rehire). */ + partner_external_id?: string | null; + /** Personal details information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `personal_details` as path parameters. */ + personal_details?: unknown; + /** Pricing plan details information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `pricing_plan_details` as path parameters. */ + pricing_plan_details?: unknown; + /** If not provided, it will default to `employee`. */ + type?: PatchV1EmploymentsEmploymentIdRequestType | (string & {}); + /** The work email of the employment. */ + work_email?: string; +} +export const PatchV1EmploymentsEmploymentIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + address_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + administrative_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestAdministrativeDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + bank_account_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + employment_basic_information_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestEmploymentBasicInformationJsonSchemaVersion.pipe( + T.Query(), + ), + ), + billing_address_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestBillingAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + contract_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestContractDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + emergency_contact_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestEmergencyContactDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + personal_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestPersonalDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + pricing_plan_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentIdRequestPricingPlanDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + skip_benefits: S.optional(S.Boolean.pipe(T.Query())), + actions: S.optional(S.String.pipe(T.Query())), + address_details: S.optional(S.Unknown), + administrative_details: S.optional(S.Unknown), + bank_account_details: S.optional(S.Unknown), + basic_information: S.optional(S.Unknown), + billing_address_details: S.optional(S.Unknown), + company_id: S.optional(S.String), + contract_details: S.optional(S.Unknown), + country: S.optional(Country), + country_code: S.optional(S.String), + department_id: S.optional(S.NullOr(S.String)), + emergency_contact_details: S.optional(S.Unknown), + external_id: S.optional(S.String), + manager_id: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + personal_details: S.optional(S.Unknown), + pricing_plan_details: S.optional(S.Unknown), + type: S.optional(PatchV1EmploymentsEmploymentIdRequestType), + work_email: S.optional(S.String), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employments/{employment_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV1EmploymentsEmploymentIdRequest", +}) as any as S.Schema; + +export interface EmploymentResponseData { + employment?: Employment; +} +export const EmploymentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment: S.optional(Employment), + }), +).annotate({ + identifier: "EmploymentResponseData", +}) as any as S.Schema; + +/** Response containing the full employment record after an update operation. */ +export interface EmploymentResponse { + data: EmploymentResponseData; +} +export const EmploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EmploymentResponseData, + }), +).annotate({ + identifier: "EmploymentResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersionCase1 = + "latest"; +export const PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersion = + | number + | PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersionCase1; +export const PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** If not provided, it will default to `employee`. */ +export type PatchV1EmploymentsEmploymentId2RequestType = + | "employee" + | "contractor"; +export const PatchV1EmploymentsEmploymentId2RequestType = + /*@__PURE__*/ S.String; + +export interface PatchV1EmploymentsEmploymentId2Request { + /** Employment ID */ + employment_id: string; + /** Version of the address_details form schema */ + address_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersion; + /** Version of the administrative_details form schema */ + administrative_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersion; + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersion; + /** Version of the employment_basic_information form schema */ + employment_basic_information_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersion; + /** Version of the billing_address_details form schema */ + billing_address_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersion; + /** Version of the contract_details form schema */ + contract_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersion; + /** Version of the emergency_contact_details form schema */ + emergency_contact_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersion; + /** Version of the personal_details form schema */ + personal_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersion; + /** Version of the pricing_plan_details form schema */ + pricing_plan_details_json_schema_version?: PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersion; + /** 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; + /** Home address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `address_details` as path parameters. */ + address_details?: unknown; + /** Administrative information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `administrative_details` as path parameters. */ + administrative_details?: unknown; + /** Bank account information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `bank_account_details` as path parameters. */ + bank_account_details?: unknown; + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + basic_information?: unknown; + /** Billing address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `billing_address_details` as path parameters. */ + billing_address_details?: 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, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `contract_details` as path parameters. */ + contract_details?: 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. When set to `null`, the employment will be unassigned from a department. */ + department_id?: string | null; + /** Emergency contact information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `emergency_contact_details` as path parameters. */ + emergency_contact_details?: unknown; + /** A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ + external_id?: string; + /** The user id of the manager, who should have an `admin`, `owner` or `people_manager` role. You can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager). **Update of this field is only available for active employments.** */ + manager_id?: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Omit the field to leave the value unchanged; send `null` to clear it. Surrounding whitespace is trimmed off. It can be set at any employment status, and the same value may be used on several employments (for example a rehire). */ + partner_external_id?: string | null; + /** Personal details information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `personal_details` as path parameters. */ + personal_details?: unknown; + /** Pricing plan details information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `pricing_plan_details` as path parameters. */ + pricing_plan_details?: unknown; + /** If not provided, it will default to `employee`. */ + type?: PatchV1EmploymentsEmploymentId2RequestType | (string & {}); + /** The work email of the employment. */ + work_email?: string; +} +export const PatchV1EmploymentsEmploymentId2Request = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + address_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + administrative_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestAdministrativeDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + bank_account_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + employment_basic_information_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestEmploymentBasicInformationJsonSchemaVersion.pipe( + T.Query(), + ), + ), + billing_address_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestBillingAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + contract_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestContractDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + emergency_contact_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestEmergencyContactDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + personal_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestPersonalDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + pricing_plan_details_json_schema_version: S.optional( + PatchV1EmploymentsEmploymentId2RequestPricingPlanDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + skip_benefits: S.optional(S.Boolean.pipe(T.Query())), + actions: S.optional(S.String.pipe(T.Query())), + address_details: S.optional(S.Unknown), + administrative_details: S.optional(S.Unknown), + bank_account_details: S.optional(S.Unknown), + basic_information: S.optional(S.Unknown), + billing_address_details: S.optional(S.Unknown), + company_id: S.optional(S.String), + contract_details: S.optional(S.Unknown), + country: S.optional(Country), + country_code: S.optional(S.String), + department_id: S.optional(S.NullOr(S.String)), + emergency_contact_details: S.optional(S.Unknown), + external_id: S.optional(S.String), + manager_id: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + personal_details: S.optional(S.Unknown), + pricing_plan_details: S.optional(S.Unknown), + type: S.optional(PatchV1EmploymentsEmploymentId2RequestType), + work_email: S.optional(S.String), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/employments/{employment_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV1EmploymentsEmploymentId2Request", +}) as any as S.Schema; + +export type ApproveExpenseParamsStatus = "approved"; +export const ApproveExpenseParamsStatus = /*@__PURE__*/ S.String; + +/** Approve an expense */ +export interface ApproveExpenseParams { + status: ApproveExpenseParamsStatus; +} +export const ApproveExpenseParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: ApproveExpenseParamsStatus, + }), +).annotate({ + identifier: "ApproveExpenseParams", +}) as any as S.Schema; + +export type DeclineExpenseParamsStatus = "declined"; +export const DeclineExpenseParamsStatus = /*@__PURE__*/ S.String; + +/** Decline an expense */ +export interface DeclineExpenseParams { + /** Reason for declination. */ + reason: string; + status: DeclineExpenseParamsStatus; +} +export const DeclineExpenseParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + reason: S.String, + status: DeclineExpenseParamsStatus, + }), +).annotate({ + identifier: "DeclineExpenseParams", +}) as any as S.Schema; + +/** Update expense params */ +export type UpdateExpenseParams = ApproveExpenseParams | DeclineExpenseParams; +export const UpdateExpenseParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PatchV1ExpensesIdRequest { + /** Expense ID */ + id: string; + body?: UpdateExpenseParams; +} +export const PatchV1ExpensesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + body: S.optional(UpdateExpenseParams.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "PUT", uri: "/v1/expenses/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1ExpensesIdRequest", +}) as any as S.Schema; + +export interface PatchV1ExpensesId2Request { + /** Expense ID */ + id: string; + body?: UpdateExpenseParams; +} +export const PatchV1ExpensesId2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + body: S.optional(UpdateExpenseParams.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "PATCH", uri: "/v1/expenses/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1ExpensesId2Request", +}) as any as S.Schema; + +export interface PatchV1IncentivesIdRequest { + /** Incentive ID */ + id: string; + /** The amount (in the currency of the employment) to be given to the employee. This field accepts fractional amounts as well. However to avoid precision issues and errors that can arise from storing fractional amounts, the Remote API only accepts currencies and their fractional amounts as integers. This means you should append fractional amounts to the end of the amount you're passing in with this field. For example, if the incentive you're offering is EUR 500.25, you would specify `50025` as the amount for this field. */ + amount?: number; + amount_tax_type?: AmountTaxType | (string & {}); + /** The date at which the incentive should take effect. Note that the incentive is not paid out on the effective date, but during the next payroll cycle. The effective date determines which payroll cycle the incentive will be paid out in. The effective date needs to be today or a future date. Note for recurring incentives: since the months don't have the same amount of days, if day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to the last day of each month, avoiding the possibility of skipping a month in the recurrence. */ + effective_date?: string; + note?: string | null; + /** The end date of the incentive period (month, quarter, half-year or year) */ + period_end?: string | null; + /** The start date of the incentive period (month, quarter, half-year or year) */ + period_start?: string | null; + /** A valid type according to the payment frequency */ + type?: string; +} +export const PatchV1IncentivesIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + amount: S.optional(S.Number), + amount_tax_type: S.optional(AmountTaxType), + effective_date: S.optional(S.String), + note: S.optional(S.NullOr(S.String)), + period_end: S.optional(S.NullOr(S.String)), + period_start: S.optional(S.NullOr(S.String)), + type: S.optional(S.String), + }).pipe(T.Http({ method: "PUT", uri: "/v1/incentives/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1IncentivesIdRequest", +}) as any as S.Schema; + +export interface PatchV1IncentivesId2Request { + /** Incentive ID */ + id: string; + /** The amount (in the currency of the employment) to be given to the employee. This field accepts fractional amounts as well. However to avoid precision issues and errors that can arise from storing fractional amounts, the Remote API only accepts currencies and their fractional amounts as integers. This means you should append fractional amounts to the end of the amount you're passing in with this field. For example, if the incentive you're offering is EUR 500.25, you would specify `50025` as the amount for this field. */ + amount?: number; + amount_tax_type?: AmountTaxType | (string & {}); + /** The date at which the incentive should take effect. Note that the incentive is not paid out on the effective date, but during the next payroll cycle. The effective date determines which payroll cycle the incentive will be paid out in. The effective date needs to be today or a future date. Note for recurring incentives: since the months don't have the same amount of days, if day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to the last day of each month, avoiding the possibility of skipping a month in the recurrence. */ + effective_date?: string; + note?: string | null; + /** The end date of the incentive period (month, quarter, half-year or year) */ + period_end?: string | null; + /** The start date of the incentive period (month, quarter, half-year or year) */ + period_start?: string | null; + /** A valid type according to the payment frequency */ + type?: string; +} +export const PatchV1IncentivesId2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + amount: S.optional(S.Number), + amount_tax_type: S.optional(AmountTaxType), + effective_date: S.optional(S.String), + note: S.optional(S.NullOr(S.String)), + period_end: S.optional(S.NullOr(S.String)), + period_start: S.optional(S.NullOr(S.String)), + type: S.optional(S.String), + }).pipe(T.Http({ method: "PATCH", uri: "/v1/incentives/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1IncentivesId2Request", +}) as any as S.Schema; + +export interface PatchV1PayItemsIdRequest { + /** Pay item ID */ + id: string; + /** Value of the pay item. See PayItemParams.amount for unit details. Must be non-zero; negative values are allowed for corrections. */ + amount?: number; + /** Working day date (YYYY-MM-DD) */ + effective_date?: string; + provider_data?: PayItemProviderData; +} +export const PatchV1PayItemsIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + amount: S.optional(S.Number), + effective_date: S.optional(S.String), + provider_data: S.optional(PayItemProviderData), + }).pipe(T.Http({ method: "PATCH", uri: "/v1/pay-items/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1PayItemsIdRequest", +}) as any as S.Schema; + +export interface PayItemResponseData { + pay_item: PayItem; +} +export const PayItemResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pay_item: PayItem, + }), +).annotate({ + identifier: "PayItemResponseData", +}) as any as S.Schema; + +export interface PayItemResponse { + data: PayItemResponseData; +} +export const PayItemResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: PayItemResponseData, + }), +).annotate({ + identifier: "PayItemResponse", +}) as any as S.Schema; + +export interface PatchV1SandboxEmploymentsEmploymentIdRequest { + /** Employment ID */ + employment_id: string; + provisional_start_date?: string; + status?: EmploymentStatus | (string & {}); +} +export const PatchV1SandboxEmploymentsEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + provisional_start_date: S.optional(S.String), + status: S.optional(EmploymentStatus), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/sandbox/employments/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1SandboxEmploymentsEmploymentIdRequest", + }) as any as S.Schema; + +export interface PatchV1SandboxEmploymentsEmploymentId2Request { + /** Employment ID */ + employment_id: string; + provisional_start_date?: string; + status?: EmploymentStatus | (string & {}); +} +export const PatchV1SandboxEmploymentsEmploymentId2Request = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + provisional_start_date: S.optional(S.String), + status: S.optional(EmploymentStatus), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/sandbox/employments/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1SandboxEmploymentsEmploymentId2Request", + }) as any as S.Schema; + +export type PatchV1TimeoffIdRequestStatus = "approved" | "cancelled"; +export const PatchV1TimeoffIdRequestStatus = /*@__PURE__*/ S.String; + +export type PatchV1TimeoffIdRequestTimeoffDaysList = Array; +export const PatchV1TimeoffIdRequestTimeoffDaysList = /*@__PURE__*/ S.Array( + TimeoffDaysParams, +) as any as S.Schema; + +export interface PatchV1TimeoffIdRequest { + /** Timeoff ID */ + id: string; + approved_at?: string; + approver_id?: string | null; + /** The reason for cancelling a time off. Required when updating to status `cancelled`. */ + cancel_reason: string; + document?: TimeoffDocumentParams; + /** The reason for the update. Required when updating the time off data but not changing the status. */ + edit_reason: string; + end_date?: string; + notes?: string; + start_date?: string; + status?: PatchV1TimeoffIdRequestStatus | (string & {}); + timeoff_days?: PatchV1TimeoffIdRequestTimeoffDaysList; + timeoff_type?: TimeoffType | (string & {}); + timezone?: string; +} +export const PatchV1TimeoffIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + approved_at: S.optional(S.String), + approver_id: S.optional(S.NullOr(S.String)), + cancel_reason: S.String, + document: S.optional(TimeoffDocumentParams), + edit_reason: S.String, + end_date: S.optional(S.String), + notes: S.optional(S.String), + start_date: S.optional(S.String), + status: S.optional(PatchV1TimeoffIdRequestStatus), + timeoff_days: S.optional(PatchV1TimeoffIdRequestTimeoffDaysList), + timeoff_type: S.optional(TimeoffType), + timezone: S.optional(S.String), + }).pipe(T.Http({ method: "PUT", uri: "/v1/timeoff/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1TimeoffIdRequest", +}) as any as S.Schema; + +export type PatchV1TimeoffId2RequestStatus = "approved" | "cancelled"; +export const PatchV1TimeoffId2RequestStatus = /*@__PURE__*/ S.String; + +export type PatchV1TimeoffId2RequestTimeoffDaysList = Array; +export const PatchV1TimeoffId2RequestTimeoffDaysList = /*@__PURE__*/ S.Array( + TimeoffDaysParams, +) as any as S.Schema; + +export interface PatchV1TimeoffId2Request { + /** Timeoff ID */ + id: string; + approved_at?: string; + approver_id?: string | null; + /** The reason for cancelling a time off. Required when updating to status `cancelled`. */ + cancel_reason: string; + document?: TimeoffDocumentParams; + /** The reason for the update. Required when updating the time off data but not changing the status. */ + edit_reason: string; + end_date?: string; + notes?: string; + start_date?: string; + status?: PatchV1TimeoffId2RequestStatus | (string & {}); + timeoff_days?: PatchV1TimeoffId2RequestTimeoffDaysList; + timeoff_type?: TimeoffType | (string & {}); + timezone?: string; +} +export const PatchV1TimeoffId2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + approved_at: S.optional(S.String), + approver_id: S.optional(S.NullOr(S.String)), + cancel_reason: S.String, + document: S.optional(TimeoffDocumentParams), + edit_reason: S.String, + end_date: S.optional(S.String), + notes: S.optional(S.String), + start_date: S.optional(S.String), + status: S.optional(PatchV1TimeoffId2RequestStatus), + timeoff_days: S.optional(PatchV1TimeoffId2RequestTimeoffDaysList), + timeoff_type: S.optional(TimeoffType), + timezone: S.optional(S.String), + }).pipe(T.Http({ method: "PATCH", uri: "/v1/timeoff/{id}", code: 200 })), +).annotate({ + identifier: "PatchV1TimeoffId2Request", +}) as any as S.Schema; + +export type ApprovedTravelLetterResponsibleForAccommodationCost = + | "employee" + | "employer"; +export const ApprovedTravelLetterResponsibleForAccommodationCost = + /*@__PURE__*/ S.String; + +export type ApprovedTravelLetterResponsibleForMealCost = + | "employee" + | "employer"; +export const ApprovedTravelLetterResponsibleForMealCost = + /*@__PURE__*/ S.String; + +export type ApprovedTravelLetterResponsibleForTravelCost = + | "employee" + | "employer"; +export const ApprovedTravelLetterResponsibleForTravelCost = + /*@__PURE__*/ S.String; + +export type ApprovedTravelLetterStatus = "approved_by_manager"; +export const ApprovedTravelLetterStatus = /*@__PURE__*/ S.String; + +/** Schema for approved travel letter */ +export interface ApprovedTravelLetter { + employer_special_instructions?: string | null; + responsible_for_accommodation_cost: + | ApprovedTravelLetterResponsibleForAccommodationCost + | (string & {}); + responsible_for_meal_cost: + | ApprovedTravelLetterResponsibleForMealCost + | (string & {}); + responsible_for_travel_cost: + | ApprovedTravelLetterResponsibleForTravelCost + | (string & {}); + status: ApprovedTravelLetterStatus; +} +export const ApprovedTravelLetter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employer_special_instructions: S.optional(S.NullOr(S.String)), + responsible_for_accommodation_cost: + ApprovedTravelLetterResponsibleForAccommodationCost, + responsible_for_meal_cost: ApprovedTravelLetterResponsibleForMealCost, + responsible_for_travel_cost: ApprovedTravelLetterResponsibleForTravelCost, + status: ApprovedTravelLetterStatus, + }), +).annotate({ + identifier: "ApprovedTravelLetter", +}) as any as S.Schema; + +export type DeclinedTravelLetterStatus = "declined_by_manager"; +export const DeclinedTravelLetterStatus = /*@__PURE__*/ S.String; + +/** Schema for declined travel letter */ +export interface DeclinedTravelLetter { + employer_special_instructions?: string | null; + reason: string; + status: DeclinedTravelLetterStatus; +} +export const DeclinedTravelLetter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employer_special_instructions: S.optional(S.NullOr(S.String)), + reason: S.String, + status: DeclinedTravelLetterStatus, + }), +).annotate({ + identifier: "DeclinedTravelLetter", +}) as any as S.Schema; + +/** Schema for updating travel letter request parameters */ +export type UpdateTravelLetterRequestParams = + | ApprovedTravelLetter + | DeclinedTravelLetter; +export const UpdateTravelLetterRequestParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PatchV1TravelLetterRequestsIdRequest { + /** Travel letter Request ID */ + id: string; + body: UpdateTravelLetterRequestParams; +} +export const PatchV1TravelLetterRequestsIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + body: UpdateTravelLetterRequestParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/travel-letter-requests/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV1TravelLetterRequestsIdRequest", +}) as any as S.Schema; + +export interface PatchV1TravelLetterRequestsId2Request { + /** Travel letter Request ID */ + id: string; + body: UpdateTravelLetterRequestParams; +} +export const PatchV1TravelLetterRequestsId2Request = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + body: UpdateTravelLetterRequestParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/travel-letter-requests/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV1TravelLetterRequestsId2Request", +}) as any as S.Schema; + +/** The setting to be enabled. */ +export type PatchV1WebhookCallbacksIdRequestSubscribedEventsItem = + | "background_check.status.updated" + | "benefit_renewal_request.created" + | "billing_document.issued" + | "company.activated" + | "company.manager_created" + | "company.manager_deleted" + | "company.manager_updated" + | "company.owner_changed" + | "company.archived" + | "company.eor_hiring.additional_information_required" + | "company.eor_hiring.reserve_payment_requested" + | "company.eor_hiring.no_reserve_payment_requested" + | "company.eor_hiring.referred" + | "company.eor_hiring.verification_completed" + | "company.partner_offboarded" + | "company.pricing_plan.updated" + | "contract_amendment.canceled" + | "contract_amendment.deleted" + | "contract_amendment.done" + | "contract_amendment.review_started" + | "contract_amendment.submitted" + | "contract.termination_date_reached" + | "contract_document.status.changed" + | "contractor_invoice.employer_paid" + | "contractor_invoice.issued" + | "contractor_invoice.paid_out" + | "contractor_invoice.payment_initiated" + | "custom_field.value_updated" + | "employment.benefits.selected" + | "employment_company_structure_node.updated" + | "employment_contract.active_contract_updated" + | "employment_contract.adjusted_during_onboarding" + | "employment.account.updated" + | "employment.administrative_details.updated" + | "employment_basic_information.updated" + | "employment.contractor_management_plan.updated" + | "employment.contractor_of_record_termination.cancelled" + | "employment.contractor_of_record_termination.executed" + | "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" + | "employment.onboarding_task.completed" + | "employment.onboarding.cancelled" + | "employment.onboarding.completed" + | "employment.onboarding.started" + | "employment.personal_information.updated" + | "employment.probation_completion_letter.cancelled" + | "employment.probation_completion_letter.completed" + | "employment.probation_completion_letter.submitted" + | "employment.probation.period_ending_reminder_sent" + | "employment.probation_period_extension.cancelled" + | "employment.probation_period_extension.completed" + | "employment.probation_period_extension.submitted" + | "employment.start_date.changed" + | "employment.status.updated" + | "employment.updated" + | "employment.user_status.activated" + | "employment.user_status.deactivated" + | "employment.user_status.initiated" + | "employment.user_status.invited" + | "employment.work_email.updated" + | "expense.approved" + | "expense.declined" + | "expense.deleted" + | "expense.reimbursed" + | "expense.submitted" + | "expense.updated" + | "identity_verification.verification_required" + | "incentive.created" + | "incentive.deleted" + | "incentive.paid" + | "incentive.processing_started" + | "incentive.updated" + | "offboarding.completed" + | "offboarding.deleted" + | "offboarding.done" + | "offboarding.review_started" + | "offboarding.submitted_to_payroll" + | "offboarding.submitted" + | "payslip.released" + | "sso_configuration.disabled" + | "sso_configuration.enabled" + | "sso_configuration.updated" + | "timeoff.approved" + | "timeoff.canceled" + | "timeoff.cancellation_requested" + | "timeoff.date_changed" + | "timeoff.declined" + | "timeoff.requested" + | "timeoff.started" + | "timeoff.taken" + | "timeoff.updated" + | "timesheet.submitted" + | "timesheet.in_calibration" + | "travel_letter.approved_by_manager" + | "travel_letter.approved_by_remote" + | "travel_letter.declined_by_manager" + | "travel_letter.declined_by_remote" + | "travel_letter.requested" + | "work_authorization.approved_by_manager" + | "work_authorization.approved_by_remote" + | "work_authorization.cancelled" + | "work_authorization.declined_by_manager" + | "work_authorization.declined_by_remote" + | "work_authorization.requested"; +export const PatchV1WebhookCallbacksIdRequestSubscribedEventsItem = + /*@__PURE__*/ S.String; + +export type PatchV1WebhookCallbacksIdRequestSubscribedEventsList = Array< + PatchV1WebhookCallbacksIdRequestSubscribedEventsItem | (string & {}) +>; +export const PatchV1WebhookCallbacksIdRequestSubscribedEventsList = + /*@__PURE__*/ S.Array( + PatchV1WebhookCallbacksIdRequestSubscribedEventsItem, + ) as any as S.Schema; + +export interface PatchV1WebhookCallbacksIdRequest { + /** Webhook Callback ID */ + id: string; + /** When true, subscribe this callback to all current and future event types. Cannot be combined with `subscribed_events`. */ + subscribe_to_all_events?: boolean; + subscribed_events?: PatchV1WebhookCallbacksIdRequestSubscribedEventsList; + url?: string; +} +export const PatchV1WebhookCallbacksIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + subscribe_to_all_events: S.optional(S.Boolean), + subscribed_events: S.optional( + PatchV1WebhookCallbacksIdRequestSubscribedEventsList, + ), + url: S.optional(S.String), + }).pipe( + T.Http({ method: "PATCH", uri: "/v1/webhook-callbacks/{id}", code: 200 }), + ), +).annotate({ + identifier: "PatchV1WebhookCallbacksIdRequest", +}) as any as S.Schema; + +export interface WebhookCallbackResponseData { + webhook_callback: WebhookCallback; +} +export const WebhookCallbackResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + webhook_callback: WebhookCallback, + }), +).annotate({ + identifier: "WebhookCallbackResponseData", +}) as any as S.Schema; + +/** Webhook callback response */ +export interface WebhookCallbackResponse { + data: WebhookCallbackResponseData; +} +export const WebhookCallbackResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: WebhookCallbackResponseData, + }), +).annotate({ + identifier: "WebhookCallbackResponse", +}) as any as S.Schema; + +export type ApprovedWorkAuthozationStatus = "approved_by_manager"; +export const ApprovedWorkAuthozationStatus = /*@__PURE__*/ S.String; + +/** Schema for approved work authorization */ +export interface ApprovedWorkAuthozation { + employer_special_instructions?: string | null; + status: ApprovedWorkAuthozationStatus; +} +export const ApprovedWorkAuthozation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employer_special_instructions: S.optional(S.NullOr(S.String)), + status: ApprovedWorkAuthozationStatus, + }), +).annotate({ + identifier: "ApprovedWorkAuthozation", +}) as any as S.Schema; + +export type DeclinedWorkAuthozationStatus = "declined_by_manager"; +export const DeclinedWorkAuthozationStatus = /*@__PURE__*/ S.String; + +/** Schema for declined work authorization */ +export interface DeclinedWorkAuthozation { + employer_special_instructions?: string | null; + reason: string; + status: DeclinedWorkAuthozationStatus; +} +export const DeclinedWorkAuthozation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employer_special_instructions: S.optional(S.NullOr(S.String)), + reason: S.String, + status: DeclinedWorkAuthozationStatus, + }), +).annotate({ + identifier: "DeclinedWorkAuthozation", +}) as any as S.Schema; + +/** Schema for updating a work authorization request */ +export type UpdateWorkAuthorizationRequestParams = + | ApprovedWorkAuthozation + | DeclinedWorkAuthozation; +export const UpdateWorkAuthorizationRequestParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PatchV1WorkAuthorizationRequestsIdRequest { + /** work authorization request ID */ + id: string; + body: UpdateWorkAuthorizationRequestParams; +} +export const PatchV1WorkAuthorizationRequestsIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + body: UpdateWorkAuthorizationRequestParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/work-authorization-requests/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1WorkAuthorizationRequestsIdRequest", + }) as any as S.Schema; + +export interface PatchV1WorkAuthorizationRequestsId2Request { + /** work authorization request ID */ + id: string; + body: UpdateWorkAuthorizationRequestParams; +} +export const PatchV1WorkAuthorizationRequestsId2Request = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + body: UpdateWorkAuthorizationRequestParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v1/work-authorization-requests/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PatchV1WorkAuthorizationRequestsId2Request", + }) as any as S.Schema; + +export interface PatchV2EmploymentsEmploymentIdRequest { + /** Employment ID */ + employment_id: string; + /** The department of the employment. The department must belong to the same company as the employment. When set to `null`, the employment will be unassigned from a department. */ + department_id?: string | null; + /** A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ + external_id?: string; + /** The user id of the manager, who should have an `admin`, `owner` or `people_manager` role. You can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager). */ + manager_id?: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Omit the field to leave the value unchanged; send `null` to clear it. Surrounding whitespace is trimmed off. It can be set at any employment status, and the same value may be used on several employments (for example a rehire). */ + partner_external_id?: string | null; + /** The work email of the employment. */ + work_email?: string; +} +export const PatchV2EmploymentsEmploymentIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + department_id: S.optional(S.NullOr(S.String)), + external_id: S.optional(S.String), + manager_id: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + work_email: S.optional(S.String), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV2EmploymentsEmploymentIdRequest", +}) as any as S.Schema; + +export interface PatchV2EmploymentsEmploymentId2Request { + /** Employment ID */ + employment_id: string; + /** The department of the employment. The department must belong to the same company as the employment. When set to `null`, the employment will be unassigned from a department. */ + department_id?: string | null; + /** A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ + external_id?: string; + /** The user id of the manager, who should have an `admin`, `owner` or `people_manager` role. You can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager). */ + manager_id?: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Omit the field to leave the value unchanged; send `null` to clear it. Surrounding whitespace is trimmed off. It can be set at any employment status, and the same value may be used on several employments (for example a rehire). */ + partner_external_id?: string | null; + /** The work email of the employment. */ + work_email?: string; +} +export const PatchV2EmploymentsEmploymentId2Request = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + department_id: S.optional(S.NullOr(S.String)), + external_id: S.optional(S.String), + manager_id: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + work_email: S.optional(S.String), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/v2/employments/{employment_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PatchV2EmploymentsEmploymentId2Request", +}) as any as S.Schema; + +/** The Authorization flow */ +export type AuthorizationCodeParamsGrantType = "authorization_code"; +export const AuthorizationCodeParamsGrantType = /*@__PURE__*/ S.String; + +export interface AuthorizationCodeParams { + /** The authorization code generated in Authorization Code flow */ + code: string; + /** The Authorization flow */ + grant_type: AuthorizationCodeParamsGrantType; +} +export const AuthorizationCodeParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + grant_type: AuthorizationCodeParamsGrantType, + }), +).annotate({ + identifier: "AuthorizationCodeParams", +}) as any as S.Schema; + +/** The Authorization flow */ +export type ClientCredentialsParamsGrantType = "client_credentials"; +export const ClientCredentialsParamsGrantType = /*@__PURE__*/ S.String; + +export interface ClientCredentialsParams { + /** The client id generated during registration */ + client_id: string; + /** The Authorization flow */ + grant_type: ClientCredentialsParamsGrantType; +} +export const ClientCredentialsParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + client_id: S.String, + grant_type: ClientCredentialsParamsGrantType, + }), +).annotate({ + identifier: "ClientCredentialsParams", +}) as any as S.Schema; + +/** The Authorization flow */ +export type RefreshTokenParamsGrantType = "refresh_token"; +export const RefreshTokenParamsGrantType = /*@__PURE__*/ S.String; + +export interface RefreshTokenParams { + /** The Authorization flow */ + grant_type: RefreshTokenParamsGrantType; + /** The refresh token generated in the Authorization Code flow */ + refresh_token: string | Redacted.Redacted; +} +export const RefreshTokenParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + grant_type: RefreshTokenParamsGrantType, + refresh_token: S.String.pipe(T.SensitiveValue({})), + }), +).annotate({ + identifier: "RefreshTokenParams", +}) as any as S.Schema; + +/** The Assertion flow grant type */ +export type AssertionTokenParamsGrantType = + "urn:ietf:params:oauth:grant-type:jwt-bearer"; +export const AssertionTokenParamsGrantType = /*@__PURE__*/ S.String; + +/** The assertion token is a JWT token that contains the following claims: - `sub`: The subject of the token, in one of the following formats: - `urn:remote-api:employment:` — mints an **employee-role** access token whose `sub` is the employment owner's user slug. Scopes are restricted to those valid for the employee role (e.g. `personal_detail:read`, `timeoff:write`). - `urn:remote-api:employee:employment:` — same as above; the recommended format for new integrations. Use this when issuing a token on behalf of an employee so they can submit their own onboarding data (e.g. `PUT /v1/employee/address`). - `urn:remote-api:company-manager:user:` — mints a **company_manager-role** access token. Scopes are restricted to those valid for the company-manager role. - `iss`: The issuer of the token, which is the client ID - `aud`: The audience of the token, which is the OAuth audience - `exp`: The expiration time of the token (max 10 minutes in the future) - `iat`: The issued at time of the token - `scope`: The scope of the token (space-separated). Optional. If omitted, the minted access token defaults to `all:write` for the subject's role. If provided, every scope must be valid for the subject's role or the assertion is rejected. The assertion must be signed with the client secret (HS256). **Example — minting an employee token to submit a residential address:** ``` sub: urn:remote-api:employee:employment:emp_2t3h9 iss: aud: exp: iat: scope: address:write ``` The resulting access token can be used at `PUT /v1/employee/address` to submit the address for that employment. */ +export interface AssertionTokenParams { + /** The assertion token */ + assertion: string; + /** The Assertion flow grant type */ + grant_type: AssertionTokenParamsGrantType; +} +export const AssertionTokenParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + assertion: S.String, + grant_type: AssertionTokenParamsGrantType, + }), +).annotate({ + identifier: "AssertionTokenParams", +}) as any as S.Schema; + +export type OAuth2TokenParams = + | AuthorizationCodeParams + | ClientCredentialsParams + | RefreshTokenParams + | AssertionTokenParams; +export const OAuth2TokenParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostAuthOauth2TokenRequest { + body?: OAuth2TokenParams; +} +export const PostAuthOauth2TokenRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(OAuth2TokenParams.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "POST", uri: "/auth/oauth2/token", code: 200 })), +).annotate({ + identifier: "PostAuthOauth2TokenRequest", +}) as any as S.Schema; + +export interface AuthorizationCodeResponse { + /** A JWT token. */ + access_token?: string | Redacted.Redacted; + /** Number of seconds until token is expired. */ + expires_in?: number; + /** The type of the token. For now, always `Bearer`. */ + token_type?: string; + /** The ID of the connected company. */ + company_id?: string; + /** The refresh token. This token must be stored and used for issuing new access tokens for managing the company's resources. */ + refresh_token?: string | Redacted.Redacted; + /** The ID of the user who connected the company. */ + user_id?: string; +} +export const AuthorizationCodeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + access_token: S.optional(S.String.pipe(T.SensitiveValue({}))), + expires_in: S.optional(S.Number), + token_type: S.optional(S.String), + company_id: S.optional(S.String), + refresh_token: S.optional(S.String.pipe(T.SensitiveValue({}))), + user_id: S.optional(S.String), + }), +).annotate({ + identifier: "AuthorizationCodeResponse", +}) as any as S.Schema; + +export interface BaseTokenResponse { + /** A JWT token. */ + access_token?: string | Redacted.Redacted; + /** Number of seconds until token is expired. */ + expires_in?: number; + /** The type of the token. For now, always `Bearer`. */ + token_type?: string; +} +export const BaseTokenResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + access_token: S.optional(S.String.pipe(T.SensitiveValue({}))), + expires_in: S.optional(S.Number), + token_type: S.optional(S.String), + }), +).annotate({ + identifier: "BaseTokenResponse", +}) as any as S.Schema; + +export interface RefreshTokenResponse { + /** A JWT token. */ + access_token?: string | Redacted.Redacted; + /** Number of seconds until token is expired. */ + expires_in?: number; + /** The type of the token. For now, always `Bearer`. */ + token_type?: string; + /** The refresh token */ + refresh_token?: string | Redacted.Redacted; +} +export const RefreshTokenResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + access_token: S.optional(S.String.pipe(T.SensitiveValue({}))), + expires_in: S.optional(S.Number), + token_type: S.optional(S.String), + refresh_token: S.optional(S.String.pipe(T.SensitiveValue({}))), + }), +).annotate({ + identifier: "RefreshTokenResponse", +}) as any as S.Schema; + +export type OAuth2Tokens = + | AuthorizationCodeResponse + | BaseTokenResponse + | RefreshTokenResponse; +export const OAuth2Tokens = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type PostAuthOauth2TokenResponse = OAuth2Tokens; +export const PostAuthOauth2TokenResponse = /*@__PURE__*/ S.suspend(() => + OAuth2Tokens.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "PostAuthOauth2TokenResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersionCase1 = + "latest"; +export const PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersion = + | number + | PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersionCase1; +export const PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest { + /** Benefit Renewal Request Id */ + benefit_renewal_request_id: string; + /** Version of the form schema */ + json_schema_version?: PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersion; +} +export const PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_renewal_request_id: S.String.pipe(T.Label()), + json_schema_version: S.optional( + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/benefit-renewal-requests/{benefit_renewal_request_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest", + }) as any as S.Schema; + +/** Employee payload. The nested fields must match the employment schema for the selected country. `activate_global_payroll` is currently supported only for Serbia (SRB) and is controlled by the `bulk_gp_product_activation` feature flag. */ +export interface BulkEmploymentEmployeePayload { + activate_global_payroll?: boolean; + /** Per-employee override for onboarding invitations. Takes precedence over the batch-level `send_invitation` value when present. */ + send_invitation?: boolean; +} +export const BulkEmploymentEmployeePayload = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activate_global_payroll: S.optional(S.Boolean), + send_invitation: S.optional(S.Boolean), + }), +).annotate({ + identifier: "BulkEmploymentEmployeePayload", +}) as any as S.Schema; + +export type PostV1BulkEmploymentJobsRequestEmployeesList = + Array; +export const PostV1BulkEmploymentJobsRequestEmployeesList = + /*@__PURE__*/ S.Array( + BulkEmploymentEmployeePayload, + ) as any as S.Schema; + +export interface PostV1BulkEmploymentJobsRequest { + country_code: string; + employees: PostV1BulkEmploymentJobsRequestEmployeesList; + /** Batch default for onboarding invitations. Each employee can override it with their own `send_invitation` value. Defaults to `false` when omitted. */ + send_invitation?: boolean; +} +export const PostV1BulkEmploymentJobsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country_code: S.String, + employees: PostV1BulkEmploymentJobsRequestEmployeesList, + send_invitation: S.optional(S.Boolean), + }).pipe( + T.Http({ method: "POST", uri: "/v1/bulk-employment-jobs", code: 200 }), + ), +).annotate({ + identifier: "PostV1BulkEmploymentJobsRequest", +}) as any as S.Schema; + +export interface PostV1BulkEmploymentJobsResponse {} +export const PostV1BulkEmploymentJobsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PostV1BulkEmploymentJobsResponse", +}) as any as S.Schema; + +export interface PostV1CancelOnboardingEmploymentIdRequest { + /** Employment ID */ + employment_id: string; + /** Whether the request should be performed async */ + async?: boolean; +} +export const PostV1CancelOnboardingEmploymentIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + async: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/cancel-onboarding/{employment_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1CancelOnboardingEmploymentIdRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PostV1CompaniesRequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PostV1CompaniesRequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1CompaniesRequestAddressDetailsJsonSchemaVersion = + | number + | PostV1CompaniesRequestAddressDetailsJsonSchemaVersionCase1; +export const PostV1CompaniesRequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Use latest version */ +export type PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersion = + | number + | PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersionCase1; +export const PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country. */ +export type PostV1CompaniesRequestDesiredCurrency = + | "AUD" + | "CAD" + | "CHF" + | "DKK" + | "EUR" + | "GBP" + | "JPY" + | "NOK" + | "NZD" + | "SEK" + | "SGD" + | "USD"; +export const PostV1CompaniesRequestDesiredCurrency = /*@__PURE__*/ S.String; + +export interface PostV1CompaniesRequest { + /** Version of the address_details form schema */ + address_details_json_schema_version?: PostV1CompaniesRequestAddressDetailsJsonSchemaVersion; + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersion; + /** 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; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `address_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + address_details?: unknown; + /** Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country). Use the desired country and `bank_account_details` as the form name for the placeholders. The response complies with the [JSON Schema](https://developer.remote.com/docs/how-json-schemas-work) specification. */ + bank_account_details?: unknown; + /** The company owner email. This value cannot be changed once set. */ + company_owner_email: string; + /** The company owner name. This value cannot be changed from the Remote API once set. */ + company_owner_name: string; + /** 3-letter country code of the country the company address is located in. For a list of countries supported through the Remote API, make a call to the [list countries endpoint](#tag/Countries/operation/get_supported_country). This endpoint will also include the 3-letter country codes you can use for this field. */ + country_code: string; + /** Desired currency for invoicing and displaying converted salaries in Remote UI regardless of the employee's country. */ + desired_currency: PostV1CompaniesRequestDesiredCurrency | (string & {}); + /** The domain of the company. Use this field to specify the company domain name when it's different from the domain in the company owner's email. */ + email_domain?: string; + /** Id of the company as represented in the external partner system. */ + external_id?: string; + /** The company name */ + name: string; + /** A phone number the company can be contacted with. */ + phone_number?: string; + /** The company registration number. This field or `tax_number` (but not both) should be submitted. */ + registration_number?: string; + /** The tax identifier of the company. This field or `registration_number` (but not both) should be submitted. */ + tax_number?: string; + /** Date and time the Terms of Service were accepted. To ensure users read the most recent version of Remote's Terms of Service, their action cannot have been done more than fifteen minutes ago. The UTC offset must be included in the ISO 8601 format: `YYYY-MM-DD HOURS:MINUTES:SECONDSZ` */ + terms_of_service_accepted_at: string; +} +export const PostV1CompaniesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + address_details_json_schema_version: S.optional( + PostV1CompaniesRequestAddressDetailsJsonSchemaVersion.pipe(T.Query()), + ), + bank_account_details_json_schema_version: S.optional( + PostV1CompaniesRequestBankAccountDetailsJsonSchemaVersion.pipe(T.Query()), + ), + action: S.optional(S.String.pipe(T.Query())), + async: S.optional(S.Boolean.pipe(T.Query())), + scope: S.optional(S.String.pipe(T.Query())), + address_details: S.optional(S.Unknown), + bank_account_details: S.optional(S.Unknown), + company_owner_email: S.String, + company_owner_name: S.String, + country_code: S.String, + desired_currency: PostV1CompaniesRequestDesiredCurrency, + email_domain: S.optional(S.String), + external_id: S.optional(S.String), + name: S.String, + phone_number: S.optional(S.String), + registration_number: S.optional(S.String), + tax_number: S.optional(S.String), + terms_of_service_accepted_at: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/companies", code: 200 })), +).annotate({ + identifier: "PostV1CompaniesRequest", +}) as any as S.Schema; + +/** Shows a company with its refresh and access tokens. Please contact Remote if you need the tokens when creating a company. */ +export interface CompanyWithTokensResponse { + company?: Company; + tokens?: OAuth2Tokens; +} +export const CompanyWithTokensResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company: S.optional(Company), + tokens: S.optional(OAuth2Tokens), + }), +).annotate({ + identifier: "CompanyWithTokensResponse", +}) as any as S.Schema; + +export type CompanyCreationResponseData = + | CompanyResponse + | CompanyWithTokensResponse; +export const CompanyCreationResponseData = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CompanyCreationResponse { + data?: CompanyCreationResponseData; +} +export const CompanyCreationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(CompanyCreationResponseData), + }), +).annotate({ + identifier: "CompanyCreationResponse", +}) as any as S.Schema; + +export interface PostV1CompaniesCompanyIdCreateTokenRequest { + /** The ID of the company */ + company_id: string; + /** The scope of the token */ + scope?: string; +} +export const PostV1CompaniesCompanyIdCreateTokenRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + scope: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/companies/{company_id}/create-token", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1CompaniesCompanyIdCreateTokenRequest", + }) as any as S.Schema; + +/** 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 interface CompanyTokenResponse { + /** The OAuth2 access token (JWT). Include this in the `Authorization: Bearer ` header for API requests. */ + access_token: string | Redacted.Redacted; + /** 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 | Redacted.Redacted; +} +export const CompanyTokenResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + access_token: S.String.pipe(T.SensitiveValue({})), + expires_in: S.Number, + refresh_token: S.String.pipe(T.SensitiveValue({})), + }), +).annotate({ + identifier: "CompanyTokenResponse", +}) as any as S.Schema; + +/** Parameters for creating a pricing plan without a partner template */ +export interface CreatePricingPlanWithoutPartnerTemplateParams { + /** The amount in cents */ + amount: number; + /** The currency code */ + currency_code: string; + /** The product price ID */ + product_price_id: string; +} +export const CreatePricingPlanWithoutPartnerTemplateParams = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + currency_code: S.String, + product_price_id: S.String, + }), + ).annotate({ + identifier: "CreatePricingPlanWithoutPartnerTemplateParams", + }) as any as S.Schema; + +/** Parameters for creating a pricing plan with a partner template */ +export interface CreatePricingPlanWithPartnerTemplateParams { + /** The pricing plan partner template ID */ + pricing_plan_partner_template_id: string; + /** The start date of the pricing plan */ + start_date?: string; +} +export const CreatePricingPlanWithPartnerTemplateParams = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + pricing_plan_partner_template_id: S.String, + start_date: S.optional(S.String), + }), + ).annotate({ + identifier: "CreatePricingPlanWithPartnerTemplateParams", + }) as any as S.Schema; + +/** Parameters for creating a pricing plan */ +export type CreatePricingPlanParams = + | CreatePricingPlanWithoutPartnerTemplateParams + | CreatePricingPlanWithPartnerTemplateParams; +export const CreatePricingPlanParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1CompaniesCompanyIdPricingPlansRequest { + /** Company ID */ + company_id: string; + body: CreatePricingPlanParams; +} +export const PostV1CompaniesCompanyIdPricingPlansRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + body: CreatePricingPlanParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/companies/{company_id}/pricing-plans", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1CompaniesCompanyIdPricingPlansRequest", + }) as any as S.Schema; + +export interface CreatePricingPlanResponseData { + pricing_plan: PricingPlan; +} +export const CreatePricingPlanResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pricing_plan: PricingPlan, + }), +).annotate({ + identifier: "CreatePricingPlanResponseData", +}) as any as S.Schema; + +/** Response for creating a pricing plan */ +export interface CreatePricingPlanResponse { + data: CreatePricingPlanResponseData; +} +export const CreatePricingPlanResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreatePricingPlanResponseData, + }), +).annotate({ + identifier: "CreatePricingPlanResponse", +}) as any as S.Schema; + +export interface PostV1CompanyDepartmentsRequest { + /** The Company ID. Required in all cases, whether the API credentials have access to multiple companies or just one. */ + company_id: string; + /** The name of the company department. May be non-unique and limited to 255 characters, maximum. */ + name: string; +} +export const PostV1CompanyDepartmentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String, + name: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/v1/company-departments", code: 200 }), + ), +).annotate({ + identifier: "PostV1CompanyDepartmentsRequest", +}) as any as S.Schema; + +export interface CompanyDepartmentCreatedResponse { + company_department?: CompanyDepartment; +} +export const CompanyDepartmentCreatedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_department: S.optional(CompanyDepartment), + }), +).annotate({ + identifier: "CompanyDepartmentCreatedResponse", +}) as any as S.Schema; + +export interface PostV1CompanyManagersRequest { + /** Complementary action(s) to perform when creating a company manager: - `no_invite` skips the email invitation step */ + actions?: string; + /** The Company ID. Required if the access token can access multiple companies. Optional otherwise. */ + company_id?: string; + /** The work email of the company manager */ + email: string; + /** The name of the company manager */ + name: string; + /** The role assigned for the new manager. The value should be one of the following: - `admin`: an Admin can manage most of the resources in remote. - `onboarding_manager`: an Onboarding Manager can add, see and manage new hires. - `people_manager`: a People Manager can view employee profiles of the team members they manage and approve and decline time off and expenses for their employees. */ + role: string; +} +export const PostV1CompanyManagersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + actions: S.optional(S.String.pipe(T.Query())), + company_id: S.optional(S.String), + email: S.String, + name: S.String, + role: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/company-managers", code: 200 })), +).annotate({ + identifier: "PostV1CompanyManagersRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PostV1ContractAmendmentsRequestJsonSchemaVersionCase1 = "latest"; +export const PostV1ContractAmendmentsRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1ContractAmendmentsRequestJsonSchemaVersion = + | number + | PostV1ContractAmendmentsRequestJsonSchemaVersionCase1; +export const PostV1ContractAmendmentsRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1ContractAmendmentsRequest { + /** Version of the form schema */ + json_schema_version?: PostV1ContractAmendmentsRequestJsonSchemaVersion; + /** The contract ID of the contract that needs to be amended. */ + amendment_contract_id: string; + /** Contract amendment informations. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Contract-Amendments/operation/post_show_form_contract_amendment_schema) endpoint passing the country code, `contract_amendment` and the employment ID as request body. */ + contract_amendment: unknown; + /** The employment ID that is related to the contract amendment request. */ + employment_id: string; +} +export const PostV1ContractAmendmentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + json_schema_version: S.optional( + PostV1ContractAmendmentsRequestJsonSchemaVersion.pipe(T.Query()), + ), + amendment_contract_id: S.String, + contract_amendment: S.Unknown, + employment_id: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/v1/contract-amendments", code: 200 }), + ), +).annotate({ + identifier: "PostV1ContractAmendmentsRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersionCase1 = + "latest"; +export const PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersion = + | number + | PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersionCase1; +export const PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1ContractAmendmentsAutomatableRequest { + /** Version of the form schema */ + json_schema_version?: PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersion; + /** The contract ID of the contract that needs to be amended. */ + amendment_contract_id: string; + /** Contract amendment informations. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Contract-Amendments/operation/post_show_form_contract_amendment_schema) endpoint passing the country code, `contract_amendment` and the employment ID as request body. */ + contract_amendment: unknown; + /** The employment ID that is related to the contract amendment request. */ + employment_id: string; +} +export const PostV1ContractAmendmentsAutomatableRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + json_schema_version: S.optional( + PostV1ContractAmendmentsAutomatableRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + amendment_contract_id: S.String, + contract_amendment: S.Unknown, + employment_id: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contract-amendments/automatable", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1ContractAmendmentsAutomatableRequest", + }) as any as S.Schema; + +export interface ContractAmendmentAutomatableResponseData { + /** If true, it means that the contract amendment request is automatable. */ + automatable?: boolean; + /** The message to explain how the contract amendment request will be processed depending if it is automatable or not. */ + message?: string; +} +export const ContractAmendmentAutomatableResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + automatable: S.optional(S.Boolean), + message: S.optional(S.String), + }), +).annotate({ + identifier: "ContractAmendmentAutomatableResponseData", +}) as any as S.Schema; + +/** Contract Amendment Automatable response */ +export interface ContractAmendmentAutomatableResponse { + data?: ContractAmendmentAutomatableResponseData; +} +export const ContractAmendmentAutomatableResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: S.optional(ContractAmendmentAutomatableResponseData), + }), +).annotate({ + identifier: "ContractAmendmentAutomatableResponse", +}) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type ContractorInvoiceScheduleCreateParamsItemsList = + Array; +export const ContractorInvoiceScheduleCreateParamsItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, + ) as any as S.Schema; + +/** Payload shape used to create invoice schedules. */ +export interface ContractorInvoiceScheduleCreateParams { + currency: string | null; + /** Employment identifier */ + employment_id: string; + /** List of invoice items that composes the overall invoice amount. */ + items: ContractorInvoiceScheduleCreateParamsItemsList; + /** Custom defined note. */ + note?: string; + /** Count of invoices that should be generated during schedule lifetime. */ + nr_occurrences?: number; + /** Invoice identifier. */ + number?: string; + periodicity: ContractorInvoiceSchedulePeriodicity | (string & {}); + /** Date of the first contractor invoice generation. */ + start_date: string; +} +export const ContractorInvoiceScheduleCreateParams = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + currency: S.NullOr(S.String), + employment_id: S.String, + items: ContractorInvoiceScheduleCreateParamsItemsList, + note: S.optional(S.String), + nr_occurrences: S.optional(S.Number), + number: S.optional(S.String), + periodicity: ContractorInvoiceSchedulePeriodicity, + start_date: S.String, + }), +).annotate({ + identifier: "ContractorInvoiceScheduleCreateParams", +}) as any as S.Schema; + +/** List of invoice schedules payload. */ +export type PostV1ContractorInvoiceSchedulesRequestContractorInvoiceSchedulesList = + Array; +export const PostV1ContractorInvoiceSchedulesRequestContractorInvoiceSchedulesList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleCreateParams, + ) as any as S.Schema; + +export interface PostV1ContractorInvoiceSchedulesRequest { + /** List of invoice schedules payload. */ + contractor_invoice_schedules: PostV1ContractorInvoiceSchedulesRequestContractorInvoiceSchedulesList; +} +export const PostV1ContractorInvoiceSchedulesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + contractor_invoice_schedules: + PostV1ContractorInvoiceSchedulesRequestContractorInvoiceSchedulesList, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractor-invoice-schedules", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1ContractorInvoiceSchedulesRequest", +}) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsCurrencyList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsCurrencyList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsEmploymentIdList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsEmploymentIdList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemAmountList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemAmountList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemDescriptionList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemDescriptionList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItem { + amount?: ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemAmountList; + description?: ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemDescriptionList; +} +export const ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemAmountList, + ), + description: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItemDescriptionList, + ), + }), + ).annotate({ + identifier: "ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItem", + }) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsItemsList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleCreateResponseFailureErrorsItemsItem, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsNoteList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsNoteList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsNrOccurrencesList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsNrOccurrencesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsNumberList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsNumberList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsPeriodicityList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsPeriodicityList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type ContractorInvoiceScheduleCreateResponseFailureErrorsStartDateList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureErrorsStartDateList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface ContractorInvoiceScheduleCreateResponseFailureErrors { + currency?: ContractorInvoiceScheduleCreateResponseFailureErrorsCurrencyList; + employment_id?: ContractorInvoiceScheduleCreateResponseFailureErrorsEmploymentIdList; + items?: ContractorInvoiceScheduleCreateResponseFailureErrorsItemsList; + note?: ContractorInvoiceScheduleCreateResponseFailureErrorsNoteList; + nr_occurrences?: ContractorInvoiceScheduleCreateResponseFailureErrorsNrOccurrencesList; + number?: ContractorInvoiceScheduleCreateResponseFailureErrorsNumberList; + periodicity?: ContractorInvoiceScheduleCreateResponseFailureErrorsPeriodicityList; + start_date?: ContractorInvoiceScheduleCreateResponseFailureErrorsStartDateList; +} +export const ContractorInvoiceScheduleCreateResponseFailureErrors = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + currency: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsCurrencyList, + ), + employment_id: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsEmploymentIdList, + ), + items: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsItemsList, + ), + note: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsNoteList, + ), + nr_occurrences: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsNrOccurrencesList, + ), + number: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsNumberList, + ), + periodicity: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsPeriodicityList, + ), + start_date: S.optional( + ContractorInvoiceScheduleCreateResponseFailureErrorsStartDateList, + ), + }), + ).annotate({ + identifier: "ContractorInvoiceScheduleCreateResponseFailureErrors", + }) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type ContractorInvoiceScheduleCreateResponseFailureItemsList = + Array; +export const ContractorInvoiceScheduleCreateResponseFailureItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, + ) as any as S.Schema; + +/** Set of invoice schedule attributes with failed validation. */ +export interface ContractorInvoiceScheduleCreateResponseFailure { + currency: string | null; + /** Employment identifier */ + employment_id: string; + errors: ContractorInvoiceScheduleCreateResponseFailureErrors; + /** List of invoice items that composes the overall invoice amount. */ + items: ContractorInvoiceScheduleCreateResponseFailureItemsList; + /** Custom defined note. */ + note?: string; + /** Count of invoices that should be generated during schedule lifetime. */ + nr_occurrences?: number; + /** Invoice identifier. */ + number?: string; + periodicity: ContractorInvoiceSchedulePeriodicity; + /** Date of the first contractor invoice generation. */ + start_date: string; +} +export const ContractorInvoiceScheduleCreateResponseFailure = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + currency: S.NullOr(S.String), + employment_id: S.String, + errors: ContractorInvoiceScheduleCreateResponseFailureErrors, + items: ContractorInvoiceScheduleCreateResponseFailureItemsList, + note: S.optional(S.String), + nr_occurrences: S.optional(S.Number), + number: S.optional(S.String), + periodicity: ContractorInvoiceSchedulePeriodicity, + start_date: S.String, + }), + ).annotate({ + identifier: "ContractorInvoiceScheduleCreateResponseFailure", + }) as any as S.Schema; + +export type PostV1ContractorInvoiceSchedulesResponseDataFailuresList = + Array; +export const PostV1ContractorInvoiceSchedulesResponseDataFailuresList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleCreateResponseFailure, + ) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type ContractorInvoiceScheduleCreateResponseSuccessItemsList = + Array; +export const ContractorInvoiceScheduleCreateResponseSuccessItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, + ) as any as S.Schema; + +/** Set of invoice schedule attributes that were successfully created. */ +export interface ContractorInvoiceScheduleCreateResponseSuccess { + currency: string | null; + /** Employment identifier */ + employment_id: string; + id: string; + /** List of invoice items that composes the overall invoice amount. */ + items: ContractorInvoiceScheduleCreateResponseSuccessItemsList; + /** Custom defined note. */ + note?: string; + /** Count of invoices that should be generated during schedule lifetime. */ + nr_occurrences?: number; + /** Invoice identifier. */ + number?: string; + periodicity: ContractorInvoiceSchedulePeriodicity; + /** Date of the first contractor invoice generation. */ + start_date: string; +} +export const ContractorInvoiceScheduleCreateResponseSuccess = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + currency: S.NullOr(S.String), + employment_id: S.String, + id: S.String, + items: ContractorInvoiceScheduleCreateResponseSuccessItemsList, + note: S.optional(S.String), + nr_occurrences: S.optional(S.Number), + number: S.optional(S.String), + periodicity: ContractorInvoiceSchedulePeriodicity, + start_date: S.String, + }), + ).annotate({ + identifier: "ContractorInvoiceScheduleCreateResponseSuccess", + }) as any as S.Schema; + +export type PostV1ContractorInvoiceSchedulesResponseDataSuccessesList = + Array; +export const PostV1ContractorInvoiceSchedulesResponseDataSuccessesList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleCreateResponseSuccess, + ) as any as S.Schema; + +export interface PostV1ContractorInvoiceSchedulesResponseData { + failures: PostV1ContractorInvoiceSchedulesResponseDataFailuresList; + successes: PostV1ContractorInvoiceSchedulesResponseDataSuccessesList; +} +export const PostV1ContractorInvoiceSchedulesResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + failures: PostV1ContractorInvoiceSchedulesResponseDataFailuresList, + successes: PostV1ContractorInvoiceSchedulesResponseDataSuccessesList, + }), + ).annotate({ + identifier: "PostV1ContractorInvoiceSchedulesResponseData", + }) as any as S.Schema; + +export interface PostV1ContractorInvoiceSchedulesResponse { + data: PostV1ContractorInvoiceSchedulesResponseData; +} +export const PostV1ContractorInvoiceSchedulesResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: PostV1ContractorInvoiceSchedulesResponseData, + }), +).annotate({ + identifier: "PostV1ContractorInvoiceSchedulesResponse", +}) as any as S.Schema; + +/** Use latest version */ +export type PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersionCase1 = + "latest"; +export const PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersion = + | number + | PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersionCase1; +export const PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Responses to the questionnaire questions */ +export type PostV1ContractorsEligibilityQuestionnaireRequestResponsesMap = { + [key: string]: string | undefined; +}; +export const PostV1ContractorsEligibilityQuestionnaireRequestResponsesMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export type PostV1ContractorsEligibilityQuestionnaireRequestType = + "contractor_of_record"; +export const PostV1ContractorsEligibilityQuestionnaireRequestType = + /*@__PURE__*/ S.String; + +export interface PostV1ContractorsEligibilityQuestionnaireRequest { + /** Version of the form schema */ + json_schema_version?: PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersion; + /** The slug/ID of the employment */ + employment_slug: string; + /** Responses to the questionnaire questions */ + responses: PostV1ContractorsEligibilityQuestionnaireRequestResponsesMap; + type: PostV1ContractorsEligibilityQuestionnaireRequestType | (string & {}); +} +export const PostV1ContractorsEligibilityQuestionnaireRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + json_schema_version: S.optional( + PostV1ContractorsEligibilityQuestionnaireRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + employment_slug: S.String, + responses: PostV1ContractorsEligibilityQuestionnaireRequestResponsesMap, + type: PostV1ContractorsEligibilityQuestionnaireRequestType, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/eligibility-questionnaire", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1ContractorsEligibilityQuestionnaireRequest", + }) as any as S.Schema; + +export interface EligibilityQuestionnaireResponse { + data: EligibilityQuestionnaire; +} +export const EligibilityQuestionnaireResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: EligibilityQuestionnaire, + }), +).annotate({ + identifier: "EligibilityQuestionnaireResponse", +}) as any as S.Schema; + +export interface PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest { + /** Employment ID */ + employment_id: string; + /** Contract document parameters. Its properties may vary depending on the country. */ + contract_document: unknown; + /** When true, skips AI-based compliance checks (e.g. services and deliverables classification). Defaults to false. */ + skip_ai_checks?: boolean; +} +export const PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + contract_document: S.Unknown, + skip_ai_checks: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/employments/{employment_id}/contract-documents", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest", + }) as any as S.Schema; + +/** A contract document for a contractor employment, tracking its signing status. */ +export interface ContractDocument { + /** The unique identifier (UUID) of the contract document. */ + id: string; + status: ContractorContractDocumentStatus; +} +export const ContractDocument = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + status: ContractorContractDocumentStatus, + }), +).annotate({ + identifier: "ContractDocument", +}) as any as S.Schema; + +export interface CreateContractDocumentResponseData { + contract_document: ContractDocument; +} +export const CreateContractDocumentResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_document: ContractDocument, + }), +).annotate({ + identifier: "CreateContractDocumentResponseData", +}) as any as S.Schema; + +/** Contract document response */ +export interface CreateContractDocumentResponse { + data: CreateContractDocumentResponseData; +} +export const CreateContractDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreateContractDocumentResponseData, + }), +).annotate({ + identifier: "CreateContractDocumentResponse", +}) as any as S.Schema; + +export interface PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest { + /** Employment ID */ + employment_id: string; + /** Document ID */ + contract_document_id: string; + /** The signer's full legal name as their electronic signature. */ + signature: string; +} +export const PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + contract_document_id: S.String.pipe(T.Label()), + signature: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest", + }) as any as S.Schema; + +export interface PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest { + /** Employment ID */ + employment_id: string; +} +export const PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/employments/{employment_id}/contractor-cor-subscription", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest", + }) as any as S.Schema; + +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequestOperation = + | "upgrade" + | "downgrade"; +export const PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequestOperation = + /*@__PURE__*/ S.String; + +export interface PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest { + /** Employment ID */ + employment_id: string; + operation: + | PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequestOperation + | (string & {}); +} +export const PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + operation: + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequestOperation, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/employments/{employment_id}/contractor-plus-subscription", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest", + }) as any as S.Schema; + +export interface PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest { + /** Employment ID */ + employment_id: string; +} +export const PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/employments/{employment_id}/cor-termination-requests", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest", + }) as any as S.Schema; + +/** Current status of the termination request. */ +export type CorTerminationRequestCreatedResponseDataStatus = + | "initiated" + | "executed" + | "cancelled"; +export const CorTerminationRequestCreatedResponseDataStatus = + /*@__PURE__*/ S.String; + +export interface CorTerminationRequestCreatedResponseData { + /** The date on which the contractor employment will be deactivated. */ + employment_deactivation_date: string | null; + /** Unique identifier of the termination request. */ + id: string; + /** Current status of the termination request. */ + status: CorTerminationRequestCreatedResponseDataStatus; + /** The date when the termination was initiated. */ + termination_date: string | null; +} +export const CorTerminationRequestCreatedResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_deactivation_date: S.NullOr(S.String), + id: S.String, + status: CorTerminationRequestCreatedResponseDataStatus, + termination_date: S.NullOr(S.String), + }), +).annotate({ + identifier: "CorTerminationRequestCreatedResponseData", +}) as any as S.Schema; + +export interface CorTerminationRequestCreatedResponse { + data: CorTerminationRequestCreatedResponseData; +} +export const CorTerminationRequestCreatedResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data: CorTerminationRequestCreatedResponseData, + }), +).annotate({ + identifier: "CorTerminationRequestCreatedResponse", +}) as any as S.Schema; + +/** The category of time being tracked. Contractors are restricted to `regular_hours`, `on_call`, or `break`. */ +export type ContractorTimeTrackingParamsType = + | "regular_hours" + | "on_call" + | "break"; +export const ContractorTimeTrackingParamsType = /*@__PURE__*/ S.String; + +/** Parameters for a single time tracking entry on a contractor timesheet. Allowed `type` values are restricted to the contractor subset. */ +export interface ContractorTimeTrackingParams { + clock_in: string; + clock_out: string; + /** Optional free-text notes about this time entry, such as project or task details. */ + notes?: string | null; + timezone: string; + /** The category of time being tracked. Contractors are restricted to `regular_hours`, `on_call`, or `break`. */ + type: ContractorTimeTrackingParamsType | (string & {}); +} +export const ContractorTimeTrackingParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + clock_in: S.String, + clock_out: S.String, + notes: S.optional(S.NullOr(S.String)), + timezone: S.String, + type: ContractorTimeTrackingParamsType, + }), +).annotate({ + identifier: "ContractorTimeTrackingParams", +}) as any as S.Schema; + +/** One or more time tracking entries to include in the timesheet. */ +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequestTimeTrackingsList = + Array; +export const PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequestTimeTrackingsList = + /*@__PURE__*/ S.Array( + ContractorTimeTrackingParams, + ) as any as S.Schema; + +export interface PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest { + /** Contractor employment ID */ + employment_id: string; + end_date: string; + start_date: string; + /** One or more time tracking entries to include in the timesheet. */ + time_trackings: PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequestTimeTrackingsList; +} +export const PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + end_date: S.String, + start_date: S.String, + time_trackings: + PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequestTimeTrackingsList, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/contractors/employments/{employment_id}/timesheets", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest", + }) as any as S.Schema; + +/** The category of time being tracked. One of `regular_hours`, `on_call`, `break`. */ +export type ContractorTimeTrackingType = "regular_hours" | "on_call" | "break"; +export const ContractorTimeTrackingType = /*@__PURE__*/ S.String; + +/** A single time tracking entry on a contractor timesheet. */ +export interface ContractorTimeTracking { + clock_in: string; + clock_out: string; + /** Optional notes about this entry. */ + notes: string | null; + timezone: string; + total_hours: HoursAndMinutes; + /** The category of time being tracked. One of `regular_hours`, `on_call`, `break`. */ + type: ContractorTimeTrackingType; +} +export const ContractorTimeTracking = /*@__PURE__*/ S.suspend(() => + S.Struct({ + clock_in: S.String, + clock_out: S.String, + notes: S.NullOr(S.String), + timezone: S.String, + total_hours: HoursAndMinutes, + type: ContractorTimeTrackingType, + }), +).annotate({ + identifier: "ContractorTimeTracking", +}) as any as S.Schema; + +/** The individual time tracking entries that make up this timesheet. */ +export type ContractorTimesheetTimeTrackingsList = + Array; +export const ContractorTimesheetTimeTrackingsList = /*@__PURE__*/ S.Array( + ContractorTimeTracking, +) as any as S.Schema; + +/** A contractor timesheet, returned by the contractor create endpoint. Only contains fields relevant to the contractor flow — EOR-only fields (overtime, night/weekend/holiday hours, approval flag) are not included. */ +export interface ContractorTimesheet { + break_hours: HoursAndMinutes; + country_code: string; + employment_id: string; + end_date: string; + id: string; + /** Optional notes attached to the timesheet. */ + notes: string | null; + on_call_hours: HoursAndMinutes; + regular_hours: HoursAndMinutes; + start_date: string; + /** The timestamp the timesheet was submitted. */ + submitted_at: string | null; + /** The individual time tracking entries that make up this timesheet. */ + time_trackings: ContractorTimesheetTimeTrackingsList; + total_hours: HoursAndMinutes; +} +export const ContractorTimesheet = /*@__PURE__*/ S.suspend(() => + S.Struct({ + break_hours: HoursAndMinutes, + country_code: S.String, + employment_id: S.String, + end_date: S.String, + id: S.String, + notes: S.NullOr(S.String), + on_call_hours: HoursAndMinutes, + regular_hours: HoursAndMinutes, + start_date: S.String, + submitted_at: S.NullOr(S.String), + time_trackings: ContractorTimesheetTimeTrackingsList, + total_hours: HoursAndMinutes, + }), +).annotate({ + identifier: "ContractorTimesheet", +}) as any as S.Schema; + +export interface ContractorTimesheetResponseData { + timesheet: ContractorTimesheet; +} +export const ContractorTimesheetResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timesheet: ContractorTimesheet, + }), +).annotate({ + identifier: "ContractorTimesheetResponseData", +}) as any as S.Schema; + +/** Response returned after creating a contractor timesheet. */ +export interface ContractorTimesheetResponse { + data?: ContractorTimesheetResponseData; +} +export const ContractorTimesheetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(ContractorTimesheetResponseData), + }), +).annotate({ + identifier: "ContractorTimesheetResponse", +}) as any as S.Schema; + +export interface CostCalculatorBenefitParam { + /** The unique identifier (slug) of the benefit group to include in the estimate. */ + benefit_group_slug: string; + /** The unique identifier (slug) of the benefit tier within the group. Determines the level of coverage and cost. */ + benefit_tier_slug: string; +} +export const CostCalculatorBenefitParam = /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_group_slug: S.String, + benefit_tier_slug: S.String, + }), +).annotate({ + identifier: "CostCalculatorBenefitParam", +}) as any as S.Schema; + +/** Specific benefit selections to include in the estimate. */ +export type CostCalculatorEmploymentParamBenefitsList = + Array; +export const CostCalculatorEmploymentParamBenefitsList = /*@__PURE__*/ S.Array( + CostCalculatorBenefitParam, +) as any as S.Schema; + +/** Configuration for applying a discount to a cost estimate. Provide either an `amount` or `percent` — not both. */ +export interface 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; +} +export const CostCalculatorDiscount = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(S.Number), + months: S.optional(S.Number), + percent: S.optional(S.Number), + quoted_amount: S.optional(S.Number), + text: S.String, + }), +).annotate({ + identifier: "CostCalculatorDiscount", +}) as any as S.Schema; + +export type EmploymentTermType = "fixed" | "indefinite"; +export const EmploymentTermType = /*@__PURE__*/ S.String; + +/** 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 interface 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?: CostCalculatorEmploymentParamBenefitsList; + discount?: CostCalculatorDiscount; + employment_term?: EmploymentTermType | (string & {}); + /** 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; +} +export const CostCalculatorEmploymentParam = /*@__PURE__*/ S.suspend(() => + S.Struct({ + age: S.optional(S.Number), + annual_gross_salary: S.optional(S.Number), + annual_gross_salary_in_employer_currency: S.optional(S.Number), + annual_total_cost: S.optional(S.Number), + annual_total_cost_in_employer_currency: S.optional(S.Number), + benefits: S.optional(CostCalculatorEmploymentParamBenefitsList), + discount: S.optional(CostCalculatorDiscount), + employment_term: S.optional(EmploymentTermType), + region_slug: S.String, + regional_to_employer_exchange_rate: S.optional(S.String), + title: S.optional(S.String), + }), +).annotate({ + identifier: "CostCalculatorEmploymentParam", +}) as any as S.Schema; + +/** One or more employments to estimate costs for. */ +export type PostV1CostCalculatorEstimationRequestEmploymentsList = + Array; +export const PostV1CostCalculatorEstimationRequestEmploymentsList = + /*@__PURE__*/ S.Array( + CostCalculatorEmploymentParam, + ) as any as S.Schema; + +export interface PostV1CostCalculatorEstimationRequest { + /** The company name, used for labeling in PDF/CSV exports. */ + company_name?: string; + /** 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: PostV1CostCalculatorEstimationRequestEmploymentsList; + 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; +} +export const PostV1CostCalculatorEstimationRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + company_name: S.optional(S.String), + employer_currency_slug: S.String, + employments: PostV1CostCalculatorEstimationRequestEmploymentsList, + global_discount: S.optional(CostCalculatorDiscount), + include_benefits: S.optional(S.Boolean), + include_cost_breakdowns: S.optional(S.Boolean), + include_management_fee: S.optional(S.Boolean), + include_premium_benefits: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/cost-calculator/estimation", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1CostCalculatorEstimationRequest", +}) as any as S.Schema; + +/** Feature flags indicating which Remote services are available in this country. */ +export type MinimalCountryFeaturesList = Array; +export const MinimalCountryFeaturesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** A lightweight country representation with basic identification fields. */ +export interface 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?: MinimalCountryFeaturesList; + /** The country's full English name. */ + name: string; + /** A unique URL-friendly identifier for the country. */ + slug: string; +} +export const MinimalCountry = /*@__PURE__*/ S.suspend(() => + S.Struct({ + alpha_2_code: S.String, + code: S.String, + features: S.optional(MinimalCountryFeaturesList), + name: S.String, + slug: S.String, + }), +).annotate({ identifier: "MinimalCountry" }) as any as S.Schema; + +/** A single cost line item within a cost breakdown (e.g., a specific employer contribution, benefit, or statutory payment). */ +export interface 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; +} +export const CostCalculatorCost = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + description: S.NullOr(S.String), + name: S.String, + zendesk_article_id: S.NullOr(S.String), + zendesk_article_url: S.NullOr(S.String), + }), +).annotate({ + identifier: "CostCalculatorCost", +}) as any as S.Schema; + +/** The list of all annual benefit costs */ +export type CostCalculatorCostsAnnualBenefitsBreakdownList = + Array; +export const CostCalculatorCostsAnnualBenefitsBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +/** The list of all annual employer contribution costs */ +export type CostCalculatorCostsAnnualContributionsBreakdownList = + Array; +export const CostCalculatorCostsAnnualContributionsBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +/** The discount applied to a cost estimate, showing the annual and monthly savings. */ +export interface 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; +} +export const CostCalculatorDiscountResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + annual_amount: S.Number, + monthly_amount: S.Number, + months: S.Number, + text: S.String, + }), +).annotate({ + identifier: "CostCalculatorDiscountResponse", +}) as any as S.Schema; + +/** The list of all annual extra statutory payment costs */ +export type CostCalculatorCostsExtraStatutoryPaymentsBreakdownList = + Array; +export const CostCalculatorCostsExtraStatutoryPaymentsBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +/** The list of all annual fringe benefits tax costs */ +export type CostCalculatorCostsFringeBenefitsTaxBreakdownList = + Array; +export const CostCalculatorCostsFringeBenefitsTaxBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +/** The list of all monthly benefit costs */ +export type CostCalculatorCostsMonthlyBenefitsBreakdownList = + Array; +export const CostCalculatorCostsMonthlyBenefitsBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +/** The list of all monthly employer contribution costs */ +export type CostCalculatorCostsMonthlyContributionsBreakdownList = + Array; +export const CostCalculatorCostsMonthlyContributionsBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +/** The list of all monthly fringe benefits tax costs */ +export type CostCalculatorCostsMonthlyFringeBenefitsTaxBreakdownList = + Array; +export const CostCalculatorCostsMonthlyFringeBenefitsTaxBreakdownList = + /*@__PURE__*/ S.Array( + CostCalculatorCost, + ) as any as S.Schema; + +export interface CostCalculatorCosts { + /** The list of all annual benefit costs */ + annual_benefits_breakdown?: CostCalculatorCostsAnnualBenefitsBreakdownList; + /** The annual benefits total that a company must pay for this employment */ + annual_benefits_total?: number; + /** The list of all annual employer contribution costs */ + annual_contributions_breakdown?: CostCalculatorCostsAnnualContributionsBreakdownList; + /** The annual contributions that a company must pay for this employment */ + annual_contributions_total: number; + /** The annual gross salary that the employee is going to earn */ + annual_gross_salary: number; + /** The annual indirect tax that a company must pay for this employment */ + annual_indirect_tax?: number; + /** The annual management fees */ + annual_management_fee?: number; + /** The annual gross salary + annual contributions + annual fee (monthly fee * 12) + extra statutory payments if applicable */ + annual_total: number; + currency: Currency; + discount?: CostCalculatorDiscountResponse; + /** The list of all annual extra statutory payment costs */ + extra_statutory_payments_breakdown?: CostCalculatorCostsExtraStatutoryPaymentsBreakdownList; + /** 13th month salary, this happens for countries such as Philippines */ + extra_statutory_payments_total: number; + /** The list of all annual fringe benefits tax costs */ + fringe_benefits_tax_breakdown?: CostCalculatorCostsFringeBenefitsTaxBreakdownList; + /** Estimated tax on employer-paid benefit premiums (e.g. New Zealand FBT) */ + fringe_benefits_tax_total?: number; + /** The list of all monthly benefit costs */ + monthly_benefits_breakdown?: CostCalculatorCostsMonthlyBenefitsBreakdownList; + /** The benefits total that the company pays monthly */ + monthly_benefits_total?: number; + /** The list of all monthly employer contribution costs */ + monthly_contributions_breakdown?: CostCalculatorCostsMonthlyContributionsBreakdownList; + /** The contributions that the company pays monthly */ + monthly_contributions_total: number; + /** The list of all monthly fringe benefits tax costs */ + monthly_fringe_benefits_tax_breakdown?: CostCalculatorCostsMonthlyFringeBenefitsTaxBreakdownList; + /** Monthly estimated tax on employer-paid benefit premiums (e.g. New Zealand FBT) */ + monthly_fringe_benefits_tax_total?: number; + /** The gross monthly salary for the Employee */ + monthly_gross_salary: number; + /** The monthly indirect tax that a company must pay for this employment */ + monthly_indirect_tax?: number; + /** The monthly management fees */ + monthly_management_fee?: number; + /** Monthly gross salary + monthly contributions (doesn't include fee) */ + monthly_tce: number; + /** Monthly gross salary + monthly contributions + monthly fee */ + monthly_total: number; +} +export const CostCalculatorCosts = /*@__PURE__*/ S.suspend(() => + S.Struct({ + annual_benefits_breakdown: S.optional( + CostCalculatorCostsAnnualBenefitsBreakdownList, + ), + annual_benefits_total: S.optional(S.Number), + annual_contributions_breakdown: S.optional( + CostCalculatorCostsAnnualContributionsBreakdownList, + ), + annual_contributions_total: S.Number, + annual_gross_salary: S.Number, + annual_indirect_tax: S.optional(S.Number), + annual_management_fee: S.optional(S.Number), + annual_total: S.Number, + currency: Currency, + discount: S.optional(CostCalculatorDiscountResponse), + extra_statutory_payments_breakdown: S.optional( + CostCalculatorCostsExtraStatutoryPaymentsBreakdownList, + ), + extra_statutory_payments_total: S.Number, + fringe_benefits_tax_breakdown: S.optional( + CostCalculatorCostsFringeBenefitsTaxBreakdownList, + ), + fringe_benefits_tax_total: S.optional(S.Number), + monthly_benefits_breakdown: S.optional( + CostCalculatorCostsMonthlyBenefitsBreakdownList, + ), + monthly_benefits_total: S.optional(S.Number), + monthly_contributions_breakdown: S.optional( + CostCalculatorCostsMonthlyContributionsBreakdownList, + ), + monthly_contributions_total: S.Number, + monthly_fringe_benefits_tax_breakdown: S.optional( + CostCalculatorCostsMonthlyFringeBenefitsTaxBreakdownList, + ), + monthly_fringe_benefits_tax_total: S.optional(S.Number), + monthly_gross_salary: S.Number, + monthly_indirect_tax: S.optional(S.Number), + monthly_management_fee: S.optional(S.Number), + monthly_tce: S.Number, + monthly_total: S.Number, + }), +).annotate({ + identifier: "CostCalculatorCosts", +}) as any as S.Schema; + +/** A cost estimate for a single employment, including costs in both the regional (local) currency and the employer's preferred currency. */ +export interface 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; + /** Whether this country has a fringe benefits tax on employer-paid benefit premiums (e.g. New Zealand). */ + has_fringe_benefits_tax?: 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; +} +export const CostCalculatorEmployment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + country: MinimalCountry, + country_benefits_details_url: S.NullOr(S.String), + country_guide_url: S.NullOr(S.String), + employer_currency_costs: CostCalculatorCosts, + has_extra_statutory_payment: S.Boolean, + has_fringe_benefits_tax: S.optional(S.Boolean), + minimum_onboarding_time: S.NullOr(S.Number), + region: MinimalRegion, + regional_currency_costs: CostCalculatorCosts, + }), +).annotate({ + identifier: "CostCalculatorEmployment", +}) as any as S.Schema; + +export type CostCalculatorEstimateResponseDataEmploymentsList = + Array; +export const CostCalculatorEstimateResponseDataEmploymentsList = + /*@__PURE__*/ S.Array( + CostCalculatorEmployment, + ) as any as S.Schema; + +export interface CostCalculatorEstimateResponseData { + employments?: CostCalculatorEstimateResponseDataEmploymentsList; +} +export const CostCalculatorEstimateResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employments: S.optional(CostCalculatorEstimateResponseDataEmploymentsList), + }), +).annotate({ + identifier: "CostCalculatorEstimateResponseData", +}) as any as S.Schema; + +export interface CostCalculatorEstimateResponse { + data: CostCalculatorEstimateResponseData; +} +export const CostCalculatorEstimateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CostCalculatorEstimateResponseData, + }), +).annotate({ + identifier: "CostCalculatorEstimateResponse", +}) as any as S.Schema; + +/** One or more employments to estimate costs for. */ +export type PostV1CostCalculatorEstimationCsvRequestEmploymentsList = + Array; +export const PostV1CostCalculatorEstimationCsvRequestEmploymentsList = + /*@__PURE__*/ S.Array( + CostCalculatorEmploymentParam, + ) as any as S.Schema; + +export interface PostV1CostCalculatorEstimationCsvRequest { + /** The company name, used for labeling in PDF/CSV exports. */ + company_name?: string; + /** 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: PostV1CostCalculatorEstimationCsvRequestEmploymentsList; + 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; +} +export const PostV1CostCalculatorEstimationCsvRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + company_name: S.optional(S.String), + employer_currency_slug: S.String, + employments: PostV1CostCalculatorEstimationCsvRequestEmploymentsList, + global_discount: S.optional(CostCalculatorDiscount), + include_benefits: S.optional(S.Boolean), + include_cost_breakdowns: S.optional(S.Boolean), + include_management_fee: S.optional(S.Boolean), + include_premium_benefits: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/cost-calculator/estimation-csv", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1CostCalculatorEstimationCsvRequest", +}) as any as S.Schema; + +export interface CostCalculatorEstimateCSVResponseData { + content: string; +} +export const CostCalculatorEstimateCSVResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + content: S.String, + }), +).annotate({ + identifier: "CostCalculatorEstimateCSVResponseData", +}) as any as S.Schema; + +export interface CostCalculatorEstimateCSVResponse { + data: CostCalculatorEstimateCSVResponseData; +} +export const CostCalculatorEstimateCSVResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CostCalculatorEstimateCSVResponseData, + }), +).annotate({ + identifier: "CostCalculatorEstimateCSVResponse", +}) as any as S.Schema; + +/** One or more employments to estimate costs for. */ +export type PostV1CostCalculatorEstimationPdfRequestEmploymentsList = + Array; +export const PostV1CostCalculatorEstimationPdfRequestEmploymentsList = + /*@__PURE__*/ S.Array( + CostCalculatorEmploymentParam, + ) as any as S.Schema; + +export interface PostV1CostCalculatorEstimationPdfRequest { + /** The company name, used for labeling in PDF/CSV exports. */ + company_name?: string; + /** 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: PostV1CostCalculatorEstimationPdfRequestEmploymentsList; + 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; +} +export const PostV1CostCalculatorEstimationPdfRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + company_name: S.optional(S.String), + employer_currency_slug: S.String, + employments: PostV1CostCalculatorEstimationPdfRequestEmploymentsList, + global_discount: S.optional(CostCalculatorDiscount), + include_benefits: S.optional(S.Boolean), + include_cost_breakdowns: S.optional(S.Boolean), + include_management_fee: S.optional(S.Boolean), + include_premium_benefits: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/cost-calculator/estimation-pdf", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1CostCalculatorEstimationPdfRequest", +}) as any as S.Schema; + +export type CostCalculatorEstimatePDFResponseData = + CostCalculatorEstimateCSVResponseData; +export const CostCalculatorEstimatePDFResponseData = + CostCalculatorEstimateCSVResponseData; + +export interface CostCalculatorEstimatePDFResponse { + data: CostCalculatorEstimateCSVResponseData; +} +export const CostCalculatorEstimatePDFResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CostCalculatorEstimateCSVResponseData, + }), +).annotate({ + identifier: "CostCalculatorEstimatePDFResponse", +}) as any as S.Schema; + +export interface PostV1CurrencyConverterEffectiveRequest { + /** The amount to convert in cents */ + amount: number; + /** The currency code to convert from */ + source_currency: string; + /** The currency code to convert to */ + target_currency: string; +} +export const PostV1CurrencyConverterEffectiveRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + amount: S.Number, + source_currency: S.String, + target_currency: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/currency-converter/effective", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1CurrencyConverterEffectiveRequest", +}) as any as S.Schema; + +/** The response from the currency converter */ +export interface ConvertCurrency { + /** The exchange rate used to convert the amount */ + exchange_rate: number; + /** The amount in cents in the source currency */ + source_amount: number; + source_currency: CurrencyDefinition; + /** The amount in cents in the target currency */ + target_amount: number; + target_currency: CurrencyDefinition; +} +export const ConvertCurrency = /*@__PURE__*/ S.suspend(() => + S.Struct({ + exchange_rate: S.Number, + source_amount: S.Number, + source_currency: CurrencyDefinition, + target_amount: S.Number, + target_currency: CurrencyDefinition, + }), +).annotate({ + identifier: "ConvertCurrency", +}) as any as S.Schema; + +export interface ConvertCurrencyResponseData { + conversion_data: ConvertCurrency; +} +export const ConvertCurrencyResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + conversion_data: ConvertCurrency, + }), +).annotate({ + identifier: "ConvertCurrencyResponseData", +}) as any as S.Schema; + +/** The response from the currency converter */ +export interface ConvertCurrencyResponse { + data: ConvertCurrencyResponseData; +} +export const ConvertCurrencyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ConvertCurrencyResponseData, + }), +).annotate({ + identifier: "ConvertCurrencyResponse", +}) as any as S.Schema; + +export interface PostV1CurrencyConverterEffective2Request { + /** The amount to convert in cents */ + amount: number; + /** The currency code to convert from */ + source_currency: string; + /** The currency code to convert to */ + target_currency: string; +} +export const PostV1CurrencyConverterEffective2Request = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + amount: S.Number, + source_currency: S.String, + target_currency: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/v1/currency-converter", code: 200 }), + ), +).annotate({ + identifier: "PostV1CurrencyConverterEffective2Request", +}) as any as S.Schema; + +export interface PostV1CurrencyConverterRawRequest { + /** The amount to convert in cents */ + amount: number; + /** The currency code to convert from */ + source_currency: string; + /** The currency code to convert to */ + target_currency: string; +} +export const PostV1CurrencyConverterRawRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + source_currency: S.String, + target_currency: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/v1/currency-converter/raw", code: 200 }), + ), +).annotate({ + identifier: "PostV1CurrencyConverterRawRequest", +}) as any as S.Schema; + +/** The datatype of the custom field */ +export type CustomFieldSimpleDataType = + | "string" + | "text" + | "integer" + | "date" + | "boolean" + | "percentage" + | "decimal" + | "link"; +export const CustomFieldSimpleDataType = /*@__PURE__*/ S.String; + +/** Schema for creating a general custom field definition */ +export interface CreateGeneralCustomFieldDefinitionParams { + data_entry_access: CustomFieldDataEntryAccess | (string & {}); + name: string; + required: boolean; + type: CustomFieldSimpleDataType | (string & {}); + visibility_scope: CustomFieldVisibilityScope | (string & {}); +} +export const CreateGeneralCustomFieldDefinitionParams = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + data_entry_access: CustomFieldDataEntryAccess, + name: S.String, + required: S.Boolean, + type: CustomFieldSimpleDataType, + visibility_scope: CustomFieldVisibilityScope, + }), +).annotate({ + identifier: "CreateGeneralCustomFieldDefinitionParams", +}) as any as S.Schema; + +export type SingleSelectMetadataOptionsList = Array; +export const SingleSelectMetadataOptionsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** The metadata for a single select custom field */ +export interface SingleSelectMetadata { + options: SingleSelectMetadataOptionsList; +} +export const SingleSelectMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + options: SingleSelectMetadataOptionsList, + }), +).annotate({ + identifier: "SingleSelectMetadata", +}) as any as S.Schema; + +export type CreateSingleSelectCustomFieldDefinitionParamsType = "single_select"; +export const CreateSingleSelectCustomFieldDefinitionParamsType = + /*@__PURE__*/ S.String; + +/** Schema for creating a single select custom field definition */ +export interface CreateSingleSelectCustomFieldDefinitionParams { + data_entry_access: CustomFieldDataEntryAccess | (string & {}); + metadata: SingleSelectMetadata; + name: string; + required: boolean; + type: CreateSingleSelectCustomFieldDefinitionParamsType; + visibility_scope: CustomFieldVisibilityScope | (string & {}); +} +export const CreateSingleSelectCustomFieldDefinitionParams = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data_entry_access: CustomFieldDataEntryAccess, + metadata: SingleSelectMetadata, + name: S.String, + required: S.Boolean, + type: CreateSingleSelectCustomFieldDefinitionParamsType, + visibility_scope: CustomFieldVisibilityScope, + }), + ).annotate({ + identifier: "CreateSingleSelectCustomFieldDefinitionParams", + }) as any as S.Schema; + +export interface CreateCurrencyCustomFieldDefinitionParamsMetadata { + currency?: string | null; +} +export const CreateCurrencyCustomFieldDefinitionParamsMetadata = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + currency: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "CreateCurrencyCustomFieldDefinitionParamsMetadata", + }) as any as S.Schema; + +export type CreateCurrencyCustomFieldDefinitionParamsType = "currency"; +export const CreateCurrencyCustomFieldDefinitionParamsType = + /*@__PURE__*/ S.String; + +/** Schema for creating a currency custom field definition */ +export interface CreateCurrencyCustomFieldDefinitionParams { + data_entry_access: CustomFieldDataEntryAccess | (string & {}); + metadata: CreateCurrencyCustomFieldDefinitionParamsMetadata; + name: string; + required: boolean; + type: CreateCurrencyCustomFieldDefinitionParamsType; + visibility_scope: CustomFieldVisibilityScope | (string & {}); +} +export const CreateCurrencyCustomFieldDefinitionParams = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data_entry_access: CustomFieldDataEntryAccess, + metadata: CreateCurrencyCustomFieldDefinitionParamsMetadata, + name: S.String, + required: S.Boolean, + type: CreateCurrencyCustomFieldDefinitionParamsType, + visibility_scope: CustomFieldVisibilityScope, + }), + ).annotate({ + identifier: "CreateCurrencyCustomFieldDefinitionParams", + }) as any as S.Schema; + +/** Schema for creating a custom field definition */ +export type CreateCustomFieldDefinitionParams = + | CreateGeneralCustomFieldDefinitionParams + | CreateSingleSelectCustomFieldDefinitionParams + | CreateCurrencyCustomFieldDefinitionParams; +export const CreateCustomFieldDefinitionParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1CustomFieldsRequest { + body: CreateCustomFieldDefinitionParams; +} +export const PostV1CustomFieldsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: CreateCustomFieldDefinitionParams.pipe(T.HttpBody()), + }).pipe(T.Http({ method: "POST", uri: "/v1/custom-fields", code: 200 })), +).annotate({ + identifier: "PostV1CustomFieldsRequest", +}) as any as S.Schema; + +export interface CreateEmploymentCustomFieldResponseData { + custom_field: EmploymentCustomField; +} +export const CreateEmploymentCustomFieldResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + custom_field: EmploymentCustomField, + }), +).annotate({ + identifier: "CreateEmploymentCustomFieldResponseData", +}) as any as S.Schema; + +/** Response returned after successfully creating a new custom field definition. */ +export interface CreateEmploymentCustomFieldResponse { + data: CreateEmploymentCustomFieldResponseData; +} +export const CreateEmploymentCustomFieldResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreateEmploymentCustomFieldResponseData, + }), +).annotate({ + identifier: "CreateEmploymentCustomFieldResponse", +}) as any as S.Schema; + +export interface PostV1DocumentsRequest { + /** The unique identifier (UUID) of the employment to attach this file to. */ + employment_id: string; + /** The file content, base64-encoded. */ + file: string; + /** 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; +} +export const PostV1DocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + file: S.String, + sub_type: S.optional(S.String), + type: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/documents", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "PostV1DocumentsRequest", +}) as any as S.Schema; + +export interface UploadFileResponseData { + file: File; +} +export const UploadFileResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + file: File, + }), +).annotate({ + identifier: "UploadFileResponseData", +}) as any as S.Schema; + +/** Response returned after successfully uploading a file. */ +export interface UploadFileResponse { + data?: UploadFileResponseData; +} +export const UploadFileResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(UploadFileResponseData), + }), +).annotate({ + identifier: "UploadFileResponse", +}) as any as S.Schema; + +export interface PostV1EmployeeDocumentsRequest { + /** The file content, base64-encoded. */ + file: string; + /** A more specific classification within the type. */ + sub_type?: string; + /** The broad category of the file (e.g., "id", "tax_form"). */ + type?: string; +} +export const PostV1EmployeeDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + file: S.String, + sub_type: S.optional(S.String), + type: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employee/documents", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "PostV1EmployeeDocumentsRequest", +}) as any as S.Schema; + +/** Categories allowed for an expense (legacy, deprecated).
Note: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future. */ +export type PostV1EmployeeExpensesRequestCategory = + | "car_rental" + | "coworking_office" + | "education_training" + | "entertainment" + | "flight" + | "fuel" + | "gifts" + | "insurance" + | "lodging" + | "meals" + | "other" + | "parking_toll" + | "subscription" + | "tech_equipment" + | "telecommunication" + | "transport" + | "utilities" + | "vaccination_testing" + | "visa" + | "wellness" + | "coworking" + | "home_office" + | "phone_utilities" + | "travel"; +export const PostV1EmployeeExpensesRequestCategory = /*@__PURE__*/ S.String; + +/** All the params needed upload a base64 file. */ +export interface Base64File { + /** The content in base64 encoding. */ + content: string; + /** The file name. */ + name: string; +} +export const Base64File = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + }), +).annotate({ identifier: "Base64File" }) as any as S.Schema; + +export type PostV1EmployeeExpensesRequestReceiptsList = Array; +export const PostV1EmployeeExpensesRequestReceiptsList = /*@__PURE__*/ S.Array( + Base64File, +) as any as S.Schema; + +export interface PostV1EmployeeExpensesRequest { + /** The expense amount in the specified currency, in cents. */ + amount: number; + /** Categories allowed for an expense (legacy, deprecated).
Note: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future. */ + category?: PostV1EmployeeExpensesRequestCategory | (string & {}) | null; + /** The three-letter code for the expense currency.
Examples: `"USD"`, `"EUR"`, `"CAD"` */ + currency: string; + /** Slug of the expense category from the hierarchical categories system (recommended). Takes precedence over legacy category field. */ + expense_category_slug?: string | null; + /** Date of the purchase, which must be in the past */ + expense_date: string; + receipt?: Base64File; + receipts?: PostV1EmployeeExpensesRequestReceiptsList; + /** The tax portion of the expense amount, in cents. Use 0 if no tax applies. */ + tax_amount?: number; + timezone?: string; + /** A short description of the expense (e.g., "New keyboard", "Team dinner"). */ + title: string; +} +export const PostV1EmployeeExpensesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + category: S.optional(S.NullOr(PostV1EmployeeExpensesRequestCategory)), + currency: S.String, + expense_category_slug: S.optional(S.NullOr(S.String)), + expense_date: S.String, + receipt: S.optional(Base64File), + receipts: S.optional(PostV1EmployeeExpensesRequestReceiptsList), + tax_amount: S.optional(S.Number), + timezone: S.optional(S.String), + title: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/employee/expenses", code: 200 })), +).annotate({ + identifier: "PostV1EmployeeExpensesRequest", +}) as any as S.Schema; + +export type PostV1EmployeeTimeoffRequestTimeoffDaysList = + Array; +export const PostV1EmployeeTimeoffRequestTimeoffDaysList = + /*@__PURE__*/ S.Array( + TimeoffDaysParams, + ) as any as S.Schema; + +export interface PostV1EmployeeTimeoffRequest { + document?: TimeoffDocumentParams; + end_date: string; + leave_policy_variant_id: string; + notes?: string; + start_date: string; + timeoff_days: PostV1EmployeeTimeoffRequestTimeoffDaysList; + timezone: string; +} +export const PostV1EmployeeTimeoffRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document: S.optional(TimeoffDocumentParams), + end_date: S.String, + leave_policy_variant_id: S.String, + notes: S.optional(S.String), + start_date: S.String, + timeoff_days: PostV1EmployeeTimeoffRequestTimeoffDaysList, + timezone: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/employee/timeoff", code: 200 })), +).annotate({ + identifier: "PostV1EmployeeTimeoffRequest", +}) as any as S.Schema; + +export interface PostV1EmployeeTimeoffIdCancelRequest { + /** Timeoff ID */ + id: string; + cancel_reason: string; +} +export const PostV1EmployeeTimeoffIdCancelRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + cancel_reason: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employee/timeoff/{id}/cancel", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1EmployeeTimeoffIdCancelRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PostV1EmploymentsRequestJsonSchemaVersionCase1 = "latest"; +export const PostV1EmploymentsRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PostV1EmploymentsRequestJsonSchemaVersion = + | number + | PostV1EmploymentsRequestJsonSchemaVersionCase1; +export const PostV1EmploymentsRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** If not provided, it will default to `employee`. */ +export type PostV1EmploymentsRequestType = + | "employee" + | "contractor" + | "global_payroll_employee" + | "hris"; +export const PostV1EmploymentsRequestType = /*@__PURE__*/ S.String; + +export interface PostV1EmploymentsRequest { + /** Version of the form schema */ + json_schema_version?: PostV1EmploymentsRequestJsonSchemaVersion; + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + basic_information: unknown; + /** Id of the legal entity that should be billed for the employment. If omitted, falls back to `engaged_by_legal_entity_id`. For EOR and Contractor employments this may differ from `engaged_by_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `engaged_by_legal_entity_id`. */ + bill_to_legal_entity_id?: string; + /** 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; + /** Deprecated alias for `engaged_by_legal_entity_id`. Use `engaged_by_legal_entity_id` instead. */ + engaged_by_entity_slug?: string; + /** Id of the legal entity that engages the employee or contractor. Required for Global Payroll employees. For EOR and Contractor employments this may differ from `bill_to_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `bill_to_legal_entity_id`. */ + engaged_by_legal_entity_id?: string; + /** A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ + external_id?: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Omit the field to leave the value unchanged; send `null` to clear it. Surrounding whitespace is trimmed off. It can be set at any employment status, and the same value may be used on several employments (for example a rehire). */ + partner_external_id?: string | null; + /** If not provided, it will default to `employee`. */ + type?: PostV1EmploymentsRequestType | (string & {}); +} +export const PostV1EmploymentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + json_schema_version: S.optional( + PostV1EmploymentsRequestJsonSchemaVersion.pipe(T.Query()), + ), + basic_information: S.Unknown, + bill_to_legal_entity_id: S.optional(S.String), + company_id: S.optional(S.String), + country_code: S.String, + engaged_by_entity_slug: S.optional(S.String), + engaged_by_legal_entity_id: S.optional(S.String), + external_id: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + type: S.optional(PostV1EmploymentsRequestType), + }).pipe(T.Http({ method: "POST", uri: "/v1/employments", code: 200 })), +).annotate({ + identifier: "PostV1EmploymentsRequest", +}) as any as S.Schema; + +/** The type of employment. */ +export type EmploymentBasicResponseType = "employee" | "contractor"; +export const EmploymentBasicResponseType = /*@__PURE__*/ S.String; + +/** 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 interface EmploymentBasicResponse { + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `basic_information` as path parameters. When present, `login_email` indicates which address the employee logs in with: `"personal"` or `"work"`. */ + basic_information?: 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?: string; + /** 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; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Null when the integration has not set one. */ + partner_external_id?: string | null; + /** The employee's personal email address. */ + personal_email?: string; + /** Required for employees, optional for contractors */ + provisional_start_date?: string; + /** The type of employment. */ + type?: EmploymentBasicResponseType; + /** When this employment was last updated. */ + updated_at?: string; +} +export const EmploymentBasicResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + basic_information: S.optional(S.Unknown), + company_id: S.optional(S.String), + country_code: S.optional(S.String), + created_at: S.optional(S.String), + employment_lifecycle_stage: S.optional(EmploymentLifecycleStage), + full_name: S.optional(S.String), + id: S.optional(S.String), + job_title: S.optional(S.NullOr(S.String)), + login_email: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + personal_email: S.optional(S.String), + provisional_start_date: S.optional(S.String), + type: S.optional(EmploymentBasicResponseType), + updated_at: S.optional(S.String), + }), +).annotate({ + identifier: "EmploymentBasicResponse", +}) as any as S.Schema; + +export interface EmploymentCreationResponseData { + employment?: EmploymentBasicResponse; +} +export const EmploymentCreationResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment: S.optional(EmploymentBasicResponse), + }), +).annotate({ + identifier: "EmploymentCreationResponseData", +}) as any as S.Schema; + +export interface EmploymentCreationResponse { + data?: EmploymentCreationResponseData; +} +export const EmploymentCreationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(EmploymentCreationResponseData), + }), +).annotate({ + identifier: "EmploymentCreationResponse", +}) as any as S.Schema; + +/** type of employment eligibility to work in residing country */ +export type PostV1EmploymentsEmploymentIdContractEligibilityRequestEligibleToWorkInResidingCountry = + | "citizen" + | "permanent_resident" + | "temporary_resident"; +export const PostV1EmploymentsEmploymentIdContractEligibilityRequestEligibleToWorkInResidingCountry = + /*@__PURE__*/ S.String; + +export interface PostV1EmploymentsEmploymentIdContractEligibilityRequest { + /** Employment ID */ + employment_id: string; + /** type of employment eligibility to work in residing country */ + eligible_to_work_in_residing_country: + | PostV1EmploymentsEmploymentIdContractEligibilityRequestEligibleToWorkInResidingCountry + | (string & {}); + /** whether the employer or work restrictions apply */ + employer_or_work_restrictions: boolean; +} +export const PostV1EmploymentsEmploymentIdContractEligibilityRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + eligible_to_work_in_residing_country: + PostV1EmploymentsEmploymentIdContractEligibilityRequestEligibleToWorkInResidingCountry, + employer_or_work_restrictions: S.Boolean, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employments/{employment_id}/contract-eligibility", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1EmploymentsEmploymentIdContractEligibilityRequest", + }) as any as S.Schema; + +export type PostV1EmploymentsEmploymentIdContractOriginRequestContractOrigin = + | "remote_contract" + | "custom_remote_contract" + | "provided_by_customer"; +export const PostV1EmploymentsEmploymentIdContractOriginRequestContractOrigin = + /*@__PURE__*/ S.String; + +/** Required when contract_origin is remote_contract or custom_remote_contract, ignored when provided_by_customer */ +export type PostV1EmploymentsEmploymentIdContractOriginRequestTemplateType = + | "contractor_agreement" + | "contractor_services_agreement" + | "contractor_statement_of_work" + | "custom_contractor_agreement" + | "custom_contractor_agreement_v2"; +export const PostV1EmploymentsEmploymentIdContractOriginRequestTemplateType = + /*@__PURE__*/ S.String; + +export interface PostV1EmploymentsEmploymentIdContractOriginRequest { + /** Employment ID */ + employment_id: string; + contract_origin: + | PostV1EmploymentsEmploymentIdContractOriginRequestContractOrigin + | (string & {}); + /** Required when contract_origin is remote_contract or custom_remote_contract, ignored when provided_by_customer */ + template_type: + | PostV1EmploymentsEmploymentIdContractOriginRequestTemplateType + | (string & {}); +} +export const PostV1EmploymentsEmploymentIdContractOriginRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + contract_origin: + PostV1EmploymentsEmploymentIdContractOriginRequestContractOrigin, + template_type: + PostV1EmploymentsEmploymentIdContractOriginRequestTemplateType, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employments/{employment_id}/contract-origin", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1EmploymentsEmploymentIdContractOriginRequest", + }) as any as S.Schema; + +/** List of invoice items that composes the overall invoice amount. */ +export type PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequestItemsList = + Array; +export const PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequestItemsList = + /*@__PURE__*/ S.Array( + ContractorInvoiceScheduleItem, + ) as any as S.Schema; + +export interface PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest { + /** Employment identifier */ + employment_id: string; + currency: string | null; + /** List of invoice items that composes the overall invoice amount. */ + items: PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequestItemsList; + /** Custom defined note. */ + note?: string | null; + /** Invoice identifier. */ + number?: string | null; + start_date: string; +} +export const PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + currency: S.NullOr(S.String), + items: + PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequestItemsList, + note: S.optional(S.NullOr(S.String)), + number: S.optional(S.NullOr(S.String)), + start_date: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employments/{employment_id}/contractor-invoices/preview", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest", + }) as any as S.Schema; + +export type ContractorInvoicePreviewResponseDataContractorInvoicePreview = + EmploymentAgreementPreviewResponseDataEmploymentAgreement; +export const ContractorInvoicePreviewResponseDataContractorInvoicePreview = + EmploymentAgreementPreviewResponseDataEmploymentAgreement; + +export interface ContractorInvoicePreviewResponseData { + contractor_invoice_preview: EmploymentAgreementPreviewResponseDataEmploymentAgreement; +} +export const ContractorInvoicePreviewResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + contractor_invoice_preview: + EmploymentAgreementPreviewResponseDataEmploymentAgreement, + }), +).annotate({ + identifier: "ContractorInvoicePreviewResponseData", +}) as any as S.Schema; + +/** Returns a base64 encoded Contractor Invoice preview document. */ +export interface ContractorInvoicePreviewResponse { + data: ContractorInvoicePreviewResponseData; +} +export const ContractorInvoicePreviewResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractorInvoicePreviewResponseData, + }), +).annotate({ + identifier: "ContractorInvoicePreviewResponse", +}) as any as S.Schema; + +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList = + Array; +export const PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** A file attached to the engagement agreement details. To upload a new file, send its `name` and its base64-encoded `content`. To keep a file uploaded previously, send back the `name` and `id` returned by the show endpoint instead. Every entry must do one or the other — an entry carrying neither is rejected, and an `id` that does not belong to this record is rejected too. Files that are not included in the payload are deleted. Only the properties below are accepted; any other one is rejected. In particular a file's `sub_type` is derived from the field it is attached to and cannot be set by the caller. */ +export interface EngagementAgreementDetailsFileParams { + /** The file content, Base64 encoded. Required when uploading a new file. The decoded content must match the extension given in `name`. Requests are capped at 25MB in total, which leaves room for a file of roughly 18MB once Base64 encoded. */ + content?: string; + /** ID of a file uploaded previously, as returned by the show endpoint. Send it to keep that file. */ + id?: string; + /** The file name, including its extension. */ + name: string; + /** The file size in bytes, before Base64 encoding. */ + size?: number; + /** The file's media type. */ + type?: string; +} +export const EngagementAgreementDetailsFileParams = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + content: S.optional(S.String), + id: S.optional(S.String), + name: S.String, + size: S.optional(S.Number), + type: S.optional(S.String), + }), +).annotate({ + identifier: "EngagementAgreementDetailsFileParams", +}) as any as S.Schema; + +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList = + Array; +export const PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList = + /*@__PURE__*/ S.Array( + EngagementAgreementDetailsFileParams, + ) as any as S.Schema; + +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList = + Array; +export const PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList = + Array; +export const PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails { + allowances_details?: PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList | null; + available_pto?: number | null; + break_time_per_day?: number | null; + business_expenses?: string | null; + cba?: string | null; + cba_document?: PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList | null; + covenants?: PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList | null; + has_allowances?: string | null; + has_bonus?: string | null; + has_business_expenses?: string | null; + has_business_presence?: string; + has_cba?: string | null; + has_commissions?: string | null; + has_covenants?: string | null; + has_illness_remuneration?: string | null; + has_overtime_compensation?: string | null; + has_pension_scheme?: string | null; + has_signing_bonus?: string | null; + has_similar_roles?: string; + has_similar_work_conditions?: string | null; + illness_remuneration_details?: string | null; + max_annual_gross_salary?: number | null; + min_annual_gross_salary?: number | null; + overtime_compensation_begins?: number | null; + overtime_compensation_type?: string | null; + overtime_pay_percentage?: number | null; + pension_scheme?: string | null; + similar_roles?: string | null; + similar_work_conditions_details?: string | null; + work_hours_per_week?: number | null; + working_days?: PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList | null; +} +export const PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + allowances_details: S.optional( + S.NullOr( + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList, + ), + ), + available_pto: S.optional(S.NullOr(S.Number)), + break_time_per_day: S.optional(S.NullOr(S.Number)), + business_expenses: S.optional(S.NullOr(S.String)), + cba: S.optional(S.NullOr(S.String)), + cba_document: S.optional( + S.NullOr( + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList, + ), + ), + covenants: S.optional( + S.NullOr( + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList, + ), + ), + has_allowances: S.optional(S.NullOr(S.String)), + has_bonus: S.optional(S.NullOr(S.String)), + has_business_expenses: S.optional(S.NullOr(S.String)), + has_business_presence: S.optional(S.String), + has_cba: S.optional(S.NullOr(S.String)), + has_commissions: S.optional(S.NullOr(S.String)), + has_covenants: S.optional(S.NullOr(S.String)), + has_illness_remuneration: S.optional(S.NullOr(S.String)), + has_overtime_compensation: S.optional(S.NullOr(S.String)), + has_pension_scheme: S.optional(S.NullOr(S.String)), + has_signing_bonus: S.optional(S.NullOr(S.String)), + has_similar_roles: S.optional(S.String), + has_similar_work_conditions: S.optional(S.NullOr(S.String)), + illness_remuneration_details: S.optional(S.NullOr(S.String)), + max_annual_gross_salary: S.optional(S.NullOr(S.Number)), + min_annual_gross_salary: S.optional(S.NullOr(S.Number)), + overtime_compensation_begins: S.optional(S.NullOr(S.Number)), + overtime_compensation_type: S.optional(S.NullOr(S.String)), + overtime_pay_percentage: S.optional(S.NullOr(S.Number)), + pension_scheme: S.optional(S.NullOr(S.String)), + similar_roles: S.optional(S.NullOr(S.String)), + similar_work_conditions_details: S.optional(S.NullOr(S.String)), + work_hours_per_week: S.optional(S.NullOr(S.Number)), + working_days: S.optional( + S.NullOr( + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList, + ), + ), + }), + ).annotate({ + identifier: + "PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails", + }) as any as S.Schema; + +export interface PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Engagement agreement details params. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_engagement_agreement_details_country) endpoint passing the country code. */ + engagement_agreement_details: PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails; +} +export const PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + engagement_agreement_details: + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employments/{employment_id}/engagement-agreement-details", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest", + }) as any as S.Schema; + +export interface PostV1EmploymentsEmploymentIdInviteRequest { + /** Employment ID */ + employment_id: string; +} +export const PostV1EmploymentsEmploymentIdInviteRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employments/{employment_id}/invite", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1EmploymentsEmploymentIdInviteRequest", + }) as any as S.Schema; + +export interface PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest { + /** Employment ID */ + employment_id: string; + /** The proof of payment file (PDF) */ + file: string; +} +export const PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + file: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/employments/{employment_id}/risk-reserve-proof-of-payments", + code: 200, + contentType: "multipart", + }), + ), + ).annotate({ + identifier: + "PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest", + }) as any as S.Schema; + +/** Current status of the proof of payment */ +export type RiskReserveProofOfPaymentResponseDataStatus = + | "pending" + | "auto_approve" + | "manual_review" + | "approved" + | "rejected"; +export const RiskReserveProofOfPaymentResponseDataStatus = + /*@__PURE__*/ S.String; + +export interface RiskReserveProofOfPaymentResponseData { + /** Proof of payment ID */ + slug?: string; + /** Current status of the proof of payment */ + status?: RiskReserveProofOfPaymentResponseDataStatus; +} +export const RiskReserveProofOfPaymentResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + slug: S.optional(S.String), + status: S.optional(RiskReserveProofOfPaymentResponseDataStatus), + }), +).annotate({ + identifier: "RiskReserveProofOfPaymentResponseData", +}) as any as S.Schema; + +export interface RiskReserveProofOfPaymentResponse { + data?: RiskReserveProofOfPaymentResponseData; +} +export const RiskReserveProofOfPaymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(RiskReserveProofOfPaymentResponseData), + }), +).annotate({ + identifier: "RiskReserveProofOfPaymentResponse", +}) as any as S.Schema; + +/** Categories allowed for an expense (legacy, deprecated).
Note: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future. */ +export type PostV1ExpensesRequestCategory = + | "car_rental" + | "coworking_office" + | "education_training" + | "entertainment" + | "flight" + | "fuel" + | "gifts" + | "insurance" + | "lodging" + | "meals" + | "other" + | "parking_toll" + | "subscription" + | "tech_equipment" + | "telecommunication" + | "transport" + | "utilities" + | "vaccination_testing" + | "visa" + | "wellness" + | "coworking" + | "home_office" + | "phone_utilities" + | "travel"; +export const PostV1ExpensesRequestCategory = /*@__PURE__*/ S.String; + +export type PostV1ExpensesRequestReceiptsList = Array; +export const PostV1ExpensesRequestReceiptsList = /*@__PURE__*/ S.Array( + Base64File, +) as any as S.Schema; + +export interface PostV1ExpensesRequest { + /** The expense amount in the specified currency, in cents. */ + amount: number; + /** Categories allowed for an expense (legacy, deprecated).
Note: `coworking`, `home_office`, `phone_utilities`, `travel` are deprecated and will be removed in the future. */ + category?: PostV1ExpensesRequestCategory | (string & {}) | null; + /** The three-letter code for the expense currency.
Examples: `"USD"`, `"EUR"`, `"CAD"` */ + currency: string; + /** The ID for the employment to which this expense relates. */ + employment_id: string; + /** Slug of the expense category from the hierarchical categories system (recommended). Takes precedence over legacy category field. */ + expense_category_slug?: string | null; + /** Date of the purchase, which must be in the past */ + expense_date: string; + receipt?: Base64File; + receipts?: PostV1ExpensesRequestReceiptsList; + /** The date and time that the expense was reviewed in ISO8601 format. If not provided, it defaults to the current datetime. */ + reviewed_at?: string; + /** 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?: string; + /** A short description of the expense (e.g., "New keyboard", "Team dinner"). */ + title: string; +} +export const PostV1ExpensesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + category: S.optional(S.NullOr(PostV1ExpensesRequestCategory)), + currency: S.String, + employment_id: S.String, + expense_category_slug: S.optional(S.NullOr(S.String)), + expense_date: S.String, + receipt: S.optional(Base64File), + receipts: S.optional(PostV1ExpensesRequestReceiptsList), + reviewed_at: S.optional(S.String), + reviewer_id: S.optional(S.String), + tax_amount: S.optional(S.Number), + timezone: S.optional(S.String), + title: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/expenses", code: 200 })), +).annotate({ + identifier: "PostV1ExpensesRequest", +}) as any as S.Schema; + +export interface PostV1IdentityVerificationEmploymentIdDeclineRequest { + /** Employment ID */ + employment_id: string; +} +export const PostV1IdentityVerificationEmploymentIdDeclineRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/identity-verification/{employment_id}/decline", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1IdentityVerificationEmploymentIdDeclineRequest", + }) as any as S.Schema; + +export interface PostV1IdentityVerificationEmploymentIdVerifyRequest { + /** Employment ID */ + employment_id: string; +} +export const PostV1IdentityVerificationEmploymentIdVerifyRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/identity-verification/{employment_id}/verify", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1IdentityVerificationEmploymentIdVerifyRequest", + }) as any as S.Schema; + +export type PostV1IncentivesRequestType = + | "acting_up_allowance" + | "allowance" + | "car_allowance" + | "health_and_wellness_allowance" + | "internet_allowance" + | "meal_allowance" + | "on_call_allowance" + | "parenthood_allowance" + | "phone_allowance" + | "relocation_allowance" + | "travel_allowance" + | "work_from_home_allowance" + | "bonus" + | "holiday_bonus" + | "referral_bonus" + | "retention_bonus" + | "commission" + | "other" + | "overtime" + | "stipend" + | "signing_bonus"; +export const PostV1IncentivesRequestType = /*@__PURE__*/ S.String; + +export interface PostV1IncentivesRequest { + /** The amount (in the currency of the employment) to be given to the employee. This field accepts fractional amounts as well. However to avoid precision issues and errors that can arise from storing fractional amounts, the Remote API only accepts currencies and their fractional amounts as integers. This means you should append fractional amounts to the end of the amount you're passing in with this field. For example, if the incentive you're offering is EUR 500.25, you would specify `50025` as the amount for this field. */ + amount: number; + amount_tax_type: AmountTaxType | (string & {}); + /** The date at which the incentive should take effect. Note that the incentive is not paid out on the effective date, but during the next payroll cycle. The effective date determines which payroll cycle the incentive will be paid out in. The effective date needs to be today or a future date. Note for recurring incentives: since the months don't have the same amount of days, if day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to the last day of each month, avoiding the possibility of skipping a month in the recurrence. */ + effective_date: string; + note?: string | null; + employment_id: string; + period_end?: string | null; + period_start?: string | null; + type: PostV1IncentivesRequestType | (string & {}); +} +export const PostV1IncentivesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + amount_tax_type: AmountTaxType, + effective_date: S.String, + note: S.optional(S.NullOr(S.String)), + employment_id: S.String, + period_end: S.optional(S.NullOr(S.String)), + period_start: S.optional(S.NullOr(S.String)), + type: PostV1IncentivesRequestType, + }).pipe(T.Http({ method: "POST", uri: "/v1/incentives", code: 200 })), +).annotate({ + identifier: "PostV1IncentivesRequest", +}) as any as S.Schema; + +export type PostV1IncentivesRecurringRequestType = + | "acting_up_allowance" + | "allowance" + | "car_allowance" + | "health_and_wellness_allowance" + | "internet_allowance" + | "meal_allowance" + | "on_call_allowance" + | "parenthood_allowance" + | "phone_allowance" + | "relocation_allowance" + | "travel_allowance" + | "work_from_home_allowance" + | "bonus" + | "holiday_bonus" + | "referral_bonus" + | "retention_bonus" + | "commission" + | "other" + | "overtime" + | "stipend"; +export const PostV1IncentivesRecurringRequestType = /*@__PURE__*/ S.String; + +export interface PostV1IncentivesRecurringRequest { + /** The amount (in the currency of the employment) to be given to the employee. This field accepts fractional amounts as well. However to avoid precision issues and errors that can arise from storing fractional amounts, the Remote API only accepts currencies and their fractional amounts as integers. This means you should append fractional amounts to the end of the amount you're passing in with this field. For example, if the incentive you're offering is EUR 500.25, you would specify `50025` as the amount for this field. */ + amount: number; + amount_tax_type: AmountTaxType | (string & {}); + /** The date at which the incentive should take effect. Note that the incentive is not paid out on the effective date, but during the next payroll cycle. The effective date determines which payroll cycle the incentive will be paid out in. The effective date needs to be today or a future date. Note for recurring incentives: since the months don't have the same amount of days, if day of month of `effective_date` is one of [28, 29, 30, 31] it will be transformed to the last day of each month, avoiding the possibility of skipping a month in the recurrence. */ + effective_date: string; + note?: string | null; + /** How many times the payment will repeat. At the moment we only fully support monthly frequency. This field is only necessary if the recurring incentive has an end date. */ + duration_in_months?: string; + employment_id: string; + type: PostV1IncentivesRecurringRequestType | (string & {}); +} +export const PostV1IncentivesRecurringRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + amount_tax_type: AmountTaxType, + effective_date: S.String, + note: S.optional(S.NullOr(S.String)), + duration_in_months: S.optional(S.String), + employment_id: S.String, + type: PostV1IncentivesRecurringRequestType, + }).pipe( + T.Http({ method: "POST", uri: "/v1/incentives/recurring", code: 200 }), + ), +).annotate({ + identifier: "PostV1IncentivesRecurringRequest", +}) as any as S.Schema; + +export interface RecurringIncentiveResponseData { + recurring_incentive: RecurringIncentive; +} +export const RecurringIncentiveResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + recurring_incentive: RecurringIncentive, + }), +).annotate({ + identifier: "RecurringIncentiveResponseData", +}) as any as S.Schema; + +/** Recurring Incentive response */ +export interface RecurringIncentiveResponse { + data?: RecurringIncentiveResponseData; +} +export const RecurringIncentiveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(RecurringIncentiveResponseData), + }), +).annotate({ + identifier: "RecurringIncentiveResponse", +}) as any as S.Schema; + +export interface MagicLinkParamsCase0 { + /** The path to which the user will be redirected to after login. This field has a max length of 2000 characters. If not specified, `/dashboard` will be used by default. Must begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.). An ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`). An optional query string can be specified too. If present, the query string must start with a question mark (`?`) and must include at least one key value pair. Both, keys and values, can only include alphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character). Additional key value pairs are allowed using ampersand (`&`). Query keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded. Query values are optional, the actual value may be empty and the equals sign (`=`) may be missing too. Some **Valid** examples for `path`: - o `/dashboard` - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5` - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=status&filters%5B0%5D%5Bvalue%5D=active` - o `/dashboard?key=value&foo=bar` Some **Invalid** examples for `path`: - x `missing_forward_slash` - x `/invalid//path` - x `//some` - x `/?key=value` - x `/some/i.n:valid*` - x `/invalid/end/slash/` - x `/some?malformed_percent_encoded_key%1=value` */ + path?: string; + user_id: string; +} +export const MagicLinkParamsCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + path: S.optional(S.String), + user_id: S.String, + }), +).annotate({ + identifier: "MagicLinkParamsCase0", +}) as any as S.Schema; + +export interface MagicLinkParamsCase1 { + employment_id: string; + /** The path to which the user will be redirected to after login. This field has a max length of 2000 characters. If not specified, `/dashboard` will be used by default. Must begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.). An ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`). An optional query string can be specified too. If present, the query string must start with a question mark (`?`) and must include at least one key value pair. Both, keys and values, can only include alphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character). Additional key value pairs are allowed using ampersand (`&`). Query keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded. Query values are optional, the actual value may be empty and the equals sign (`=`) may be missing too. Some **Valid** examples for `path`: - o `/dashboard` - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5` - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=status&filters%5B0%5D%5Bvalue%5D=active` - o `/dashboard?key=value&foo=bar` Some **Invalid** examples for `path`: - x `missing_forward_slash` - x `/invalid//path` - x `//some` - x `/?key=value` - x `/some/i.n:valid*` - x `/invalid/end/slash/` - x `/some?malformed_percent_encoded_key%1=value` */ + path?: string; +} +export const MagicLinkParamsCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + path: S.optional(S.String), + }), +).annotate({ + identifier: "MagicLinkParamsCase1", +}) as any as S.Schema; + +/** Magic link params */ +export type MagicLinkParams = MagicLinkParamsCase0 | MagicLinkParamsCase1; +export const MagicLinkParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1MagicLinkRequest { + body: MagicLinkParams; +} +export const PostV1MagicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: MagicLinkParams.pipe(T.HttpBody()), + }).pipe(T.Http({ method: "POST", uri: "/v1/magic-link", code: 200 })), +).annotate({ + identifier: "PostV1MagicLinkRequest", +}) as any as S.Schema; + +export interface MagicLinkResponseData { + url: string; +} +export const MagicLinkResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.String, + }), +).annotate({ + identifier: "MagicLinkResponseData", +}) as any as S.Schema; + +export interface MagicLinkResponse { + data: MagicLinkResponseData; +} +export const MagicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: MagicLinkResponseData, + }), +).annotate({ + identifier: "MagicLinkResponse", +}) as any as S.Schema; + +/** 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. */ +export interface TerminationDetailsParamsEmployeeAwareness { + /** When the employee was told about the termination. */ + date?: string | null; + /** Notes describing how the termination was shared with the employee. Remote advises being as specific as possible, and include details about the employee’s response, if applicable. */ + note?: string | null; +} +export const TerminationDetailsParamsEmployeeAwareness = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + date: S.optional(S.NullOr(S.String)), + note: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "TerminationDetailsParamsEmployeeAwareness", + }) as any as S.Schema; + +export type TerminationDetailsParamsRiskAssessmentReasonsItem = + | "caring_responsibilities" + | "disabled_or_health_condition" + | "family_leave" + | "member_of_union_or_works_council" + | "none_of_these" + | "pregnant_or_breastfeeding" + | "reported_concerns_with_workplace" + | "requested_medical_or_family_leave" + | "sick_leave"; +export const TerminationDetailsParamsRiskAssessmentReasonsItem = + /*@__PURE__*/ S.String; + +/** Possible reasons for offboarding risk assessment */ +export type TerminationDetailsParamsRiskAssessmentReasonsList = Array< + TerminationDetailsParamsRiskAssessmentReasonsItem | (string & {}) +>; +export const TerminationDetailsParamsRiskAssessmentReasonsList = + /*@__PURE__*/ S.Array( + TerminationDetailsParamsRiskAssessmentReasonsItem, + ) as any as S.Schema; + +/** Choose an accurate termination reason to avoid unfair or unlawful dismissal claims. If the termination is created before the employee's start date, this field will be set to `cancellation_before_start_date`. */ +export type TerminationDetailsParamsTerminationReason = + | "cancellation_before_start_date" + | "compliance_issue" + | "conversion_to_contractor" + | "dissatisfaction_with_remote_service" + | "end_of_fixed_term_contract_compliance_issue" + | "end_of_fixed_term_contract_incapacity_to_perform_inherent_duties" + | "end_of_fixed_term_contract_local_regulations_max_term_reached" + | "end_of_fixed_term_contract_misconduct" + | "end_of_fixed_term_contract_operational_reasons" + | "end_of_fixed_term_contract_other" + | "end_of_fixed_term_contract_performance" + | "end_of_fixed_term_contract_redundancy" + | "end_of_fixed_term_contract_values" + | "gross_misconduct" + | "incapacity_to_perform_inherent_duties" + | "job_abandonment" + | "mutual_agreement" + | "other" + | "performance" + | "values" + | "workforce_reduction"; +export const TerminationDetailsParamsTerminationReason = /*@__PURE__*/ S.String; + +export interface OffboardingFile { + /** The content in base64 encoding */ + content: string; + /** The file name */ + name: string; +} +export const OffboardingFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + }), +).annotate({ + identifier: "OffboardingFile", +}) as any as S.Schema; + +/** Any supporting documents regarding the termination reason */ +export type TerminationDetailsParamsTerminationReasonFilesList = + Array; +export const TerminationDetailsParamsTerminationReasonFilesList = + /*@__PURE__*/ S.Array( + OffboardingFile, + ) as any as S.Schema; + +export interface 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. */ + employee_awareness?: TerminationDetailsParamsEmployeeAwareness; + /** Remote will use this email address for post-termination communication. If it is not provided, this field will be derived from the employment record. Therefore, it is important to ensure that it is not a company email. */ + personal_email?: string; + /** In most cases, employee needs to be notified before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. Remote will use those factors to determine the required notice period. Please note that we cannot commit to a termination date until we conduct a full review of the information you submit. */ + proposed_termination_date: string; + /** Description of the reason for termination */ + reason_description: string; + /** Possible reasons for offboarding risk assessment */ + risk_assessment_reasons: TerminationDetailsParamsRiskAssessmentReasonsList; + /** Choose an accurate termination reason to avoid unfair or unlawful dismissal claims. If the termination is created before the employee's start date, this field will be set to `cancellation_before_start_date`. */ + termination_reason: TerminationDetailsParamsTerminationReason | (string & {}); + /** Any supporting documents regarding the termination reason */ + termination_reason_files?: TerminationDetailsParamsTerminationReasonFilesList; + /** Paid time off accuracy Typically, any vacation pay accrued and unpaid at the time of termination must be paid out to the employee. To avoid overpaying or underpaying, please make sure we have an accurate account of their paid time off by querying the [Show Time Off Balance](#operation/get_show_timeoff_balance) endpoint, filtering by the `employment_id`. This optional document should be sent in case of any discrepancies. */ + timesheet_file?: OffboardingFile; + /** Whether is it likely or not that the employee will challenge their termination */ + will_challenge_termination: boolean; + /** If it is likely that the employee will challenge their termination, please provide additional details explaining the risk */ + will_challenge_termination_description?: string; +} +export const TerminationDetailsParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + acknowledge_termination_procedure: S.optional(S.NullOr(S.Boolean)), + additional_comments: S.optional(S.NullOr(S.String)), + agrees_to_pto_amount: S.optional(S.NullOr(S.Boolean)), + agrees_to_pto_amount_notes: S.optional(S.NullOr(S.String)), + confidential: S.Boolean, + customer_informed_employee: S.optional(S.NullOr(S.Boolean)), + employee_awareness: S.optional(TerminationDetailsParamsEmployeeAwareness), + personal_email: S.optional(S.String), + proposed_termination_date: S.String, + reason_description: S.String, + risk_assessment_reasons: TerminationDetailsParamsRiskAssessmentReasonsList, + termination_reason: TerminationDetailsParamsTerminationReason, + termination_reason_files: S.optional( + TerminationDetailsParamsTerminationReasonFilesList, + ), + timesheet_file: S.optional(OffboardingFile), + will_challenge_termination: S.Boolean, + will_challenge_termination_description: S.optional(S.String), + }), +).annotate({ + identifier: "TerminationDetailsParams", +}) as any as S.Schema; + +/** The type of the offboarding request. For now, only `termination` is allowed. */ +export type PostV1OffboardingsRequestType = "termination"; +export const PostV1OffboardingsRequestType = /*@__PURE__*/ S.String; + +export interface PostV1OffboardingsRequest { + /** The unique identifier (UUID) of the employment to be terminated. */ + employment_id: string; + termination_details: TerminationDetailsParams; + /** The type of the offboarding request. For now, only `termination` is allowed. */ + type: PostV1OffboardingsRequestType | (string & {}); +} +export const PostV1OffboardingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + termination_details: TerminationDetailsParams, + type: PostV1OffboardingsRequestType, + }).pipe(T.Http({ method: "POST", uri: "/v1/offboardings", code: 200 })), +).annotate({ + identifier: "PostV1OffboardingsRequest", +}) as any as S.Schema; + +export interface PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest { + /** Employment ID */ + employment_id: string; + /** Pre-onboarding document ID */ + id: string; + /** The signer's full legal name as their electronic signature. */ + signature: string; +} +export const PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + id: S.String.pipe(T.Label()), + signature: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/onboarding/employments/{employment_id}/pre-onboarding-documents/{id}/sign", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest", + }) as any as S.Schema; + +export interface PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest { + /** Employment ID */ + employment_id: string; + /** Pre-onboarding requirement slug */ + requirement_slug: string; +} +export const PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + requirement_slug: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements/{requirement_slug}/acknowledge", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest", + }) as any as S.Schema; + +export interface CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement { + id: string; +} +export const CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + }), + ).annotate({ + identifier: + "CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement", + }) as any as S.Schema; + +export interface CreatePreOnboardingAcknowledgementResponseData { + pre_onboarding_acknowledgement: CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement; +} +export const CreatePreOnboardingAcknowledgementResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + pre_onboarding_acknowledgement: + CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement, + }), + ).annotate({ + identifier: "CreatePreOnboardingAcknowledgementResponseData", + }) as any as S.Schema; + +/** Returns the slug of the recorded pre-onboarding acknowledgement. */ +export interface CreatePreOnboardingAcknowledgementResponse { + data: CreatePreOnboardingAcknowledgementResponseData; +} +export const CreatePreOnboardingAcknowledgementResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreatePreOnboardingAcknowledgementResponseData, + }), + ).annotate({ + identifier: "CreatePreOnboardingAcknowledgementResponse", + }) as any as S.Schema; + +export interface PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest { + /** Employment ID */ + employment_id: string; + /** Pre-onboarding requirement slug */ + requirement_slug: string; +} +export const PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + requirement_slug: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/onboarding/employments/{employment_id}/pre-onboarding-requirements/{requirement_slug}/documents", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest", + }) as any as S.Schema; + +export type CreatePreOnboardingDocumentResponseDataPreOnboardingDocument = + CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement; +export const CreatePreOnboardingDocumentResponseDataPreOnboardingDocument = + CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement; + +export interface CreatePreOnboardingDocumentResponseData { + pre_onboarding_document: CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement; +} +export const CreatePreOnboardingDocumentResponseData = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + pre_onboarding_document: + CreatePreOnboardingAcknowledgementResponseDataPreOnboardingAcknowledgement, + }), +).annotate({ + identifier: "CreatePreOnboardingDocumentResponseData", +}) as any as S.Schema; + +/** Returns the slug of the found-or-created pre-onboarding document. */ +export interface CreatePreOnboardingDocumentResponse { + data: CreatePreOnboardingDocumentResponseData; +} +export const CreatePreOnboardingDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreatePreOnboardingDocumentResponseData, + }), +).annotate({ + identifier: "CreatePreOnboardingDocumentResponse", +}) as any as S.Schema; + +export interface PayItemParams { + /** Value of the pay item. Its unit depends on the `type` of the pay code (see GET /v1/companies/:company_id/legal-entities/:legal_entity_id/pay-codes): `amount` in cents, `percentage` in basis points, `unit` as a raw count, `hours` as a whole number of hours, `duration` in seconds. Must be non-zero; negative values are allowed for corrections. */ + amount: number; + /** Pay item type code. Mutually exclusive with `external_import_code` — provide exactly one. */ + code?: string; + currency?: string | null; + /** Working day date (YYYY-MM-DD) */ + effective_date: string; + /** Employment UUID. Only Global Payroll employments are supported. */ + employment_id: string; + /** Partner-defined pay element identifier, as configured on the legal entity pay element. Mutually exclusive with `code` — provide exactly one. */ + external_import_code?: string; + provider_data?: PayItemProviderData; +} +export const PayItemParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.Number, + code: S.optional(S.String), + currency: S.optional(S.NullOr(S.String)), + effective_date: S.String, + employment_id: S.String, + external_import_code: S.optional(S.String), + provider_data: S.optional(PayItemProviderData), + }), +).annotate({ identifier: "PayItemParams" }) as any as S.Schema; + +export type PostV1PayItemsBulkRequestPayItemsList = Array; +export const PostV1PayItemsBulkRequestPayItemsList = /*@__PURE__*/ S.Array( + PayItemParams, +) as any as S.Schema; + +export interface PostV1PayItemsBulkRequest { + pay_items: PostV1PayItemsBulkRequestPayItemsList; +} +export const PostV1PayItemsBulkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pay_items: PostV1PayItemsBulkRequestPayItemsList, + }).pipe(T.Http({ method: "POST", uri: "/v1/pay-items/bulk", code: 200 })), +).annotate({ + identifier: "PostV1PayItemsBulkRequest", +}) as any as S.Schema; + +export interface UnprocessableEntityResponseCase0 { + errors: unknown; +} +export const UnprocessableEntityResponseCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + errors: S.Unknown, + }), +).annotate({ + identifier: "UnprocessableEntityResponseCase0", +}) as any as S.Schema; + +export interface ParameterError { + /** An error code that describes the nature of the error. */ + code: string; + /** A developer friendly error message that gives details on what the error was and how it may be remedied. */ + message: string; + /** The parameter that lead to the error message. */ + param: string; +} +export const ParameterError = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + message: S.String, + param: S.String, + }), +).annotate({ identifier: "ParameterError" }) as any as S.Schema; + +export type UnprocessableEntityResponseCase1MessageCase2List = + Array; +export const UnprocessableEntityResponseCase1MessageCase2List = + /*@__PURE__*/ S.Array( + ParameterError, + ) as any as S.Schema; + +export interface ActionError { + /** The action that lead to the error message. */ + action: string; + /** An error code that describes the nature of the error. */ + code: string; + /** A developer friendly error message that gives details on what the error was and how it may be remedied. */ + message: string; +} +export const ActionError = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action: S.String, + code: S.String, + message: S.String, + }), +).annotate({ identifier: "ActionError" }) as any as S.Schema; + +export type UnprocessableEntityResponseCase1MessageCase4List = + Array; +export const UnprocessableEntityResponseCase1MessageCase4List = + /*@__PURE__*/ S.Array( + ActionError, + ) as any as S.Schema; + +export type UnprocessableEntityResponseCase1Message = + | string + | ParameterError + | UnprocessableEntityResponseCase1MessageCase2List + | ActionError + | UnprocessableEntityResponseCase1MessageCase4List; +export const UnprocessableEntityResponseCase1Message = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface UnprocessableEntityResponseCase1 { + message: UnprocessableEntityResponseCase1Message; +} +export const UnprocessableEntityResponseCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + message: UnprocessableEntityResponseCase1Message, + }), +).annotate({ + identifier: "UnprocessableEntityResponseCase1", +}) as any as S.Schema; + +export type UnprocessableEntityResponse = + | UnprocessableEntityResponseCase0 + | UnprocessableEntityResponseCase1; +export const UnprocessableEntityResponse = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Failure reason. Includes `employment_not_global_payroll` when the provided employment is not Global Payroll, and `pay_item_code_not_allowed` / `pay_item_external_import_code_not_allowed` when the given identifier does not resolve to an allowed pay element. */ +export type PayItemBulkCreateFailuresError = + | string + | UnprocessableEntityResponse; +export const PayItemBulkCreateFailuresError = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PayItemBulkCreateFailures { + /** Failure reason. Includes `employment_not_global_payroll` when the provided employment is not Global Payroll, and `pay_item_code_not_allowed` / `pay_item_external_import_code_not_allowed` when the given identifier does not resolve to an allowed pay element. */ + error?: PayItemBulkCreateFailuresError; + row_number?: number; +} +export const PayItemBulkCreateFailures = /*@__PURE__*/ S.suspend(() => + S.Struct({ + error: S.optional(PayItemBulkCreateFailuresError), + row_number: S.optional(S.Number), + }), +).annotate({ + identifier: "PayItemBulkCreateFailures", +}) as any as S.Schema; + +export type BulkCreatePayItemsResponseDataFailuresList = + Array; +export const BulkCreatePayItemsResponseDataFailuresList = /*@__PURE__*/ S.Array( + PayItemBulkCreateFailures, +) as any as S.Schema; + +export interface PayItemBulkCreateSuccesses { + pay_item: PayItem; + row_number: number; +} +export const PayItemBulkCreateSuccesses = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pay_item: PayItem, + row_number: S.Number, + }), +).annotate({ + identifier: "PayItemBulkCreateSuccesses", +}) as any as S.Schema; + +export type BulkCreatePayItemsResponseDataSuccessesList = + Array; +export const BulkCreatePayItemsResponseDataSuccessesList = + /*@__PURE__*/ S.Array( + PayItemBulkCreateSuccesses, + ) as any as S.Schema; + +export interface BulkCreatePayItemsResponseData { + failures: BulkCreatePayItemsResponseDataFailuresList; + successes: BulkCreatePayItemsResponseDataSuccessesList; +} +export const BulkCreatePayItemsResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + failures: BulkCreatePayItemsResponseDataFailuresList, + successes: BulkCreatePayItemsResponseDataSuccessesList, + }), +).annotate({ + identifier: "BulkCreatePayItemsResponseData", +}) as any as S.Schema; + +export interface BulkCreatePayItemsResponse { + data: BulkCreatePayItemsResponseData; +} +export const BulkCreatePayItemsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BulkCreatePayItemsResponseData, + }), +).annotate({ + identifier: "BulkCreatePayItemsResponse", +}) as any as S.Schema; + +/** The type of GL report to generate. */ +export type PostV1PayrollRunsPayrollRunIdGlReportsRequestType = + | "summary" + | "by_department" + | "employee_detail"; +export const PostV1PayrollRunsPayrollRunIdGlReportsRequestType = + /*@__PURE__*/ S.String; + +export interface PostV1PayrollRunsPayrollRunIdGlReportsRequest { + /** The payroll run's ID */ + payroll_run_id: string; + /** The type of GL report to generate. */ + type: PostV1PayrollRunsPayrollRunIdGlReportsRequestType | (string & {}); +} +export const PostV1PayrollRunsPayrollRunIdGlReportsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + payroll_run_id: S.String.pipe(T.Label()), + type: PostV1PayrollRunsPayrollRunIdGlReportsRequestType, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/payroll-runs/{payroll_run_id}/gl-reports", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1PayrollRunsPayrollRunIdGlReportsRequest", + }) as any as S.Schema; + +export interface PostV1ProbationCompletionLetterRequest { + /** The employment ID. */ + employment_id: string; +} +export const PostV1ProbationCompletionLetterRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + employment_id: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/probation-completion-letter", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1ProbationCompletionLetterRequest", +}) as any as S.Schema; + +export interface ProbationExtensionFile { + /** The content of the file encoded in base64. */ + content: string; + /** The name of the file. */ + name: string; +} +export const ProbationExtensionFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.String, + name: S.String, + }), +).annotate({ + identifier: "ProbationExtensionFile", +}) as any as S.Schema; + +export interface PostV1ProbationExtensionsRequest { + /** Any additional details that need to be considered for the probation extension. */ + additional_details?: string; + /** The date when the discussion with the employee took place. Is required when `was_employee_informed` is `true` and should be in the past. */ + date_of_discussion_with_employee?: string; + /** The number of days to add to the existing probation end date. */ + duration_of_extension_in_days: number; + /** The employment ID that is related to the probation extension request. */ + employment_id: string; + /** The reason for the probation extension. */ + reason_for_extension: string; + /** Upload performance improvement plan or any other supporting document. This optional document can be sent only if `was_employee_informed` is `true`. */ + supporting_document?: ProbationExtensionFile; + /** Whether the employee was informed about the probation extension. */ + was_employee_informed: boolean; +} +export const PostV1ProbationExtensionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + additional_details: S.optional(S.String), + date_of_discussion_with_employee: S.optional(S.String), + duration_of_extension_in_days: S.Number, + employment_id: S.String, + reason_for_extension: S.String, + supporting_document: S.optional(ProbationExtensionFile), + was_employee_informed: S.Boolean, + }).pipe( + T.Http({ method: "POST", uri: "/v1/probation-extensions", code: 200 }), + ), +).annotate({ + identifier: "PostV1ProbationExtensionsRequest", +}) as any as S.Schema; + +export interface PostV1RiskReserveRequest { + /** 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; +} +export const PostV1RiskReserveRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_slug: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/risk-reserve", code: 200 })), +).annotate({ + identifier: "PostV1RiskReserveRequest", +}) as any as S.Schema; + +export interface PostV1SandboxBenefitRenewalRequestsRequest { + /** The unique identifier (UUID) of the benefit group to create a renewal request for. */ + benefit_group_id: string; +} +export const PostV1SandboxBenefitRenewalRequestsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + benefit_group_id: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/benefit-renewal-requests", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1SandboxBenefitRenewalRequestsRequest", + }) as any as S.Schema; + +export type BenefitRenewalRequestsCreateBenefitRenewalRequestResponseData = + BenefitRenewalRequestsBenefitRenewalRequestResponseData; +export const BenefitRenewalRequestsCreateBenefitRenewalRequestResponseData = + BenefitRenewalRequestsBenefitRenewalRequestResponseData; + +/** Create Benefit Renewal Request Response */ +export interface BenefitRenewalRequestsCreateBenefitRenewalRequestResponse { + data: BenefitRenewalRequestsBenefitRenewalRequestResponseData; +} +export const BenefitRenewalRequestsCreateBenefitRenewalRequestResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: BenefitRenewalRequestsBenefitRenewalRequestResponseData, + }), + ).annotate({ + identifier: "BenefitRenewalRequestsCreateBenefitRenewalRequestResponse", + }) as any as S.Schema; + +export interface PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest { + /** Company ID */ + company_id: string; +} +export const PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/companies/{company_id}/bypass-eligibility-checks", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest", + }) as any as S.Schema; + +export interface PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest { + /** Company ID */ + company_id: string; + /** ISO 3166-1 alpha-3 country code */ + country_code: string; +} +export const PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + country_code: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/companies/{company_id}/legal-entities", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest", + }) as any as S.Schema; + +export interface PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData { + /** Legal entity slug */ + legal_entity_id?: string; + /** Legal entity name */ + name?: string; + /** Legal entity status */ + status?: string; +} +export const PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + legal_entity_id: S.optional(S.String), + name: S.optional(S.String), + status: S.optional(S.String), + }), + ).annotate({ + identifier: "PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData", + }) as any as S.Schema; + +export interface PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse { + data?: PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData; +} +export const PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional( + PostV1SandboxCompaniesCompanyIdLegalEntitiesResponseData, + ), + }), + ).annotate({ + identifier: "PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse", + }) as any as S.Schema; + +export interface PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest { + /** Company ID */ + company_id: string; + /** Legal Entity ID to activate Global Payroll on */ + legal_entity_id: string; +} +export const PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/companies/{company_id}/legal-entities/{legal_entity_id}/activate-global-payroll", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest", + }) as any as S.Schema; + +export interface PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest { + /** Company ID */ + company_id: string; + /** Legal Entity ID */ + legal_entity_id: string; + /** Credit risk status to set. */ + credit_risk_status: string; +} +export const PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + credit_risk_status: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/companies/{company_id}/legal-entities/{legal_entity_id}/set-credit-risk-status", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest", + }) as any as S.Schema; + +/** How often the contractor is paid. Must be null or omitted for a `one_off` rate. */ +export type PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestPayFrequency = + | "weekly" + | "bi_weekly" + | "semi_monthly" + | "monthly"; +export const PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestPayFrequency = + /*@__PURE__*/ S.String; + +/** The unit the amount is paid per. */ +export type PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestType = + | "hourly" + | "daily" + | "weekly" + | "monthly" + | "one_off"; +export const PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestType = + /*@__PURE__*/ S.String; + +export interface PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest { + /** Contractor employment ID */ + employment_id: string; + /** The amount paid per `type`, in the major unit, e.g. 103.83. */ + amount: string; + /** How often the contractor is paid. Must be null or omitted for a `one_off` rate. */ + pay_frequency?: + | PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestPayFrequency + | (string & {}) + | null; + /** The unit the amount is paid per. */ + type: + | PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestType + | (string & {}); +} +export const PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + amount: S.String, + pay_frequency: S.optional( + S.NullOr( + PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestPayFrequency, + ), + ), + type: PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequestType, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/contractors/employments/{employment_id}/rates", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest", + }) as any as S.Schema; + +/** The contractor rate that was seeded. */ +export interface SandboxContractorRateResponse { + data: ContractorRate; +} +export const SandboxContractorRateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: ContractorRate, + }), +).annotate({ + identifier: "SandboxContractorRateResponse", +}) as any as S.Schema; + +/** If not provided, it will default to `employee`. */ +export type PostV1SandboxEmploymentsRequestType = + | "employee" + | "contractor" + | "global_payroll_employee" + | "hris"; +export const PostV1SandboxEmploymentsRequestType = /*@__PURE__*/ S.String; + +export interface PostV1SandboxEmploymentsRequest { + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + basic_information: unknown; + /** Id of the legal entity that should be billed for the employment. If omitted, falls back to `engaged_by_legal_entity_id`. For EOR and Contractor employments this may differ from `engaged_by_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `engaged_by_legal_entity_id`. */ + bill_to_legal_entity_id?: string; + /** 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; + /** Deprecated alias for `engaged_by_legal_entity_id`. Use `engaged_by_legal_entity_id` instead. */ + engaged_by_entity_slug?: string; + /** Id of the legal entity that engages the employee or contractor. Required for Global Payroll employees. For EOR and Contractor employments this may differ from `bill_to_legal_entity_id`. For Global Payroll and Direct (HRIS) employments it must match `bill_to_legal_entity_id`. */ + engaged_by_legal_entity_id?: string; + /** A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system. */ + external_id?: string; + /** A reference code for the employment record in the calling integration's own system. Private to that integration — no other integration can read or overwrite it. Omit the field to leave the value unchanged; send `null` to clear it. Surrounding whitespace is trimmed off. It can be set at any employment status, and the same value may be used on several employments (for example a rehire). */ + partner_external_id?: string | null; + /** If not provided, it will default to `employee`. */ + type?: PostV1SandboxEmploymentsRequestType | (string & {}); +} +export const PostV1SandboxEmploymentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + basic_information: S.Unknown, + bill_to_legal_entity_id: S.optional(S.String), + company_id: S.optional(S.String), + country_code: S.String, + engaged_by_entity_slug: S.optional(S.String), + engaged_by_legal_entity_id: S.optional(S.String), + external_id: S.optional(S.String), + partner_external_id: S.optional(S.NullOr(S.String)), + type: S.optional(PostV1SandboxEmploymentsRequestType), + }).pipe( + T.Http({ method: "POST", uri: "/v1/sandbox/employments", code: 200 }), + ), +).annotate({ + identifier: "PostV1SandboxEmploymentsRequest", +}) as any as S.Schema; + +export interface PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest { + /** Employment ID */ + employment_id: string; +} +export const PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/employments/{employment_id}/risk-reserve-proof-of-payments/approve", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest", + }) as any as S.Schema; + +export type WebhookTriggerEmploymentParamsEventType = + | "background_check.status.updated" + | "benefit_renewal_request.created" + | "billing_document.issued" + | "company.activated" + | "company.manager_created" + | "company.manager_deleted" + | "company.manager_updated" + | "company.owner_changed" + | "company.archived" + | "company.eor_hiring.additional_information_required" + | "company.eor_hiring.reserve_payment_requested" + | "company.eor_hiring.no_reserve_payment_requested" + | "company.eor_hiring.referred" + | "company.eor_hiring.verification_completed" + | "company.partner_offboarded" + | "company.pricing_plan.updated" + | "contract_amendment.canceled" + | "contract_amendment.deleted" + | "contract_amendment.done" + | "contract_amendment.review_started" + | "contract_amendment.submitted" + | "contract.termination_date_reached" + | "contract_document.status.changed" + | "contractor_invoice.employer_paid" + | "contractor_invoice.issued" + | "contractor_invoice.paid_out" + | "contractor_invoice.payment_initiated" + | "custom_field.value_updated" + | "employment.benefits.selected" + | "employment_company_structure_node.updated" + | "employment_contract.active_contract_updated" + | "employment_contract.adjusted_during_onboarding" + | "employment.account.updated" + | "employment.administrative_details.updated" + | "employment_basic_information.updated" + | "employment.contractor_management_plan.updated" + | "employment.contractor_of_record_termination.cancelled" + | "employment.contractor_of_record_termination.executed" + | "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" + | "employment.onboarding_task.completed" + | "employment.onboarding.cancelled" + | "employment.onboarding.completed" + | "employment.onboarding.started" + | "employment.personal_information.updated" + | "employment.probation_completion_letter.cancelled" + | "employment.probation_completion_letter.completed" + | "employment.probation_completion_letter.submitted" + | "employment.probation.period_ending_reminder_sent" + | "employment.probation_period_extension.cancelled" + | "employment.probation_period_extension.completed" + | "employment.probation_period_extension.submitted" + | "employment.start_date.changed" + | "employment.status.updated" + | "employment.updated" + | "employment.user_status.activated" + | "employment.user_status.deactivated" + | "employment.user_status.initiated" + | "employment.user_status.invited" + | "employment.work_email.updated" + | "expense.approved" + | "expense.declined" + | "expense.deleted" + | "expense.reimbursed" + | "expense.submitted" + | "expense.updated" + | "identity_verification.verification_required" + | "incentive.created" + | "incentive.deleted" + | "incentive.paid" + | "incentive.processing_started" + | "incentive.updated" + | "offboarding.completed" + | "offboarding.deleted" + | "offboarding.done" + | "offboarding.review_started" + | "offboarding.submitted_to_payroll" + | "offboarding.submitted" + | "payslip.released" + | "sso_configuration.disabled" + | "sso_configuration.enabled" + | "sso_configuration.updated" + | "timeoff.approved" + | "timeoff.canceled" + | "timeoff.cancellation_requested" + | "timeoff.date_changed" + | "timeoff.declined" + | "timeoff.requested" + | "timeoff.started" + | "timeoff.taken" + | "timeoff.updated" + | "timesheet.submitted" + | "timesheet.in_calibration" + | "travel_letter.approved_by_manager" + | "travel_letter.approved_by_remote" + | "travel_letter.declined_by_manager" + | "travel_letter.declined_by_remote" + | "travel_letter.requested" + | "work_authorization.approved_by_manager" + | "work_authorization.approved_by_remote" + | "work_authorization.cancelled" + | "work_authorization.declined_by_manager" + | "work_authorization.declined_by_remote" + | "work_authorization.requested"; +export const WebhookTriggerEmploymentParamsEventType = /*@__PURE__*/ S.String; + +export interface WebhookTriggerEmploymentParams { + employment_id: string; + event_type: WebhookTriggerEmploymentParamsEventType | (string & {}); +} +export const WebhookTriggerEmploymentParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String, + event_type: WebhookTriggerEmploymentParamsEventType, + }), +).annotate({ + identifier: "WebhookTriggerEmploymentParams", +}) as any as S.Schema; + +export type WebhookTriggerBillingParamsDocumentType = + | "supplemental_service_invoice" + | "prefunding_invoice" + | "reconciliation_invoice" + | "supplemental_service_credit_note" + | "prefunding_credit_note" + | "reconciliation_credit_note"; +export const WebhookTriggerBillingParamsDocumentType = /*@__PURE__*/ S.String; + +export type WebhookTriggerBillingParamsEventType = "billing_document.issued"; +export const WebhookTriggerBillingParamsEventType = /*@__PURE__*/ S.String; + +export interface WebhookTriggerBillingParams { + document_type: WebhookTriggerBillingParamsDocumentType | (string & {}); + event_type: WebhookTriggerBillingParamsEventType; +} +export const WebhookTriggerBillingParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_type: WebhookTriggerBillingParamsDocumentType, + event_type: WebhookTriggerBillingParamsEventType, + }), +).annotate({ + identifier: "WebhookTriggerBillingParams", +}) as any as S.Schema; + +/** Required params to trigger a webhook event in the Sandbox environment */ +export type WebhookTriggerParams = + | WebhookTriggerEmploymentParams + | WebhookTriggerBillingParams; +export const WebhookTriggerParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1SandboxWebhookCallbacksTriggerRequest { + body?: WebhookTriggerParams; +} +export const PostV1SandboxWebhookCallbacksTriggerRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(WebhookTriggerParams.pipe(T.HttpBody())), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/sandbox/webhook-callbacks/trigger", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1SandboxWebhookCallbacksTriggerRequest", + }) as any as S.Schema; + +/** Error category */ +export type PostV1SdkTelemetryErrorsRequestErrorCategory = + | "RENDER_ERROR" + | "NETWORK_ERROR" + | "VALIDATION_ERROR" + | "STATE_ERROR" + | "HOOK_ERROR" + | "RUNTIME_ERROR" + | "UNKNOWN_ERROR"; +export const PostV1SdkTelemetryErrorsRequestErrorCategory = + /*@__PURE__*/ S.String; + +/** Component Stack */ +export type PostV1SdkTelemetryErrorsRequestErrorComponentStackList = + Array; +export const PostV1SdkTelemetryErrorsRequestErrorComponentStackList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Error severity */ +export type PostV1SdkTelemetryErrorsRequestErrorSeverity = + | "critical" + | "error" + | "warning" + | "info"; +export const PostV1SdkTelemetryErrorsRequestErrorSeverity = + /*@__PURE__*/ S.String; + +export interface PostV1SdkTelemetryErrorsRequestError { + /** Error category */ + category: PostV1SdkTelemetryErrorsRequestErrorCategory | (string & {}); + /** Component Stack */ + component_stack?: PostV1SdkTelemetryErrorsRequestErrorComponentStackList | null; + /** Error message */ + message: string; + /** Error name */ + name: string; + /** Error severity */ + severity: PostV1SdkTelemetryErrorsRequestErrorSeverity | (string & {}); + /** Stack Trace */ + stack?: string | null; +} +export const PostV1SdkTelemetryErrorsRequestError = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + category: PostV1SdkTelemetryErrorsRequestErrorCategory, + component_stack: S.optional( + S.NullOr(PostV1SdkTelemetryErrorsRequestErrorComponentStackList), + ), + message: S.String, + name: S.String, + severity: PostV1SdkTelemetryErrorsRequestErrorSeverity, + stack: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "PostV1SdkTelemetryErrorsRequestError", +}) as any as S.Schema; + +/** SDK runtime environment */ +export type PostV1SdkTelemetryErrorsRequestMetadataEnvironment = + | "production" + | "staging" + | "local" + | "partners" + | "sandbox"; +export const PostV1SdkTelemetryErrorsRequestMetadataEnvironment = + /*@__PURE__*/ S.String; + +export interface PostV1SdkTelemetryErrorsRequestMetadata { + /** SDK runtime environment */ + environment: + | PostV1SdkTelemetryErrorsRequestMetadataEnvironment + | (string & {}); + /** SDK Version */ + sdk_version: string; + /** Client Timestamp */ + timestamp: string; + /** Client URL */ + url: string; + /** User Agent */ + user_agent: string; +} +export const PostV1SdkTelemetryErrorsRequestMetadata = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + environment: PostV1SdkTelemetryErrorsRequestMetadataEnvironment, + sdk_version: S.String, + timestamp: S.String, + url: S.String, + user_agent: S.String, + }), +).annotate({ + identifier: "PostV1SdkTelemetryErrorsRequestMetadata", +}) as any as S.Schema; + +export interface PostV1SdkTelemetryErrorsRequest { + /** Context */ + context?: unknown | null; + error: PostV1SdkTelemetryErrorsRequestError; + metadata: PostV1SdkTelemetryErrorsRequestMetadata; +} +export const PostV1SdkTelemetryErrorsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + context: S.optional(S.NullOr(S.Unknown)), + error: PostV1SdkTelemetryErrorsRequestError, + metadata: PostV1SdkTelemetryErrorsRequestMetadata, + }).pipe( + T.Http({ method: "POST", uri: "/v1/sdk/telemetry-errors", code: 200 }), + ), +).annotate({ + identifier: "PostV1SdkTelemetryErrorsRequest", +}) as any as S.Schema; + +export interface PostV1SdkTelemetryErrorsResponse {} +export const PostV1SdkTelemetryErrorsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PostV1SdkTelemetryErrorsResponse", +}) as any as S.Schema; + +export interface PostV1SsoConfigurationRequest { + /** The SAML signing certificate from your identity provider, base64-encoded. */ + certificate: string; + /** 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; +} +export const PostV1SsoConfigurationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + certificate: S.String, + domain: S.String, + identity_provider_url: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/sso-configuration", code: 200 })), +).annotate({ + identifier: "PostV1SsoConfigurationRequest", +}) as any as S.Schema; + +export interface CreateSSOConfigurationResult { + audience_uri: string; + certificate: string; + domain: string; + identity_provider_url: string; + sso_url: string; +} +export const CreateSSOConfigurationResult = /*@__PURE__*/ S.suspend(() => + S.Struct({ + audience_uri: S.String, + certificate: S.String, + domain: S.String, + identity_provider_url: S.String, + sso_url: S.String, + }), +).annotate({ + identifier: "CreateSSOConfigurationResult", +}) as any as S.Schema; + +export interface CreateSSOConfigurationResponse { + data: CreateSSOConfigurationResult; +} +export const CreateSSOConfigurationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreateSSOConfigurationResult, + }), +).annotate({ + identifier: "CreateSSOConfigurationResponse", +}) as any as S.Schema; + +export type PostV1TimeoffRequestTimeoffDaysList = Array; +export const PostV1TimeoffRequestTimeoffDaysList = /*@__PURE__*/ S.Array( + TimeoffDaysParams, +) as any as S.Schema; + +export type PostV1TimeoffRequestStatus = "approved"; +export const PostV1TimeoffRequestStatus = /*@__PURE__*/ S.String; + +export interface PostV1TimeoffRequest { + document?: TimeoffDocumentParams; + employment_id: string; + end_date: string; + /** UUID of a custom company leave policy assigned to the employment. Use this field instead of `timeoff_type` when creating time off against a custom leave policy. Discover available custom leave policy UUIDs via `GET /v1/leave-policies/details/{employment_id}`. */ + leave_policy_variant_id?: string; + notes?: string; + start_date: string; + timeoff_days: PostV1TimeoffRequestTimeoffDaysList; + timeoff_type?: TimeoffType | (string & {}); + timezone: string; + approved_at: string; + approver_id: string | null; + status: PostV1TimeoffRequestStatus | (string & {}); +} +export const PostV1TimeoffRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document: S.optional(TimeoffDocumentParams), + employment_id: S.String, + end_date: S.String, + leave_policy_variant_id: S.optional(S.String), + notes: S.optional(S.String), + start_date: S.String, + timeoff_days: PostV1TimeoffRequestTimeoffDaysList, + timeoff_type: S.optional(TimeoffType), + timezone: S.String, + approved_at: S.String, + approver_id: S.NullOr(S.String), + status: PostV1TimeoffRequestStatus, + }).pipe(T.Http({ method: "POST", uri: "/v1/timeoff", code: 200 })), +).annotate({ + identifier: "PostV1TimeoffRequest", +}) as any as S.Schema; + +export interface PostV1TimeoffTimeoffIdApproveRequest { + /** Time Off ID */ + timeoff_id: string; + approver_id: string | null; +} +export const PostV1TimeoffTimeoffIdApproveRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + timeoff_id: S.String.pipe(T.Label()), + approver_id: S.NullOr(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timeoff/{timeoff_id}/approve", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1TimeoffTimeoffIdApproveRequest", +}) as any as S.Schema; + +export interface PostV1TimeoffTimeoffIdCancelRequest { + /** Time Off ID */ + timeoff_id: string; + cancel_reason: string; +} +export const PostV1TimeoffTimeoffIdCancelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timeoff_id: S.String.pipe(T.Label()), + cancel_reason: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timeoff/{timeoff_id}/cancel", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1TimeoffTimeoffIdCancelRequest", +}) as any as S.Schema; + +export interface PostV1TimeoffTimeoffIdCancelRequestApproveRequest { + /** Time Off ID */ + timeoff_id: string; +} +export const PostV1TimeoffTimeoffIdCancelRequestApproveRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + timeoff_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timeoff/{timeoff_id}/cancel-request/approve", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1TimeoffTimeoffIdCancelRequestApproveRequest", + }) as any as S.Schema; + +export interface PostV1TimeoffTimeoffIdCancelRequestDeclineRequest { + /** Time Off ID */ + timeoff_id: string; + decline_reason: string | null; +} +export const PostV1TimeoffTimeoffIdCancelRequestDeclineRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + timeoff_id: S.String.pipe(T.Label()), + decline_reason: S.NullOr(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timeoff/{timeoff_id}/cancel-request/decline", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1TimeoffTimeoffIdCancelRequestDeclineRequest", + }) as any as S.Schema; + +export interface PostV1TimeoffTimeoffIdDeclineRequest { + /** Time Off ID */ + timeoff_id: string; + decline_reason: string | null; +} +export const PostV1TimeoffTimeoffIdDeclineRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + timeoff_id: S.String.pipe(T.Label()), + decline_reason: S.NullOr(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timeoff/{timeoff_id}/decline", + code: 200, + }), + ), +).annotate({ + identifier: "PostV1TimeoffTimeoffIdDeclineRequest", +}) as any as S.Schema; + +export interface PostV1TimesheetsTimesheetIdApproveRequest { + /** Timesheet ID */ + timesheet_id: string; +} +export const PostV1TimesheetsTimesheetIdApproveRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + timesheet_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timesheets/{timesheet_id}/approve", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1TimesheetsTimesheetIdApproveRequest", + }) as any as S.Schema; + +/** 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 interface MinimalTimesheet { + /** Whether this timesheet requires explicit approval before processing. */ + approval_required: boolean; + country_code: string; + employment_id: string; + end_date: string; + id: string; + /** Optional notes added by the employee. */ + notes: string | null; + start_date: string; + status: TimesheetStatus; + /** The timestamp when the employee submitted this timesheet. Null if not yet submitted. */ + submitted_at: string | null; +} +export const MinimalTimesheet = /*@__PURE__*/ S.suspend(() => + S.Struct({ + approval_required: S.Boolean, + country_code: S.String, + employment_id: S.String, + end_date: S.String, + id: S.String, + notes: S.NullOr(S.String), + start_date: S.String, + status: TimesheetStatus, + submitted_at: S.NullOr(S.String), + }), +).annotate({ + identifier: "MinimalTimesheet", +}) as any as S.Schema; + +export interface MinimalTimesheetResponseData { + timesheet: MinimalTimesheet; +} +export const MinimalTimesheetResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timesheet: MinimalTimesheet, + }), +).annotate({ + identifier: "MinimalTimesheetResponseData", +}) as any as S.Schema; + +/** Response containing a minimal timesheet representation, returned after create and approve operations. */ +export interface MinimalTimesheetResponse { + data?: MinimalTimesheetResponseData; +} +export const MinimalTimesheetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(MinimalTimesheetResponseData), + }), +).annotate({ + identifier: "MinimalTimesheetResponse", +}) as any as S.Schema; + +export interface PostV1TimesheetsTimesheetIdSendBackRequest { + /** Timesheet ID */ + timesheet_id: string; + /** A required explanation of why the timesheet is being sent back. This will be visible to the employee. */ + sent_back_reason: string; +} +export const PostV1TimesheetsTimesheetIdSendBackRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + timesheet_id: S.String.pipe(T.Label()), + sent_back_reason: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/v1/timesheets/{timesheet_id}/send-back", + code: 200, + }), + ), + ).annotate({ + identifier: "PostV1TimesheetsTimesheetIdSendBackRequest", + }) as any as S.Schema; + +/** 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 interface SentBackTimesheet { + id: string; + /** 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; +} +export const SentBackTimesheet = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + sent_back: S.Boolean, + sent_back_reason: S.String, + status: TimesheetStatus, + }), +).annotate({ + identifier: "SentBackTimesheet", +}) as any as S.Schema; + +export interface SentBackTimesheetResponseData { + timesheet: SentBackTimesheet; +} +export const SentBackTimesheetResponseData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timesheet: SentBackTimesheet, + }), +).annotate({ + identifier: "SentBackTimesheetResponseData", +}) as any as S.Schema; + +/** Response returned after a timesheet has been sent back to the employee for revision. */ +export interface SentBackTimesheetResponse { + data?: SentBackTimesheetResponseData; +} +export const SentBackTimesheetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(SentBackTimesheetResponseData), + }), +).annotate({ + identifier: "SentBackTimesheetResponse", +}) as any as S.Schema; + +/** The setting to be enabled. */ +export type PostV1WebhookCallbacksRequestSubscribedEventsItem = + | "background_check.status.updated" + | "benefit_renewal_request.created" + | "billing_document.issued" + | "company.activated" + | "company.manager_created" + | "company.manager_deleted" + | "company.manager_updated" + | "company.owner_changed" + | "company.archived" + | "company.eor_hiring.additional_information_required" + | "company.eor_hiring.reserve_payment_requested" + | "company.eor_hiring.no_reserve_payment_requested" + | "company.eor_hiring.referred" + | "company.eor_hiring.verification_completed" + | "company.partner_offboarded" + | "company.pricing_plan.updated" + | "contract_amendment.canceled" + | "contract_amendment.deleted" + | "contract_amendment.done" + | "contract_amendment.review_started" + | "contract_amendment.submitted" + | "contract.termination_date_reached" + | "contract_document.status.changed" + | "contractor_invoice.employer_paid" + | "contractor_invoice.issued" + | "contractor_invoice.paid_out" + | "contractor_invoice.payment_initiated" + | "custom_field.value_updated" + | "employment.benefits.selected" + | "employment_company_structure_node.updated" + | "employment_contract.active_contract_updated" + | "employment_contract.adjusted_during_onboarding" + | "employment.account.updated" + | "employment.administrative_details.updated" + | "employment_basic_information.updated" + | "employment.contractor_management_plan.updated" + | "employment.contractor_of_record_termination.cancelled" + | "employment.contractor_of_record_termination.executed" + | "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" + | "employment.onboarding_task.completed" + | "employment.onboarding.cancelled" + | "employment.onboarding.completed" + | "employment.onboarding.started" + | "employment.personal_information.updated" + | "employment.probation_completion_letter.cancelled" + | "employment.probation_completion_letter.completed" + | "employment.probation_completion_letter.submitted" + | "employment.probation.period_ending_reminder_sent" + | "employment.probation_period_extension.cancelled" + | "employment.probation_period_extension.completed" + | "employment.probation_period_extension.submitted" + | "employment.start_date.changed" + | "employment.status.updated" + | "employment.updated" + | "employment.user_status.activated" + | "employment.user_status.deactivated" + | "employment.user_status.initiated" + | "employment.user_status.invited" + | "employment.work_email.updated" + | "expense.approved" + | "expense.declined" + | "expense.deleted" + | "expense.reimbursed" + | "expense.submitted" + | "expense.updated" + | "identity_verification.verification_required" + | "incentive.created" + | "incentive.deleted" + | "incentive.paid" + | "incentive.processing_started" + | "incentive.updated" + | "offboarding.completed" + | "offboarding.deleted" + | "offboarding.done" + | "offboarding.review_started" + | "offboarding.submitted_to_payroll" + | "offboarding.submitted" + | "payslip.released" + | "sso_configuration.disabled" + | "sso_configuration.enabled" + | "sso_configuration.updated" + | "timeoff.approved" + | "timeoff.canceled" + | "timeoff.cancellation_requested" + | "timeoff.date_changed" + | "timeoff.declined" + | "timeoff.requested" + | "timeoff.started" + | "timeoff.taken" + | "timeoff.updated" + | "timesheet.submitted" + | "timesheet.in_calibration" + | "travel_letter.approved_by_manager" + | "travel_letter.approved_by_remote" + | "travel_letter.declined_by_manager" + | "travel_letter.declined_by_remote" + | "travel_letter.requested" + | "work_authorization.approved_by_manager" + | "work_authorization.approved_by_remote" + | "work_authorization.cancelled" + | "work_authorization.declined_by_manager" + | "work_authorization.declined_by_remote" + | "work_authorization.requested"; +export const PostV1WebhookCallbacksRequestSubscribedEventsItem = + /*@__PURE__*/ S.String; + +export type PostV1WebhookCallbacksRequestSubscribedEventsList = Array< + PostV1WebhookCallbacksRequestSubscribedEventsItem | (string & {}) +>; +export const PostV1WebhookCallbacksRequestSubscribedEventsList = + /*@__PURE__*/ S.Array( + PostV1WebhookCallbacksRequestSubscribedEventsItem, + ) as any as S.Schema; + +export interface PostV1WebhookCallbacksRequest { + /** When true, subscribe this callback to all current and future event types. Cannot be combined with `subscribed_events`. */ + subscribe_to_all_events?: boolean; + subscribed_events?: PostV1WebhookCallbacksRequestSubscribedEventsList; + url: string; +} +export const PostV1WebhookCallbacksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + subscribe_to_all_events: S.optional(S.Boolean), + subscribed_events: S.optional( + PostV1WebhookCallbacksRequestSubscribedEventsList, + ), + url: S.String, + }).pipe(T.Http({ method: "POST", uri: "/v1/webhook-callbacks", code: 200 })), +).annotate({ + identifier: "PostV1WebhookCallbacksRequest", +}) as any as S.Schema; + +/** A list of webhook event IDs to replay. */ +export type IdsRequiredParamsIdsList = Array; +export const IdsRequiredParamsIdsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface IdsRequiredParams { + /** A list of webhook event IDs to replay. */ + ids: IdsRequiredParamsIdsList; +} +export const IdsRequiredParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + ids: IdsRequiredParamsIdsList, + }), +).annotate({ + identifier: "IdsRequiredParams", +}) as any as S.Schema; + +export interface 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; +} +export const BeforeAfterRequiredParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + after: S.String, + before: S.String, + company_id: S.optional(S.String), + event_type: S.optional(S.String), + successfully_delivered: S.optional(S.Boolean), + }), +).annotate({ + identifier: "BeforeAfterRequiredParams", +}) as any as S.Schema; + +/** Replay webhook events params */ +export type ReplayWebhookEventsParams = + | IdsRequiredParams + | BeforeAfterRequiredParams; +export const ReplayWebhookEventsParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostV1WebhookEventsReplayRequest { + body: ReplayWebhookEventsParams; +} +export const PostV1WebhookEventsReplayRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: ReplayWebhookEventsParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ method: "POST", uri: "/v1/webhook-events/replay", code: 200 }), + ), +).annotate({ + identifier: "PostV1WebhookEventsReplayRequest", +}) as any as S.Schema; + +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList = + Array; +export const PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList = + Array; +export const PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList = + /*@__PURE__*/ S.Array( + EngagementAgreementDetailsFileParams, + ) as any as S.Schema; + +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList = + Array; +export const PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList = + Array; +export const PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails { + allowances_details?: PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList | null; + available_pto?: number | null; + break_time_per_day?: number | null; + business_expenses?: string | null; + cba?: string | null; + cba_document?: PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList | null; + covenants?: PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList | null; + has_allowances?: string | null; + has_bonus?: string | null; + has_business_expenses?: string | null; + has_business_presence?: string; + has_cba?: string | null; + has_commissions?: string | null; + has_covenants?: string | null; + has_illness_remuneration?: string | null; + has_overtime_compensation?: string | null; + has_pension_scheme?: string | null; + has_signing_bonus?: string | null; + has_similar_roles?: string; + has_similar_work_conditions?: string | null; + illness_remuneration_details?: string | null; + max_annual_gross_salary?: number | null; + min_annual_gross_salary?: number | null; + overtime_compensation_begins?: number | null; + overtime_compensation_type?: string | null; + overtime_pay_percentage?: number | null; + pension_scheme?: string | null; + similar_roles?: string | null; + similar_work_conditions_details?: string | null; + work_hours_per_week?: number | null; + working_days?: PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList | null; +} +export const PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + allowances_details: S.optional( + S.NullOr( + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsAllowancesDetailsList, + ), + ), + available_pto: S.optional(S.NullOr(S.Number)), + break_time_per_day: S.optional(S.NullOr(S.Number)), + business_expenses: S.optional(S.NullOr(S.String)), + cba: S.optional(S.NullOr(S.String)), + cba_document: S.optional( + S.NullOr( + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCbaDocumentList, + ), + ), + covenants: S.optional( + S.NullOr( + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsCovenantsList, + ), + ), + has_allowances: S.optional(S.NullOr(S.String)), + has_bonus: S.optional(S.NullOr(S.String)), + has_business_expenses: S.optional(S.NullOr(S.String)), + has_business_presence: S.optional(S.String), + has_cba: S.optional(S.NullOr(S.String)), + has_commissions: S.optional(S.NullOr(S.String)), + has_covenants: S.optional(S.NullOr(S.String)), + has_illness_remuneration: S.optional(S.NullOr(S.String)), + has_overtime_compensation: S.optional(S.NullOr(S.String)), + has_pension_scheme: S.optional(S.NullOr(S.String)), + has_signing_bonus: S.optional(S.NullOr(S.String)), + has_similar_roles: S.optional(S.String), + has_similar_work_conditions: S.optional(S.NullOr(S.String)), + illness_remuneration_details: S.optional(S.NullOr(S.String)), + max_annual_gross_salary: S.optional(S.NullOr(S.Number)), + min_annual_gross_salary: S.optional(S.NullOr(S.Number)), + overtime_compensation_begins: S.optional(S.NullOr(S.Number)), + overtime_compensation_type: S.optional(S.NullOr(S.String)), + overtime_pay_percentage: S.optional(S.NullOr(S.Number)), + pension_scheme: S.optional(S.NullOr(S.String)), + similar_roles: S.optional(S.NullOr(S.String)), + similar_work_conditions_details: S.optional(S.NullOr(S.String)), + work_hours_per_week: S.optional(S.NullOr(S.Number)), + working_days: S.optional( + S.NullOr( + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetailsWorkingDaysList, + ), + ), + }), + ).annotate({ + identifier: + "PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails", + }) as any as S.Schema; + +export interface PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Engagement agreement details params. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_engagement_agreement_details_country) endpoint passing the country code. */ + engagement_agreement_details: PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails; +} +export const PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + engagement_agreement_details: + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequestEngagementAgreementDetails, + }).pipe( + T.Http({ + method: "POST", + uri: "/v2/employments/{employment_id}/engagement-agreement-details", + code: 200, + }), + ), + ).annotate({ + identifier: + "PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest", + }) as any as S.Schema; + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequestProductType = + | "peo" + | "global_payroll" + | "e2e_payroll"; +export const PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequestProductType = + /*@__PURE__*/ S.String; + +export interface PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest { + /** Company ID */ + company_id: string; + /** Legal entity ID */ + legal_entity_id: string; + /** Administrative information. As its properties may vary depending on the country, you must query the `Show legal entity administrative details form schema` endpoint passing the country code and `administrative_details` as path parameters. */ + administrative_details: unknown; + product_type: + | PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequestProductType + | (string & {}); +} +export const PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + administrative_details: S.Unknown, + product_type: + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequestProductType, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/companies/{company_id}/legal-entities/{legal_entity_id}/administrative-details", + code: 200, + }), + ), + ).annotate({ + identifier: + "PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest", + }) as any as S.Schema; + +export interface PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse { + data: unknown; +} +export const PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.Unknown, + }), + ).annotate({ + identifier: + "PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion = + | number + | PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersionCase1; +export const PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV1EmployeeAddressRequest { + /** Version of the address_details form schema */ + address_details_json_schema_version?: PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion; + /** Home address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `address_details` as path parameters. */ + address_details: unknown; +} +export const PutV1EmployeeAddressRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + address_details_json_schema_version: S.optional( + PutV1EmployeeAddressRequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + address_details: S.Unknown, + }).pipe(T.Http({ method: "PUT", uri: "/v1/employee/address", code: 200 })), +).annotate({ + identifier: "PutV1EmployeeAddressRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion = + | number + | PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersionCase1; +export const PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV1EmployeeBankAccountRequest { + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion; + /** Bank account information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `bank_account_details` as path parameters. */ + bank_account_details: unknown; +} +export const PutV1EmployeeBankAccountRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + bank_account_details_json_schema_version: S.optional( + PutV1EmployeeBankAccountRequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + bank_account_details: S.Unknown, + }).pipe( + T.Http({ method: "PUT", uri: "/v1/employee/bank-account", code: 200 }), + ), +).annotate({ + identifier: "PutV1EmployeeBankAccountRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion = + | number + | PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1; +export const PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV1EmployeeEmergencyContactRequest { + /** Version of the emergency_contact_details form schema */ + emergency_contact_details_json_schema_version?: PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion; + /** Emergency contact information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `emergency_contact_details` as path parameters. */ + emergency_contact_details: unknown; +} +export const PutV1EmployeeEmergencyContactRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + emergency_contact_details_json_schema_version: S.optional( + PutV1EmployeeEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + emergency_contact_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employee/emergency-contact", + code: 200, + }), + ), +).annotate({ + identifier: "PutV1EmployeeEmergencyContactRequest", +}) as any as S.Schema; + +export interface PutV1EmployeeFederalTaxesRequest { + /** Federal taxes params. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `global_payroll_federal_taxes` as path parameters. */ + federal_taxes: unknown; +} +export const PutV1EmployeeFederalTaxesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + federal_taxes: S.Unknown, + }).pipe( + T.Http({ method: "PUT", uri: "/v1/employee/federal-taxes", code: 200 }), + ), +).annotate({ + identifier: "PutV1EmployeeFederalTaxesRequest", +}) as any as S.Schema; + +/** Use latest version */ +export type PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion = + | number + | PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1; +export const PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV1EmployeePersonalDetailsRequest { + /** Version of the personal_details form schema */ + personal_details_json_schema_version?: PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion; + /** Employment personal details. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + personal_details: unknown; +} +export const PutV1EmployeePersonalDetailsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + personal_details_json_schema_version: S.optional( + PutV1EmployeePersonalDetailsRequestPersonalDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + personal_details: S.Unknown, + }).pipe( + T.Http({ method: "PUT", uri: "/v1/employee/personal-details", code: 200 }), + ), +).annotate({ + identifier: "PutV1EmployeePersonalDetailsRequest", +}) as any as S.Schema; + +export interface PutV1EmployeeStateTaxesJurisdictionRequest { + /** Two-letter US state/jurisdiction code */ + jurisdiction: string; + /** State taxes params for the jurisdiction in the path. As its properties vary depending on the country and jurisdiction, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `global_payroll_state_taxes` as path parameters. */ + state_taxes: unknown; +} +export const PutV1EmployeeStateTaxesJurisdictionRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + jurisdiction: S.String.pipe(T.Label()), + state_taxes: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employee/state-taxes/{jurisdiction}", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV1EmployeeStateTaxesJurisdictionRequest", + }) as any as S.Schema; + +export interface PutV1EmploymentsEmploymentIdBasicInformationRequest { + /** Employment ID */ + employment_id: string; + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + basic_information: unknown; +} +export const PutV1EmploymentsEmploymentIdBasicInformationRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + basic_information: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employments/{employment_id}/basic-information", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV1EmploymentsEmploymentIdBasicInformationRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersionCase1 = + "latest"; +export const PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersion = + | number + | PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersionCase1; +export const PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV1EmploymentsEmploymentIdBenefitOffersRequest { + /** Unique identifier of the employment */ + employment_id: string; + /** Version of the form schema */ + json_schema_version?: PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersion; +} +export const PutV1EmploymentsEmploymentIdBenefitOffersRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + json_schema_version: S.optional( + PutV1EmploymentsEmploymentIdBenefitOffersRequestJsonSchemaVersion.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employments/{employment_id}/benefit-offers", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV1EmploymentsEmploymentIdBenefitOffersRequest", + }) as any as S.Schema; + +export interface PutV1EmploymentsEmploymentIdFederalTaxesRequest { + /** Employment ID */ + employment_id: string; + /** Federal taxes params. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `global_payroll_federal_taxes` as path parameters. */ + federal_taxes: unknown; +} +export const PutV1EmploymentsEmploymentIdFederalTaxesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + federal_taxes: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employments/{employment_id}/federal-taxes", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV1EmploymentsEmploymentIdFederalTaxesRequest", + }) as any as S.Schema; + +export interface PutV1EmploymentsEmploymentIdPersonalDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Employment personal details. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + personal_details: unknown; +} +export const PutV1EmploymentsEmploymentIdPersonalDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + personal_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/employments/{employment_id}/personal-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV1EmploymentsEmploymentIdPersonalDetailsRequest", + }) as any as S.Schema; + +/** required if `is_owed_outstanding_reimbursements` is set to true. */ +export interface ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements { + /** The amount (in the currency of the employment) to be given to the employee. This field accepts fractional amounts as well. However to avoid precision issues and errors that can arise from storing fractional amounts, the Remote API only accepts currencies and their fractional amounts as integers. This means you should append fractional amounts to the end of the amount you're passing in with this field. For example, if the amount you're offering is EUR 500.25, you would specify `50025` as the amount for this field. */ + amount?: number; + notes?: string; +} +export const ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + amount: S.optional(S.Number), + notes: S.optional(S.String), + }), + ).annotate({ + identifier: + "ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements", + }) as any as S.Schema; + +/** Required if `accepts_proposed_notice` is set to false. */ +export interface ResignationAfterStartDateRequestParamsProposedLastDate { + date?: string; + notes?: string; +} +export const ResignationAfterStartDateRequestParamsProposedLastDate = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + date: S.optional(S.String), + notes: S.optional(S.String), + }), + ).annotate({ + identifier: "ResignationAfterStartDateRequestParamsProposedLastDate", + }) as any as S.Schema; + +export type ResignationFile = OffboardingFile; +export const ResignationFile = OffboardingFile; + +export interface 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. */ + owed_outstanding_reimbursements?: ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements; + /** Required if `accepts_proposed_notice` is set to false. */ + proposed_last_date?: ResignationAfterStartDateRequestParamsProposedLastDate; + /** Paid time off accuracy Typically, any vacation pay accrued and unpaid at the time of termination must be paid out to the employee. To avoid overpaying or underpaying, please make sure we have an accurate account of their paid time off by querying the [Show Time Off Balance](#operation/get_show_timeoff_balance) endpoint, filtering by the `employment_id`. This optional document should be sent in case of any discrepancies. */ + timesheet_file?: OffboardingFile; + /** 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. */ + will_take_more_pto_notes?: string; +} +export const ResignationAfterStartDateRequestParams = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + accepts_proposed_notice: S.Boolean, + agrees_to_pto_amount: S.Boolean, + agrees_to_pto_amount_notes: S.optional(S.String), + agrees_to_resignation_reason: S.Boolean, + agrees_to_resignation_reason_notes: S.optional(S.String), + has_additional_information: S.Boolean, + has_additional_information_notes: S.optional(S.String), + has_more_salary_info: S.Boolean, + has_more_salary_info_notes: S.optional(S.String), + is_owed_outstanding_reimbursements: S.Boolean, + owed_outstanding_reimbursements: S.optional( + ResignationAfterStartDateRequestParamsOwedOutstandingReimbursements, + ), + proposed_last_date: S.optional( + ResignationAfterStartDateRequestParamsProposedLastDate, + ), + timesheet_file: S.optional(OffboardingFile), + will_take_more_pto: S.Boolean, + will_take_more_pto_notes: S.optional(S.String), + }), +).annotate({ + identifier: "ResignationAfterStartDateRequestParams", +}) as any as S.Schema; + +export interface 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. */ + proposed_resignation_accepted_notes?: string; +} +export const ResignationBeforeStartDateRequestParams = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + proposed_resignation_accepted: S.Boolean, + proposed_resignation_accepted_notes: S.optional(S.String), + }), +).annotate({ + identifier: "ResignationBeforeStartDateRequestParams", +}) as any as S.Schema; + +export type ValidateResignationRequestParams = + | ResignationAfterStartDateRequestParams + | ResignationBeforeStartDateRequestParams; +export const ValidateResignationRequestParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV1ResignationsOffboardingRequestIdValidateRequest { + /** Offboarding request ID */ + offboarding_request_id: string; + body: ValidateResignationRequestParams; +} +export const PutV1ResignationsOffboardingRequestIdValidateRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + offboarding_request_id: S.String.pipe(T.Label()), + body: ValidateResignationRequestParams.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/resignations/{offboarding_request_id}/validate", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV1ResignationsOffboardingRequestIdValidateRequest", + }) as any as S.Schema; + +export interface PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest { + /** Company ID */ + company_id: string; + /** Legal Entity ID to set as the new default */ + legal_entity_id: string; +} +export const PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + company_id: S.String.pipe(T.Label()), + legal_entity_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/sandbox/companies/{company_id}/default-legal-entity/{legal_entity_id}", + code: 200, + }), + ), + ).annotate({ + identifier: + "PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest", + }) as any as S.Schema; + +export interface PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest { + /** Contract amendment request ID */ + contract_amendment_request_id: string; +} +export const PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_amendment_request_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve", + code: 200, + }), + ), + ).annotate({ + identifier: + "PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest", + }) as any as S.Schema; + +export interface PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest { + /** Contract amendment request ID */ + contract_amendment_request_id: string; +} +export const PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + contract_amendment_request_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel", + code: 200, + }), + ), + ).annotate({ + identifier: + "PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdAddressDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Version of the address_details form schema */ + address_details_json_schema_version?: PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersion; + /** Home address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `address_details` as path parameters. */ + address_details: unknown; +} +export const PutV2EmploymentsEmploymentIdAddressDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + address_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdAddressDetailsRequestAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + address_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/address-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdAddressDetailsRequest", + }) as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Administrative information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `administrative_details` as path parameters. */ + administrative_details: unknown; +} +export const PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + administrative_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/administrative-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdBankAccountDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Version of the bank_account_details form schema */ + bank_account_details_json_schema_version?: PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersion; + /** Bank account information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `bank_account_details` as path parameters. */ + bank_account_details: unknown; +} +export const PutV2EmploymentsEmploymentIdBankAccountDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + bank_account_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdBankAccountDetailsRequestBankAccountDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + bank_account_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/bank-account-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdBankAccountDetailsRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdBasicInformationRequest { + /** Employment ID */ + employment_id: string; + /** Version of the employment_basic_information form schema */ + employment_basic_information_json_schema_version?: PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion; + /** Employment basic information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + basic_information: unknown; +} +export const PutV2EmploymentsEmploymentIdBasicInformationRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + employment_basic_information_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdBasicInformationRequestEmploymentBasicInformationJsonSchemaVersion.pipe( + T.Query(), + ), + ), + basic_information: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/basic-information", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdBasicInformationRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Version of the billing_address_details form schema */ + billing_address_details_json_schema_version?: PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersion; + /** Billing address information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `billing_address_details` as path parameters. */ + billing_address_details: unknown; +} +export const PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + billing_address_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdBillingAddressDetailsRequestBillingAddressDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + billing_address_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/billing-address-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdContractDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Version of the contract_details form schema */ + contract_details_json_schema_version?: PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersion; + /** Skips the dynamic benefits part of the schema if set. To be used when benefits are set via its own API. */ + skip_benefits?: boolean; + /** Contract information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `contract_details` as path parameters. */ + contract_details: unknown; +} +export const PutV2EmploymentsEmploymentIdContractDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + contract_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdContractDetailsRequestContractDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + skip_benefits: S.optional(S.Boolean.pipe(T.Query())), + contract_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/contract-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdContractDetailsRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdEmergencyContactRequest { + /** Employment ID */ + employment_id: string; + /** Version of the emergency_contact_details form schema */ + emergency_contact_details_json_schema_version?: PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion; + /** Emergency contact information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `emergency_contact_details` as path parameters. */ + emergency_contact_details: unknown; +} +export const PutV2EmploymentsEmploymentIdEmergencyContactRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + emergency_contact_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdEmergencyContactRequestEmergencyContactDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + emergency_contact_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/emergency-contact", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdEmergencyContactRequest", + }) as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdFederalTaxesRequest { + /** Employment ID */ + employment_id: string; + /** Federal taxes params. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `global_payroll_federal_taxes` as path parameters. */ + federal_taxes: unknown; +} +export const PutV2EmploymentsEmploymentIdFederalTaxesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + federal_taxes: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/federal-taxes", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdFederalTaxesRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdPersonalDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Version of the personal_details form schema */ + personal_details_json_schema_version?: PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersion; + /** Employment personal details. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `employment_basic_information` as path parameters. */ + personal_details: unknown; +} +export const PutV2EmploymentsEmploymentIdPersonalDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + personal_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdPersonalDetailsRequestPersonalDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + personal_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/personal-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdPersonalDetailsRequest", + }) as any as S.Schema; + +/** Use latest version */ +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersionCase1 = + "latest"; +export const PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersionCase1 = + /*@__PURE__*/ S.String; + +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersion = + | number + | PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersionCase1; +export const PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersion = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest { + /** Employment ID */ + employment_id: string; + /** Version of the pricing_plan_details form schema */ + pricing_plan_details_json_schema_version?: PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersion; + /** Pricing plan details information. As its properties may vary depending on the country, you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint passing the country code and `pricing_plan_details` as path parameters. */ + pricing_plan_details: unknown; +} +export const PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + employment_id: S.String.pipe(T.Label()), + pricing_plan_details_json_schema_version: S.optional( + PutV2EmploymentsEmploymentIdPricingPlanDetailsRequestPricingPlanDetailsJsonSchemaVersion.pipe( + T.Query(), + ), + ), + pricing_plan_details: S.Unknown, + }).pipe( + T.Http({ + method: "PUT", + uri: "/v2/employments/{employment_id}/pricing-plan-details", + code: 200, + }), + ), + ).annotate({ + identifier: "PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest", + }) as any as S.Schema; + +export type DeleteV1CompanyManagersUserIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Deletes a Company Manager user Deletes a Company Manager user ## Scopes */ +export const deleteV1CompanyManagersUserId: API.OperationMethod< + DeleteV1CompanyManagersUserIdRequest, + SuccessResponse, + DeleteV1CompanyManagersUserIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteV1CompanyManagersUserIdRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Delete contractor of record subscription intent Deletes Contractor of Record subscription intent. ## Scopes */ +export const deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription: API.OperationMethod< + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest, + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse, + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest, + output: + DeleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1IncentivesIdError = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Delete an Incentive Delete an incentive. `one_time` incentives that have the following status **CANNOT** be deleted: * `processing` * `paid` ## Scopes */ +export const deleteV1IncentivesId: API.OperationMethod< + DeleteV1IncentivesIdRequest, + SuccessResponse, + DeleteV1IncentivesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteV1IncentivesIdRequest, + output: SuccessResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1IncentivesRecurringIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const deleteV1IncentivesRecurringId: API.OperationMethod< + DeleteV1IncentivesRecurringIdRequest, + DeleteRecurringIncentiveResponse, + DeleteV1IncentivesRecurringIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteV1IncentivesRecurringIdRequest, + output: DeleteRecurringIncentiveResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Remove a pre-onboarding acknowledgement Removes a previously recorded acknowledgement. Rejected once a requirement that depends on this acknowledgement has been signed/completed. ## Scopes */ +export const deleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledge: API.OperationMethod< + DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest, + SuccessResponse, + DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + DeleteV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest, + output: SuccessResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1PayItemsIdError = + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Delete a Pay Item Archives a pay item. Cannot delete pay items linked to a payroll adjustment, salary pay items, pay items automatically created from an external source, or pay items whose payroll run is no longer in preparation. ## Scopes */ +export const deleteV1PayItemsId: API.OperationMethod< + DeleteV1PayItemsIdRequest, + SuccessResponse, + DeleteV1PayItemsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteV1PayItemsIdRequest, + output: SuccessResponse, + errors: [ + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1SandboxEmploymentsEmploymentIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Archive employment Archives an employment, setting its status to `archived`. This endpoint is only available in Sandbox and allows partners to clean up test employees during automated E2E testing without requiring Remote manual intervention. This endpoint will respond with a 404 outside of the Sandbox environment. */ +export const deleteV1SandboxEmploymentsEmploymentId: API.OperationMethod< + DeleteV1SandboxEmploymentsEmploymentIdRequest, + SuccessResponse, + DeleteV1SandboxEmploymentsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteV1SandboxEmploymentsEmploymentIdRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type DeleteV1WebhookCallbacksIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Delete a Webhook Callback Delete a callback previously registered for webhooks ## Scopes */ +export const deleteV1WebhookCallbacksId: API.OperationMethod< + DeleteV1WebhookCallbacksIdRequest, + SuccessResponse, + DeleteV1WebhookCallbacksIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteV1WebhookCallbacksIdRequest, + output: SuccessResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BenefitOffersError = NotFound | RemoteOpError; +/** List Benefit Offers By Employment List benefit offers by employment. ## Scopes */ +export const getV1BenefitOffers: API.OperationMethod< + GetV1BenefitOffersRequest, + BenefitOfferByEmploymentResponse, + GetV1BenefitOffersError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BenefitOffersRequest, + output: BenefitOfferByEmploymentResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BenefitOffersCountrySummariesError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Benefit Offers List benefit offers for each country. ## Scopes */ +export const getV1BenefitOffersCountrySummaries: API.OperationMethod< + GetV1BenefitOffersCountrySummariesRequest, + CountrySummariesResponse, + GetV1BenefitOffersCountrySummariesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BenefitOffersCountrySummariesRequest, + output: CountrySummariesResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BenefitRenewalRequestsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Benefit Renewal Requests List Benefit Renewal Requests for each country. ## Scopes */ +export const getV1BenefitRenewalRequests: API.OperationMethod< + GetV1BenefitRenewalRequestsRequest, + BenefitRenewalRequestsListBenefitRenewalRequestResponse, + GetV1BenefitRenewalRequestsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BenefitRenewalRequestsRequest, + output: BenefitRenewalRequestsListBenefitRenewalRequestResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Benefit Renewal Request Show Benefit Renewal Request details. ## Scopes */ +export const getV1BenefitRenewalRequestsBenefitRenewalRequestId: API.OperationMethod< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest, + BenefitRenewalRequestsBenefitRenewalRequestResponse, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest, + output: BenefitRenewalRequestsBenefitRenewalRequestResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show benefit renewal request schema Returns the json schema of the `benefit_renewal_request` form for a specific request. This endpoint requires a company access token, as forms are dependent on certain properties of companies and their current employments. ## Scopes */ +export const getV1BenefitRenewalRequestsBenefitRenewalRequestIdSchema: API.OperationMethod< + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest, + BenefitRenewalRequestsBenefitRenewalRequestFormResponse, + GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BenefitRenewalRequestsBenefitRenewalRequestIdSchemaRequest, + output: BenefitRenewalRequestsBenefitRenewalRequestFormResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BillingDocumentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Billing Documents List billing documents for a company ## Scopes */ +export const getV1BillingDocuments: API.OperationMethod< + GetV1BillingDocumentsRequest, + BillingDocumentsResponse, + GetV1BillingDocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BillingDocumentsRequest, + output: BillingDocumentsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BillingDocumentsBillingDocumentIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Billing Document Shows a billing document details. Please contact api-support@remote.com to request access to this endpoint. ## Scopes */ +export const getV1BillingDocumentsBillingDocumentId: API.OperationMethod< + GetV1BillingDocumentsBillingDocumentIdRequest, + BillingDocumentResponse, + GetV1BillingDocumentsBillingDocumentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BillingDocumentsBillingDocumentIdRequest, + output: BillingDocumentResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BillingDocumentsBillingDocumentIdBreakdownError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get Billing Document Breakdown Get billing document breakdown ## Scopes */ +export const getV1BillingDocumentsBillingDocumentIdBreakdown: API.OperationMethod< + GetV1BillingDocumentsBillingDocumentIdBreakdownRequest, + BillingDocumentBreakdownResponse, + GetV1BillingDocumentsBillingDocumentIdBreakdownError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BillingDocumentsBillingDocumentIdBreakdownRequest, + output: BillingDocumentBreakdownResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BillingDocumentsBillingDocumentIdPdfError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Download a billing document PDF Downloads a billing document PDF ## Scopes */ +export const getV1BillingDocumentsBillingDocumentIdPdf: API.OperationMethod< + GetV1BillingDocumentsBillingDocumentIdPdfRequest, + GetV1BillingDocumentsBillingDocumentIdPdfResponse, + GetV1BillingDocumentsBillingDocumentIdPdfError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BillingDocumentsBillingDocumentIdPdfRequest, + output: GetV1BillingDocumentsBillingDocumentIdPdfResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BulkEmploymentJobsJobIdError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** Show bulk employment job ## Scopes */ +export const getV1BulkEmploymentJobsJobId: API.OperationMethod< + GetV1BulkEmploymentJobsJobIdRequest, + BulkEmploymentImportJobResponse, + GetV1BulkEmploymentJobsJobIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BulkEmploymentJobsJobIdRequest, + output: BulkEmploymentImportJobResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1BulkEmploymentJobsJobIdRowsError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** 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 */ +export const getV1BulkEmploymentJobsJobIdRows: API.OperationMethod< + GetV1BulkEmploymentJobsJobIdRowsRequest, + ImportJobRowsResponse, + GetV1BulkEmploymentJobsJobIdRowsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1BulkEmploymentJobsJobIdRowsRequest, + output: ImportJobRowsResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List all companies List all companies that authorized your integration to act on their behalf. In other words, these are all the companies that your integration can manage. Any company that has completed the authorization flow for your integration will be included in the response. ## Scopes */ +export const getV1Companies: API.OperationMethod< + GetV1CompaniesRequest, + CompaniesResponse, + GetV1CompaniesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesRequest, + output: CompaniesResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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 */ +export const getV1CompaniesCompanyId: API.OperationMethod< + GetV1CompaniesCompanyIdRequest, + CompanyResponse, + GetV1CompaniesCompanyIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdRequest, + output: CompanyResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdActionsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List a company's pending actions Given a company ID, returns the company-level actions still pending for the company — for example company verification and Remote Payments setup. The list can be empty or contain one or more actions; `setup_remote_payments` is returned once per legal entity that needs it. ## Scopes */ +export const getV1CompaniesCompanyIdActions: API.OperationMethod< + GetV1CompaniesCompanyIdActionsRequest, + CompanyActionsResponse, + GetV1CompaniesCompanyIdActionsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdActionsRequest, + output: CompanyActionsResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdComplianceProfileError = + | Forbidden + | NotFound + | RemoteOpError; +/** Get Company Compliance Profile Returns the KYB and credit risk status for the company's default legal entity. ## Scopes */ +export const getV1CompaniesCompanyIdComplianceProfile: API.OperationMethod< + GetV1CompaniesCompanyIdComplianceProfileRequest, + CompanyComplianceProfileResponse, + GetV1CompaniesCompanyIdComplianceProfileError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdComplianceProfileRequest, + output: CompanyComplianceProfileResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusError = + | Forbidden + | NotFound + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatus: API.OperationMethod< + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest, + OnboardingReservesStatusResponse, + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + GetV1CompaniesCompanyIdEmploymentsEmploymentIdOnboardingReservesStatusRequest, + output: OnboardingReservesStatusResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdLegalEntitiesError = + | NotFound + | RemoteOpError; +/** List Company Legal Entities Lists all active legal entities for the authorized company specified in the request. ## Scopes */ +export const getV1CompaniesCompanyIdLegalEntities: API.OperationMethod< + GetV1CompaniesCompanyIdLegalEntitiesRequest, + ListCompanyLegalEntitiesResponse, + GetV1CompaniesCompanyIdLegalEntitiesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdLegalEntitiesRequest, + output: ListCompanyLegalEntitiesResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = + | NotFound + | RemoteOpError; +/** Show Legal Entity Administrative details Show administrative details of legal entity for the authorized company specified in the request. ## Scopes */ +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails: API.OperationMethod< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest, + output: + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityError = + | NotFound + | RemoteOpError; +/** Show contractor eligibility and COR-supported countries for legal entity Returns which contractor products (standard, plus, cor) the legal entity is eligible to use, and the list of country codes where COR is supported for this legal entity. COR-supported countries exclude sanctioned and signup-prevented countries and apply entity rules (same-country, local-to-local). When the legal entity is not COR-eligible, `cor_supported_country_codes` is an empty list. ## Scopes */ +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibility: API.OperationMethod< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest, + ContractorEligibilityResponse, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdContractorEligibilityRequest, + output: ContractorEligibilityResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesError = + | Forbidden + | NotFound + | RemoteOpError; +/** List Pay Codes Lists pay codes available for a legal entity. Pay codes represent the allowed pay element types that can be submitted via `POST /v1/pay-items/bulk`. ## Scopes */ +export const getV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodes: API.OperationMethod< + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest, + ListPayCodesResponse, + GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdLegalEntitiesLegalEntityIdPayCodesRequest, + output: ListPayCodesResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdPricingPlansError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List pricing plans List all pricing plans for a company. Currently the endpoint only returns the pricing plans for the EOR monthly product and the contractor products (Standard, Plus and COR). ## Scopes */ +export const getV1CompaniesCompanyIdPricingPlans: API.OperationMethod< + GetV1CompaniesCompanyIdPricingPlansRequest, + ListCompanyPricingPlansResponse, + GetV1CompaniesCompanyIdPricingPlansError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdPricingPlansRequest, + output: ListCompanyPricingPlansResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdProductPricesError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1CompaniesCompanyIdProductPrices: API.OperationMethod< + GetV1CompaniesCompanyIdProductPricesRequest, + ListProductPricesResponse, + GetV1CompaniesCompanyIdProductPricesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdProductPricesRequest, + output: ListProductPricesResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesCompanyIdWebhookCallbacksError = + | NotFound + | RemoteOpError; +/** List Webhook Callbacks List callbacks for a given company ## Scopes */ +export const getV1CompaniesCompanyIdWebhookCallbacks: API.OperationMethod< + GetV1CompaniesCompanyIdWebhookCallbacksRequest, + ListWebhookCallbacksResponse, + GetV1CompaniesCompanyIdWebhookCallbacksError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesCompanyIdWebhookCallbacksRequest, + output: ListWebhookCallbacksResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompaniesSchemaError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show form schema Returns the json schema of the requested company form. Currently only supports the `address_details` form. ## Scopes */ +export const getV1CompaniesSchema: API.OperationMethod< + GetV1CompaniesSchemaRequest, + CompanyFormResponse, + GetV1CompaniesSchemaError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompaniesSchemaRequest, + output: CompanyFormResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompanyCompanyIdCostCenterAllocationsError = + | BadRequest + | Forbidden + | UnprocessableEntity + | RemoteOpError; +/** List cost center allocations for a company Lists all employments under a company with their cost center allocations, grouped by employment. Each entry includes the employment's legal entity IDs and the list of cost center allocations assigned to it, with each allocation's cost center, allocated percentage, and effective period. Employments with no cost center allocations are included with an empty list. Use the `status` query parameter to return only `active`, `scheduled`, or `expired` allocations. When omitted, all allocations are returned. ## Scopes */ +export const getV1CompanyCompanyIdCostCenterAllocations: API.OperationMethod< + GetV1CompanyCompanyIdCostCenterAllocationsRequest, + ListCompanyCostCenterAllocationsResponse, + GetV1CompanyCompanyIdCostCenterAllocationsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompanyCompanyIdCostCenterAllocationsRequest, + output: ListCompanyCostCenterAllocationsResponse, + errors: [BadRequest, Forbidden, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompanyCurrenciesError = NotFound | RemoteOpError; +/** List company supported currencies List company supported currencies ## Scopes */ +export const getV1CompanyCurrencies: API.OperationMethod< + GetV1CompanyCurrenciesRequest, + CompanyCurrenciesResponse, + GetV1CompanyCurrenciesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompanyCurrenciesRequest, + output: CompanyCurrenciesResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompanyDepartmentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Company Departments Lists all departments for the authorized company specified in the request. ## Scopes */ +export const getV1CompanyDepartments: API.OperationMethod< + GetV1CompanyDepartmentsRequest, + ListCompanyDepartmentsPaginatedResponse, + GetV1CompanyDepartmentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompanyDepartmentsRequest, + output: ListCompanyDepartmentsPaginatedResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompanyManagersError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1CompanyManagers: API.OperationMethod< + GetV1CompanyManagersRequest, + CompanyManagersResponse, + GetV1CompanyManagersError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompanyManagersRequest, + output: CompanyManagersResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CompanyManagersUserIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show company manager user Shows a single company manager user ## Scopes */ +export const getV1CompanyManagersUserId: API.OperationMethod< + GetV1CompanyManagersUserIdRequest, + CompanyManagerResponse, + GetV1CompanyManagersUserIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CompanyManagersUserIdRequest, + output: CompanyManagerResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractAmendmentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Contract Amendment List Contract Amendment requests. ## Scopes */ +export const getV1ContractAmendments: API.OperationMethod< + GetV1ContractAmendmentsRequest, + ListContractAmendmentResponse, + GetV1ContractAmendmentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractAmendmentsRequest, + output: ListContractAmendmentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractAmendmentsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Contract Amendment Show a single Contract Amendment request. ## Scopes */ +export const getV1ContractAmendmentsId: API.OperationMethod< + GetV1ContractAmendmentsIdRequest, + ContractAmendmentResponse, + GetV1ContractAmendmentsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractAmendmentsIdRequest, + output: ContractAmendmentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractAmendmentsSchemaError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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 */ +export const getV1ContractAmendmentsSchema: API.OperationMethod< + GetV1ContractAmendmentsSchemaRequest, + ContractAmendmentFormResponse, + GetV1ContractAmendmentsSchemaError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractAmendmentsSchemaRequest, + output: ContractAmendmentFormResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorInvoicesError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Contractor Invoices Lists Contractor Invoice records. ## Scopes */ +export const getV1ContractorInvoices: API.OperationMethod< + GetV1ContractorInvoicesRequest, + ListContractorInvoicesResponse, + GetV1ContractorInvoicesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorInvoicesRequest, + output: ListContractorInvoicesResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorInvoiceSchedulesError = + | Forbidden + | NotFound + | RemoteOpError; +/** List Contractor Invoice Schedules Lists Contractor Invoice Schedule records. ## Scopes */ +export const getV1ContractorInvoiceSchedules: API.OperationMethod< + GetV1ContractorInvoiceSchedulesRequest, + ListContractorInvoiceSchedulesResponse, + GetV1ContractorInvoiceSchedulesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorInvoiceSchedulesRequest, + output: ListContractorInvoiceSchedulesResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorInvoiceSchedulesIdError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Contractor Invoice Schedule Shows a single Contractor Invoice Schedule record ## Scopes */ +export const getV1ContractorInvoiceSchedulesId: API.OperationMethod< + GetV1ContractorInvoiceSchedulesIdRequest, + ContractorInvoiceScheduleResponse, + GetV1ContractorInvoiceSchedulesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorInvoiceSchedulesIdRequest, + output: ContractorInvoiceScheduleResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorInvoicesIdError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Contractor Invoice Shows a single Contractor Invoice record. ## Scopes */ +export const getV1ContractorInvoicesId: API.OperationMethod< + GetV1ContractorInvoicesIdRequest, + ContractorInvoiceResponse, + GetV1ContractorInvoicesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorInvoicesIdRequest, + output: ContractorInvoiceResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsCorTerminationRequestsError = + | Forbidden + | NotFound + | RemoteOpError; +/** List contractor of record (COR) termination requests Lists Contractor of Record termination requests for your company, optionally filtered by employment and status. ## Scopes */ +export const getV1ContractorsCorTerminationRequests: API.OperationMethod< + GetV1ContractorsCorTerminationRequestsRequest, + IndexCorTerminationRequestsResponse, + GetV1ContractorsCorTerminationRequestsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorsCorTerminationRequestsRequest, + output: IndexCorTerminationRequestsResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Return a base64 encoded version of the contract document ## Scopes */ +export const getV1ContractorsEmploymentsEmploymentIdContractDocumentsId: API.OperationMethod< + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest, + ContractDocumentResponse, + GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorsEmploymentsEmploymentIdContractDocumentsIdRequest, + output: ContractDocumentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesError = + | Forbidden + | NotFound + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1ContractorsEmploymentsEmploymentIdContractorCurrencies: API.OperationMethod< + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest, + ContractorCurrencyResponse, + GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorsEmploymentsEmploymentIdContractorCurrenciesRequest, + output: ContractorCurrencyResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsError = + | Forbidden + | NotFound + | RemoteOpError; +/** List contractor subscriptions Endpoint that can be used to list contractor subscriptions. ## Scopes */ +export const getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions: API.OperationMethod< + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest, + ContractorSubscriptionSummariesResponse, + GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorsEmploymentsEmploymentIdContractorSubscriptionsRequest, + output: ContractorSubscriptionSummariesResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdError = + | Forbidden + | NotFound + | RemoteOpError; +/** Show a contractor of record (COR) termination request Retrieves a Contractor of Record termination request by ID. ## Scopes */ +export const getV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestId: API.OperationMethod< + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest, + CorTerminationRequestResponse, + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + GetV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsTerminationRequestIdRequest, + output: CorTerminationRequestResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsEmploymentsEmploymentIdRatesError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List the rates of a contractor Lists the rates configured for a contractor, whatever the origin of their contract: rates agreed through a Remote-managed services agreement and statement of work, and rates recorded by the company on its own paper, are returned in the same shape. What the response contains: - The **configured** rate — not amounts that were scheduled, invoiced, or paid. - **Effective** rates only. Terms of a statement of work that has not been signed yet are not included. - The stored rate, even when the contractor's contract has already expired. `contract_start_date` and `contract_expiration_date` describe the contract the rate is paid under, not where the rate came from. `type` and `pay_frequency` are open enums, so treat an unrecognised value as opaque rather than an error. See the field descriptions for how each is derived. A contractor with no rate, and an employment that is not a contractor, both return an empty list. ## Scopes */ +export const getV1ContractorsEmploymentsEmploymentIdRates: API.OperationMethod< + GetV1ContractorsEmploymentsEmploymentIdRatesRequest, + ListContractorRatesResponse, + GetV1ContractorsEmploymentsEmploymentIdRatesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorsEmploymentsEmploymentIdRatesRequest, + output: ListContractorRatesResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ContractorsSchemasEligibilityQuestionnaireError = + | Forbidden + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1ContractorsSchemasEligibilityQuestionnaire: API.OperationMethod< + GetV1ContractorsSchemasEligibilityQuestionnaireRequest, + EligibilityQuestionnaireJSONSchemaResponse, + GetV1ContractorsSchemasEligibilityQuestionnaireError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ContractorsSchemasEligibilityQuestionnaireRequest, + output: EligibilityQuestionnaireJSONSchemaResponse, + errors: [Forbidden, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CostCalculatorCountriesError = RemoteOpError; +/** List countries for Cost Calculator Lists countries available for cost calculation */ +export const getV1CostCalculatorCountries: API.OperationMethod< + GetV1CostCalculatorCountriesRequest, + CostCalculatorListCountryResponse, + GetV1CostCalculatorCountriesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CostCalculatorCountriesRequest, + output: CostCalculatorListCountryResponse, + errors: [UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CostCalculatorRegionsSlugFieldsError = RemoteOpError; +/** Show region fields Returns required fields JSON Schema for a given region. These are required in order to calculate the cost of employment for the region. These fields are based on employer contributions that are associated with the region or any of it's parent regions. */ +export const getV1CostCalculatorRegionsSlugFields: API.OperationMethod< + GetV1CostCalculatorRegionsSlugFieldsRequest, + JSONSchemaResponse, + GetV1CostCalculatorRegionsSlugFieldsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CostCalculatorRegionsSlugFieldsRequest, + output: JSONSchemaResponse, + errors: [UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CountriesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List countries Returns the countries supported by Remote API, alphabetically ordered. The supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema. The countries present in the list are the ones where creating a company is allowed. ## Scopes */ +export const getV1Countries: API.OperationMethod< + GetV1CountriesRequest, + CountriesResponse, + GetV1CountriesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CountriesRequest, + output: CountriesResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CountriesCountryCodeContractorContractDetailsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show contractor contract details Returns the contract details JSON Schema for contractors given a country ## Scopes */ +export const getV1CountriesCountryCodeContractorContractDetails: API.OperationMethod< + GetV1CountriesCountryCodeContractorContractDetailsRequest, + ContractorContractDetailsResponse, + GetV1CountriesCountryCodeContractorContractDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CountriesCountryCodeContractorContractDetailsRequest, + output: ContractorContractDetailsResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CountriesCountryCodeEngagementAgreementDetailsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show engagement agreement details Returns the engagement agreement details JSON Schema for a country. Only DEU country is supported for now. ## Scopes */ +export const getV1CountriesCountryCodeEngagementAgreementDetails: API.OperationMethod< + GetV1CountriesCountryCodeEngagementAgreementDetailsRequest, + EngagementAgreementDetailsResponse, + GetV1CountriesCountryCodeEngagementAgreementDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CountriesCountryCodeEngagementAgreementDetailsRequest, + output: EngagementAgreementDetailsResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CountriesCountryCodeFormError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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 - engagement_agreement_details - personal_details - pricing_plan_details - company_basic_information - global_payroll_administrative_details - global_payroll_bank_account_details - global_payroll_basic_information - global_payroll_contract_details - global_payroll_federal_taxes - global_payroll_state_taxes - global_payroll_personal_details - benefit_renewal_request - hris_personal_details ``` Most forms require a company access token, as they are dependent on certain properties of companies and their current employments. However, the `address_details` and `company_basic_information` forms can be accessed using client_credentials authentication (without a company). ## Scopes */ +export const getV1CountriesCountryCodeForm: API.OperationMethod< + GetV1CountriesCountryCodeFormRequest, + CountryFormResponse, + GetV1CountriesCountryCodeFormError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CountriesCountryCodeFormRequest, + output: CountryFormResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CountriesCountryCodeHolidaysYearError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List all holidays of a country List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision. ## Scopes */ +export const getV1CountriesCountryCodeHolidaysYear: API.OperationMethod< + GetV1CountriesCountryCodeHolidaysYearRequest, + HolidaysResponse, + GetV1CountriesCountryCodeHolidaysYearError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CountriesCountryCodeHolidaysYearRequest, + output: HolidaysResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CountriesCountryCodeLegalEntityFormsFormError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1CountriesCountryCodeLegalEntityFormsForm: API.OperationMethod< + GetV1CountriesCountryCodeLegalEntityFormsFormRequest, + CountryFormResponse, + GetV1CountriesCountryCodeLegalEntityFormsFormError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CountriesCountryCodeLegalEntityFormsFormRequest, + output: CountryFormResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CustomFieldsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Lists custom fields definitions Returns custom fields definitions ## Scopes */ +export const getV1CustomFields: API.OperationMethod< + GetV1CustomFieldsRequest, + ListEmploymentCustomFieldsResponse, + GetV1CustomFieldsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CustomFieldsRequest, + output: ListEmploymentCustomFieldsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1CustomFieldsCustomFieldIdValuesEmploymentIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show a custom field value Returns a custom field value for a given employment ## Scopes */ +export const getV1CustomFieldsCustomFieldIdValuesEmploymentId: API.OperationMethod< + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest, + EmploymentCustomFieldValueResponse, + GetV1CustomFieldsCustomFieldIdValuesEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest, + output: EmploymentCustomFieldValueResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1DirectOffboardingsError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Direct Offboardings Lists offboardings for global payroll employments, optionally filtered by employment ID. ## Scopes */ +export const getV1DirectOffboardings: API.OperationMethod< + GetV1DirectOffboardingsRequest, + ListDirectOffboardingResponse, + GetV1DirectOffboardingsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1DirectOffboardingsRequest, + output: ListDirectOffboardingResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeAddressError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** Show employee address Returns the authenticated employee's residential address. The employment is derived from the access token's subject — there is no employment id in the path. This endpoint requires country-specific data. The exact required fields vary depending on which country the authenticated employee's employment is in. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` as the form name to discover the schema for a given country. ## Scopes */ +export const getV1EmployeeAddress: API.OperationMethod< + GetV1EmployeeAddressRequest, + EmploymentDetailsOnlyResponse, + GetV1EmployeeAddressError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeAddressRequest, + output: EmploymentDetailsOnlyResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeBankAccountError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** Show employee bank account Returns the authenticated employee's bank account details. This endpoint requires and returns country-specific data. The exact fields vary depending on which country the authenticated employee's employment is in. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` as the form name to discover the schema for a given country. ## Scopes */ +export const getV1EmployeeBankAccount: API.OperationMethod< + GetV1EmployeeBankAccountRequest, + EmploymentDetailsOnlyResponse, + GetV1EmployeeBankAccountError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeBankAccountRequest, + output: EmploymentDetailsOnlyResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeCurrentError = Forbidden | RemoteOpError; +/** Get employee token identity Returns user and company information for the authenticated employee. */ +export const getV1EmployeeCurrent: API.OperationMethod< + GetV1EmployeeCurrentRequest, + SuccessResponse, + GetV1EmployeeCurrentError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeCurrentRequest, + output: SuccessResponse, + errors: [Forbidden, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeDocumentsError = Forbidden | NotFound | RemoteOpError; +/** Indexes all the documents for the employee ## Scopes */ +export const getV1EmployeeDocuments: API.OperationMethod< + GetV1EmployeeDocumentsRequest, + ListDocumentsResponse, + GetV1EmployeeDocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeDocumentsRequest, + output: ListDocumentsResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeDocumentsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Download a document for the employee ## Scopes */ +export const getV1EmployeeDocumentsId: API.OperationMethod< + GetV1EmployeeDocumentsIdRequest, + DownloadDocumentResponse, + GetV1EmployeeDocumentsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeDocumentsIdRequest, + output: DownloadDocumentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeEmergencyContactError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** Show employee emergency contact Returns the authenticated employee's emergency contact. The employment is derived from the access token's subject — there is no employment id in the path. This endpoint requires country-specific data. The exact required fields vary depending on which country the authenticated employee's employment is in. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` as the form name to discover the schema for a given country. ## Scopes */ +export const getV1EmployeeEmergencyContact: API.OperationMethod< + GetV1EmployeeEmergencyContactRequest, + EmploymentDetailsOnlyResponse, + GetV1EmployeeEmergencyContactError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeEmergencyContactRequest, + output: EmploymentDetailsOnlyResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeExpenseCategoriesError = + | Forbidden + | NotFound + | RemoteOpError; +/** List expense categories for the authenticated employee Returns the flat list of expense categories applicable to the current employee. Only active categories are returned, filtered by the employee's country / legal-entity visibility rules. Leaf nodes have `is_selectable: true`; parent nodes are excluded unless `include_parents=true`. ## Scopes */ +export const getV1EmployeeExpenseCategories: API.OperationMethod< + GetV1EmployeeExpenseCategoriesRequest, + ListExpenseCategoriesResponse, + GetV1EmployeeExpenseCategoriesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeExpenseCategoriesRequest, + output: ListExpenseCategoriesResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeExpensesError = Forbidden | NotFound | RemoteOpError; +/** List expenses for the authenticated employee Returns a paginated list of expenses belonging to the current employee. ## Scopes */ +export const getV1EmployeeExpenses: API.OperationMethod< + GetV1EmployeeExpensesRequest, + SuccessResponse, + GetV1EmployeeExpensesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeExpensesRequest, + output: SuccessResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeIncentivesError = Forbidden | NotFound | RemoteOpError; +/** List incentives for the authenticated employee Returns all incentives for the authenticated employee. ## Scopes */ +export const getV1EmployeeIncentives: API.OperationMethod< + GetV1EmployeeIncentivesRequest, + SuccessResponse, + GetV1EmployeeIncentivesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeIncentivesRequest, + output: SuccessResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeLeavePoliciesError = NotFound | RemoteOpError; +/** List Employee Leave Policies List the leave policies for the current employee ## Scopes */ +export const getV1EmployeeLeavePolicies: API.OperationMethod< + GetV1EmployeeLeavePoliciesRequest, + ListLeavePoliciesDetailsResponse, + GetV1EmployeeLeavePoliciesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeLeavePoliciesRequest, + output: ListLeavePoliciesDetailsResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeLeavePoliciesSummaryError = NotFound | RemoteOpError; +/** List Employee Leave Policies Summary List the leave policies summary (balances and entitlements) for the current employee ## Scopes */ +export const getV1EmployeeLeavePoliciesSummary: API.OperationMethod< + GetV1EmployeeLeavePoliciesSummaryRequest, + ListLeavePoliciesSummaryResponse, + GetV1EmployeeLeavePoliciesSummaryError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeLeavePoliciesSummaryRequest, + output: ListLeavePoliciesSummaryResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeePayslipFilesError = + | Forbidden + | NotFound + | RemoteOpError; +/** List payslip files for the authenticated employee Returns a paginated list of payslip files belonging to the current employee. ## Scopes */ +export const getV1EmployeePayslipFiles: API.OperationMethod< + GetV1EmployeePayslipFilesRequest, + ListPayslipFilesResponse, + GetV1EmployeePayslipFilesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeePayslipFilesRequest, + output: ListPayslipFilesResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeePayslipsError = Forbidden | NotFound | RemoteOpError; +/** List approved payslip files for the authenticated employee Returns a paginated list of payslip files belonging to the current employee. ## Scopes */ +export const getV1EmployeePayslips: API.OperationMethod< + GetV1EmployeePayslipsRequest, + ListEmployeePayslipsResponse, + GetV1EmployeePayslipsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeePayslipsRequest, + output: ListEmployeePayslipsResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeePersonalDetailsError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** Show employee personal details Returns the authenticated employee's personal details. This endpoint requires country-specific data. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` as the form name to discover the schema for a given country. ## Scopes */ +export const getV1EmployeePersonalDetails: API.OperationMethod< + GetV1EmployeePersonalDetailsRequest, + EmploymentDetailsOnlyResponse, + GetV1EmployeePersonalDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeePersonalDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeePersonalInformationError = + | Forbidden + | NotFound + | RemoteOpError; +/** Show personal information for the authenticated employee Returns personal information for the authenticated employee. ## Scopes */ +export const getV1EmployeePersonalInformation: API.OperationMethod< + GetV1EmployeePersonalInformationRequest, + SuccessResponse, + GetV1EmployeePersonalInformationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeePersonalInformationRequest, + output: SuccessResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeTimeoffError = BadRequest | NotFound | RemoteOpError; +/** List employee time offs Lists the current employee's time off records ## Scopes */ +export const getV1EmployeeTimeoff: API.OperationMethod< + GetV1EmployeeTimeoffRequest, + ListTimeoffResponse, + GetV1EmployeeTimeoffError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeTimeoffRequest, + output: ListTimeoffResponse, + errors: [BadRequest, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmployeeTimesheetsError = Forbidden | NotFound | RemoteOpError; +/** List timesheets for the authenticated employee Returns a paginated list of timesheets for the authenticated employee. ## Scopes */ +export const getV1EmployeeTimesheets: API.OperationMethod< + GetV1EmployeeTimesheetsRequest, + SuccessResponse, + GetV1EmployeeTimesheetsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmployeeTimesheetsRequest, + output: SuccessResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentContractsError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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 */ +export const getV1EmploymentContracts: API.OperationMethod< + GetV1EmploymentContractsRequest, + ListEmploymentContractResponse, + GetV1EmploymentContractsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentContractsRequest, + output: ListEmploymentContractResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentContractsEmploymentIdPendingChangesError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get employment contract pending changes Get all the pending changes (waiting for aproval or signature) for the employment contract. ## Scopes */ +export const getV1EmploymentContractsEmploymentIdPendingChanges: API.OperationMethod< + GetV1EmploymentContractsEmploymentIdPendingChangesRequest, + EmploymentContractPendingChangesResponse, + GetV1EmploymentContractsEmploymentIdPendingChangesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentContractsEmploymentIdPendingChangesRequest, + output: EmploymentContractPendingChangesResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** 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. 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 getV1Employments: API.OperationMethod< + GetV1EmploymentsRequest, + ListEmploymentsResponse, + GetV1EmploymentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsRequest, + output: ListEmploymentsResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsBulkError = BadRequest | Forbidden | RemoteOpError; +/** Bulk list employments Lists full-detail employments for the company scope, page-by-page via an opaque cursor. Each employment is the same shape returned by Show employment, except files are excluded to avoid a per-employment file lookup; use the Show employment endpoint to fetch files for a specific employment. The `files` field is always `null` on this endpoint. Pass the `next_cursor` value from a page's response as the `cursor` query parameter to fetch the next page. `next_cursor` is `null` once the last page has been reached. ## Scopes */ +export const getV1EmploymentsBulk: API.OperationMethod< + GetV1EmploymentsBulkRequest, + EmploymentsBulkResponse, + GetV1EmploymentsBulkError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsBulkRequest, + output: EmploymentsBulkResponse, + errors: [BadRequest, Forbidden, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const getV1EmploymentsEmploymentId: API.OperationMethod< + GetV1EmploymentsEmploymentIdRequest, + EmploymentShowResponse, + GetV1EmploymentsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdRequest, + output: EmploymentShowResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Background Check Show Background Check details for a given employment and background check request. ## Scopes */ +export const getV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckId: API.OperationMethod< + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest, + BackgroundChecksBackgroundCheckResponse, + GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdBackgroundChecksBackgroundCheckIdRequest, + output: BackgroundChecksBackgroundCheckResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdBenefitOffersError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get employment benefit offers ## Scopes */ +export const getV1EmploymentsEmploymentIdBenefitOffers: API.OperationMethod< + GetV1EmploymentsEmploymentIdBenefitOffersRequest, + EmploymentsBenefitOffersListBenefitOffers, + GetV1EmploymentsEmploymentIdBenefitOffersError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdBenefitOffersRequest, + output: EmploymentsBenefitOffersListBenefitOffers, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdBenefitOffersSchemaError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get a employment benefit offers JSON schema ## Scopes */ +export const getV1EmploymentsEmploymentIdBenefitOffersSchema: API.OperationMethod< + GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest, + UnifiedEmploymentsBenefitOffersJSONSchemaResponse, + GetV1EmploymentsEmploymentIdBenefitOffersSchemaError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdBenefitOffersSchemaRequest, + output: UnifiedEmploymentsBenefitOffersJSONSchemaResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdCompanyStructureNodesError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List company structure nodes Shows all the company structure nodes of an employment. ## Scopes */ +export const getV1EmploymentsEmploymentIdCompanyStructureNodes: API.OperationMethod< + GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest, + CompanyStructureNodesResponse, + GetV1EmploymentsEmploymentIdCompanyStructureNodesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdCompanyStructureNodesRequest, + output: CompanyStructureNodesResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdContractDocumentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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 */ +export const getV1EmploymentsEmploymentIdContractDocuments: API.OperationMethod< + GetV1EmploymentsEmploymentIdContractDocumentsRequest, + IndexContractDocumentsResponse, + GetV1EmploymentsEmploymentIdContractDocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdContractDocumentsRequest, + output: IndexContractDocumentsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdCostCenterAllocationsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List cost center allocations for an employment Lists the cost center allocations for an employment. Each allocation includes the cost center, the allocated percentage, and its effective period. An employment with no cost center assigned returns an empty list. Use the `status` query parameter to return only `active`, `scheduled`, or `expired` allocations. When omitted, all allocations are returned. ## Scopes */ +export const getV1EmploymentsEmploymentIdCostCenterAllocations: API.OperationMethod< + GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest, + ListCostCenterAllocationsResponse, + GetV1EmploymentsEmploymentIdCostCenterAllocationsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdCostCenterAllocationsRequest, + output: ListCostCenterAllocationsResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdCustomFieldsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List custom field value for an employment Returns a list of custom field values for a given employment ## Scopes */ +export const getV1EmploymentsEmploymentIdCustomFields: API.OperationMethod< + GetV1EmploymentsEmploymentIdCustomFieldsRequest, + ListEmploymentCustomFieldValuePaginatedResponse, + GetV1EmploymentsEmploymentIdCustomFieldsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdCustomFieldsRequest, + output: ListEmploymentCustomFieldValuePaginatedResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Download the Employment Agreement for an employment Downloads a PDF of the auto-generated Employment Agreement for an employment. The document is rendered as a draft (no signatures) and is not persisted. EA preview is only available for countries that have a published Employment Agreement automation template — see the `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. ## Scopes */ +export const getV1EmploymentsEmploymentIdEmploymentAgreementDownload: API.OperationMethod< + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse, + GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadRequest, + output: GetV1EmploymentsEmploymentIdEmploymentAgreementDownloadResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Preview the Employment Agreement for an employment Returns a base64-encoded PDF preview of the auto-generated Employment Agreement for an employment. The document is rendered as a draft (no signatures) and is not persisted. EA preview is only available for countries that have a published Employment Agreement automation template — see the `employment_agreement_preview_available` flag on the [Countries](#tag/Countries) endpoint. ## Scopes */ +export const getV1EmploymentsEmploymentIdEmploymentAgreementPreview: API.OperationMethod< + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest, + EmploymentAgreementPreviewResponse, + GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdEmploymentAgreementPreviewRequest, + output: EmploymentAgreementPreviewResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get engagement agreement details Returns the engagement agreement details for an employment. ## Scopes */ +export const getV1EmploymentsEmploymentIdEngagementAgreementDetails: API.OperationMethod< + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + EmploymentEngagementAgreementDetailsResponse, + GetV1EmploymentsEmploymentIdEngagementAgreementDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + output: EmploymentEngagementAgreementDetailsResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdFilesError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List employment files Lists files associated with a specific employment. Supports filtering by file type and sub_type. ## Scopes */ +export const getV1EmploymentsEmploymentIdFiles: API.OperationMethod< + GetV1EmploymentsEmploymentIdFilesRequest, + ListFilesResponse, + GetV1EmploymentsEmploymentIdFilesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdFilesRequest, + output: ListFilesResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdJobError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show employment job Shows an employment job details. ## Scopes */ +export const getV1EmploymentsEmploymentIdJob: API.OperationMethod< + GetV1EmploymentsEmploymentIdJobRequest, + EmploymentJobResponse, + GetV1EmploymentsEmploymentIdJobError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdJobRequest, + output: EmploymentJobResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1EmploymentsEmploymentIdOnboardingStepsError = + | NotFound + | RemoteOpError; +/** Show onboarding steps for an employment Returns onboarding steps and substeps in a hierarchical, ordered structure. ## Scopes */ +export const getV1EmploymentsEmploymentIdOnboardingSteps: API.OperationMethod< + GetV1EmploymentsEmploymentIdOnboardingStepsRequest, + EmploymentOnboardingStepsResponse, + GetV1EmploymentsEmploymentIdOnboardingStepsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1EmploymentsEmploymentIdOnboardingStepsRequest, + output: EmploymentOnboardingStepsResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ExpensesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List expenses Lists all expenses records ## Scopes */ +export const getV1Expenses: API.OperationMethod< + GetV1ExpensesRequest, + ListExpenseResponse, + GetV1ExpensesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ExpensesRequest, + output: ListExpenseResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ExpensesCategoriesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List expense categories Lists the effective hierarchy of expense categories. At least one of employment_id, expense_id, or country_code must be provided. */ +export const getV1ExpensesCategories: API.OperationMethod< + GetV1ExpensesCategoriesRequest, + ListExpenseCategoriesResponse, + GetV1ExpensesCategoriesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ExpensesCategoriesRequest, + output: ListExpenseCategoriesResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ExpensesExpenseIdReceiptsReceiptIdError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Download a receipt by id Download a receipt by id. ## Scopes */ +export const getV1ExpensesExpenseIdReceiptsReceiptId: API.OperationMethod< + GetV1ExpensesExpenseIdReceiptsReceiptIdRequest, + GetV1ExpensesExpenseIdReceiptsReceiptIdResponse, + GetV1ExpensesExpenseIdReceiptsReceiptIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ExpensesExpenseIdReceiptsReceiptIdRequest, + output: GetV1ExpensesExpenseIdReceiptsReceiptIdResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ExpensesIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show expense Shows a single expense record ## Scopes */ +export const getV1ExpensesId: API.OperationMethod< + GetV1ExpensesIdRequest, + ExpenseResponse, + GetV1ExpensesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ExpensesIdRequest, + output: ExpenseResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1FilesIdError = NotFound | UnprocessableEntity | RemoteOpError; +/** Download file Downloads a file. ## Scopes */ +export const getV1FilesId: API.OperationMethod< + GetV1FilesIdRequest, + DownloadFileResponse, + GetV1FilesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1FilesIdRequest, + output: DownloadFileResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1HelpCenterArticlesIdError = NotFound | RemoteOpError; +/** Get Help Center Article Get a help center article by its ID ## Scopes */ +export const getV1HelpCenterArticlesId: API.OperationMethod< + GetV1HelpCenterArticlesIdRequest, + HelpCenterArticleResponse, + GetV1HelpCenterArticlesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1HelpCenterArticlesIdRequest, + output: HelpCenterArticleResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1IdentityCurrentError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get token identity Shows information about the entities that can be controlled by the current auth token. */ +export const getV1IdentityCurrent: API.OperationMethod< + GetV1IdentityCurrentRequest, + GetV1IdentityCurrentResponse, + GetV1IdentityCurrentError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1IdentityCurrentRequest, + output: GetV1IdentityCurrentResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1IdentityVerificationEmploymentIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get Employment Profile Gets necessary information to perform the identity verification of an employee. ## Scopes */ +export const getV1IdentityVerificationEmploymentId: API.OperationMethod< + GetV1IdentityVerificationEmploymentIdRequest, + IdentityVerificationResponse, + GetV1IdentityVerificationEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1IdentityVerificationEmploymentIdRequest, + output: IdentityVerificationResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1IncentivesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Incentives Lists all Incentives of a company ## Scopes */ +export const getV1Incentives: API.OperationMethod< + GetV1IncentivesRequest, + ListIncentivesResponse, + GetV1IncentivesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1IncentivesRequest, + output: ListIncentivesResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1IncentivesIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Incentive Show an Incentive's details ## Scopes */ +export const getV1IncentivesId: API.OperationMethod< + GetV1IncentivesIdRequest, + IncentiveResponse, + GetV1IncentivesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1IncentivesIdRequest, + output: IncentiveResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1IncentivesRecurringError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Recurring Incentive List all Recurring Incentives of a company. ## Scopes */ +export const getV1IncentivesRecurring: API.OperationMethod< + GetV1IncentivesRecurringRequest, + ListRecurringIncentivesResponse, + GetV1IncentivesRecurringError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1IncentivesRecurringRequest, + output: ListRecurringIncentivesResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1LeavePoliciesDetailsEmploymentIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Leave Policies Details Describe the leave policies (custom or not) for a given employment ## Scopes */ +export const getV1LeavePoliciesDetailsEmploymentId: API.OperationMethod< + GetV1LeavePoliciesDetailsEmploymentIdRequest, + ListLeavePoliciesDetailsResponse, + GetV1LeavePoliciesDetailsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1LeavePoliciesDetailsEmploymentIdRequest, + output: ListLeavePoliciesDetailsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1LeavePoliciesSummaryEmploymentIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Leave Policies Summary List all the data related to time off for a given employment ## Scopes */ +export const getV1LeavePoliciesSummaryEmploymentId: API.OperationMethod< + GetV1LeavePoliciesSummaryEmploymentIdRequest, + ListLeavePoliciesSummaryResponse, + GetV1LeavePoliciesSummaryEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1LeavePoliciesSummaryEmploymentIdRequest, + output: ListLeavePoliciesSummaryResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1OffboardingsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Offboarding Lists Offboarding requests. ## Scopes */ +export const getV1Offboardings: API.OperationMethod< + GetV1OffboardingsRequest, + ListOffboardingResponse, + GetV1OffboardingsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1OffboardingsRequest, + output: ListOffboardingResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1OffboardingsEmploymentsEmploymentIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Offboardings for Employment Lists Offboarding requests for a specific employment. ## Scopes */ +export const getV1OffboardingsEmploymentsEmploymentId: API.OperationMethod< + GetV1OffboardingsEmploymentsEmploymentIdRequest, + ListOffboardingResponse, + GetV1OffboardingsEmploymentsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1OffboardingsEmploymentsEmploymentIdRequest, + output: ListOffboardingResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1OffboardingsIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Offboarding Shows an Offboarding request. ## Scopes */ +export const getV1OffboardingsId: API.OperationMethod< + GetV1OffboardingsIdRequest, + OffboardingResponse, + GetV1OffboardingsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1OffboardingsIdRequest, + output: OffboardingResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdError = + | Forbidden + | NotFound + | RemoteOpError; +/** Retrieve a pre-onboarding document with its rendered PDF content Returns the rendered contract PDF (base64-encoded) and the list of signatories for the given pre-onboarding document. The `content` field is prefixed with `data:application/pdf;base64,` so it can be embedded directly in a document viewer. ## Scopes */ +export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsId: API.OperationMethod< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest, + ShowPreOnboardingDocumentResponse, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdRequest, + output: ShowPreOnboardingDocumentResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsError = + | Forbidden + | NotFound + | RemoteOpError; +/** List pre-onboarding requirements for an employment Returns the list of pre-onboarding requirements — both documents (e.g. master service agreements, individual labour agreements) and acknowledgements — that must be fulfilled before the given employment can be onboarded. Each requirement carries its `type`, current `status`, and the requirement it `depends_on` (if any). ## Scopes */ +export const getV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirements: API.OperationMethod< + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest, + IndexPreOnboardingRequirementsResponse, + GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequest, + output: IndexPreOnboardingRequirementsResponse, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayItemsError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Pay Items Lists pay items for a company with optional filtering by employment, date range, and pagination. ## Scopes */ +export const getV1PayItems: API.OperationMethod< + GetV1PayItemsRequest, + ListPayItemsResponse, + GetV1PayItemsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayItemsRequest, + output: ListPayItemsResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollCalendarsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List EOR Payroll Calendar List all active payroll calendars for EOR. ## Scopes */ +export const getV1PayrollCalendars: API.OperationMethod< + GetV1PayrollCalendarsRequest, + PayrollCalendarsEORResponse, + GetV1PayrollCalendarsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollCalendarsRequest, + output: PayrollCalendarsEORResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollCalendarsCycleError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Company Payroll Calendar List all payroll calendars for the company within the requested cycle. ## Scopes */ +export const getV1PayrollCalendarsCycle: API.OperationMethod< + GetV1PayrollCalendarsCycleRequest, + PayrollCalendarsResponse, + GetV1PayrollCalendarsCycleError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollCalendarsCycleRequest, + output: PayrollCalendarsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollRunsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Company Payroll Runs Lists all payroll runs for a company ## Scopes */ +export const getV1PayrollRuns: API.OperationMethod< + GetV1PayrollRunsRequest, + ListPayrollRunResponse, + GetV1PayrollRunsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollRunsRequest, + output: ListPayrollRunResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollRunsPayrollRunIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Company Payroll Runs Given an ID, shows a payroll run. `employee_details` field is deprecated in favour of the `employee_details` endpoint and will be removed in the future. ## Scopes */ +export const getV1PayrollRunsPayrollRunId: API.OperationMethod< + GetV1PayrollRunsPayrollRunIdRequest, + PayrollRunResponse, + GetV1PayrollRunsPayrollRunIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollRunsPayrollRunIdRequest, + output: PayrollRunResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollRunsPayrollRunIdEmployeeDetailsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get Employee Details for a Payroll Run Gets the employee details for a payroll run ## Scopes */ +export const getV1PayrollRunsPayrollRunIdEmployeeDetails: API.OperationMethod< + GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest, + EmployeeDetailsResponse, + GetV1PayrollRunsPayrollRunIdEmployeeDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollRunsPayrollRunIdEmployeeDetailsRequest, + output: EmployeeDetailsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdError = + | NotFound + | RemoteOpError; +/** Show a GL report Returns the current status of a GL report. Poll until `status` is `completed`, then call `download`. ## Scopes */ +export const getV1PayrollRunsPayrollRunIdGlReportsGlReportId: API.OperationMethod< + GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest, + GLReportResponse, + GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdRequest, + output: GLReportResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadError = + | NotFound + | RemoteOpError; +/** Download a GL report Downloads the generated GL report as a CSV file. The report must have `status: completed` before calling this endpoint. ## Scopes */ +export const getV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownload: API.OperationMethod< + GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest, + GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse, + GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadRequest, + output: GetV1PayrollRunsPayrollRunIdGlReportsGlReportIdDownloadResponse, + errors: [NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayslipsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List payslips Lists all payslips belonging to a company. Can also filter for a single employment belonging to that company. ## Scopes */ +export const getV1Payslips: API.OperationMethod< + GetV1PayslipsRequest, + ListPayslipsResponse, + GetV1PayslipsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayslipsRequest, + output: ListPayslipsResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PayslipsPayslipIdPdfError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Download payslip in the PDF format Given a Payslip ID, downloads a payslip. It is important to note that each country has a different payslip format and they are not authored by Remote. ## Scopes */ +export const getV1PayslipsPayslipIdPdf: API.OperationMethod< + GetV1PayslipsPayslipIdPdfRequest, + GetV1PayslipsPayslipIdPdfResponse, + GetV1PayslipsPayslipIdPdfError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PayslipsPayslipIdPdfRequest, + output: GetV1PayslipsPayslipIdPdfResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1PricingPlanPartnerTemplatesError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List pricing plan partner templates List all pricing plan partner templates. ## Scopes */ +export const getV1PricingPlanPartnerTemplates: API.OperationMethod< + GetV1PricingPlanPartnerTemplatesRequest, + ListPricingPlanPartnerTemplatesResponse, + GetV1PricingPlanPartnerTemplatesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1PricingPlanPartnerTemplatesRequest, + output: ListPricingPlanPartnerTemplatesResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ProbationCompletionLetterIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show probation completion letter Show a single probation completion letter. ## Scopes */ +export const getV1ProbationCompletionLetterId: API.OperationMethod< + GetV1ProbationCompletionLetterIdRequest, + ProbationCompletionLetterResponse, + GetV1ProbationCompletionLetterIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ProbationCompletionLetterIdRequest, + output: ProbationCompletionLetterResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ProbationExtensionsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Probation Extension Shows a Probation Extension Request. ## Scopes */ +export const getV1ProbationExtensionsId: API.OperationMethod< + GetV1ProbationExtensionsIdRequest, + ProbationExtensionResponse, + GetV1ProbationExtensionsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ProbationExtensionsIdRequest, + output: ProbationExtensionResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ResignationsOffboardingRequestIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Resignation Shows the details of a resignation with status `submitted`. ## Scopes */ +export const getV1ResignationsOffboardingRequestId: API.OperationMethod< + GetV1ResignationsOffboardingRequestIdRequest, + ResignationResponse, + GetV1ResignationsOffboardingRequestIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ResignationsOffboardingRequestIdRequest, + output: ResignationResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ResignationsOffboardingRequestIdResignationLetterError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Download a resignation letter Downloads a resignation letter from an employment request. ## Scopes */ +export const getV1ResignationsOffboardingRequestIdResignationLetter: API.OperationMethod< + GetV1ResignationsOffboardingRequestIdResignationLetterRequest, + GetV1ResignationsOffboardingRequestIdResignationLetterResponse, + GetV1ResignationsOffboardingRequestIdResignationLetterError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ResignationsOffboardingRequestIdResignationLetterRequest, + output: GetV1ResignationsOffboardingRequestIdResignationLetterResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ScimV2GroupsError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** List groups via SCIM v2.0 Retrieves a list of groups (departments) for the authenticated company following SCIM 2.0 standard */ +export const getV1ScimV2Groups: API.OperationMethod< + GetV1ScimV2GroupsRequest, + IntegrationsScimGroupListResponse, + GetV1ScimV2GroupsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ScimV2GroupsRequest, + output: IntegrationsScimGroupListResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ScimV2GroupsIdError = Forbidden | NotFound | RemoteOpError; +/** Get group by ID via SCIM v2.0 Retrieves a single group (department) for the authenticated company by group ID */ +export const getV1ScimV2GroupsId: API.OperationMethod< + GetV1ScimV2GroupsIdRequest, + IntegrationsScimGroup, + GetV1ScimV2GroupsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ScimV2GroupsIdRequest, + output: IntegrationsScimGroup, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ScimV2UsersError = + | BadRequest + | Forbidden + | NotFound + | RemoteOpError; +/** List users via SCIM v2.0 Retrieves a list of users for the authenticated company following SCIM 2.0 standard */ +export const getV1ScimV2Users: API.OperationMethod< + GetV1ScimV2UsersRequest, + IntegrationsScimUserListResponse, + GetV1ScimV2UsersError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ScimV2UsersRequest, + output: IntegrationsScimUserListResponse, + errors: [BadRequest, Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1ScimV2UsersIdError = Forbidden | NotFound | RemoteOpError; +/** Get user by ID via SCIM v2.0 Retrieves a single user for the authenticated company by user ID */ +export const getV1ScimV2UsersId: API.OperationMethod< + GetV1ScimV2UsersIdRequest, + IntegrationsScimUser, + GetV1ScimV2UsersIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1ScimV2UsersIdRequest, + output: IntegrationsScimUser, + errors: [Forbidden, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1SsoConfigurationError = BadRequest | NotFound | RemoteOpError; +/** Show the current SSO Configuration Shows the current SSO Configuration for the company. ## Scopes */ +export const getV1SsoConfiguration: API.OperationMethod< + GetV1SsoConfigurationRequest, + SSOConfigurationResponse, + GetV1SsoConfigurationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1SsoConfigurationRequest, + output: SSOConfigurationResponse, + errors: [BadRequest, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1SsoConfigurationDetailsError = + | BadRequest + | NotFound + | RemoteOpError; +/** Show the SSO Configuration Details Shows the SSO Configuration details for the company. ## Scopes */ +export const getV1SsoConfigurationDetails: API.OperationMethod< + GetV1SsoConfigurationDetailsRequest, + SSOConfigurationDetailsResponse, + GetV1SsoConfigurationDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1SsoConfigurationDetailsRequest, + output: SSOConfigurationDetailsResponse, + errors: [BadRequest, NotFound, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TestSchemaError = RemoteOpError; +/** Get a mock JSON Schema Get a mock JSON Schema for testing purposes */ +export const getV1TestSchema: API.OperationMethod< + GetV1TestSchemaRequest, + CompanyFormResponse, + GetV1TestSchemaError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TestSchemaRequest, + output: CompanyFormResponse, + errors: [UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TimeoffError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Time Off Lists all Time Off records. ## Scopes */ +export const getV1Timeoff: API.OperationMethod< + GetV1TimeoffRequest, + ListTimeoffResponse, + GetV1TimeoffError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TimeoffRequest, + output: ListTimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TimeoffIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Time Off Shows a single Time Off record ## Scopes */ +export const getV1TimeoffId: API.OperationMethod< + GetV1TimeoffIdRequest, + TimeoffResponse, + GetV1TimeoffIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TimeoffIdRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TimeoffTypesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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). ## Scopes */ +export const getV1TimeoffTypes: API.OperationMethod< + GetV1TimeoffTypesRequest, + ListTimeoffTypesResponse, + GetV1TimeoffTypesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TimeoffTypesRequest, + output: ListTimeoffTypesResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TimesheetsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List timesheets Lists all timesheets. ## Scopes */ +export const getV1Timesheets: API.OperationMethod< + GetV1TimesheetsRequest, + ListTimesheetsResponse, + GetV1TimesheetsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TimesheetsRequest, + output: ListTimesheetsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TimesheetsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show timesheet Shows a timesheet by its ID. ## Scopes */ +export const getV1TimesheetsId: API.OperationMethod< + GetV1TimesheetsIdRequest, + TimesheetResponse, + GetV1TimesheetsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TimesheetsIdRequest, + output: TimesheetResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TravelLetterRequestsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List travel letter requests List travel letter requests. ## Scopes */ +export const getV1TravelLetterRequests: API.OperationMethod< + GetV1TravelLetterRequestsRequest, + ListTravelLettersResponse, + GetV1TravelLetterRequestsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TravelLetterRequestsRequest, + output: ListTravelLettersResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1TravelLetterRequestsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show travel letter request Show a single travel letter request. ## Scopes */ +export const getV1TravelLetterRequestsId: API.OperationMethod< + GetV1TravelLetterRequestsIdRequest, + TravelLetterResponse, + GetV1TravelLetterRequestsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1TravelLetterRequestsIdRequest, + output: TravelLetterResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1WebhookEventsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Webhook Events List all webhook events ## Scopes */ +export const getV1WebhookEvents: API.OperationMethod< + GetV1WebhookEventsRequest, + ListWebhookEventsResponse, + GetV1WebhookEventsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1WebhookEventsRequest, + output: ListWebhookEventsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1WorkAuthorizationRequestsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List work authorization requests List work authorization requests. ## Scopes */ +export const getV1WorkAuthorizationRequests: API.OperationMethod< + GetV1WorkAuthorizationRequestsRequest, + ListWorkAuthorizationRequestsResponse, + GetV1WorkAuthorizationRequestsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1WorkAuthorizationRequestsRequest, + output: ListWorkAuthorizationRequestsResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV1WorkAuthorizationRequestsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show work authorization request Show a single work authorization request. ## Scopes */ +export const getV1WorkAuthorizationRequestsId: API.OperationMethod< + GetV1WorkAuthorizationRequestsIdRequest, + WorkAuthorizationRequestResponse, + GetV1WorkAuthorizationRequestsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV1WorkAuthorizationRequestsIdRequest, + output: WorkAuthorizationRequestResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV2EmploymentsEmploymentIdBasicInformationError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get basic information Returns the employment's basic information. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. ## Scopes */ +export const getV2EmploymentsEmploymentIdBasicInformation: API.OperationMethod< + GetV2EmploymentsEmploymentIdBasicInformationRequest, + EmploymentDetailsOnlyResponse, + GetV2EmploymentsEmploymentIdBasicInformationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV2EmploymentsEmploymentIdBasicInformationRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Get engagement agreement details Returns the engagement agreement details for an employment. ## Scopes */ +export const getV2EmploymentsEmploymentIdEngagementAgreementDetails: API.OperationMethod< + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + EmploymentEngagementAgreementDetailsResponse, + GetV2EmploymentsEmploymentIdEngagementAgreementDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + output: EmploymentEngagementAgreementDetailsResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV2OffboardingsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** List Offboardings (v2) Lists offboardings for a company. ## Scopes */ +export const getV2Offboardings: API.OperationMethod< + GetV2OffboardingsRequest, + V2ListOffboardingResponse, + GetV2OffboardingsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV2OffboardingsRequest, + output: V2ListOffboardingResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type GetV2OffboardingsIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Show Offboarding (v2) Returns a single offboarding by its ID. ## Scopes */ +export const getV2OffboardingsId: API.OperationMethod< + GetV2OffboardingsIdRequest, + V2OffboardingResponse, + GetV2OffboardingsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetV2OffboardingsIdRequest, + output: V2OffboardingResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1CompaniesCompanyIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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) ## Scopes */ +export const patchV1CompaniesCompanyId: API.OperationMethod< + PatchV1CompaniesCompanyIdRequest, + CompanyResponse, + PatchV1CompaniesCompanyIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1CompaniesCompanyIdRequest, + output: CompanyResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1CompaniesCompanyId2Error = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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) ## Scopes */ +export const patchV1CompaniesCompanyId2: API.OperationMethod< + PatchV1CompaniesCompanyId2Request, + CompanyResponse, + PatchV1CompaniesCompanyId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1CompaniesCompanyId2Request, + output: CompanyResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1CompanyManagersUserIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update a Company Manager's billing contact assignment Assigns or unassigns a Company Manager as the billing contact (primary or additional) for one or more legal entities. ## Scopes */ +export const patchV1CompanyManagersUserId: API.OperationMethod< + PatchV1CompanyManagersUserIdRequest, + CompanyManagerResponse, + PatchV1CompanyManagersUserIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1CompanyManagersUserIdRequest, + output: CompanyManagerResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1CompanyManagersUserId2Error = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update a Company Manager's billing contact assignment Assigns or unassigns a Company Manager as the billing contact (primary or additional) for one or more legal entities. ## Scopes */ +export const patchV1CompanyManagersUserId2: API.OperationMethod< + PatchV1CompanyManagersUserId2Request, + CompanyManagerResponse, + PatchV1CompanyManagersUserId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1CompanyManagersUserId2Request, + output: CompanyManagerResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1ContractorInvoiceSchedulesIdError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Updates Contractor Invoice Schedule Updates a contractor invoice schedule record ## Scopes */ +export const patchV1ContractorInvoiceSchedulesId: API.OperationMethod< + PatchV1ContractorInvoiceSchedulesIdRequest, + ContractorInvoiceScheduleResponse, + PatchV1ContractorInvoiceSchedulesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1ContractorInvoiceSchedulesIdRequest, + output: ContractorInvoiceScheduleResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1ContractorInvoiceSchedulesId2Error = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Updates Contractor Invoice Schedule Updates a contractor invoice schedule record ## Scopes */ +export const patchV1ContractorInvoiceSchedulesId2: API.OperationMethod< + PatchV1ContractorInvoiceSchedulesId2Request, + ContractorInvoiceScheduleResponse, + PatchV1ContractorInvoiceSchedulesId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1ContractorInvoiceSchedulesId2Request, + output: ContractorInvoiceScheduleResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update a Custom Field Value Updates a custom field value for a given employment. ## Scopes */ +export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId: API.OperationMethod< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest, + EmploymentCustomFieldValueResponse, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1CustomFieldsCustomFieldIdValuesEmploymentIdRequest, + output: EmploymentCustomFieldValueResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Error = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update a Custom Field Value Updates a custom field value for a given employment. ## Scopes */ +export const patchV1CustomFieldsCustomFieldIdValuesEmploymentId2: API.OperationMethod< + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request, + EmploymentCustomFieldValueResponse, + PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1CustomFieldsCustomFieldIdValuesEmploymentId2Request, + output: EmploymentCustomFieldValueResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1EmployeeTimeoffIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update Time Off as Employee Updates a Time Off record as Employee ## Scopes */ +export const patchV1EmployeeTimeoffId: API.OperationMethod< + PatchV1EmployeeTimeoffIdRequest, + TimeoffResponse, + PatchV1EmployeeTimeoffIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1EmployeeTimeoffIdRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1EmployeeTimeoffId2Error = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update Time Off as Employee Updates a Time Off record as Employee ## Scopes */ +export const patchV1EmployeeTimeoffId2: API.OperationMethod< + PatchV1EmployeeTimeoffId2Request, + TimeoffResponse, + PatchV1EmployeeTimeoffId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1EmployeeTimeoffId2Request, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1EmploymentsEmploymentIdError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** 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. The same applies to `partner_external_id`, the reference code private to the calling integration. Omit the field to leave it unchanged; send `null` to clear it. ## Global Payroll Employees To update a Global Payment employment your input data must comply with the global payroll json schemas. **For `active` employments:** In addition to the above list, you can update personal_details. ## Direct Employees To update an HRIS employment your input data must comply with the HRIS json schemas. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. Please contact Remote if you need to update contractors via API since it's currently not supported. ## Scopes */ +export const patchV1EmploymentsEmploymentId: API.OperationMethod< + PatchV1EmploymentsEmploymentIdRequest, + EmploymentResponse, + PatchV1EmploymentsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1EmploymentsEmploymentIdRequest, + output: EmploymentResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1EmploymentsEmploymentId2Error = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** 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. The same applies to `partner_external_id`, the reference code private to the calling integration. Omit the field to leave it unchanged; send `null` to clear it. ## Global Payroll Employees To update a Global Payment employment your input data must comply with the global payroll json schemas. **For `active` employments:** In addition to the above list, you can update personal_details. ## Direct Employees To update an HRIS employment your input data must comply with the HRIS json schemas. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. Please contact Remote if you need to update contractors via API since it's currently not supported. ## Scopes */ +export const patchV1EmploymentsEmploymentId2: API.OperationMethod< + PatchV1EmploymentsEmploymentId2Request, + EmploymentResponse, + PatchV1EmploymentsEmploymentId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1EmploymentsEmploymentId2Request, + output: EmploymentResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1ExpensesIdError = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update an expense Updates an expense ## Scopes */ +export const patchV1ExpensesId: API.OperationMethod< + PatchV1ExpensesIdRequest, + ExpenseResponse, + PatchV1ExpensesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1ExpensesIdRequest, + output: ExpenseResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1ExpensesId2Error = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update an expense Updates an expense ## Scopes */ +export const patchV1ExpensesId2: API.OperationMethod< + PatchV1ExpensesId2Request, + ExpenseResponse, + PatchV1ExpensesId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1ExpensesId2Request, + output: ExpenseResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1IncentivesIdError = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update Incentive Updates an Incentive. Incentives use the currency of the employment specified provided in the `employment_id` field. The API doesn't support updating paid incentives. ## Scopes */ +export const patchV1IncentivesId: API.OperationMethod< + PatchV1IncentivesIdRequest, + IncentiveResponse, + PatchV1IncentivesIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1IncentivesIdRequest, + output: IncentiveResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1IncentivesId2Error = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update Incentive Updates an Incentive. Incentives use the currency of the employment specified provided in the `employment_id` field. The API doesn't support updating paid incentives. ## Scopes */ +export const patchV1IncentivesId2: API.OperationMethod< + PatchV1IncentivesId2Request, + IncentiveResponse, + PatchV1IncentivesId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1IncentivesId2Request, + output: IncentiveResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1PayItemsIdError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update a Pay Item Updates a pay item. Editing a pay item archives the existing one and creates a new one with a new `id` — use the response's `replaced_ids` to reconcile with the id you had stored. Only the fields provided are changed. Cannot update pay items linked to a payroll adjustment, salary pay items, pay items automatically created from an external source, or pay items whose payroll run is no longer in preparation. ## Scopes */ +export const patchV1PayItemsId: API.OperationMethod< + PatchV1PayItemsIdRequest, + PayItemResponse, + PatchV1PayItemsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1PayItemsIdRequest, + output: PayItemResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1SandboxEmploymentsEmploymentIdError = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update employment Updates an employment. Use this endpoint to: - modify employment states for testing - Backdate employment start dates This endpoint will respond with a 404 outside of the Sandbox environment. `partner_external_id` cannot be updated here and is ignored if sent, like any other unsupported field. Set it with `PATCH /api/eor/v1/employments/{employment_id}` instead. For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). */ +export const patchV1SandboxEmploymentsEmploymentId: API.OperationMethod< + PatchV1SandboxEmploymentsEmploymentIdRequest, + EmploymentResponse, + PatchV1SandboxEmploymentsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1SandboxEmploymentsEmploymentIdRequest, + output: EmploymentResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1SandboxEmploymentsEmploymentId2Error = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update employment Updates an employment. Use this endpoint to: - modify employment states for testing - Backdate employment start dates This endpoint will respond with a 404 outside of the Sandbox environment. `partner_external_id` cannot be updated here and is ignored if sent, like any other unsupported field. Set it with `PATCH /api/eor/v1/employments/{employment_id}` instead. For updating an employment's parameters outside of testing purposes, use [this Employment update endpoint](#operation/patch_update_employment). */ +export const patchV1SandboxEmploymentsEmploymentId2: API.OperationMethod< + PatchV1SandboxEmploymentsEmploymentId2Request, + EmploymentResponse, + PatchV1SandboxEmploymentsEmploymentId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1SandboxEmploymentsEmploymentId2Request, + output: EmploymentResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1TimeoffIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update Time Off Updates a Time Off record. Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. ## Scopes */ +export const patchV1TimeoffId: API.OperationMethod< + PatchV1TimeoffIdRequest, + TimeoffResponse, + PatchV1TimeoffIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1TimeoffIdRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1TimeoffId2Error = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update Time Off Updates a Time Off record. Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025. To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead. ## Scopes */ +export const patchV1TimeoffId2: API.OperationMethod< + PatchV1TimeoffId2Request, + TimeoffResponse, + PatchV1TimeoffId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1TimeoffId2Request, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1TravelLetterRequestsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Updates a travel letter request Updates a travel letter request ## Scopes */ +export const patchV1TravelLetterRequestsId: API.OperationMethod< + PatchV1TravelLetterRequestsIdRequest, + TravelLetterResponse, + PatchV1TravelLetterRequestsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1TravelLetterRequestsIdRequest, + output: TravelLetterResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1TravelLetterRequestsId2Error = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Updates a travel letter request Updates a travel letter request ## Scopes */ +export const patchV1TravelLetterRequestsId2: API.OperationMethod< + PatchV1TravelLetterRequestsId2Request, + TravelLetterResponse, + PatchV1TravelLetterRequestsId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1TravelLetterRequestsId2Request, + output: TravelLetterResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1WebhookCallbacksIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update a Webhook Callback Update a callback previously registered for webhooks ## Scopes */ +export const patchV1WebhookCallbacksId: API.OperationMethod< + PatchV1WebhookCallbacksIdRequest, + WebhookCallbackResponse, + PatchV1WebhookCallbacksIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1WebhookCallbacksIdRequest, + output: WebhookCallbackResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1WorkAuthorizationRequestsIdError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update work authorization request Updates a work authorization request. ## Scopes */ +export const patchV1WorkAuthorizationRequestsId: API.OperationMethod< + PatchV1WorkAuthorizationRequestsIdRequest, + WorkAuthorizationRequestResponse, + PatchV1WorkAuthorizationRequestsIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1WorkAuthorizationRequestsIdRequest, + output: WorkAuthorizationRequestResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV1WorkAuthorizationRequestsId2Error = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update work authorization request Updates a work authorization request. ## Scopes */ +export const patchV1WorkAuthorizationRequestsId2: API.OperationMethod< + PatchV1WorkAuthorizationRequestsId2Request, + WorkAuthorizationRequestResponse, + PatchV1WorkAuthorizationRequestsId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV1WorkAuthorizationRequestsId2Request, + output: WorkAuthorizationRequestResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV2EmploymentsEmploymentIdError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update employment */ +export const patchV2EmploymentsEmploymentId: API.OperationMethod< + PatchV2EmploymentsEmploymentIdRequest, + EmploymentResponse, + PatchV2EmploymentsEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV2EmploymentsEmploymentIdRequest, + output: EmploymentResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PatchV2EmploymentsEmploymentId2Error = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update employment */ +export const patchV2EmploymentsEmploymentId2: API.OperationMethod< + PatchV2EmploymentsEmploymentId2Request, + EmploymentResponse, + PatchV2EmploymentsEmploymentId2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchV2EmploymentsEmploymentId2Request, + output: EmploymentResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostAuthOauth2TokenError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Token Endpoint to exchange tokens in the Authorization Code, Assertion Flow, Client Credentials and Refresh Token flows */ +export const postAuthOauth2Token: API.OperationMethod< + PostAuthOauth2TokenRequest, + PostAuthOauth2TokenResponse, + PostAuthOauth2TokenError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostAuthOauth2TokenRequest, + output: PostAuthOauth2TokenResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1BenefitRenewalRequestsBenefitRenewalRequestIdError = + | UnprocessableEntity + | RemoteOpError; +/** Updates a Benefit Renewal Request Response Updates a Benefit Renewal Request with the given response. ## Scopes */ +export const postV1BenefitRenewalRequestsBenefitRenewalRequestId: API.OperationMethod< + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest, + SuccessResponse, + PostV1BenefitRenewalRequestsBenefitRenewalRequestIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1BenefitRenewalRequestsBenefitRenewalRequestIdRequest, + output: SuccessResponse, + errors: [UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1BulkEmploymentJobsError = + | BadRequest + | Forbidden + | UnprocessableEntity + | RemoteOpError; +/** Create bulk employment job Creates a job to bulk-create employments for multiple employees at once. Each employee payload must match the employment schema for the selected country. ## Scopes */ +export const postV1BulkEmploymentJobs: API.OperationMethod< + PostV1BulkEmploymentJobsRequest, + PostV1BulkEmploymentJobsResponse, + PostV1BulkEmploymentJobsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1BulkEmploymentJobsRequest, + output: PostV1BulkEmploymentJobsResponse, + errors: [BadRequest, Forbidden, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CancelOnboardingEmploymentIdError = + | BadRequest + | UnprocessableEntity + | RemoteOpError; +/** 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 ## Scopes */ +export const postV1CancelOnboardingEmploymentId: API.OperationMethod< + PostV1CancelOnboardingEmploymentIdRequest, + SuccessResponse, + PostV1CancelOnboardingEmploymentIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CancelOnboardingEmploymentIdRequest, + output: SuccessResponse, + errors: [BadRequest, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CompaniesError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Create a company Creates a new company. ### Creating a company with only the required request body parameters When you call this endpoint and omit all the optional parameters in the request body, the following resources get created upon a successful response: * A new company with status `pending`. * A company owner for the new company with status `initiated`. See the [update a company endpoint](#tag/Companies/operation/patch_update_company) for more details on how to get your company and its owner to `active` status. If you'd like to create a company and its owner with `active` status in a single request, please provide the optional `address_details` parameter as well. ### Accepting the Terms of Service A required step for creating a company in Remote is to accept our Terms of Service (ToS). Company managers need to be aware of our Terms of Service and Privacy Policy, hence **it's the responsibility of our partners to advise and ensure company managers read and accept the ToS**. The terms have to be accepted only once, before creating a company, and the Remote API will collect the acceptance timestamp as its confirmation. To ensure users read the most recent version of Remote's Terms of Service, their **acceptance must be done within the last fifteen minutes prior the company creation action**. To retrieve this information, partners can provide an element with any text and a description explaining that by performing that action they are accepting Remote's Term of Service. For instance, the partner can add a checkbox or a "Create Remote Account" button followed by a description saying "By creating an account, you agree to [Remote's Terms of Service](https://remote.com/terms-of-service). Also see Remote's [Privacy Policy](https://remote.com/privacy-policy)". ## Scopes */ +export const postV1Companies: API.OperationMethod< + PostV1CompaniesRequest, + CompanyCreationResponse, + PostV1CompaniesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CompaniesRequest, + output: CompanyCreationResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CompaniesCompanyIdCreateTokenError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a new token for a company Creates new tokens for a given company */ +export const postV1CompaniesCompanyIdCreateToken: API.OperationMethod< + PostV1CompaniesCompanyIdCreateTokenRequest, + CompanyTokenResponse, + PostV1CompaniesCompanyIdCreateTokenError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CompaniesCompanyIdCreateTokenRequest, + output: CompanyTokenResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CompaniesCompanyIdPricingPlansError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a pricing plan for a company Create a pricing plan for a company, in order to do that we have 2 ways: 1. Create a pricing plan from a partner template 2. Create a pricing plan from a product price The pricing plan is always created in the company's desired currency. ## Scopes */ +export const postV1CompaniesCompanyIdPricingPlans: API.OperationMethod< + PostV1CompaniesCompanyIdPricingPlansRequest, + CreatePricingPlanResponse, + PostV1CompaniesCompanyIdPricingPlansError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CompaniesCompanyIdPricingPlansRequest, + output: CreatePricingPlanResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CompanyDepartmentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create New Department Creates a new department in the specified company. Department names may be non-unique and must be non-empty with no more than 255 characters (Unicode code points). ## Scopes */ +export const postV1CompanyDepartments: API.OperationMethod< + PostV1CompanyDepartmentsRequest, + CompanyDepartmentCreatedResponse, + PostV1CompanyDepartmentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CompanyDepartmentsRequest, + output: CompanyDepartmentCreatedResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CompanyManagersError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create and invite a Company Manager Create a Company Manager and sends the invitation email for signing in to the Remote Platform. ## Scopes */ +export const postV1CompanyManagers: API.OperationMethod< + PostV1CompanyManagersRequest, + CompanyManagerData, + PostV1CompanyManagersError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CompanyManagersRequest, + output: CompanyManagerData, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractAmendmentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create Contract Amendment Creates a Contract Amendment request. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. ## Scopes */ +export const postV1ContractAmendments: API.OperationMethod< + PostV1ContractAmendmentsRequest, + ContractAmendmentResponse, + PostV1ContractAmendmentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractAmendmentsRequest, + output: ContractAmendmentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractAmendmentsAutomatableError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const postV1ContractAmendmentsAutomatable: API.OperationMethod< + PostV1ContractAmendmentsAutomatableRequest, + ContractAmendmentAutomatableResponse, + PostV1ContractAmendmentsAutomatableError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractAmendmentsAutomatableRequest, + output: ContractAmendmentAutomatableResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorInvoiceSchedulesError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const postV1ContractorInvoiceSchedules: API.OperationMethod< + PostV1ContractorInvoiceSchedulesRequest, + PostV1ContractorInvoiceSchedulesResponse, + PostV1ContractorInvoiceSchedulesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractorInvoiceSchedulesRequest, + output: PostV1ContractorInvoiceSchedulesResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEligibilityQuestionnaireError = + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Submit eligibility questionnaire Submits an eligibility questionnaire for a contractor employment. The questionnaire determines if the contractor is eligible for certain products or features. The responses are validated against the JSON schema for the questionnaire type. **Requirements:** - Employment must be of type `contractor` - Employment must be in `created` status - Responses must conform to the questionnaire JSON schema ## Scopes */ +export const postV1ContractorsEligibilityQuestionnaire: API.OperationMethod< + PostV1ContractorsEligibilityQuestionnaireRequest, + EligibilityQuestionnaireResponse, + PostV1ContractorsEligibilityQuestionnaireError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractorsEligibilityQuestionnaireRequest, + output: EligibilityQuestionnaireResponse, + errors: [Forbidden, Conflict, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a contract document for a contractor Create a contract document for a contractor. ## Scopes */ +export const postV1ContractorsEmploymentsEmploymentIdContractDocuments: API.OperationMethod< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest, + CreateContractDocumentResponse, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractorsEmploymentsEmploymentIdContractDocumentsRequest, + output: CreateContractDocumentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignError = + | BadRequest + | Forbidden + | RemoteOpError; +/** Sign a document for a contractor ## Scopes */ +export const postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign: API.OperationMethod< + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest, + SuccessResponse, + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSignRequest, + output: SuccessResponse, + errors: [BadRequest, Forbidden, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create contractor of record subscription intent Assigns Contractor of Record subscription in pending state to employment. Once risk analysis is performed, subscription may start upon contract signing, or might be denied. Requires a non-blocking eligibility questionnaire to be submitted before creating the subscription intent. ## Scopes */ +export const postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription: API.OperationMethod< + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest, + SuccessResponse, + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1ContractorsEmploymentsEmploymentIdContractorCorSubscriptionRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionError = + | BadRequest + | Forbidden + | RemoteOpError; +/** 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 */ +export const postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription: API.OperationMethod< + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest, + SuccessResponse, + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1ContractorsEmploymentsEmploymentIdContractorPlusSubscriptionRequest, + output: SuccessResponse, + errors: [BadRequest, Forbidden, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const postV1ContractorsEmploymentsEmploymentIdCorTerminationRequests: API.OperationMethod< + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest, + CorTerminationRequestCreatedResponse, + PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractorsEmploymentsEmploymentIdCorTerminationRequestsRequest, + output: CorTerminationRequestCreatedResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ContractorsEmploymentsEmploymentIdTimesheetsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a contractor timesheet Creates a timesheet on behalf of a contractor employment. The submitted hours are immediately available to the contractor in the Remote UI for self-serve invoice creation (Invoices → Create invoice → "Use Time Tracking"). This endpoint is restricted to contractor employments. Calls against EOR or Global Payroll employments are rejected with `422`. ## Scopes */ +export const postV1ContractorsEmploymentsEmploymentIdTimesheets: API.OperationMethod< + PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest, + ContractorTimesheetResponse, + PostV1ContractorsEmploymentsEmploymentIdTimesheetsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ContractorsEmploymentsEmploymentIdTimesheetsRequest, + output: ContractorTimesheetResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CostCalculatorEstimationError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Creates a cost estimation of employments */ +export const postV1CostCalculatorEstimation: API.OperationMethod< + PostV1CostCalculatorEstimationRequest, + CostCalculatorEstimateResponse, + PostV1CostCalculatorEstimationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CostCalculatorEstimationRequest, + output: CostCalculatorEstimateResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CostCalculatorEstimationCsvError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Creates a CSV cost estimation of employments Creates CSV cost estimation of employments */ +export const postV1CostCalculatorEstimationCsv: API.OperationMethod< + PostV1CostCalculatorEstimationCsvRequest, + CostCalculatorEstimateCSVResponse, + PostV1CostCalculatorEstimationCsvError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CostCalculatorEstimationCsvRequest, + output: CostCalculatorEstimateCSVResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CostCalculatorEstimationPdfError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Creates PDF cost estimation of employments Creates a PDF cost estimation of employments based on the provided parameters. */ +export const postV1CostCalculatorEstimationPdf: API.OperationMethod< + PostV1CostCalculatorEstimationPdfRequest, + CostCalculatorEstimatePDFResponse, + PostV1CostCalculatorEstimationPdfError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CostCalculatorEstimationPdfRequest, + output: CostCalculatorEstimatePDFResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CurrencyConverterEffectiveError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Convert currency using dynamic rates Convert currency using the rates Remote applies during employment creation and invoicing. ## Scopes */ +export const postV1CurrencyConverterEffective: API.OperationMethod< + PostV1CurrencyConverterEffectiveRequest, + ConvertCurrencyResponse, + PostV1CurrencyConverterEffectiveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CurrencyConverterEffectiveRequest, + output: ConvertCurrencyResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CurrencyConverterEffective2Error = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Convert currency using dynamic rates Convert currency using the rates Remote applies during employment creation and invoicing. ## Scopes */ +export const postV1CurrencyConverterEffective2: API.OperationMethod< + PostV1CurrencyConverterEffective2Request, + ConvertCurrencyResponse, + PostV1CurrencyConverterEffective2Error, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CurrencyConverterEffective2Request, + output: ConvertCurrencyResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CurrencyConverterRawError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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 */ +export const postV1CurrencyConverterRaw: API.OperationMethod< + PostV1CurrencyConverterRawRequest, + ConvertCurrencyResponse, + PostV1CurrencyConverterRawError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CurrencyConverterRawRequest, + output: ConvertCurrencyResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1CustomFieldsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create Custom Field Definition Creates a new custom field definition. ## Scopes */ +export const postV1CustomFields: API.OperationMethod< + PostV1CustomFieldsRequest, + CreateEmploymentCustomFieldResponse, + PostV1CustomFieldsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1CustomFieldsRequest, + output: CreateEmploymentCustomFieldResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1DocumentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Upload file Uploads a file associated with a specified employment. Please contact api-support@remote.com to request access to this endpoint. ## Scopes */ +export const postV1Documents: API.OperationMethod< + PostV1DocumentsRequest, + UploadFileResponse, + PostV1DocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1DocumentsRequest, + output: UploadFileResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmployeeDocumentsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Upload employee file Uploads a file owned by the authenticated employee, for example identity documents or tax forms. ## Scopes */ +export const postV1EmployeeDocuments: API.OperationMethod< + PostV1EmployeeDocumentsRequest, + UploadFileResponse, + PostV1EmployeeDocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmployeeDocumentsRequest, + output: UploadFileResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmployeeExpensesError = + | BadRequest + | Forbidden + | UnprocessableEntity + | RemoteOpError; +/** Create an expense for the authenticated employee Creates a new expense record for the current employee. ## Scopes */ +export const postV1EmployeeExpenses: API.OperationMethod< + PostV1EmployeeExpensesRequest, + SuccessResponse, + PostV1EmployeeExpensesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmployeeExpensesRequest, + output: SuccessResponse, + errors: [BadRequest, Forbidden, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmployeeTimeoffError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a Pending Time Off Creates a pending Time Off record ## Scopes */ +export const postV1EmployeeTimeoff: API.OperationMethod< + PostV1EmployeeTimeoffRequest, + TimeoffResponse, + PostV1EmployeeTimeoffError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmployeeTimeoffRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmployeeTimeoffIdCancelError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Cancel Time Off as Employee Cancels a Time Off record as Employee ## Scopes */ +export const postV1EmployeeTimeoffIdCancel: API.OperationMethod< + PostV1EmployeeTimeoffIdCancelRequest, + TimeoffResponse, + PostV1EmployeeTimeoffIdCancelError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmployeeTimeoffIdCancelRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** 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 id of the specific legal entity that the employee will be engaged by and billed to as the `engaged_by_legal_entity_id` 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. ## Scopes */ +export const postV1Employments: API.OperationMethod< + PostV1EmploymentsRequest, + EmploymentCreationResponse, + PostV1EmploymentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsRequest, + output: EmploymentCreationResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsEmploymentIdContractEligibilityError = + | BadRequest + | UnprocessableEntity + | RemoteOpError; +/** Create contract eligibility Create contract eligibility for an employment. This will create a new contract eligibility for the employment. ## Scopes */ +export const postV1EmploymentsEmploymentIdContractEligibility: API.OperationMethod< + PostV1EmploymentsEmploymentIdContractEligibilityRequest, + SuccessResponse, + PostV1EmploymentsEmploymentIdContractEligibilityError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsEmploymentIdContractEligibilityRequest, + output: SuccessResponse, + errors: [BadRequest, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsEmploymentIdContractOriginError = + | BadRequest + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Set contract origin for a contractor employment Sets the `contract_origin` for a contractor employment. * `remote_contract` — Remote provides and manages the contract (a contract document is created) * `custom_remote_contract` — A customised Remote contract is used (a contract document is created) * `provided_by_customer` — The employer provides their own contract (no contract document is created) When `provided_by_customer` is selected, the contractor can be invited without completing the `contract_details` onboarding step. ## Scopes */ +export const postV1EmploymentsEmploymentIdContractOrigin: API.OperationMethod< + PostV1EmploymentsEmploymentIdContractOriginRequest, + SuccessResponse, + PostV1EmploymentsEmploymentIdContractOriginError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsEmploymentIdContractOriginRequest, + output: SuccessResponse, + errors: [BadRequest, Conflict, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsEmploymentIdContractorInvoicesPreviewError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Preview a Contractor Invoice Returns a base64-encoded PDF preview of a contractor invoice built from the given parameters. The document is a draft and is not persisted. ## Scopes */ +export const postV1EmploymentsEmploymentIdContractorInvoicesPreview: API.OperationMethod< + PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest, + ContractorInvoicePreviewResponse, + PostV1EmploymentsEmploymentIdContractorInvoicesPreviewError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsEmploymentIdContractorInvoicesPreviewRequest, + output: ContractorInvoicePreviewResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsEmploymentIdEngagementAgreementDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Upsert engagement agreement details Creates or updates the engagement agreement details for an employment. This endpoint requires country-specific data. The exact required fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that compliance requirements for each country are subject to change according to local laws. Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended to avoid compliance issues and to have the latest version of a country's requirements. ## Scopes */ +export const postV1EmploymentsEmploymentIdEngagementAgreementDetails: API.OperationMethod< + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + SuccessResponse, + PostV1EmploymentsEmploymentIdEngagementAgreementDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsEmploymentIdInviteError = + | BadRequest + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const postV1EmploymentsEmploymentIdInvite: API.OperationMethod< + PostV1EmploymentsEmploymentIdInviteRequest, + SuccessResponse, + PostV1EmploymentsEmploymentIdInviteError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsEmploymentIdInviteRequest, + output: SuccessResponse, + errors: [BadRequest, Conflict, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Submit risk reserve proof of payment Submits a proof of payment document for a risk reserve associated with an employment. Triggers an `employment.cor_hiring.proof_of_payment_submitted` webhook event. ## Scopes */ +export const postV1EmploymentsEmploymentIdRiskReserveProofOfPayments: API.OperationMethod< + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest, + RiskReserveProofOfPaymentResponse, + PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1EmploymentsEmploymentIdRiskReserveProofOfPaymentsRequest, + output: RiskReserveProofOfPaymentResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ExpensesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create expense Creates an **approved** expense ## Scopes */ +export const postV1Expenses: API.OperationMethod< + PostV1ExpensesRequest, + ExpenseResponse, + PostV1ExpensesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ExpensesRequest, + output: ExpenseResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1IdentityVerificationEmploymentIdDeclineError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Decline Identity Verification Declines the identity verification of an employee. ## Scopes */ +export const postV1IdentityVerificationEmploymentIdDecline: API.OperationMethod< + PostV1IdentityVerificationEmploymentIdDeclineRequest, + SuccessResponse, + PostV1IdentityVerificationEmploymentIdDeclineError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1IdentityVerificationEmploymentIdDeclineRequest, + output: SuccessResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1IdentityVerificationEmploymentIdVerifyError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Verify Employment Identity Endpoint to confirms the employment profile is from the actual employee ## Scopes */ +export const postV1IdentityVerificationEmploymentIdVerify: API.OperationMethod< + PostV1IdentityVerificationEmploymentIdVerifyRequest, + SuccessResponse, + PostV1IdentityVerificationEmploymentIdVerifyError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1IdentityVerificationEmploymentIdVerifyRequest, + output: SuccessResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1IncentivesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create Incentive Creates an Incentive. Incentives use the currency of the employment specified provided in the `employment_id` field. ## Scopes */ +export const postV1Incentives: API.OperationMethod< + PostV1IncentivesRequest, + IncentiveResponse, + PostV1IncentivesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1IncentivesRequest, + output: IncentiveResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1IncentivesRecurringError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. ## Scopes */ +export const postV1IncentivesRecurring: API.OperationMethod< + PostV1IncentivesRecurringRequest, + RecurringIncentiveResponse, + PostV1IncentivesRecurringError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1IncentivesRecurringRequest, + output: RecurringIncentiveResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1MagicLinkError = UnprocessableEntity | RemoteOpError; +/** 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 */ +export const postV1MagicLink: API.OperationMethod< + PostV1MagicLinkRequest, + MagicLinkResponse, + PostV1MagicLinkError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1MagicLinkRequest, + output: MagicLinkResponse, + errors: [UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1OffboardingsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create Offboarding Creates an Offboarding request ## Scopes */ +export const postV1Offboardings: API.OperationMethod< + PostV1OffboardingsRequest, + OffboardingResponse, + PostV1OffboardingsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1OffboardingsRequest, + output: OffboardingResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Sign a pre-onboarding document Signs the latest contract document associated with the given pre-onboarding document on behalf of the company signatory. ## Scopes */ +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSign: API.OperationMethod< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest, + SuccessResponse, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingDocumentsIdSignRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Acknowledge a pre-onboarding acknowledgement requirement Records an acknowledgement for an acknowledgement requirement. Rejected if the requirement is blocked by an unmet dependency or has already been acknowledged. ## Scopes */ +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledge: API.OperationMethod< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest, + CreatePreOnboardingAcknowledgementResponse, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugAcknowledgeRequest, + output: CreatePreOnboardingAcknowledgementResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Find or create a document for a pre-onboarding requirement Finds an existing unsigned pre-onboarding document for the given document requirement, or creates a new one. Idempotent: repeated calls return the same document until it is signed. ## Scopes */ +export const postV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocuments: API.OperationMethod< + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest, + CreatePreOnboardingDocumentResponse, + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirementsRequirementSlugDocumentsRequest, + output: CreatePreOnboardingDocumentResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1PayItemsBulkError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Bulk Create Pay Items Bulk creates pay items for employments. Supports up to 500 items per request. Each item must supply exactly one of `code` or `external_import_code` to identify the pay element. Integration-specific fields (shift code, currency, pay amount, etc.) go in the `provider_data` object. Only Global Payroll employments are supported. Non-GP employments are returned as `employment_not_global_payroll`. ## Scopes */ +export const postV1PayItemsBulk: API.OperationMethod< + PostV1PayItemsBulkRequest, + BulkCreatePayItemsResponse, + PostV1PayItemsBulkError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1PayItemsBulkRequest, + output: BulkCreatePayItemsResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1PayrollRunsPayrollRunIdGlReportsError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a GL report Triggers generation of a General Ledger report for the given payroll run and type. Returns immediately with a `pending` report — poll `show` until `status` is `completed`, then call `download`. ## Scopes */ +export const postV1PayrollRunsPayrollRunIdGlReports: API.OperationMethod< + PostV1PayrollRunsPayrollRunIdGlReportsRequest, + GLReportResponse, + PostV1PayrollRunsPayrollRunIdGlReportsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1PayrollRunsPayrollRunIdGlReportsRequest, + output: GLReportResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ProbationCompletionLetterError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create probation completion letter Create a new probation completion letter request. ## Scopes */ +export const postV1ProbationCompletionLetter: API.OperationMethod< + PostV1ProbationCompletionLetterRequest, + ProbationCompletionLetterResponse, + PostV1ProbationCompletionLetterError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ProbationCompletionLetterRequest, + output: ProbationCompletionLetterResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1ProbationExtensionsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create Probation Extension Create a probation extension request. ## Scopes */ +export const postV1ProbationExtensions: API.OperationMethod< + PostV1ProbationExtensionsRequest, + ProbationExtensionResponse, + PostV1ProbationExtensionsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1ProbationExtensionsRequest, + output: ProbationExtensionResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1RiskReserveError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create risk reserve Create a new risk reserve ## Scopes */ +export const postV1RiskReserve: API.OperationMethod< + PostV1RiskReserveRequest, + SuccessResponse, + PostV1RiskReserveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1RiskReserveRequest, + output: SuccessResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxBenefitRenewalRequestsError = + | BadRequest + | UnprocessableEntity + | RemoteOpError; +/** 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. */ +export const postV1SandboxBenefitRenewalRequests: API.OperationMethod< + PostV1SandboxBenefitRenewalRequestsRequest, + BenefitRenewalRequestsCreateBenefitRenewalRequestResponse, + PostV1SandboxBenefitRenewalRequestsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SandboxBenefitRenewalRequestsRequest, + output: BenefitRenewalRequestsCreateBenefitRenewalRequestResponse, + errors: [BadRequest, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** 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. */ +export const postV1SandboxCompaniesCompanyIdBypassEligibilityChecks: API.OperationMethod< + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest, + SuccessResponse, + PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SandboxCompaniesCompanyIdBypassEligibilityChecksRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a legal entity Create a new legal entity for a company in a given country, with KYB automatically passed. The entity is created with active status and can be set as the company's default using the reassign default entity endpoint. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const postV1SandboxCompaniesCompanyIdLegalEntities: API.OperationMethod< + PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest, + PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse, + PostV1SandboxCompaniesCompanyIdLegalEntitiesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SandboxCompaniesCompanyIdLegalEntitiesRequest, + output: PostV1SandboxCompaniesCompanyIdLegalEntitiesResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Activate Global Payroll for a legal entity Enables the Global Payroll product on a legal entity so that GP employees can be created against it. Performs three idempotent steps: * Adds the Global Payroll product to the company. * Flips `global_payroll_enabled` on the legal entity's settings. * Ensures a Global Payroll pricing plan exists for the legal entity's country. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const postV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayroll: API.OperationMethod< + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest, + SuccessResponse, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdActivateGlobalPayrollRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Set company credit risk status Sets the credit risk status of a specific legal entity to any valid credit risk status. Use this endpoint to test hiring flows affected by credit risk, without needing Remote admin intervention. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const postV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatus: API.OperationMethod< + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest, + SuccessResponse, + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1SandboxCompaniesCompanyIdLegalEntitiesLegalEntityIdSetCreditRiskStatusRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxContractorsEmploymentsEmploymentIdRatesError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Seed a contractor rate Creates or replaces the contractor's rate, so that the rate endpoints can be exercised without going through contract signature. The currency is derived from the legal entity the contractor is paid in by. A rate in a currency the contractor cannot be paid in is rejected with `422`. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const postV1SandboxContractorsEmploymentsEmploymentIdRates: API.OperationMethod< + PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest, + SandboxContractorRateResponse, + PostV1SandboxContractorsEmploymentsEmploymentIdRatesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SandboxContractorsEmploymentsEmploymentIdRatesRequest, + output: SandboxContractorRateResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxEmploymentsError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create employment Creates an employment without provisional_start_date validation. This endpoint is only available in Sandbox and allows creating employments which `provisional_start_date` is in the past. This is especially helpful for: * Testing the Timeoff Balance endpoints * Testing the Offboarding endpoints * Testing features around probation periods This endpoint will respond with a 404 outside of the Sandbox environment. For creating an employment's parameters outside of testing purposes, use [this Employment create endpoint](#operation/post_create_employment) */ +export const postV1SandboxEmployments: API.OperationMethod< + PostV1SandboxEmploymentsRequest, + EmploymentCreationResponse, + PostV1SandboxEmploymentsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SandboxEmploymentsRequest, + output: EmploymentCreationResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Approve risk reserve proof of payment Approves a risk reserve proof of payment without the intervention of a Remote admin. Triggers an `employment.cor_hiring.proof_of_payment_accepted` webhook event. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const postV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApprove: API.OperationMethod< + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest, + RiskReserveProofOfPaymentResponse, + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PostV1SandboxEmploymentsEmploymentIdRiskReserveProofOfPaymentsApproveRequest, + output: RiskReserveProofOfPaymentResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SandboxWebhookCallbacksTriggerError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Trigger a Webhook Triggers a callback previously registered for webhooks. Use this endpoint to emit a webhook for testing in the Sandbox environment. This endpoint will respond with a 404 outside of the Sandbox environment. */ +export const postV1SandboxWebhookCallbacksTrigger: API.OperationMethod< + PostV1SandboxWebhookCallbacksTriggerRequest, + SuccessResponse, + PostV1SandboxWebhookCallbacksTriggerError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SandboxWebhookCallbacksTriggerRequest, + output: SuccessResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SdkTelemetryErrorsError = BadRequest | RemoteOpError; +/** Report SDK errors Receives error telemetry from the frontend SDK. Errors are logged to observability backend for monitoring and debugging. */ +export const postV1SdkTelemetryErrors: API.OperationMethod< + PostV1SdkTelemetryErrorsRequest, + PostV1SdkTelemetryErrorsResponse, + PostV1SdkTelemetryErrorsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SdkTelemetryErrorsRequest, + output: PostV1SdkTelemetryErrorsResponse, + errors: [BadRequest, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1SsoConfigurationError = + | BadRequest + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Create the SSO Configuration Creates the SSO Configuration for the company. ## Scopes */ +export const postV1SsoConfiguration: API.OperationMethod< + PostV1SsoConfigurationRequest, + CreateSSOConfigurationResponse, + PostV1SsoConfigurationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1SsoConfigurationRequest, + output: CreateSSOConfigurationResponse, + errors: [ + BadRequest, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimeoffError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create Time Off Creates a Time Off record ## Scopes */ +export const postV1Timeoff: API.OperationMethod< + PostV1TimeoffRequest, + TimeoffResponse, + PostV1TimeoffError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimeoffRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimeoffTimeoffIdApproveError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Approve Time Off Approve a time off request. ## Scopes */ +export const postV1TimeoffTimeoffIdApprove: API.OperationMethod< + PostV1TimeoffTimeoffIdApproveRequest, + TimeoffResponse, + PostV1TimeoffTimeoffIdApproveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimeoffTimeoffIdApproveRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimeoffTimeoffIdCancelError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Cancel Time Off Cancel a time off request that was already approved. ## Scopes */ +export const postV1TimeoffTimeoffIdCancel: API.OperationMethod< + PostV1TimeoffTimeoffIdCancelRequest, + TimeoffResponse, + PostV1TimeoffTimeoffIdCancelError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimeoffTimeoffIdCancelRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimeoffTimeoffIdCancelRequestApproveError = + | UnprocessableEntity + | RemoteOpError; +/** Approve a time off cancellation request Approve a time off cancellation request. In order to approve a time off cancellation request, the timeoff status must be `cancel_requested`. ## Scopes */ +export const postV1TimeoffTimeoffIdCancelRequestApprove: API.OperationMethod< + PostV1TimeoffTimeoffIdCancelRequestApproveRequest, + SuccessResponse, + PostV1TimeoffTimeoffIdCancelRequestApproveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimeoffTimeoffIdCancelRequestApproveRequest, + output: SuccessResponse, + errors: [UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimeoffTimeoffIdCancelRequestDeclineError = + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Decline a time off cancellation request Decline a time off cancellation request. ## Scopes */ +export const postV1TimeoffTimeoffIdCancelRequestDecline: API.OperationMethod< + PostV1TimeoffTimeoffIdCancelRequestDeclineRequest, + SuccessResponse, + PostV1TimeoffTimeoffIdCancelRequestDeclineError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimeoffTimeoffIdCancelRequestDeclineRequest, + output: SuccessResponse, + errors: [Conflict, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimeoffTimeoffIdDeclineError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Decline Time Off Decline a time off request. Please note that only time off requests on the `requested` status can be declined. ## Scopes */ +export const postV1TimeoffTimeoffIdDecline: API.OperationMethod< + PostV1TimeoffTimeoffIdDeclineRequest, + TimeoffResponse, + PostV1TimeoffTimeoffIdDeclineError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimeoffTimeoffIdDeclineRequest, + output: TimeoffResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimesheetsTimesheetIdApproveError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Approve timesheet Approves the given timesheet. ## Scopes */ +export const postV1TimesheetsTimesheetIdApprove: API.OperationMethod< + PostV1TimesheetsTimesheetIdApproveRequest, + MinimalTimesheetResponse, + PostV1TimesheetsTimesheetIdApproveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimesheetsTimesheetIdApproveRequest, + output: MinimalTimesheetResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1TimesheetsTimesheetIdSendBackError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Send back a timesheet for review or modification Sends the given timesheet back to the employee for review or modification. ## Scopes */ +export const postV1TimesheetsTimesheetIdSendBack: API.OperationMethod< + PostV1TimesheetsTimesheetIdSendBackRequest, + SentBackTimesheetResponse, + PostV1TimesheetsTimesheetIdSendBackError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1TimesheetsTimesheetIdSendBackRequest, + output: SentBackTimesheetResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1WebhookCallbacksError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Create a Webhook Callback Register a callback to be used for webhooks ## Scopes */ +export const postV1WebhookCallbacks: API.OperationMethod< + PostV1WebhookCallbacksRequest, + WebhookCallbackResponse, + PostV1WebhookCallbacksError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1WebhookCallbacksRequest, + output: WebhookCallbackResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV1WebhookEventsReplayError = + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Replay Webhook Events Replay webhook events ## Scopes */ +export const postV1WebhookEventsReplay: API.OperationMethod< + PostV1WebhookEventsReplayRequest, + SuccessResponse, + PostV1WebhookEventsReplayError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV1WebhookEventsReplayRequest, + output: SuccessResponse, + errors: [NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PostV2EmploymentsEmploymentIdEngagementAgreementDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Upsert engagement agreement details Creates or updates the engagement agreement details for an employment. This endpoint requires country-specific data. The exact required fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that compliance requirements for each country are subject to change according to local laws. Using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) is recommended to avoid compliance issues and to have the latest version of a country's requirements. ## Scopes */ +export const postV2EmploymentsEmploymentIdEngagementAgreementDetails: API.OperationMethod< + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + SuccessResponse, + PostV2EmploymentsEmploymentIdEngagementAgreementDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostV2EmploymentsEmploymentIdEngagementAgreementDetailsRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError = + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update Legal Entity Administrative details Update administrative details of legal entity for the authorized company specified in the request. ## Scopes */ +export const putV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetails: API.OperationMethod< + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest, + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse, + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsRequest, + output: + PutV1CompaniesCompanyIdLegalEntitiesLegalEntityIdAdministrativeDetailsResponse, + errors: [NotFound, Conflict, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmployeeAddressError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update employee address Updates the authenticated employee's residential address. The employment is derived from the access token's subject — there is no employment id in the path. The token must be an employee-role token (typically obtained via the OAuth2 assertion grant with subject `urn:remote-api:employee:employment:`). This endpoint requires country-specific data. The exact required fields vary depending on which country the authenticated employee's employment is in. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `address_details` as the form name to discover the schema for a given country. ## Scopes */ +export const putV1EmployeeAddress: API.OperationMethod< + PutV1EmployeeAddressRequest, + EmploymentDetailsOnlyResponse, + PutV1EmployeeAddressError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmployeeAddressRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmployeeBankAccountError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update employee bank account Upserts the authenticated employee's bank account details. This endpoint requires and returns country-specific data. The exact fields vary depending on which country the authenticated employee's employment is in. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `bank_account_details` as the form name to discover the schema for a given country. ## Scopes */ +export const putV1EmployeeBankAccount: API.OperationMethod< + PutV1EmployeeBankAccountRequest, + EmploymentDetailsOnlyResponse, + PutV1EmployeeBankAccountError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmployeeBankAccountRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmployeeEmergencyContactError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update employee emergency contact Updates the authenticated employee's emergency contact. The employment is derived from the access token's subject — there is no employment id in the path. The token must be an employee-role token (typically obtained via the OAuth2 assertion grant with subject `urn:remote-api:employee:employment:`). This endpoint requires country-specific data. The exact required fields vary depending on which country the authenticated employee's employment is in. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `emergency_contact_details` as the form name to discover the schema for a given country. ## Scopes */ +export const putV1EmployeeEmergencyContact: API.OperationMethod< + PutV1EmployeeEmergencyContactRequest, + EmploymentDetailsOnlyResponse, + PutV1EmployeeEmergencyContactError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmployeeEmergencyContactRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmployeeFederalTaxesError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Submit employee federal taxes Submits the authenticated employee's US federal tax (W-4) details. Available for US Global Payroll employees once they reach the post-enrollment state. Calls made before then return a 404. This endpoint requires country-specific data. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_federal_taxes` as the form name to discover the schema for a given country. ## Scopes */ +export const putV1EmployeeFederalTaxes: API.OperationMethod< + PutV1EmployeeFederalTaxesRequest, + SuccessResponse, + PutV1EmployeeFederalTaxesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmployeeFederalTaxesRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmployeePersonalDetailsError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Update employee personal details Updates the authenticated employee's personal details (date of birth, national ID, nationality, etc.). This endpoint requires country-specific data. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `personal_details` as the form name to discover the schema for a given country. ## Scopes */ +export const putV1EmployeePersonalDetails: API.OperationMethod< + PutV1EmployeePersonalDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV1EmployeePersonalDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmployeePersonalDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmployeeStateTaxesJurisdictionError = + | BadRequest + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Submit employee state taxes Submits the authenticated employee's US state tax withholding answers for a single jurisdiction (e.g. `NY`). Available for US Global Payroll employees once they reach the post-enrollment state, at which point the per-jurisdiction state tax task exists. This endpoint requires country/jurisdiction-specific data. Query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint with `global_payroll_state_taxes` as the form name to discover the schema for a given country. ## Scopes */ +export const putV1EmployeeStateTaxesJurisdiction: API.OperationMethod< + PutV1EmployeeStateTaxesJurisdictionRequest, + SuccessResponse, + PutV1EmployeeStateTaxesJurisdictionError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmployeeStateTaxesJurisdictionRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmploymentsEmploymentIdBasicInformationError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update basic information Updates employment's basic information. Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. ## Scopes */ +export const putV1EmploymentsEmploymentIdBasicInformation: API.OperationMethod< + PutV1EmploymentsEmploymentIdBasicInformationRequest, + EmploymentResponse, + PutV1EmploymentsEmploymentIdBasicInformationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmploymentsEmploymentIdBasicInformationRequest, + output: EmploymentResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmploymentsEmploymentIdBenefitOffersError = + | Forbidden + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Upserts employment benefit offers */ +export const putV1EmploymentsEmploymentIdBenefitOffers: API.OperationMethod< + PutV1EmploymentsEmploymentIdBenefitOffersRequest, + SuccessResponse, + PutV1EmploymentsEmploymentIdBenefitOffersError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmploymentsEmploymentIdBenefitOffersRequest, + output: SuccessResponse, + errors: [Forbidden, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmploymentsEmploymentIdFederalTaxesError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update federal taxes Updates employment's federal taxes. Requirements to update federal taxes successfully: * Employment should be Global Payroll * Employment should be in the post-enrollment state * Employment should belong to USA This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. ## Scopes */ +export const putV1EmploymentsEmploymentIdFederalTaxes: API.OperationMethod< + PutV1EmploymentsEmploymentIdFederalTaxesRequest, + SuccessResponse, + PutV1EmploymentsEmploymentIdFederalTaxesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmploymentsEmploymentIdFederalTaxesRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1EmploymentsEmploymentIdPersonalDetailsError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update personal details Updates employment's personal details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV1EmploymentsEmploymentIdPersonalDetails: API.OperationMethod< + PutV1EmploymentsEmploymentIdPersonalDetailsRequest, + EmploymentResponse, + PutV1EmploymentsEmploymentIdPersonalDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1EmploymentsEmploymentIdPersonalDetailsRequest, + output: EmploymentResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1ResignationsOffboardingRequestIdValidateError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Validate resignation request Validates a resignation employment request ## Scopes */ +export const putV1ResignationsOffboardingRequestIdValidate: API.OperationMethod< + PutV1ResignationsOffboardingRequestIdValidateRequest, + SuccessResponse, + PutV1ResignationsOffboardingRequestIdValidateError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1ResignationsOffboardingRequestIdValidateRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Reassign default legal entity Set a different legal entity as the company's default entity. The default entity is used when creating new employments without an explicit entity. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const putV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityId: API.OperationMethod< + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest, + SuccessResponse, + PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1SandboxCompaniesCompanyIdDefaultLegalEntityLegalEntityIdRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Approve Contract Amendment Approves a contract amendment request without the intervention of a Remote admin. Approvals done via this endpoint are effective immediately, regardless of the effective date entered on the contract amendment creation. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const putV1SandboxContractAmendmentsContractAmendmentRequestIdApprove: API.OperationMethod< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest, + ContractAmendmentResponse, + PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1SandboxContractAmendmentsContractAmendmentRequestIdApproveRequest, + output: ContractAmendmentResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelError = + | BadRequest + | NotFound + | UnprocessableEntity + | RemoteOpError; +/** Cancel Contract Amendment Use this endpoint to cancel an existing contract amendment request. This endpoint is only available in Sandbox, otherwise it will respond with a 404. */ +export const putV1SandboxContractAmendmentsContractAmendmentRequestIdCancel: API.OperationMethod< + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest, + SuccessResponse, + PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV1SandboxContractAmendmentsContractAmendmentRequestIdCancelRequest, + output: SuccessResponse, + errors: [BadRequest, NotFound, UnprocessableEntity, UnknownRemoteError], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdAddressDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update address details Updates employment's address details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdAddressDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdAddressDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdAddressDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdAddressDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdAdministrativeDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update administrative details Updates employment's administrative details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdAdministrativeDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdAdministrativeDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdAdministrativeDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdBankAccountDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update bank account details Updates employment's bank account details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdBankAccountDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdBankAccountDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdBankAccountDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdBankAccountDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdBasicInformationError = + | BadRequest + | Forbidden + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update basic information Updates employment's basic information. Supported employment statuses: `created`, `job_title_review`, `created_reserve_paid`, `created_awaiting_reserve`. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdBasicInformation: API.OperationMethod< + PutV2EmploymentsEmploymentIdBasicInformationRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdBasicInformationError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdBasicInformationRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdBillingAddressDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update billing address details Updates employment's billing address details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdBillingAddressDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdBillingAddressDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdBillingAddressDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdContractDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update contract details Updates employment's contract details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdContractDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdContractDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdContractDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdContractDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdEmergencyContactError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update emergency contact Updates the employment's emergency contact details. This endpoint requires country-specific data. Query the **Show form schema** endpoint passing the country code and `emergency_contact_details` as path parameters to see the required fields for a given country. ## Scopes */ +export const putV2EmploymentsEmploymentIdEmergencyContact: API.OperationMethod< + PutV2EmploymentsEmploymentIdEmergencyContactRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdEmergencyContactError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdEmergencyContactRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdFederalTaxesError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update federal taxes Updates employment's federal taxes. Requirements to update federal taxes successfully: * Employment should be Global Payroll * Employment should be in the post-enrollment state * Employment should belong to USA This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdFederalTaxes: API.OperationMethod< + PutV2EmploymentsEmploymentIdFederalTaxesRequest, + SuccessResponse, + PutV2EmploymentsEmploymentIdFederalTaxesError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdFederalTaxesRequest, + output: SuccessResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdPersonalDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update personal details Updates employment's personal details. This endpoint requires and returns country-specific data. The exact required and returned fields will vary depending on which country the employment is in. To see the list of parameters for each country, see the **Show form schema** endpoint under the [Countries](#tag/Countries) category. Please note that the compliance requirements for each country are subject to change according to local laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid compliance issues and to have the latest version of a country requirements. If you are using this endpoint to build an integration, make sure you are dynamically collecting or displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint. For more information on JSON Schemas, see the **How JSON Schemas work** documentation. To learn how you can dynamically generate forms to display in your UI, see the documentation for the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-form) tool. ## Scopes */ +export const putV2EmploymentsEmploymentIdPersonalDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdPersonalDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdPersonalDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdPersonalDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); + +export type PutV2EmploymentsEmploymentIdPricingPlanDetailsError = + | BadRequest + | Forbidden + | NotFound + | Conflict + | UnprocessableEntity + | RemoteOpError; +/** Update pricing plan details Updates the pricing plan for an employment. The frequency determines how often Remote bills the employer for management fees. Annual billing typically offers a discount. ## Scopes */ +export const putV2EmploymentsEmploymentIdPricingPlanDetails: API.OperationMethod< + PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest, + EmploymentDetailsOnlyResponse, + PutV2EmploymentsEmploymentIdPricingPlanDetailsError, + RemoteOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutV2EmploymentsEmploymentIdPricingPlanDetailsRequest, + output: EmploymentDetailsOnlyResponse, + errors: [ + BadRequest, + Forbidden, + NotFound, + Conflict, + UnprocessableEntity, + UnknownRemoteError, + ], + protocol: RemoteProtocol, + retry: Retry.Retry, +})); diff --git a/packages/remote/src/traits.ts b/packages/remote/src/traits.ts new file mode 100644 index 000000000..7c4480309 --- /dev/null +++ b/packages/remote/src/traits.ts @@ -0,0 +1,44 @@ +/** + * Remote SDK trait surface — hand-written. + * + * Re-exports the generic protocol traits from core (so generated operations + * import everything from one place). Remote has no envelope of its own; the + * REST-protocol traits (SensitiveValue / RawResponse) come from + * `core/protocol-rest`. + */ +export { + Body, + Header, + Query, + Label, + Http, + ResponseCode, + HttpBody, + FormDataFile, + KeyDictionary, + UnionCases, + applyErrorMatchers, + getErrorMatchers, + type HttpTrait, + type ErrorMatcher, + bodySymbol, + headerSymbol, + querySymbol, + labelSymbol, + httpSymbol, + responseCodeSymbol, + httpBodySymbol, + formDataFileSymbol, + keyDictionarySymbol, + unionCasesSymbol, + errorMatchersSymbol, +} from "@distilled.cloud/core/trait"; + +export { + SensitiveValue, + RawResponse, + RawResponseRoot, + sensitiveValueSymbol, + rawResponseSymbol, + rawResponseRootSymbol, +} from "@distilled.cloud/core/protocol-rest"; diff --git a/packages/remote/tsconfig.json b/packages/remote/tsconfig.json new file mode 100644 index 000000000..56b16e575 --- /dev/null +++ b/packages/remote/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "composite": true, + "noEmit": false, + "outDir": "./lib", + "rootDir": "./src", + "paths": { + "@distilled.cloud/core/*": ["../core/src/*"] + } + }, + "references": [{ "path": "../core" }] +} diff --git a/packages/remote/tsconfig.scripts.json b/packages/remote/tsconfig.scripts.json new file mode 100644 index 000000000..be37c3474 --- /dev/null +++ b/packages/remote/tsconfig.scripts.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["scripts/**/*.ts"], + "compilerOptions": { + "composite": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "./.scripts-types", + "rootDir": "./scripts", + "tsBuildInfoFile": "./.scripts-types/tsconfig.scripts.tsbuildinfo", + // Resolve @distilled.cloud/core/* to src (the bun condition), matching + // how the scripts actually run under bun. + "rewriteRelativeImportExtensions": false, + "customConditions": ["bun"] + }, + "references": [{ "path": "../core" }] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a5b177f1..23481465c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -522,6 +522,25 @@ importers: specifier: catalog:tooling version: 26.4.0 + packages/remote: + dependencies: + '@distilled.cloud/core': + specifier: workspace:* + version: link:../core + effect: + specifier: catalog:effect + version: 4.0.0-rc.112 + devDependencies: + '@effect/platform-bun': + specifier: catalog:effect + version: 4.0.0-rc.112(effect@4.0.0-rc.112) + '@types/bun': + specifier: catalog:tooling + version: 1.4.0 + '@types/node': + specifier: catalog:tooling + version: 26.4.0 + packages/stripe: dependencies: '@distilled.cloud/core': diff --git a/stacks/distilled-submodules/SpecRepos.ts b/stacks/distilled-submodules/SpecRepos.ts index 97e991a7b..f49cbd6e4 100644 --- a/stacks/distilled-submodules/SpecRepos.ts +++ b/stacks/distilled-submodules/SpecRepos.ts @@ -69,6 +69,7 @@ export const SPEC_REPOS: readonly SpecRepo[] = [ { package: "posthog" }, { package: "prisma-postgres" }, { package: "railway" }, + { package: "remote" }, { package: "stripe" }, { package: "supabase" }, { package: "turso" }, diff --git a/stacks/distilled-submodules/spec-repos/remote/fetch-specs.ts b/stacks/distilled-submodules/spec-repos/remote/fetch-specs.ts new file mode 100644 index 000000000..c6c91d78a --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/remote/fetch-specs.ts @@ -0,0 +1,482 @@ +#!/usr/bin/env bun +/** + * Assembles Remote's REST API description into ../specs/. + * + * Remote does not publish a first-party OpenAPI document — developer.remote.com + * `/openapi.json` is a ReadMe landing page, not an OAS file. The official + * index at https://developer.remote.com/llms.txt lists every REST reference + * page; each operation page inlines a per-path OpenAPI 3.1 snippet under + * `# OpenAPI definition`. This script snapshots those vendor pages and + * merges the snippets (paths + components) into one document. + * + * Usage: + * bun run fetch-specs.ts + * + * The specs are saved to: + * ../specs/llms.txt + * ../specs/docs/reference/*.md + * ../specs/docs/_manifest.json + * ../specs/openapi.json + */ + +import { existsSync, mkdirSync } from "fs"; +import { mkdir, readdir, rm, writeFile } from "fs/promises"; +import { dirname, join, relative } from "path"; + +const ORIGIN = "https://developer.remote.com"; +const LLMS_URL = `${ORIGIN}/llms.txt`; +const SPECS_DIR = "../specs"; +const DOCS_DIR = `${SPECS_DIR}/docs`; +const REFERENCE_DIR = `${DOCS_DIR}/reference`; +const OUTPUT_PATH = `${SPECS_DIR}/openapi.json`; +const CONCURRENCY = 4; +const MAX_FAILURE_RATE_FOR_PRUNE = 0.05; + +const HTTP_METHODS = [ + "get", + "put", + "post", + "delete", + "options", + "head", + "patch", + "trace", +] as const; + +type HttpMethod = (typeof HTTP_METHODS)[number]; + +class FetchError extends Error { + constructor( + readonly url: string, + readonly status?: number, + readonly reason?: unknown, + ) { + super( + `${url} — ${status !== undefined ? `HTTP ${status}` : `${reason ?? "network error"}`}`, + ); + } +} + +const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + +async function fetchText(url: string, attempts = 8): Promise { + let lastError: FetchError | undefined; + for (let attempt = 0; attempt < attempts; attempt++) { + let error: FetchError; + let retryAfterMs: number | undefined; + try { + const response = await fetch(url, { + headers: { "user-agent": "distilled.cloud-remote-spec-mirror" }, + }); + if (response.ok) return await response.text(); + error = new FetchError(url, response.status); + const retryAfter = response.headers.get("retry-after"); + if (retryAfter) { + const seconds = Number(retryAfter); + if (Number.isFinite(seconds) && seconds > 0) { + retryAfterMs = seconds * 1000; + } + } + if (response.status < 500 && response.status !== 429) throw error; + } catch (cause) { + error = + cause instanceof FetchError + ? cause + : new FetchError(url, undefined, cause); + if ( + error.status !== undefined && + error.status < 500 && + error.status !== 429 + ) { + throw error; + } + } + lastError = error; + if (attempt < attempts - 1) { + await sleep(retryAfterMs ?? 750 * 2 ** attempt); + } + } + throw lastError; +} + +function extractReferenceSlugs(llmsTxt: string): string[] { + const slugs = new Set(); + for (const match of llmsTxt.matchAll( + /https:\/\/developer\.remote\.com\/reference\/([A-Za-z0-9._-]+)/g, + )) { + slugs.add(match[1]!.replace(/\.md$/, "")); + } + return [...slugs].sort(); +} + +const OPENAPI_FENCE = /```json\s*\n([\s\S]*?)\n```/; + +function extractOpenApi(markdown: string): Record | undefined { + const heading = markdown.indexOf("# OpenAPI definition"); + const haystack = heading === -1 ? markdown : markdown.slice(heading); + const match = OPENAPI_FENCE.exec(haystack); + if (!match) return undefined; + let parsed: unknown; + try { + parsed = JSON.parse(match[1]!); + } catch { + return undefined; + } + if ( + parsed === null || + typeof parsed !== "object" || + typeof (parsed as any).openapi !== "string" || + (parsed as any).paths === undefined + ) { + return undefined; + } + return parsed as Record; +} + +/** True for REST reference pages (`get_v1_countries`), not webhook events. */ +function isOperationSlug(slug: string): boolean { + return /^(get|put|post|delete|patch)_/i.test(slug); +} + +/** Prefer the canonical slug over ReadMe's `-2` duplicate pages. */ +function slugRank(slug: string): number { + if (!isOperationSlug(slug)) return 0; + return /-\d+$/.test(slug) ? 1 : 2; +} + +function cleanOperation(op: Record): Record { + const cleaned = { ...op }; + delete cleaned["x-readme"]; + delete cleaned["x-readme-fauxas"]; + delete cleaned["x-codeSamples"]; + delete cleaned.callbacks; + delete cleaned.security; + if (Array.isArray(cleaned.parameters)) { + cleaned.parameters = cleaned.parameters.filter((parameter: unknown) => { + if (parameter === null || typeof parameter !== "object") return true; + const rec = parameter as Record; + return !( + rec.in === "header" && + typeof rec.name === "string" && + rec.name.toLowerCase() === "authorization" + ); + }); + if (cleaned.parameters.length === 0) delete cleaned.parameters; + } + return cleaned; +} + +function mergeComponentMap( + dest: Record, + src: Record | undefined, +) { + if (src === undefined) return; + for (const [name, value] of Object.entries(src)) { + if (dest[name] === undefined) { + dest[name] = value; + continue; + } + const previous = JSON.stringify(dest[name]); + const next = JSON.stringify(value); + if (previous === next) continue; + if (next.length > previous.length) dest[name] = value; + } +} + +function sortedRecord(input: Record): Record { + const out: Record = {}; + for (const key of Object.keys(input).sort()) out[key] = input[key]; + return out; +} + +async function mapConcurrent( + items: readonly T[], + limit: number, + worker: (item: T) => Promise, +): Promise { + const results = Array.from({ length: items.length }); + let next = 0; + const runners = Array.from( + { length: Math.min(limit, items.length) }, + async () => { + while (true) { + const index = next++; + if (index >= items.length) return; + results[index] = await worker(items[index]!); + } + }, + ); + await Promise.all(runners); + return results; +} + +async function prune(keep: ReadonlySet) { + if (!existsSync(REFERENCE_DIR)) return; + const stale: string[] = []; + const walk = async (dir: string): Promise => { + for (const entry of await readdir(dir, { withFileTypes: true })) { + const full = join(dir, entry.name); + if (entry.isDirectory()) { + await walk(full); + } else if (entry.name.endsWith(".md") && !keep.has(full)) { + stale.push(full); + } + } + }; + await walk(REFERENCE_DIR); + for (const file of stale) await rm(file); + if (stale.length > 0) { + console.log(` Pruned ${stale.length} page(s) no longer listed upstream`); + } +} + +function census(spec: Record) { + const tags = new Set(); + let operations = 0; + for (const item of Object.values(spec.paths ?? {})) { + for (const method of HTTP_METHODS) { + const op = item?.[method]; + if (!op) continue; + operations++; + tags.add(op.tags?.[0] ?? "(untagged)"); + } + } + return { + paths: Object.keys(spec.paths ?? {}).length, + operations, + tags: tags.size, + }; +} + +if (!existsSync(SPECS_DIR)) { + mkdirSync(SPECS_DIR, { recursive: true }); +} + +async function main() { + console.log(`Fetching ${LLMS_URL}...`); + const llmsTxt = await fetchText(LLMS_URL); + await writeFile( + `${SPECS_DIR}/llms.txt`, + llmsTxt.endsWith("\n") ? llmsTxt : `${llmsTxt}\n`, + ); + + const slugs = extractReferenceSlugs(llmsTxt); + if (slugs.length === 0) { + throw new Error( + `${LLMS_URL} listed no /reference/ pages — refusing to continue`, + ); + } + console.log(` ${slugs.length} API reference page(s)`); + + await mkdir(REFERENCE_DIR, { recursive: true }); + + const pages = slugs.map((slug) => { + const pageUrl = `${ORIGIN}/reference/${slug}`; + const localPath = join(REFERENCE_DIR, `${slug}.md`); + return { + slug, + pageUrl, + markdownUrl: `${pageUrl}.md`, + localPath, + }; + }); + + console.log( + `\nDownloading ${pages.length} markdown pages (concurrency ${CONCURRENCY})...`, + ); + + const downloaded = await mapConcurrent(pages, CONCURRENCY, async (page) => { + let markdown: string; + try { + markdown = await fetchText(page.markdownUrl); + } catch (cause) { + console.warn( + ` Failed to download ${page.markdownUrl} (${cause}) — skipping`, + ); + return undefined; + } + await mkdir(dirname(page.localPath), { recursive: true }); + await writeFile(page.localPath, markdown); + return { ...page, markdown }; + }); + + const kept = downloaded + .filter( + (page): page is NonNullable<(typeof downloaded)[number]> => + page !== undefined, + ) + .sort((a, b) => a.slug.localeCompare(b.slug)); + const failed = pages.length - kept.length; + console.log( + ` ${kept.length} downloaded` + (failed > 0 ? `, ${failed} failed` : ""), + ); + + if (failed / pages.length > MAX_FAILURE_RATE_FOR_PRUNE) { + console.warn( + ` ${failed}/${pages.length} pages failed — skipping the prune this run`, + ); + } else { + await prune(new Set(kept.map((page) => page.localPath))); + } + + await writeFile( + join(DOCS_DIR, "_manifest.json"), + JSON.stringify( + { + source: LLMS_URL, + count: kept.length, + pages: kept.map((page) => ({ + page: page.pageUrl, + markdown: page.markdownUrl, + file: relative(DOCS_DIR, page.localPath), + })), + }, + null, + 2, + ) + "\n", + ); + + const paths: Record = {}; + const claimed = new Map< + string, + { slug: string; title: string; rank: number } + >(); + const schemas: Record = {}; + const parameters: Record = {}; + const requestBodies: Record = {}; + const responses: Record = {}; + const headers: Record = {}; + const securitySchemes: Record = {}; + let snippets = 0; + let skipped = 0; + const collisions: string[] = []; + const tags = new Map(); + + for (const page of kept) { + const snippet = extractOpenApi(page.markdown); + if (!snippet) { + skipped++; + continue; + } + snippets++; + const title = + typeof snippet.info?.title === "string" ? snippet.info.title : "unknown"; + const rank = slugRank(page.slug); + const components = snippet.components ?? {}; + + mergeComponentMap(schemas, components.schemas); + mergeComponentMap(parameters, components.parameters); + mergeComponentMap(requestBodies, components.requestBodies); + mergeComponentMap(responses, components.responses); + mergeComponentMap(headers, components.headers); + mergeComponentMap(securitySchemes, components.securitySchemes); + + // Webhook-event pages inline the whole tag's OpenAPI; only REST + // operation slugs contribute paths. Components still merge above. + if (!isOperationSlug(page.slug)) continue; + + for (const [pathTemplate, item] of Object.entries( + snippet.paths ?? {}, + )) { + if (item === null || typeof item !== "object") continue; + if (!paths[pathTemplate]) paths[pathTemplate] = {}; + for (const method of HTTP_METHODS) { + const op = item[method]; + if (!op) continue; + const key = `${method.toUpperCase()} ${pathTemplate}`; + const existing = claimed.get(key); + if (existing) { + if (rank > existing.rank) { + collisions.push( + `${key}: ${page.slug} (${title}) replaces ${existing.slug} (${existing.title})`, + ); + } else { + continue; + } + } + const cleaned = cleanOperation(op); + paths[pathTemplate][method] = cleaned; + claimed.set(key, { slug: page.slug, title, rank }); + if (Array.isArray(cleaned.tags)) { + for (const tag of cleaned.tags) { + if (typeof tag === "string" && !tags.has(tag)) { + tags.set(tag, { name: tag }); + } + } + } + } + } + } + + const sortedPaths: Record = {}; + for (const pathTemplate of Object.keys(paths).sort()) { + const item = paths[pathTemplate]; + const sortedItem: Record = {}; + for (const method of HTTP_METHODS) { + if (item[method]) sortedItem[method] = item[method]; + } + if (Object.keys(sortedItem).length > 0) + sortedPaths[pathTemplate] = sortedItem; + } + + const components: Record = {}; + if (Object.keys(schemas).length > 0) + components.schemas = sortedRecord(schemas); + if (Object.keys(parameters).length > 0) { + components.parameters = sortedRecord(parameters); + } + if (Object.keys(requestBodies).length > 0) { + components.requestBodies = sortedRecord(requestBodies); + } + if (Object.keys(responses).length > 0) { + components.responses = sortedRecord(responses); + } + if (Object.keys(headers).length > 0) + components.headers = sortedRecord(headers); + if (Object.keys(securitySchemes).length > 0) { + components.securitySchemes = sortedRecord(securitySchemes); + } + + const spec = { + openapi: "3.1.0", + info: { + title: "Remote API", + version: "2.0.0", + description: + "Assembled from per-operation OpenAPI snippets in https://developer.remote.com/llms.txt. Remote does not publish a first-party OpenAPI document.", + }, + servers: [ + { url: "https://gateway.remote.com" }, + { url: "https://gateway.remote-sandbox.com" }, + ], + security: [{ CustomerAPIToken: [] }, { OAuth2: [] }], + tags: [...tags.values()].sort((a, b) => a.name.localeCompare(b.name)), + paths: sortedPaths, + components, + }; + + if (typeof spec.openapi !== "string" || spec.paths === undefined) { + throw new Error("assembled document is missing `openapi`/`paths`"); + } + + const c = census(spec); + if (c.operations === 0) { + throw new Error( + "assembled OpenAPI has no operations — refusing to write a gutted spec", + ); + } + + await writeFile(OUTPUT_PATH, JSON.stringify(spec, null, 2) + "\n"); + + console.log( + `\n ${OUTPUT_PATH} — OpenAPI ${spec.openapi}, ${c.paths} paths, ${c.operations} operations ` + + `(${snippets} snippets, ${skipped} pages without OpenAPI, ${collisions.length} overlapping route(s)/schemas)`, + ); + for (const line of collisions) console.log(` ${line}`); + console.log("Done!"); +} + +main().catch((err) => { + console.error("Fatal error:", err); + process.exit(1); +}); diff --git a/stacks/distilled-submodules/spec-repos/remote/package.json b/stacks/distilled-submodules/spec-repos/remote/package.json new file mode 100644 index 000000000..fe338dcd2 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/remote/package.json @@ -0,0 +1,27 @@ +{ + "name": "remote-spec", + "private": true, + "type": "module", + "scripts": { + "fetch-specs": "bun run fetch-specs.ts", + "tsc": "tsc --noEmit", + "lint": "oxlint .", + "fmt": "oxfmt --write .", + "fmt:check": "oxfmt --check .", + "check": "bun run tsc && bun run lint && bun run fmt:check" + }, + "workspaces": { + "catalog": { + "@typescript/native-preview": "latest", + "oxfmt": "0.21.0", + "oxlint": "1.36.0" + } + }, + "dependencies": { + "@typescript/native-preview": "catalog:" + }, + "devDependencies": { + "oxfmt": "catalog:", + "oxlint": "catalog:" + } +} diff --git a/stacks/distilled-submodules/spec-repos/remote/readme.md b/stacks/distilled-submodules/spec-repos/remote/readme.md new file mode 100644 index 000000000..19d4f2e55 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/remote/readme.md @@ -0,0 +1,31 @@ +# spec-mirror-remote + +A git mirror of Remote's REST API, assembled from the per-operation OpenAPI +snippets published on [developer.remote.com](https://developer.remote.com/llms.txt). +Remote does not ship a first-party OpenAPI file (`/openapi.json` is a ReadMe +landing page); each reference page inlines a path-level OpenAPI 3.1 snippet. +The fetch script snapshots those vendor pages and merges them into +`specs/openapi.json`. + +The mirror is updated every 24 hours and is designed to be used as a stable git submodule. + +## Usage as a submodule + +```sh +git submodule add https://github.com/distilled-mirror/spec-mirror-remote.git +``` + +## Updating specs + +From `.meta/`: + +```sh +bun install +bun run fetch-specs +``` + +--- + +This repository is managed by the `distilled-submodules` Alchemy stack in +[alchemy-run/distilled](https://github.com/alchemy-run/distilled) (`stacks/distilled-submodules`). +Its scaffolding is generated — edit it there, not here. diff --git a/tsconfig.json b/tsconfig.json index 7289e61be..0b1eba631 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,60 +1,176 @@ { "files": [], "references": [ - { "path": "./packages/core/tsconfig.json" }, - { "path": "./packages/cloudflare/tsconfig.json" }, - { "path": "./packages/cloudflare/tsconfig.scripts.json" }, - { "path": "./packages/aws/tsconfig.json" }, - { "path": "./packages/aws/tsconfig.scripts.json" }, - { "path": "./packages/axiom/tsconfig.json" }, - { "path": "./packages/axiom/tsconfig.scripts.json" }, - { "path": "./packages/azure/tsconfig.json" }, - { "path": "./packages/azure/tsconfig.scripts.json" }, - { "path": "./packages/coinbase/tsconfig.json" }, - { "path": "./packages/coinbase/tsconfig.scripts.json" }, - { "path": "./packages/discord/tsconfig.json" }, - { "path": "./packages/discord/tsconfig.scripts.json" }, - { "path": "./packages/expo-eas/tsconfig.json" }, - { "path": "./packages/expo-eas/tsconfig.scripts.json" }, - { "path": "./packages/fly-io/tsconfig.json" }, - { "path": "./packages/fly-io/tsconfig.scripts.json" }, - { "path": "./packages/gcp/tsconfig.json" }, - { "path": "./packages/gcp/tsconfig.scripts.json" }, - { "path": "./packages/github/tsconfig.json" }, - { "path": "./packages/github/tsconfig.scripts.json" }, - { "path": "./packages/hetzner/tsconfig.json" }, - { "path": "./packages/hetzner/tsconfig.scripts.json" }, - { "path": "./packages/huggingface/tsconfig.json" }, - { "path": "./packages/huggingface/tsconfig.scripts.json" }, - { "path": "./packages/kubernetes/tsconfig.json" }, - { "path": "./packages/kubernetes/tsconfig.scripts.json" }, - { "path": "./packages/mongodb-atlas/tsconfig.json" }, - { "path": "./packages/mongodb-atlas/tsconfig.scripts.json" }, - { "path": "./packages/modal/tsconfig.json" }, - { "path": "./packages/modal/tsconfig.scripts.json" }, - { "path": "./packages/neon/tsconfig.json" }, - { "path": "./packages/neon/tsconfig.scripts.json" }, - { "path": "./packages/planetscale/tsconfig.json" }, - { "path": "./packages/planetscale/tsconfig.scripts.json" }, - { "path": "./packages/posthog/tsconfig.json" }, - { "path": "./packages/posthog/tsconfig.scripts.json" }, - { "path": "./packages/prisma-postgres/tsconfig.json" }, - { "path": "./packages/prisma-postgres/tsconfig.scripts.json" }, - { "path": "./packages/railway/tsconfig.json" }, - { "path": "./packages/railway/tsconfig.scripts.json" }, - { "path": "./packages/stripe/tsconfig.json" }, - { "path": "./packages/stripe/tsconfig.scripts.json" }, - { "path": "./packages/supabase/tsconfig.json" }, - { "path": "./packages/supabase/tsconfig.scripts.json" }, - { "path": "./packages/turso/tsconfig.json" }, - { "path": "./packages/turso/tsconfig.scripts.json" }, - { "path": "./packages/typesense/tsconfig.json" }, - { "path": "./packages/typesense/tsconfig.scripts.json" }, - { "path": "./packages/vercel/tsconfig.json" }, - { "path": "./packages/vercel/tsconfig.scripts.json" }, - { "path": "./packages/whop/tsconfig.json" }, - { "path": "./packages/whop/tsconfig.scripts.json" }, - { "path": "./packages/workos/tsconfig.json" }, - { "path": "./packages/workos/tsconfig.scripts.json" } + { + "path": "./packages/core/tsconfig.json" + }, + { + "path": "./packages/cloudflare/tsconfig.json" + }, + { + "path": "./packages/cloudflare/tsconfig.scripts.json" + }, + { + "path": "./packages/aws/tsconfig.json" + }, + { + "path": "./packages/aws/tsconfig.scripts.json" + }, + { + "path": "./packages/axiom/tsconfig.json" + }, + { + "path": "./packages/axiom/tsconfig.scripts.json" + }, + { + "path": "./packages/azure/tsconfig.json" + }, + { + "path": "./packages/azure/tsconfig.scripts.json" + }, + { + "path": "./packages/coinbase/tsconfig.json" + }, + { + "path": "./packages/coinbase/tsconfig.scripts.json" + }, + { + "path": "./packages/discord/tsconfig.json" + }, + { + "path": "./packages/discord/tsconfig.scripts.json" + }, + { + "path": "./packages/expo-eas/tsconfig.json" + }, + { + "path": "./packages/expo-eas/tsconfig.scripts.json" + }, + { + "path": "./packages/fly-io/tsconfig.json" + }, + { + "path": "./packages/fly-io/tsconfig.scripts.json" + }, + { + "path": "./packages/gcp/tsconfig.json" + }, + { + "path": "./packages/gcp/tsconfig.scripts.json" + }, + { + "path": "./packages/github/tsconfig.json" + }, + { + "path": "./packages/github/tsconfig.scripts.json" + }, + { + "path": "./packages/hetzner/tsconfig.json" + }, + { + "path": "./packages/hetzner/tsconfig.scripts.json" + }, + { + "path": "./packages/huggingface/tsconfig.json" + }, + { + "path": "./packages/huggingface/tsconfig.scripts.json" + }, + { + "path": "./packages/kubernetes/tsconfig.json" + }, + { + "path": "./packages/kubernetes/tsconfig.scripts.json" + }, + { + "path": "./packages/modal/tsconfig.json" + }, + { + "path": "./packages/modal/tsconfig.scripts.json" + }, + { + "path": "./packages/mongodb-atlas/tsconfig.json" + }, + { + "path": "./packages/mongodb-atlas/tsconfig.scripts.json" + }, + { + "path": "./packages/neon/tsconfig.json" + }, + { + "path": "./packages/neon/tsconfig.scripts.json" + }, + { + "path": "./packages/planetscale/tsconfig.json" + }, + { + "path": "./packages/planetscale/tsconfig.scripts.json" + }, + { + "path": "./packages/posthog/tsconfig.json" + }, + { + "path": "./packages/posthog/tsconfig.scripts.json" + }, + { + "path": "./packages/prisma-postgres/tsconfig.json" + }, + { + "path": "./packages/prisma-postgres/tsconfig.scripts.json" + }, + { + "path": "./packages/railway/tsconfig.json" + }, + { + "path": "./packages/railway/tsconfig.scripts.json" + }, + { + "path": "./packages/remote/tsconfig.json" + }, + { + "path": "./packages/remote/tsconfig.scripts.json" + }, + { + "path": "./packages/stripe/tsconfig.json" + }, + { + "path": "./packages/stripe/tsconfig.scripts.json" + }, + { + "path": "./packages/supabase/tsconfig.json" + }, + { + "path": "./packages/supabase/tsconfig.scripts.json" + }, + { + "path": "./packages/turso/tsconfig.json" + }, + { + "path": "./packages/turso/tsconfig.scripts.json" + }, + { + "path": "./packages/typesense/tsconfig.json" + }, + { + "path": "./packages/typesense/tsconfig.scripts.json" + }, + { + "path": "./packages/vercel/tsconfig.json" + }, + { + "path": "./packages/vercel/tsconfig.scripts.json" + }, + { + "path": "./packages/whop/tsconfig.json" + }, + { + "path": "./packages/whop/tsconfig.scripts.json" + }, + { + "path": "./packages/workos/tsconfig.json" + }, + { + "path": "./packages/workos/tsconfig.scripts.json" + } ] }