@remoteoss/remote-flows 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +199 -28
  2. package/dist/chunk-32G7XF2D.js +2 -0
  3. package/dist/chunk-32G7XF2D.js.map +1 -0
  4. package/dist/{chunk-7ZBXCVHC.js → chunk-56PULCHS.js} +2 -2
  5. package/dist/{chunk-XSTVWDTD.js → chunk-BY2NZ5QF.js} +2 -2
  6. package/dist/{chunk-BRK6MUQS.js → chunk-DHJSRW7Y.js} +2 -2
  7. package/dist/{chunk-ZII4VJ3N.js → chunk-HGBJ3RNH.js} +2 -2
  8. package/dist/chunk-HHNKZK2V.js +2 -0
  9. package/dist/chunk-HHNKZK2V.js.map +1 -0
  10. package/dist/chunk-K44YP7ZG.js +20 -0
  11. package/dist/chunk-K44YP7ZG.js.map +1 -0
  12. package/dist/flows/CostCalculator/CostCalculator.d.ts +7 -2
  13. package/dist/flows/CostCalculator/CostCalculator.js +1 -1
  14. package/dist/flows/CostCalculator/Disclaimer/Disclaimer.js +1 -1
  15. package/dist/flows/CostCalculator/Disclaimer/index.js +1 -1
  16. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  17. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  18. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  19. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  20. package/dist/flows/CostCalculator/fields.d.ts +1 -1
  21. package/dist/flows/CostCalculator/hooks.d.ts +17 -11
  22. package/dist/flows/CostCalculator/hooks.js +1 -1
  23. package/dist/flows/CostCalculator/index.d.ts +2 -2
  24. package/dist/flows/CostCalculator/index.js +1 -1
  25. package/dist/flows/CostCalculator/types.d.ts +7 -2
  26. package/dist/flows/CostCalculator/utils.d.ts +1 -1
  27. package/dist/flows/CostCalculator/utils.js +1 -1
  28. package/dist/flows/types.d.ts +1 -1
  29. package/dist/index.css +1 -1
  30. package/dist/index.css.map +1 -1
  31. package/dist/index.d.ts +3 -3
  32. package/dist/index.js +1 -1
  33. package/dist/{types.gen-_BwuB2Vq.d.ts → types.gen-dIMXHE0Y.d.ts} +393 -17
  34. package/package.json +5 -1
  35. package/dist/chunk-7EZH5DCX.js +0 -20
  36. package/dist/chunk-7EZH5DCX.js.map +0 -1
  37. package/dist/chunk-J2GLSJLO.js +0 -2
  38. package/dist/chunk-J2GLSJLO.js.map +0 -1
  39. package/dist/chunk-V7QTPQZS.js +0 -2
  40. package/dist/chunk-V7QTPQZS.js.map +0 -1
  41. /package/dist/{chunk-7ZBXCVHC.js.map → chunk-56PULCHS.js.map} +0 -0
  42. /package/dist/{chunk-XSTVWDTD.js.map → chunk-BY2NZ5QF.js.map} +0 -0
  43. /package/dist/{chunk-BRK6MUQS.js.map → chunk-DHJSRW7Y.js.map} +0 -0
  44. /package/dist/{chunk-ZII4VJ3N.js.map → chunk-HGBJ3RNH.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "scripts": {
5
5
  "build": "NODE_ENV=production tsup",
6
6
  "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run test",
@@ -52,8 +52,10 @@
52
52
  "dependencies": {
53
53
  "@hey-api/client-fetch": "^0.8.1",
54
54
  "@hookform/resolvers": "^4.1.3",
55
+ "@radix-ui/react-checkbox": "^1.1.4",
55
56
  "@radix-ui/react-dialog": "^1.1.6",
56
57
  "@radix-ui/react-label": "^2.1.2",
58
+ "@radix-ui/react-popover": "^1.1.6",
57
59
  "@radix-ui/react-radio-group": "^1.2.3",
58
60
  "@radix-ui/react-scroll-area": "^1.2.3",
59
61
  "@radix-ui/react-select": "^2.1.6",
@@ -67,8 +69,10 @@
67
69
  "@tanstack/react-query": "^5.67.2",
68
70
  "class-variance-authority": "^0.7.1",
69
71
  "clsx": "^2.1.1",
72
+ "date-fns": "^3.6.0",
70
73
  "lucide-react": "0.477.0",
71
74
  "postcss": "^8.5.3",
75
+ "react-day-picker": "^8.10.1",
72
76
  "react-hook-form": "^7.54.2",
73
77
  "recharts": "^2.15.1",
74
78
  "tailwind-merge": "^3.0.2",
@@ -1,20 +0,0 @@
1
- import{c as f}from"./chunk-ATKR5HCM.js";import{a as d}from"./chunk-2AGPO366.js";import{a as t}from"./chunk-AYDF3IFZ.js";import{object as ue}from"yup";import{formDataBodySerializer as we}from"@hey-api/client-fetch";import{createClient as z,createConfig as H}from"@hey-api/client-fetch";var p=z(H({baseUrl:"https://gateway.remote.com/"}));var P=t(e=>(e.client??p).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimation");var R=t(e=>(e?.client??p).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-pdf",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationPdf");var g=t(e=>(e.client??p).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/countries",...e}),"getIndexCountry");var D=t(e=>(e.client??p).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var G=t(e=>(e?.client??p).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");import{createClient as te}from"@hey-api/client-fetch";import{QueryClient as re,QueryClientProvider as oe,useQuery as ne}from"@tanstack/react-query";import E,{createContext as ae,useContext as se,useRef as U}from"react";var v={staging:"https://gateway.niceremote.com",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com"};function y(e){let r=document.documentElement;Object.keys(e).forEach(o=>{let s=e[o];s&&r.style.setProperty(o,s)})}t(y,"setCssProperties");function K(e){let r={};return Object.keys(e).forEach(o=>{r[`--${o}`]=e[o]}),r}t(K,"mapThemeColors");function J(e){return{"--spacing":e}}t(J,"mapThemeSpacing");function Q(e){return{"--radius":e}}t(Q,"mapThemeBorderRadius");function N(e){return{"--fontSizeBase":e.fontSizeBase}}t(N,"mapThemeFont");function I(e){e?.colors&&y(K(e.colors)),e?.spacing&&y(J(e.spacing)),e?.borderRadius&&y(Q(e.borderRadius)),e?.font&&y(N(e.font))}t(I,"applyTheme");import Y,{createContext as Z,useEffect as $,useMemo as X}from"react";var ee=Z({theme:{}});function S(e){$(()=>{e.theme&&Object.keys(e.theme).length>0&&I(e.theme)},[e.theme]);let r=X(()=>({theme:e.theme}),[e.theme]);return Y.createElement(ee.Provider,{value:r},e.children)}t(S,"ThemeProvider");var ie=new re,k=ae({client:null}),c=t(()=>se(k),"useClient");function pe({children:e,auth:r,isTestingMode:o}){let s=U(null),{refetch:m}=ne({queryKey:["auth"],queryFn:r,enabled:!1}),w=o?v.partners:"https://gateway.remote.com",h=U(te({...p.getConfig(),baseUrl:w,auth:t(async()=>{function u(i){return!i||Date.now()+6e4>i}if(t(u,"hasTokenExpired"),!s.current||u(s.current.expiresAt)){let{data:i}=await m();i&&(s.current={accessToken:i.accessToken,expiresAt:Date.now()+i.expiresIn*1e3})}return s.current?.accessToken},"auth")}));return E.createElement(k.Provider,{value:{client:h.current}},e)}t(pe,"RemoteFlowContextWrapper");function Ve({auth:e,children:r,isTestingMode:o=!1,theme:s}){return E.createElement(oe,{client:ie},E.createElement(pe,{isTestingMode:o,auth:e},E.createElement(S,{theme:s},r)))}t(Ve,"RemoteFlows");import{createHeadlessForm as le}from"@remoteoss/json-schema-form";import{useMutation as _,useQuery as C}from"@tanstack/react-query";import{useState as B}from"react";import{string as A}from"yup";var ce=t(()=>{let{client:e}=c();return C({queryKey:["cost-calculator-countries"],queryFn:t(()=>g({client:e,headers:{Authorization:""}}),"queryFn"),select:t(r=>r.data?.data.map(o=>({value:o.region_slug,label:o.name,childRegions:o.child_regions,hasAdditionalFields:o.has_additional_fields,regionSlug:o.region_slug})),"select")})},"useCostCalculatorCountries"),he=t(()=>{let{client:e}=c();return C({queryKey:["company-currencies"],queryFn:t(()=>G({client:e,headers:{Authorization:""}}),"queryFn"),select:t(r=>r.data?.data?.company_currencies.map(o=>({value:o.slug,label:o.code})),"select")})},"useCompanyCurrencies"),de=t(()=>{let{client:e}=c();return _({mutationFn:t(r=>P({client:e,headers:{Authorization:""},body:r}),"mutationFn")})},"useCostCalculatorEstimation"),tt=t(()=>{let{client:e}=c();return _({mutationFn:t(r=>R({client:e,headers:{Authorization:""},body:r}),"mutationFn")})},"useCostCalculatorEstimationPdf"),me=t(e=>{let{client:r}=c();return C({queryKey:["cost-calculator-region-fields",e],queryFn:t(()=>D({client:r,headers:{Authorization:""},path:{slug:e}}),"queryFn"),enabled:!!e,select:t(({data:o})=>le(o?.data?.schema||{},{strictInputType:!1}),"select")})},"useRegionFields"),T={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1},rt=t(({defaultRegion:e,estimationOptions:r}={estimationOptions:T})=>{let[o,s]=B(e),[m,w]=B(),{data:h}=ce(),{data:u}=he(),i=o||m?.value,{data:O}=me(i),V=de();async function W(n){try{await b.validate(n,{abortEarly:!1})}catch(a){return{data:null,error:a}}try{let a=await V.mutateAsync(F(n,r));return a.data?{data:a.data,error:null}:{data:null,error:a.error}}catch(a){return{data:null,error:a}}}t(W,"onSubmit");function j(n){let a=h?.find(({value:M})=>M===n);a&&a.childRegions.length===0&&a.hasAdditionalFields?s(a.regionSlug):s(void 0),w(a)}t(j,"onCountryChange");function L(n){s(n)}t(L,"onRegionChange");let l=d.find(n=>n.name==="region");if(l){let n=m?.childRegions.map(a=>({value:a.slug,label:a.name}))??[];l.options=n,l.isVisible=n.length>0,l.required=n.length>0,l.onChange=L,l.schema=n.length>0?A().required("Currency is required"):A()}if(u){let n=d.find(a=>a.name==="currency");n&&(n.options=u)}if(h){let n=d.find(a=>a.name==="country");n&&(n.options=h,n.onChange=j)}let x=[...d,...O?.fields||[]],b=q(x);return{stepState:{current:0,total:1,isLastStep:!0},fields:x,validationSchema:b,handleValidation:O?.handleValidation,onSubmit:W}},"useCostCalculator"),ot=t(()=>{let e={data:{id:4668194326797,title:"Disclaimer information on Cost of Employment calculations",body:`<h3 id="h_01HHJFVR5Q4F8A52F06EVG289R">Remote disclaimer</h3>
2
- <p>The estimate provides a transparent detailed breakdown for in-country statutory social contributions, statutory benefits, and other benefits that may be required. Estimates do not take into account additional costs that may be incurred for relocation, visa, right-to-work requirements, or other activities.\xA0</p>
3
- <p><strong>See also:</strong> <a href="https://support.remote.com/hc/en-us/articles/22329255813133">What other type of costs does the Cost Calculator not include?</a></p>
4
- <h3 id="h_01HHJFVYRAAGDKJ36EZS8W6P5N">EOR services</h3>
5
- <p>Our EOR services allow you to retain ownership of your employees' IP and inventions. Compliance, taxes, and payroll are handled by our local teams for a seamless end-to-end experience.</p>
6
- <h3 id="h_01HHJFW4FQPGPK14FSM4XCY5MR">Pricing and payroll</h3>
7
- <p>When it comes to payroll, legal and operational complexities are reduced to a single invoice for all of your Remote employees across every country you hire in \u2013 no hidden costs and no long-term commitments needed. Just a simple pricing structure that includes a fixed hiring fee for each EOR employee.</p>
8
- <h3 id="01JMCR2YZ0GVTCXNPY88TADWQ1">Currency conversions</h3>
9
- <p>When the employee currency differs from the billing currency, we use market rates to convert. The rate figures on this quote are a rough estimate. When the employee currency differs from the billing currency, we use market rates to convert. The rate figures on this quote are a rough estimated.</p>
10
- <h3 id="h_01HHJFWD1TFB5DQ6B4WD5F1GY6">Employee off-boarding related costs</h3>
11
- <p>The estimate here does not include any costs related to off-boarding of employees. Whilst we do not charge any processing fees when you want to off-board an employee, any other costs such as severance pay, covering remaining vacation days and etc will be charged back to you.<br><strong>See also:\xA0</strong><a href="https://support.remote.com/hc/en-us/articles/22329371247885">Are the costs of employee off-boarding included in the Cost Calculator?</a></p>
12
- <p>Please note the \u2018employee net income estimate\u2019 section (if available for the country) is intended for informational purposes only and should not be used as a substitute for professional financial advice.</p>
13
- <p>Additionally, tax laws and rates can vary by location and are subject to change, which may not be immediately reflected in the calculator.</p>
14
- <p>For a detailed and accurate assessment of your take-home pay, please consult with a qualified tax professional or financial advisor.</p>
15
- <p><strong>See also</strong>: <a href="https://support.remote.com/hc/en-us/articles/25196498469773">How to use the \u2018employee net income estimate\u2019 section in the Cost Calculator?</a></p>
16
- <p><!-- notionvc: 04d0e276-e0d7-4793-93ee-d4ad14600217 --></p>
17
- <h3 id="h_01HHJFWTHJ58YAZ87M3E090H4J">Note</h3>
18
- <p>This estimate is for guidance only and may not constitute accurate financial advice. Information contained in this document is subject to changes in laws in different jurisdictions, which can change without notice. This document is the property of Remote, is confidential, cannot be reproduced without permission, and cannot be disclosed to any third parties.</p>
19
- <p><!-- notionvc: 09e777b4-c10c-438e-bb95-ce1f3fb86c9a --></p>`,html_url:"https://support.remote.com/hc/en-us/articles/4668194326797-Disclaimer-information-on-Cost-of-Employment-calculations"}};return C({queryKey:["cost-calculator-disclaimer"],queryFn:t(()=>Promise.resolve(e),"queryFn")})},"useCostCalculatorDisclaimer");function q(e){let r=e.reduce((o,s)=>(o[s.name]=s.schema,o),{});return ue(r)}t(q,"buildValidationSchema");function F(e,r=T){return{employer_currency_slug:e.currency,include_benefits:r.includeBenefits,include_cost_breakdowns:r.includeCostBreakdowns,employments:[{region_slug:e.region||e.country,annual_gross_salary:f(e.salary),annual_gross_salary_in_employer_currency:f(e.salary),employment_term:e.contract_duration_type??"fixed",title:r.title,regional_to_employer_exchange_rate:"1",age:e.age??void 0}]}}t(F,"buildPayload");export{Ve as a,q as b,F as c,tt as d,T as e,rt as f,ot as g};
20
- //# sourceMappingURL=chunk-7EZH5DCX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/utils.ts","../src/client/sdk.gen.ts","../src/client/client.gen.ts","../src/RemoteFlowsProvider.tsx","../src/environments.ts","../src/lib/applyTheme.ts","../src/theme.tsx","../src/flows/CostCalculator/hooks.ts"],"sourcesContent":["import { AnyObjectSchema, object } from 'yup';\n\nimport type { CostCalculatorEstimateParams } from '@/src/client';\nimport { convertToCents } from '@/src/lib/utils';\nimport { defaultEstimationOptions } from './hooks';\nimport type {\n CostCalculatorEstimationFormValues,\n CostCalculatorEstimationOptions,\n Field,\n} from './types';\n\n/**\n * Build the validation schema for the form.\n * @returns\n */\nexport function buildValidationSchema(fields: Field[]) {\n const fieldsSchema = fields.reduce<Record<string, AnyObjectSchema>>(\n (fieldsSchemaAcc, field) => {\n fieldsSchemaAcc[field.name] = field.schema as AnyObjectSchema;\n return fieldsSchemaAcc;\n },\n {},\n );\n return object(fieldsSchema) as AnyObjectSchema;\n}\n\n/**\n * Build the payload for the cost calculator estimation.\n * @param values\n * @param estimationOptions\n * @returns\n */\nexport function buildPayload(\n values: CostCalculatorEstimationFormValues,\n estimationOptions: CostCalculatorEstimationOptions = defaultEstimationOptions,\n): CostCalculatorEstimateParams {\n return {\n employer_currency_slug: values.currency,\n include_benefits: estimationOptions.includeBenefits,\n include_cost_breakdowns: estimationOptions.includeCostBreakdowns,\n employments: [\n {\n region_slug: values.region || values.country,\n annual_gross_salary: convertToCents(values.salary),\n annual_gross_salary_in_employer_currency: convertToCents(values.salary),\n employment_term: values.contract_duration_type ?? 'fixed',\n title: estimationOptions.title,\n regional_to_employer_exchange_rate: '1',\n age: values.age ?? undefined,\n },\n ],\n };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport {\n type Options as ClientOptions,\n type TDataShape,\n type Client,\n formDataBodySerializer,\n} from '@hey-api/client-fetch';\nimport type {\n GetIndexOffboardingData,\n GetIndexOffboardingResponse,\n GetIndexOffboardingError,\n PostCreateOffboardingData,\n PostCreateOffboardingResponse,\n PostCreateOffboardingError,\n GetShowTimesheetData,\n GetShowTimesheetResponse,\n GetShowTimesheetError,\n PostUpdateCancelOnboardingData,\n PostUpdateCancelOnboardingResponse,\n PostUpdateCancelOnboardingError,\n GetShowContractAmendmentSchemaData,\n GetShowContractAmendmentSchemaResponse,\n GetShowContractAmendmentSchemaError,\n GetIndexDataSyncData,\n GetIndexDataSyncResponse,\n GetIndexDataSyncError,\n PostCreateDataSyncData,\n PostCreateDataSyncError,\n GetShowProbationCompletionLetterData,\n GetShowProbationCompletionLetterResponse,\n GetShowProbationCompletionLetterError,\n GetShowContractorInvoiceData,\n GetShowContractorInvoiceResponse,\n GetShowContractorInvoiceError,\n GetIndexEmploymentData,\n GetIndexEmploymentResponse,\n GetIndexEmploymentError,\n PostCreateEmployment2Data,\n PostCreateEmployment2Response,\n PostCreateEmployment2Error,\n GetIndexContractorInvoiceData,\n GetIndexContractorInvoiceResponse,\n GetIndexContractorInvoiceError,\n GetDetailsSsoConfigurationData,\n GetDetailsSsoConfigurationResponse,\n GetDetailsSsoConfigurationError,\n PostCreateEstimationData,\n PostCreateEstimationResponse,\n PostCreateEstimationError,\n GetShowCompanySchemaData,\n GetShowCompanySchemaResponse,\n GetShowCompanySchemaError,\n GetIndexBenefitOfferData,\n GetIndexBenefitOfferResponse,\n GetIndexBenefitOfferError,\n PutUpdateBenefitOfferData,\n PutUpdateBenefitOfferResponse,\n PutUpdateBenefitOfferError,\n GetGetIdentityVerificationDataIdentityVerificationData,\n GetGetIdentityVerificationDataIdentityVerificationResponse,\n GetGetIdentityVerificationDataIdentityVerificationError,\n PostBypassEligibilityChecksCompanyData,\n PostBypassEligibilityChecksCompanyResponse,\n PostBypassEligibilityChecksCompanyError,\n GetIndexHolidayData,\n GetIndexHolidayResponse,\n GetIndexHolidayError,\n PostCreateCancellationData,\n PostCreateCancellationResponse,\n PostCreateCancellationError,\n GetIndexRecurringIncentiveData,\n GetIndexRecurringIncentiveResponse,\n GetIndexRecurringIncentiveError,\n PostCreateRecurringIncentiveData,\n PostCreateRecurringIncentiveResponse,\n PostCreateRecurringIncentiveError,\n PostCreateBenefitRenewalRequestData,\n PostCreateBenefitRenewalRequestResponse,\n PostCreateBenefitRenewalRequestError,\n GetIndexExpenseData,\n GetIndexExpenseResponse,\n GetIndexExpenseError,\n PostCreateExpenseData,\n PostCreateExpenseResponse,\n PostCreateExpenseError,\n GetShowSsoConfigurationData,\n GetShowSsoConfigurationResponse,\n GetShowSsoConfigurationError,\n PostCreateSsoConfigurationData,\n PostCreateSsoConfigurationResponse,\n PostCreateSsoConfigurationError,\n PutApproveContractAmendmentData,\n PutApproveContractAmendmentResponse,\n PutApproveContractAmendmentError,\n GetSchemaBenefitRenewalRequestData,\n GetSchemaBenefitRenewalRequestResponse,\n GetSchemaBenefitRenewalRequestError,\n DeleteDeleteRecurringIncentiveData,\n DeleteDeleteRecurringIncentiveResponse,\n DeleteDeleteRecurringIncentiveError,\n GetIndexIncentiveData,\n GetIndexIncentiveResponse,\n GetIndexIncentiveError,\n PostCreateIncentiveData,\n PostCreateIncentiveResponse,\n PostCreateIncentiveError,\n PostCreateProbationCompletionLetterData,\n PostCreateProbationCompletionLetterResponse,\n PostCreateProbationCompletionLetterError,\n GetShowScheduledContractorInvoiceData,\n GetShowScheduledContractorInvoiceResponse,\n GetShowScheduledContractorInvoiceError,\n PatchUpdateScheduledContractorInvoice2Data,\n PatchUpdateScheduledContractorInvoice2Response,\n PatchUpdateScheduledContractorInvoice2Error,\n PatchUpdateScheduledContractorInvoiceData,\n PatchUpdateScheduledContractorInvoiceResponse,\n PatchUpdateScheduledContractorInvoiceError,\n GetShowBillingDocumentData,\n GetShowBillingDocumentResponse,\n GetShowBillingDocumentError,\n PostCreateEstimationPdfData,\n PostCreateEstimationPdfResponse,\n PostCreateEstimationPdfError,\n GetShowWorkAuthorizationRequestData,\n GetShowWorkAuthorizationRequestResponse,\n GetShowWorkAuthorizationRequestError,\n PatchUpdateWorkAuthorizationRequest2Data,\n PatchUpdateWorkAuthorizationRequest2Response,\n PatchUpdateWorkAuthorizationRequest2Error,\n PatchUpdateWorkAuthorizationRequestData,\n PatchUpdateWorkAuthorizationRequestResponse,\n PatchUpdateWorkAuthorizationRequestError,\n PostCreateProbationExtensionData,\n PostCreateProbationExtensionResponse,\n PostCreateProbationExtensionError,\n GetShowCompanyData,\n GetShowCompanyResponse,\n GetShowCompanyError,\n PatchUpdateCompany2Data,\n PatchUpdateCompany2Response,\n PatchUpdateCompany2Error,\n PatchUpdateCompanyData,\n PatchUpdateCompanyResponse,\n PatchUpdateCompanyError,\n GetDownloadResignationLetterData,\n GetDownloadResignationLetterResponse,\n GetDownloadResignationLetterError,\n GetIndexContractAmendmentData,\n GetIndexContractAmendmentResponse,\n GetIndexContractAmendmentError,\n PostCreateContractAmendmentData,\n PostCreateContractAmendmentResponse,\n PostCreateContractAmendmentError,\n GetDownloadExpenseReceiptData,\n GetDownloadExpenseReceiptResponse,\n GetDownloadExpenseReceiptError,\n GetShowTravelLetterRequestData,\n GetShowTravelLetterRequestResponse,\n GetShowTravelLetterRequestError,\n PatchUpdateTravelLetterRequest2Data,\n PatchUpdateTravelLetterRequest2Response,\n PatchUpdateTravelLetterRequest2Error,\n PatchUpdateTravelLetterRequestData,\n PatchUpdateTravelLetterRequestResponse,\n PatchUpdateTravelLetterRequestError,\n GetShowTimeoffBalanceData,\n GetShowTimeoffBalanceResponse,\n GetShowTimeoffBalanceError,\n GetShowFormCountryData,\n GetShowFormCountryResponse,\n GetShowFormCountryError,\n GetShowFileData,\n GetShowFileResponse,\n GetShowFileError,\n GetShowContractAmendmentData,\n GetShowContractAmendmentResponse,\n GetShowContractAmendmentError,\n GetIndexCompanyManagerData,\n GetIndexCompanyManagerResponse,\n GetIndexCompanyManagerError,\n PostCreateCompanyManagerData,\n PostCreateCompanyManagerResponse,\n PostCreateCompanyManagerError,\n GetIndexCountryData,\n GetIndexCountryResponse,\n PostDeclineIdentityVerificationData,\n PostDeclineIdentityVerificationResponse,\n PostDeclineIdentityVerificationError,\n GetIndexBillingDocumentData,\n GetIndexBillingDocumentResponse,\n GetIndexBillingDocumentError,\n DeleteDeleteWebhookCallbackData,\n DeleteDeleteWebhookCallbackResponse,\n DeleteDeleteWebhookCallbackError,\n PatchUpdateWebhookCallbackData,\n PatchUpdateWebhookCallbackResponse,\n PatchUpdateWebhookCallbackError,\n GetIndexTravelLetterRequestData,\n GetIndexTravelLetterRequestResponse,\n GetIndexTravelLetterRequestError,\n GetIndexBenefitRenewalRequestData,\n GetIndexBenefitRenewalRequestResponse,\n GetIndexBenefitRenewalRequestError,\n PostCreateWebhookCallbackData,\n PostCreateWebhookCallbackResponse,\n PostCreateWebhookCallbackError,\n PostApproveTimesheetData,\n PostApproveTimesheetResponse,\n PostApproveTimesheetError,\n GetShowPayslipData,\n GetShowPayslipResponse,\n GetShowPayslipError,\n GetIndexLeavePoliciesSummaryData,\n GetIndexLeavePoliciesSummaryResponse,\n GetIndexLeavePoliciesSummaryError,\n GetIndexCompanyDepartmentData,\n GetIndexCompanyDepartmentResponse,\n GetIndexCompanyDepartmentError,\n PostCreateCompanyDepartmentData,\n PostCreateCompanyDepartmentResponse,\n PostCreateCompanyDepartmentError,\n GetShowSchemaData,\n GetShowSchemaResponse,\n GetShowSchemaError,\n GetIndexTimesheetData,\n GetIndexTimesheetResponse,\n GetIndexTimesheetError,\n GetShowEmploymentData,\n GetShowEmploymentResponse,\n GetShowEmploymentError,\n PatchUpdateEmployment2Data,\n PatchUpdateEmployment2Response,\n PatchUpdateEmployment2Error,\n PatchUpdateEmploymentData,\n PatchUpdateEmploymentResponse,\n PatchUpdateEmploymentError,\n GetIndexPayrollCalendarData,\n GetIndexPayrollCalendarResponse,\n GetIndexPayrollCalendarError,\n GetShowRegionFieldData,\n GetShowRegionFieldResponse,\n GetShowRegionFieldError,\n GetShowOffboardingData,\n GetShowOffboardingResponse,\n GetShowOffboardingError,\n PostCreateEmploymentData,\n PostCreateEmploymentResponse,\n PostCreateEmploymentError,\n GetSupportedCountryData,\n GetSupportedCountryResponse,\n GetSupportedCountryError,\n PostCompleteOnboardingEmploymentData,\n PostCompleteOnboardingEmploymentResponse,\n PostCompleteOnboardingEmploymentError,\n GetTimeoffTypesTimeoffData,\n GetTimeoffTypesTimeoffResponse,\n GetTimeoffTypesTimeoffError,\n PostTriggerWebhookCallbackData,\n PostTriggerWebhookCallbackResponse,\n PostTriggerWebhookCallbackError,\n GetDownloadPayslipPayslipData,\n GetDownloadPayslipPayslipResponse,\n GetDownloadPayslipPayslipError,\n GetShowTimeoffData,\n GetShowTimeoffResponse,\n GetShowTimeoffError,\n PatchUpdateTimeoff2Data,\n PatchUpdateTimeoff2Response,\n PatchUpdateTimeoff2Error,\n PatchUpdateTimeoffData,\n PatchUpdateTimeoffResponse,\n PatchUpdateTimeoffError,\n PostCreateDeclineData,\n PostCreateDeclineResponse,\n PostCreateDeclineError,\n PostAutomatableContractAmendmentData,\n PostAutomatableContractAmendmentResponse,\n PostAutomatableContractAmendmentError,\n PostCreateApprovalData,\n PostCreateApprovalResponse,\n PostCreateApprovalError,\n GetIndexEmploymentCustomFieldData,\n GetIndexEmploymentCustomFieldResponse,\n GetIndexEmploymentCustomFieldError,\n PostCreateEmploymentCustomFieldData,\n PostCreateEmploymentCustomFieldResponse,\n PostCreateEmploymentCustomFieldError,\n GetIndexCompanyCurrencyData,\n GetIndexCompanyCurrencyResponse,\n GetIndexCompanyCurrencyError,\n PatchUpdateEmployment4Data,\n PatchUpdateEmployment4Response,\n PatchUpdateEmployment4Error,\n PatchUpdateEmployment3Data,\n PatchUpdateEmployment3Response,\n PatchUpdateEmployment3Error,\n GetPendingChangesEmploymentContractData,\n GetPendingChangesEmploymentContractResponse,\n GetPendingChangesEmploymentContractError,\n GetShowResignationData,\n GetShowResignationResponse,\n GetShowResignationError,\n PostUploadEmployeeFileFileData,\n PostUploadEmployeeFileFileResponse,\n PostUploadEmployeeFileFileError,\n PostInviteEmploymentInvitationData,\n PostInviteEmploymentInvitationResponse,\n PostInviteEmploymentInvitationError,\n GetShowExpenseData,\n GetShowExpenseResponse,\n GetShowExpenseError,\n PatchUpdateExpense2Data,\n PatchUpdateExpense2Response,\n PatchUpdateExpense2Error,\n PatchUpdateExpenseData,\n PatchUpdateExpenseResponse,\n PatchUpdateExpenseError,\n GetShowBenefitRenewalRequestData,\n GetShowBenefitRenewalRequestResponse,\n GetShowBenefitRenewalRequestError,\n PostUpdateBenefitRenewalRequestData,\n PostUpdateBenefitRenewalRequestResponse,\n PostUpdateBenefitRenewalRequestError,\n PutValidateResignationData,\n PutValidateResignationResponse,\n PutValidateResignationError,\n GetShowEmploymentCustomFieldValueData,\n GetShowEmploymentCustomFieldValueResponse,\n GetShowEmploymentCustomFieldValueError,\n PatchUpdateEmploymentCustomFieldValue2Data,\n PatchUpdateEmploymentCustomFieldValue2Response,\n PatchUpdateEmploymentCustomFieldValue2Error,\n PatchUpdateEmploymentCustomFieldValueData,\n PatchUpdateEmploymentCustomFieldValueResponse,\n PatchUpdateEmploymentCustomFieldValueError,\n GetCurrentIdentityData,\n GetCurrentIdentityResponse,\n GetCurrentIdentityError,\n DeleteDeleteIncentiveData,\n DeleteDeleteIncentiveResponse,\n DeleteDeleteIncentiveError,\n GetShowIncentiveData,\n GetShowIncentiveResponse,\n GetShowIncentiveError,\n PatchUpdateIncentive2Data,\n PatchUpdateIncentive2Response,\n PatchUpdateIncentive2Error,\n PatchUpdateIncentiveData,\n PatchUpdateIncentiveResponse,\n PatchUpdateIncentiveError,\n GetIndexWorkAuthorizationRequestData,\n GetIndexWorkAuthorizationRequestResponse,\n GetIndexWorkAuthorizationRequestError,\n GetIndexBenefitOffersCountrySummaryData,\n GetIndexBenefitOffersCountrySummaryResponse,\n GetIndexBenefitOffersCountrySummaryError,\n GetIndexBenefitOffersByEmploymentData,\n GetIndexBenefitOffersByEmploymentResponse,\n GetIndexBenefitOffersByEmploymentError,\n PutCancelContractAmendmentData,\n PutCancelContractAmendmentResponse,\n PutCancelContractAmendmentError,\n GetShowProbationExtensionData,\n GetShowProbationExtensionResponse,\n GetShowProbationExtensionError,\n GetIndexPayslipData,\n GetIndexPayslipResponse,\n GetIndexPayslipError,\n GetDownloadByIdExpenseReceiptData,\n GetDownloadByIdExpenseReceiptResponse,\n GetDownloadByIdExpenseReceiptError,\n PostTokenOAuth2TokenData,\n PostTokenOAuth2TokenResponse,\n PostTokenOAuth2TokenError,\n GetIndexTimeoffData,\n GetIndexTimeoffResponse,\n GetIndexTimeoffError,\n PostCreateTimeoffData,\n PostCreateTimeoffResponse,\n PostCreateTimeoffError,\n GetIndexEmploymentContractData,\n GetIndexEmploymentContractResponse,\n GetIndexEmploymentContractError,\n GetIndexCompanyData,\n GetIndexCompanyResponse,\n GetIndexCompanyError,\n PostCreateCompanyData,\n PostCreateCompanyResponse,\n PostCreateCompanyError,\n PostSendBackTimesheetData,\n PostSendBackTimesheetResponse,\n PostSendBackTimesheetError,\n DeleteDeleteCompanyManagerData,\n DeleteDeleteCompanyManagerResponse,\n DeleteDeleteCompanyManagerError,\n GetShowCompanyManagerData,\n GetShowCompanyManagerResponse,\n GetShowCompanyManagerError,\n GetIndexScheduledContractorInvoiceData,\n GetIndexScheduledContractorInvoiceResponse,\n GetIndexScheduledContractorInvoiceError,\n PostBulkCreateScheduledContractorInvoiceData,\n PostBulkCreateScheduledContractorInvoiceResponse,\n PostBulkCreateScheduledContractorInvoiceError,\n GetGetBreakdownBillingDocumentData,\n GetGetBreakdownBillingDocumentResponse,\n GetGetBreakdownBillingDocumentError,\n PostVerifyIdentityVerificationData,\n PostVerifyIdentityVerificationResponse,\n PostVerifyIdentityVerificationError,\n GetDownloadPdfBillingDocumentData,\n GetDownloadPdfBillingDocumentResponse,\n GetDownloadPdfBillingDocumentError,\n} from './types.gen';\nimport { client as _heyApiClient } from './client.gen';\n\nexport type Options<\n TData extends TDataShape = TDataShape,\n ThrowOnError extends boolean = boolean,\n> = ClientOptions<TData, ThrowOnError> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: Record<string, unknown>;\n};\n\n/**\n * List Offboarding\n * Lists Offboarding requests.\n */\nexport const getIndexOffboarding = <ThrowOnError extends boolean = false>(\n options?: Options<GetIndexOffboardingData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexOffboardingResponse,\n GetIndexOffboardingError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/offboardings',\n ...options,\n });\n};\n\n/**\n * Create Offboarding\n * Creates an Offboarding request.\n *\n */\nexport const postCreateOffboarding = <ThrowOnError extends boolean = false>(\n options?: Options<PostCreateOffboardingData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).post<\n PostCreateOffboardingResponse,\n PostCreateOffboardingError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/offboardings',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show timesheet\n * Shows a timesheet by its ID.\n */\nexport const getShowTimesheet = <ThrowOnError extends boolean = false>(\n options: Options<GetShowTimesheetData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowTimesheetResponse,\n GetShowTimesheetError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timesheets/{id}',\n ...options,\n });\n};\n\n/**\n * Cancel onboarding\n * Cancel onboarding.\n *\n * Requirements 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 */\nexport const postUpdateCancelOnboarding = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostUpdateCancelOnboardingData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostUpdateCancelOnboardingResponse,\n PostUpdateCancelOnboardingError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/cancel-onboarding/{employment_id}',\n ...options,\n });\n};\n\n/**\n * Show form schema\n * Returns the json schema of the `contract_amendment` form for a specific employment.\n * This endpoint requires a company access token, as forms are dependent on certain\n * properties of companies and their current employments.\n *\n */\nexport const getShowContractAmendmentSchema = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowContractAmendmentSchemaData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowContractAmendmentSchemaResponse,\n GetShowContractAmendmentSchemaError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contract-amendments/schema',\n ...options,\n });\n};\n\n/**\n * Get latest data sync events\n * Get the latest data sync events for each data type that have passed\n *\n */\nexport const getIndexDataSync = <ThrowOnError extends boolean = false>(\n options?: Options<GetIndexDataSyncData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexDataSyncResponse,\n GetIndexDataSyncError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/data-sync',\n ...options,\n });\n};\n\n/**\n * Create test data sync job\n * Create Test Data Synchronization job that will sync test data to the database from production\n * The job will be handled asynchronously and the response will be a 202 status code.\n *\n * **Heads up:** This endpoint is only available for specific usecases and should not be used for general data sync needs,\n * if you need to request access to this endpoint, please contact the api-support@remote.com.\n *\n */\nexport const postCreateDataSync = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateDataSyncData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n unknown,\n PostCreateDataSyncError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/data-sync',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show probation completion letter\n * Show a single probation completion letter.\n */\nexport const getShowProbationCompletionLetter = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowProbationCompletionLetterData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowProbationCompletionLetterResponse,\n GetShowProbationCompletionLetterError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/probation-completion-letter/{id}',\n ...options,\n });\n};\n\n/**\n * Show Contractor Invoice\n * Shows a single Contractor Invoice record.\n */\nexport const getShowContractorInvoice = <ThrowOnError extends boolean = false>(\n options: Options<GetShowContractorInvoiceData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowContractorInvoiceResponse,\n GetShowContractorInvoiceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoices/{id}',\n ...options,\n });\n};\n\n/**\n * List employments\n * Lists all employments, except for the deleted ones.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n */\nexport const getIndexEmployment = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexEmploymentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexEmploymentResponse,\n GetIndexEmploymentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments',\n ...options,\n });\n};\n\n/**\n * Create employment\n * Creates an employment. We support creating employees and contractors.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n */\nexport const postCreateEmployment2 = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateEmployment2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateEmployment2Response,\n PostCreateEmployment2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List Contractor Invoices\n * Lists Contractor Invoice records.\n */\nexport const getIndexContractorInvoice = <ThrowOnError extends boolean = false>(\n options?: Options<GetIndexContractorInvoiceData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexContractorInvoiceResponse,\n GetIndexContractorInvoiceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoices',\n ...options,\n });\n};\n\n/**\n * Show the SSO Configuration Details\n * Shows the SSO Configuration details for the company.\n */\nexport const getDetailsSsoConfiguration = <\n ThrowOnError extends boolean = false,\n>(\n options?: Options<GetDetailsSsoConfigurationData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetDetailsSsoConfigurationResponse,\n GetDetailsSsoConfigurationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sso-configuration/details',\n ...options,\n });\n};\n\n/**\n * Creates a cost estimation of employments\n */\nexport const postCreateEstimation = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateEstimationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateEstimationResponse,\n PostCreateEstimationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/cost-calculator/estimation',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show form schema\n * Returns the json schema of the requested company form.\n * Currently only supports the `address_details` form.\n *\n */\nexport const getShowCompanySchema = <ThrowOnError extends boolean = false>(\n options: Options<GetShowCompanySchemaData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowCompanySchemaResponse,\n GetShowCompanySchemaError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/companies/schema',\n ...options,\n });\n};\n\n/**\n * Get employment benefit offers\n */\nexport const getIndexBenefitOffer = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexBenefitOfferData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexBenefitOfferResponse,\n GetIndexBenefitOfferError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}/benefit-offers',\n ...options,\n });\n};\n\n/**\n * Upserts employment benefit offers\n */\nexport const putUpdateBenefitOffer = <ThrowOnError extends boolean = false>(\n options: Options<PutUpdateBenefitOfferData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PutUpdateBenefitOfferResponse,\n PutUpdateBenefitOfferError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}/benefit-offers',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Get Employment Profile\n * Gets necessary information to perform the identity verification of an employee.\n *\n */\nexport const getGetIdentityVerificationDataIdentityVerification = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<\n GetGetIdentityVerificationDataIdentityVerificationData,\n ThrowOnError\n >,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetGetIdentityVerificationDataIdentityVerificationResponse,\n GetGetIdentityVerificationDataIdentityVerificationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/identity-verification/{employment_id}',\n ...options,\n });\n};\n\n/**\n * Pass KYB\n * Pass KYB and credit risk for a company without the intervention of a Remote admin.\n *\n * This endpoint is only available in Sandbox, otherwise it will respond with a 404.\n *\n */\nexport const postBypassEligibilityChecksCompany = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostBypassEligibilityChecksCompanyData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostBypassEligibilityChecksCompanyResponse,\n PostBypassEligibilityChecksCompanyError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/companies/{company_id}/bypass-eligibility-checks',\n ...options,\n });\n};\n\n/**\n * List all holidays of a country\n * List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision.\n */\nexport const getIndexHoliday = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexHolidayData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexHolidayResponse,\n GetIndexHolidayError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/countries/{country_code}/holidays/{year}',\n ...options,\n });\n};\n\n/**\n * Cancel Time Off\n * Cancel a time off request that was already approved.\n */\nexport const postCreateCancellation = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateCancellationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateCancellationResponse,\n PostCreateCancellationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/{timeoff_id}/cancel',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List Recurring Incentive\n * List all Recurring Incentives of a company.\n *\n */\nexport const getIndexRecurringIncentive = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetIndexRecurringIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexRecurringIncentiveResponse,\n GetIndexRecurringIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/recurring',\n ...options,\n });\n};\n\n/**\n * Create Recurring Incentive\n * Create a Recurring Incentive, that is, a monthly paid incentive.\n *\n * Incentives use the currency of the employment specified provided in the `employment_id` field.\n *\n */\nexport const postCreateRecurringIncentive = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateRecurringIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateRecurringIncentiveResponse,\n PostCreateRecurringIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/recurring',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Creates a Benefit Renewal Request\n * Creates a Benefit Renewal Request for a specific Benefit Group.\n * This endpoint is only available in Sandbox, otherwise it will respond with a 404.\n *\n */\nexport const postCreateBenefitRenewalRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateBenefitRenewalRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateBenefitRenewalRequestResponse,\n PostCreateBenefitRenewalRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/benefit-renewal-requests',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List expenses\n * Lists all expenses records\n */\nexport const getIndexExpense = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexExpenseData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexExpenseResponse,\n GetIndexExpenseError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses',\n ...options,\n });\n};\n\n/**\n * Create expense\n * Creates an **approved** expense\n */\nexport const postCreateExpense = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateExpenseData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateExpenseResponse,\n PostCreateExpenseError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show the current SSO Configuration\n * Shows the current SSO Configuration for the company.\n */\nexport const getShowSsoConfiguration = <ThrowOnError extends boolean = false>(\n options?: Options<GetShowSsoConfigurationData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetShowSsoConfigurationResponse,\n GetShowSsoConfigurationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sso-configuration',\n ...options,\n });\n};\n\n/**\n * Create the SSO Configuration\n * Creates the SSO Configuration for the company.\n */\nexport const postCreateSsoConfiguration = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateSsoConfigurationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateSsoConfigurationResponse,\n PostCreateSsoConfigurationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sso-configuration',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Approve Contract Amendment\n * Approves a contract amendment request without the intervention of a Remote admin.\n * Approvals done via this endpoint are effective immediately,\n * regardless of the effective date entered on the contract amendment creation.\n *\n * This endpoint is only available in Sandbox, otherwise it will respond with a 404.\n *\n */\nexport const putApproveContractAmendment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PutApproveContractAmendmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PutApproveContractAmendmentResponse,\n PutApproveContractAmendmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/approve',\n ...options,\n });\n};\n\n/**\n * Show benefit renewal request schema\n * Returns the json schema of the `benefit_renewal_request` form for a specific request.\n * This endpoint requires a company access token, as forms are dependent on certain\n * properties of companies and their current employments.\n *\n */\nexport const getSchemaBenefitRenewalRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetSchemaBenefitRenewalRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetSchemaBenefitRenewalRequestResponse,\n GetSchemaBenefitRenewalRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}/schema',\n ...options,\n });\n};\n\n/**\n * Delete a Recurring Incentive\n * Delete a Recurring Incentive, that is, a monthly paid incentive.\n *\n * Internally, Remote schedules upcoming incentives. As such, when you attempt to\n * delete a recurring incentive, Remote will **ONLY** delete scheduled incentives\n * with the `pending` status.\n *\n * Incentives payments that are already scheduled and cannot be deleted will be\n * included in the response, in case you need to reference them.\n *\n */\nexport const deleteDeleteRecurringIncentive = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<DeleteDeleteRecurringIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).delete<\n DeleteDeleteRecurringIncentiveResponse,\n DeleteDeleteRecurringIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/recurring/{id}',\n ...options,\n });\n};\n\n/**\n * List Incentives\n * Lists all Incentives of a company\n */\nexport const getIndexIncentive = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexIncentiveResponse,\n GetIndexIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives',\n ...options,\n });\n};\n\n/**\n * Create Incentive\n * Creates an Incentive.\n *\n * Incentives use the currency of the employment specified provided in the `employment_id` field.\n *\n */\nexport const postCreateIncentive = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateIncentiveResponse,\n PostCreateIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Create probation completion letter\n * Create a new probation completion letter request.\n */\nexport const postCreateProbationCompletionLetter = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateProbationCompletionLetterData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateProbationCompletionLetterResponse,\n PostCreateProbationCompletionLetterError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/probation-completion-letter',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show Contractor Invoice Schedule\n * Shows a single Contractor Invoice Schedule record\n */\nexport const getShowScheduledContractorInvoice = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowScheduledContractorInvoiceData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowScheduledContractorInvoiceResponse,\n GetShowScheduledContractorInvoiceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoice-schedules/{id}',\n ...options,\n });\n};\n\n/**\n * Updates Contractor Invoice Schedule\n * Updates a contractor invoice schedule record\n */\nexport const patchUpdateScheduledContractorInvoice2 = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateScheduledContractorInvoice2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateScheduledContractorInvoice2Response,\n PatchUpdateScheduledContractorInvoice2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoice-schedules/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Updates Contractor Invoice Schedule\n * Updates a contractor invoice schedule record\n */\nexport const patchUpdateScheduledContractorInvoice = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateScheduledContractorInvoiceData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateScheduledContractorInvoiceResponse,\n PatchUpdateScheduledContractorInvoiceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoice-schedules/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show Billing Document\n * Shows a billing document details.\n *\n * Please contact api-support@remote.com to request access to this endpoint.\n *\n */\nexport const getShowBillingDocument = <ThrowOnError extends boolean = false>(\n options: Options<GetShowBillingDocumentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowBillingDocumentResponse,\n GetShowBillingDocumentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/billing-documents/{billing_document_id}',\n ...options,\n });\n};\n\n/**\n * Creates PDF cost estimation of employments\n * Creates a PDF cost estimation of employments based on the provided parameters.\n */\nexport const postCreateEstimationPdf = <ThrowOnError extends boolean = false>(\n options?: Options<PostCreateEstimationPdfData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).post<\n PostCreateEstimationPdfResponse,\n PostCreateEstimationPdfError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/cost-calculator/estimation-pdf',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show work authorization request\n * Show a single work authorization request.\n */\nexport const getShowWorkAuthorizationRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowWorkAuthorizationRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowWorkAuthorizationRequestResponse,\n GetShowWorkAuthorizationRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/work-authorization-requests/{id}',\n ...options,\n });\n};\n\n/**\n * Update work authorization request\n * Updates a work authorization request.\n */\nexport const patchUpdateWorkAuthorizationRequest2 = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateWorkAuthorizationRequest2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateWorkAuthorizationRequest2Response,\n PatchUpdateWorkAuthorizationRequest2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/work-authorization-requests/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update work authorization request\n * Updates a work authorization request.\n */\nexport const patchUpdateWorkAuthorizationRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateWorkAuthorizationRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateWorkAuthorizationRequestResponse,\n PatchUpdateWorkAuthorizationRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/work-authorization-requests/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Create Probation Extension\n * Create a probation extension request.\n */\nexport const postCreateProbationExtension = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateProbationExtensionData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateProbationExtensionResponse,\n PostCreateProbationExtensionError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/probation-extensions',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show a company\n * Given an ID, shows a company\n */\nexport const getShowCompany = <ThrowOnError extends boolean = false>(\n options: Options<GetShowCompanyData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowCompanyResponse,\n GetShowCompanyError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/companies/{company_id}',\n ...options,\n });\n};\n\n/**\n * Update a company\n * Given an ID and a request object with new information, updates a company.\n *\n * ### Getting a company and its owner to `active` status\n * If you created a company using the\n * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required\n * request body parameters, you can use this endpoint to provide the missing data. Once the company\n * and its owner have all the necessary data, both their statuses will be set to `active` and the company\n * onboarding will be marked as \"completed\".\n *\n * The 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\n * are 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 */\nexport const patchUpdateCompany2 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateCompany2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateCompany2Response,\n PatchUpdateCompany2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/companies/{company_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update a company\n * Given an ID and a request object with new information, updates a company.\n *\n * ### Getting a company and its owner to `active` status\n * If you created a company using the\n * [create a company endpoint](#tag/Companies/operation/post_create_company) without all the required\n * request body parameters, you can use this endpoint to provide the missing data. Once the company\n * and its owner have all the necessary data, both their statuses will be set to `active` and the company\n * onboarding will be marked as \"completed\".\n *\n * The 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\n * are 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 */\nexport const patchUpdateCompany = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateCompanyData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateCompanyResponse,\n PatchUpdateCompanyError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/companies/{company_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Download a resignation letter\n * Downloads a resignation letter from an employment request.\n */\nexport const getDownloadResignationLetter = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetDownloadResignationLetterData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetDownloadResignationLetterResponse,\n GetDownloadResignationLetterError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/resignations/{offboarding_request_id}/resignation-letter',\n ...options,\n });\n};\n\n/**\n * List Contract Amendment\n * List Contract Amendment requests.\n */\nexport const getIndexContractAmendment = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexContractAmendmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexContractAmendmentResponse,\n GetIndexContractAmendmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contract-amendments',\n ...options,\n });\n};\n\n/**\n * Create Contract Amendment\n * Creates a Contract Amendment request.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n */\nexport const postCreateContractAmendment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateContractAmendmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateContractAmendmentResponse,\n PostCreateContractAmendmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contract-amendments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * @deprecated\n * Download a receipt\n * Downloads an expense receipt.\n *\n * Deprecated since late February 2024 in favour of **[Download a receipt by id](#tag/Expenses/operation/get_download_by_id_expense_receipt)** endpoint.\n *\n */\nexport const getDownloadExpenseReceipt = <ThrowOnError extends boolean = false>(\n options: Options<GetDownloadExpenseReceiptData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetDownloadExpenseReceiptResponse,\n GetDownloadExpenseReceiptError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses/{expense_id}/receipt',\n ...options,\n });\n};\n\n/**\n * Show travel letter request\n * Show a single travel letter request.\n */\nexport const getShowTravelLetterRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowTravelLetterRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowTravelLetterRequestResponse,\n GetShowTravelLetterRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/travel-letter-requests/{id}',\n ...options,\n });\n};\n\n/**\n * Updates a travel letter request\n * Updates a travel letter request\n */\nexport const patchUpdateTravelLetterRequest2 = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateTravelLetterRequest2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateTravelLetterRequest2Response,\n PatchUpdateTravelLetterRequest2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/travel-letter-requests/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Updates a travel letter request\n * Updates a travel letter request\n */\nexport const patchUpdateTravelLetterRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateTravelLetterRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateTravelLetterRequestResponse,\n PatchUpdateTravelLetterRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/travel-letter-requests/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * @deprecated\n * Show Time Off Balance\n * Shows the time off balance for the given employment_id.\n *\n * Deprecated since February 2025 in favour of **[List Leave Policies Summary](#tag/Leave-Policies/operation/get_index_leave_policies_summary)** endpoint.\n *\n */\nexport const getShowTimeoffBalance = <ThrowOnError extends boolean = false>(\n options: Options<GetShowTimeoffBalanceData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowTimeoffBalanceResponse,\n GetShowTimeoffBalanceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff-balances/{employment_id}',\n ...options,\n });\n};\n\n/**\n * Show form schema\n * Returns 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 * - billing_address_details\n * - contract_details\n * - emergency_contact\n * - employment_document_details\n * - personal_details\n * - pricing_plan_details\n * - global_payroll_administrative_details\n * - global_payroll_contract_details\n * - global_payroll_personal_details\n *\n * ```\n *\n * This endpoint requires a company access token, as forms are dependent on certain\n * properties of companies and their current employments.\n *\n *\n */\nexport const getShowFormCountry = <ThrowOnError extends boolean = false>(\n options: Options<GetShowFormCountryData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowFormCountryResponse,\n GetShowFormCountryError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/countries/{country_code}/{form}',\n ...options,\n });\n};\n\n/**\n * Download file\n * Downloads a file.\n *\n */\nexport const getShowFile = <ThrowOnError extends boolean = false>(\n options: Options<GetShowFileData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowFileResponse,\n GetShowFileError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/files/{id}',\n ...options,\n });\n};\n\n/**\n * Show Contract Amendment\n * Show a single Contract Amendment request.\n */\nexport const getShowContractAmendment = <ThrowOnError extends boolean = false>(\n options: Options<GetShowContractAmendmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowContractAmendmentResponse,\n GetShowContractAmendmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contract-amendments/{id}',\n ...options,\n });\n};\n\n/**\n * List Company Managers\n * List all company managers of an integration. If filtered by the company_id param,\n * it lists only company managers belonging to the specified company.\n *\n */\nexport const getIndexCompanyManager = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexCompanyManagerData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexCompanyManagerResponse,\n GetIndexCompanyManagerError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-managers',\n ...options,\n });\n};\n\n/**\n * Create and invite a Company Manager\n * Create a Company Manager and sends the invitation email for signing in to the Remote Platform.\n */\nexport const postCreateCompanyManager = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateCompanyManagerData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateCompanyManagerResponse,\n PostCreateCompanyManagerError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-managers',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List countries\n * Lists active and processing countries\n */\nexport const getIndexCountry = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexCountryData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexCountryResponse,\n unknown,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/cost-calculator/countries',\n ...options,\n });\n};\n\n/**\n * Decline Identity Verification\n * Declines the identity verification of an employee.\n *\n */\nexport const postDeclineIdentityVerification = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostDeclineIdentityVerificationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostDeclineIdentityVerificationResponse,\n PostDeclineIdentityVerificationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/identity-verification/{employment_id}/decline',\n ...options,\n });\n};\n\n/**\n * List Billing Documents\n * List billing documents for a company\n */\nexport const getIndexBillingDocument = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexBillingDocumentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexBillingDocumentResponse,\n GetIndexBillingDocumentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/billing-documents',\n ...options,\n });\n};\n\n/**\n * Delete a Webhook Callback\n * Delete a callback previously registered for webhooks\n */\nexport const deleteDeleteWebhookCallback = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<DeleteDeleteWebhookCallbackData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).delete<\n DeleteDeleteWebhookCallbackResponse,\n DeleteDeleteWebhookCallbackError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/webhook-callbacks/{id}',\n ...options,\n });\n};\n\n/**\n * Update a Webhook Callback\n * Update a callback previously registered for webhooks\n */\nexport const patchUpdateWebhookCallback = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateWebhookCallbackData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateWebhookCallbackResponse,\n PatchUpdateWebhookCallbackError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/webhook-callbacks/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List travel letter requests\n * List travel letter requests.\n */\nexport const getIndexTravelLetterRequest = <\n ThrowOnError extends boolean = false,\n>(\n options?: Options<GetIndexTravelLetterRequestData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexTravelLetterRequestResponse,\n GetIndexTravelLetterRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/travel-letter-requests',\n ...options,\n });\n};\n\n/**\n * List Benefit Renewal Requests\n * List Benefit Renewal Requests for each country.\n */\nexport const getIndexBenefitRenewalRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetIndexBenefitRenewalRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexBenefitRenewalRequestResponse,\n GetIndexBenefitRenewalRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/benefit-renewal-requests',\n ...options,\n });\n};\n\n/**\n * Create a Webhook Callback\n * Register a callback to be used for webhooks\n */\nexport const postCreateWebhookCallback = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateWebhookCallbackData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateWebhookCallbackResponse,\n PostCreateWebhookCallbackError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/webhook-callbacks',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Approve timesheet\n * Approves the given timesheet.\n */\nexport const postApproveTimesheet = <ThrowOnError extends boolean = false>(\n options: Options<PostApproveTimesheetData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostApproveTimesheetResponse,\n PostApproveTimesheetError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timesheets/{timesheet_id}/approve',\n ...options,\n });\n};\n\n/**\n * Show payslip\n * Given an ID, shows a payslip.\n *\n * Please contact api-support@remote.com to request access to this endpoint.\n *\n */\nexport const getShowPayslip = <ThrowOnError extends boolean = false>(\n options: Options<GetShowPayslipData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowPayslipResponse,\n GetShowPayslipError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/payslips/{id}',\n ...options,\n });\n};\n\n/**\n * List Leave Policies Summary\n * List all the data related to time off for a given employment\n */\nexport const getIndexLeavePoliciesSummary = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetIndexLeavePoliciesSummaryData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexLeavePoliciesSummaryResponse,\n GetIndexLeavePoliciesSummaryError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/leave-policies/summary/{employment_id}',\n ...options,\n });\n};\n\n/**\n * List Company Departments\n * Lists all departments for the authorized company specified in the request.\n *\n */\nexport const getIndexCompanyDepartment = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexCompanyDepartmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexCompanyDepartmentResponse,\n GetIndexCompanyDepartmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-departments',\n ...options,\n });\n};\n\n/**\n * Create New Department\n * 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).\n */\nexport const postCreateCompanyDepartment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateCompanyDepartmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateCompanyDepartmentResponse,\n PostCreateCompanyDepartmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-departments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Get a employment benefit offers JSON schema\n */\nexport const getShowSchema = <ThrowOnError extends boolean = false>(\n options: Options<GetShowSchemaData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowSchemaResponse,\n GetShowSchemaError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}/benefit-offers/schema',\n ...options,\n });\n};\n\n/**\n * List timesheets\n * Lists all timesheets.\n */\nexport const getIndexTimesheet = <ThrowOnError extends boolean = false>(\n options?: Options<GetIndexTimesheetData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexTimesheetResponse,\n GetIndexTimesheetError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timesheets',\n ...options,\n });\n};\n\n/**\n * Show employment\n * Shows all the information of an employment.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n */\nexport const getShowEmployment = <ThrowOnError extends boolean = false>(\n options: Options<GetShowEmploymentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowEmploymentResponse,\n GetShowEmploymentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}',\n ...options,\n });\n};\n\n/**\n * Update employment\n * Updates 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 and address_details.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n * #### Automatically inviting an employee\n *\n * When you submit the `contract_details` and `pricing_plan_details`, Remote should have all the required data to automatically\n * send an invite to the employee. You can tell if an automatic invite has been sent by looking at the `employment_lifecycle_stage`\n * field value. If its value is `employee_self_enrollment`, it means the employee has received an email to join the Remote platform\n * at their `personal_email`.\n *\n * After an automatic invite is sent to an employee, **you will not be able to update employment data through the Remote API**.\n * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`.\n * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited.\n * We block updates to some employment data because employees need to agree to amendments in certain cases,\n * such as when there are changes to their contract_details.\n * Currently, these amendments can only be done through the Remote UI.\n *\n * Please contact Remote if you need to update contractors via API since it's currently not supported.\n *\n */\nexport const patchUpdateEmployment2 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateEmployment2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateEmployment2Response,\n PatchUpdateEmployment2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update employment\n * Updates 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 and address_details.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Countries](#tag/Countries) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n * #### Automatically inviting an employee\n *\n * When you submit the `contract_details` and `pricing_plan_details`, Remote should have all the required data to automatically\n * send an invite to the employee. You can tell if an automatic invite has been sent by looking at the `employment_lifecycle_stage`\n * field value. If its value is `employee_self_enrollment`, it means the employee has received an email to join the Remote platform\n * at their `personal_email`.\n *\n * After an automatic invite is sent to an employee, **you will not be able to update employment data through the Remote API**.\n * After onboarding, only a limited set of employment data will be available for updates, such as `emergency_contact_details`.\n * If you want to provide additional information for an employment, please make sure to do so **before** the employee is invited.\n * We block updates to some employment data because employees need to agree to amendments in certain cases,\n * such as when there are changes to their contract_details.\n * Currently, these amendments can only be done through the Remote UI.\n *\n * Please contact Remote if you need to update contractors via API since it's currently not supported.\n *\n */\nexport const patchUpdateEmployment = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateEmploymentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateEmploymentResponse,\n PatchUpdateEmploymentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List Payroll Calendar\n * List all payroll calendars for the company within the requested cycle.\n */\nexport const getIndexPayrollCalendar = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexPayrollCalendarData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexPayrollCalendarResponse,\n GetIndexPayrollCalendarError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/payroll-calendars/{cycle}',\n ...options,\n });\n};\n\n/**\n * Show region fields\n * Returns 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.\n */\nexport const getShowRegionField = <ThrowOnError extends boolean = false>(\n options: Options<GetShowRegionFieldData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowRegionFieldResponse,\n GetShowRegionFieldError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/cost-calculator/regions/{slug}/fields',\n ...options,\n });\n};\n\n/**\n * Show Offboarding\n * Shows an Offboarding request.\n */\nexport const getShowOffboarding = <ThrowOnError extends boolean = false>(\n options: Options<GetShowOffboardingData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowOffboardingResponse,\n GetShowOffboardingError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/offboardings/{id}',\n ...options,\n });\n};\n\n/**\n * Create employment\n * Creates an employment without provisional_start_date validation.\n *\n * This 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 *\n * This endpoint will respond with a 404 outside of the Sandbox environment.\n *\n * For creating an employment's parameters outside of testing purposes, use [this\n * Employment create endpoint](#operation/post_create_employment)\n *\n */\nexport const postCreateEmployment = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateEmploymentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateEmploymentResponse,\n PostCreateEmploymentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/employments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List countries\n * Returns a list of all countries that are supported by Remote API alphabetically ordered. The supported list accounts for creating employment with basic information and it does not imply fully onboarding employment via JSON Schema.\n *\n */\nexport const getSupportedCountry = <ThrowOnError extends boolean = false>(\n options: Options<GetSupportedCountryData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetSupportedCountryResponse,\n GetSupportedCountryError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/countries',\n ...options,\n });\n};\n\n/**\n * Complete onboarding\n * Completes the employee onboarding. When all tasks are completed, the employee is marked as in `review` status\n */\nexport const postCompleteOnboardingEmployment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCompleteOnboardingEmploymentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCompleteOnboardingEmploymentResponse,\n PostCompleteOnboardingEmploymentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/ready',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List Time Off Types\n * Lists all time off types that can be used for the `timeoff_type` parameter\n */\nexport const getTimeoffTypesTimeoff = <ThrowOnError extends boolean = false>(\n options: Options<GetTimeoffTypesTimeoffData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetTimeoffTypesTimeoffResponse,\n GetTimeoffTypesTimeoffError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/types',\n ...options,\n });\n};\n\n/**\n * Trigger a Webhook\n * Triggers a callback previously registered for webhooks. Use this endpoint to\n * emit a webhook for testing in the Sandbox environment. This endpoint will\n * respond with a 404 outside of the Sandbox environment.\n *\n */\nexport const postTriggerWebhookCallback = <\n ThrowOnError extends boolean = false,\n>(\n options?: Options<PostTriggerWebhookCallbackData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).post<\n PostTriggerWebhookCallbackResponse,\n PostTriggerWebhookCallbackError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/webhook-callbacks/trigger',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Download payslip in the PDF format\n * Given a Payslip ID, downloads a payslip.\n * It is important to note that each country has a different payslip format and they are not authored by Remote.\n *\n */\nexport const getDownloadPayslipPayslip = <ThrowOnError extends boolean = false>(\n options: Options<GetDownloadPayslipPayslipData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetDownloadPayslipPayslipResponse,\n GetDownloadPayslipPayslipError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/payslips/{payslip_id}/pdf',\n ...options,\n });\n};\n\n/**\n * Show Time Off\n * Shows a single Time Off record\n */\nexport const getShowTimeoff = <ThrowOnError extends boolean = false>(\n options: Options<GetShowTimeoffData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowTimeoffResponse,\n GetShowTimeoffError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/{id}',\n ...options,\n });\n};\n\n/**\n * Update Time Off\n * Updates a Time Off record.\n * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025.\n * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead.\n *\n */\nexport const patchUpdateTimeoff2 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateTimeoff2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateTimeoff2Response,\n PatchUpdateTimeoff2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update Time Off\n * Updates a Time Off record.\n * Warning: Updating the status of a time off through this endpoint is deprecated and will be removed on January 13, 2025.\n * To approve or cancel an approved time off, use the `/approve` and `/cancel` endpoints instead.\n *\n */\nexport const patchUpdateTimeoff = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateTimeoffData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateTimeoffResponse,\n PatchUpdateTimeoffError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Decline Time Off\n * Decline a time off request. Please note that only time off requests on the `requested` status can be declined.\n */\nexport const postCreateDecline = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateDeclineData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateDeclineResponse,\n PostCreateDeclineError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/{timeoff_id}/decline',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Automatable Contract Amendment\n * Check if a contract amendment request is automatable.\n * If the contract amendment request is automatable, then after submission, it will instantly amend the employee's contract\n * and send them an updated document.\n *\n * This endpoint requires and returns country-specific data. The exact required and returned fields will\n * vary depending on which country the employment is in. To see the list of parameters for each country,\n * see the **Show form schema** endpoint under the [Contract Amendments](#tag/Contract-Amendments) category.\n *\n * Please note that the compliance requirements for each country are subject to change according to local\n * laws. Given its continual updates, using Remote's [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) should be considered in order to avoid\n * compliance issues and to have the latest version of a country requirements.\n *\n * If you are using this endpoint to build an integration, make sure you are dynamically collecting or\n * displaying the latest parameters for each country by querying the _\"Show form schema\"_ endpoint.\n *\n * For more information on JSON Schemas, see the **How JSON Schemas work** documentation.\n *\n * To learn how you can dynamically generate forms to display in your UI, see the documentation for\n * the [json-schema-form](https://remote.com/resources/api/how-json-schemas-work) tool.\n *\n *\n */\nexport const postAutomatableContractAmendment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostAutomatableContractAmendmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostAutomatableContractAmendmentResponse,\n PostAutomatableContractAmendmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contract-amendments/automatable',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Approve Time Off\n * Approve a time off request.\n */\nexport const postCreateApproval = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateApprovalData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateApprovalResponse,\n PostCreateApprovalError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff/{timeoff_id}/approve',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Lists custom fields definitions\n * Returns custom fields definitions\n */\nexport const getIndexEmploymentCustomField = <\n ThrowOnError extends boolean = false,\n>(\n options?: Options<GetIndexEmploymentCustomFieldData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexEmploymentCustomFieldResponse,\n GetIndexEmploymentCustomFieldError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/custom-fields',\n ...options,\n });\n};\n\n/**\n * Create Custom Field Definition\n * Creates a new custom field definition.\n */\nexport const postCreateEmploymentCustomField = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostCreateEmploymentCustomFieldData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateEmploymentCustomFieldResponse,\n PostCreateEmploymentCustomFieldError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/custom-fields',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List company supported currencies\n * List company supported currencies\n */\nexport const getIndexCompanyCurrency = <ThrowOnError extends boolean = false>(\n options?: Options<GetIndexCompanyCurrencyData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexCompanyCurrencyResponse,\n GetIndexCompanyCurrencyError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-currencies',\n ...options,\n });\n};\n\n/**\n * Update employment\n * Updates an employment. Use this endpoint to modify employment states for testing\n * in the Sandbox environment. This endpoint will respond with a 404 outside of the\n * Sandbox environment.\n *\n * For updating an employment's parameters outside of testing purposes, use [this\n * Employment update endpoint](#operation/patch_update_employment).\n *\n */\nexport const patchUpdateEmployment4 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateEmployment4Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateEmployment4Response,\n PatchUpdateEmployment4Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/employments/{employment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update employment\n * Updates an employment. Use this endpoint to modify employment states for testing\n * in the Sandbox environment. This endpoint will respond with a 404 outside of the\n * Sandbox environment.\n *\n * For updating an employment's parameters outside of testing purposes, use [this\n * Employment update endpoint](#operation/patch_update_employment).\n *\n */\nexport const patchUpdateEmployment3 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateEmployment3Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateEmployment3Response,\n PatchUpdateEmployment3Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/employments/{employment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Get employment contract pending changes\n * Get all the pending changes (waiting for aproval or signature) for the employment contract.\n */\nexport const getPendingChangesEmploymentContract = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetPendingChangesEmploymentContractData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetPendingChangesEmploymentContractResponse,\n GetPendingChangesEmploymentContractError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employment-contracts/{employment_id}/pending-changes',\n ...options,\n });\n};\n\n/**\n * Show Resignation\n * Shows the details of a resignation with status `submitted`.\n */\nexport const getShowResignation = <ThrowOnError extends boolean = false>(\n options: Options<GetShowResignationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowResignationResponse,\n GetShowResignationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/resignations/{offboarding_request_id}',\n ...options,\n });\n};\n\n/**\n * Upload file\n * Uploads a file associated with a specified employment.\n *\n * Please contact api-support@remote.com to request access to this endpoint.\n *\n */\nexport const postUploadEmployeeFileFile = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostUploadEmployeeFileFileData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostUploadEmployeeFileFileResponse,\n PostUploadEmployeeFileFileError,\n ThrowOnError\n >({\n ...formDataBodySerializer,\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/documents',\n ...options,\n headers: {\n 'Content-Type': null,\n ...options?.headers,\n },\n });\n};\n\n/**\n * Invite employment\n * Invite an employment to start the self-enrollment.\n *\n * Requirements 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 *\n * If there are validations errors, they are returned with a Conflict HTTP Status (409) and a descriptive message.\n * HTTP Status OK (200) is returned in case of success.\n *\n * In case of the following error message:\n * `\"Please reselect benefits - the previous selection is no longer available\"`\n * it means that the benefit options have been updated and the employment's benefits are no longer compliant with the new schema.\n *\n * In this case, reselect benefits by updating `contract_details` JSON Schema form.\n *\n */\nexport const postInviteEmploymentInvitation = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostInviteEmploymentInvitationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostInviteEmploymentInvitationResponse,\n PostInviteEmploymentInvitationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employments/{employment_id}/invite',\n ...options,\n });\n};\n\n/**\n * Show expense\n * Shows a single expense record\n */\nexport const getShowExpense = <ThrowOnError extends boolean = false>(\n options: Options<GetShowExpenseData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowExpenseResponse,\n GetShowExpenseError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses/{id}',\n ...options,\n });\n};\n\n/**\n * Update an expense\n * Updates an expense\n */\nexport const patchUpdateExpense2 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateExpense2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateExpense2Response,\n PatchUpdateExpense2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update an expense\n * Updates an expense\n */\nexport const patchUpdateExpense = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateExpenseData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateExpenseResponse,\n PatchUpdateExpenseError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show Benefit Renewal Request\n * Show Benefit Renewal Request details.\n */\nexport const getShowBenefitRenewalRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowBenefitRenewalRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowBenefitRenewalRequestResponse,\n GetShowBenefitRenewalRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}',\n ...options,\n });\n};\n\n/**\n * Updates a Benefit Renewal Request Response\n * Updates a Benefit Renewal Request with the given response.\n */\nexport const postUpdateBenefitRenewalRequest = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostUpdateBenefitRenewalRequestData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostUpdateBenefitRenewalRequestResponse,\n PostUpdateBenefitRenewalRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/benefit-renewal-requests/{benefit_renewal_request_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Validate resignation request\n * Validates a resignation employment request\n */\nexport const putValidateResignation = <ThrowOnError extends boolean = false>(\n options: Options<PutValidateResignationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PutValidateResignationResponse,\n PutValidateResignationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/resignations/{offboarding_request_id}/validate',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Show a custom field value\n * Returns a custom field value for a given employment\n */\nexport const getShowEmploymentCustomFieldValue = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetShowEmploymentCustomFieldValueData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowEmploymentCustomFieldValueResponse,\n GetShowEmploymentCustomFieldValueError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}',\n ...options,\n });\n};\n\n/**\n * Update a Custom Field Value\n * Updates a custom field value for a given employment.\n */\nexport const patchUpdateEmploymentCustomFieldValue2 = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateEmploymentCustomFieldValue2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateEmploymentCustomFieldValue2Response,\n PatchUpdateEmploymentCustomFieldValue2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update a Custom Field Value\n * Updates a custom field value for a given employment.\n */\nexport const patchUpdateEmploymentCustomFieldValue = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PatchUpdateEmploymentCustomFieldValueData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateEmploymentCustomFieldValueResponse,\n PatchUpdateEmploymentCustomFieldValueError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/custom-fields/{custom_field_id}/values/{employment_id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Get token identity\n * Shows information about the entities that can be controlled by the current auth token.\n *\n */\nexport const getCurrentIdentity = <ThrowOnError extends boolean = false>(\n options: Options<GetCurrentIdentityData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetCurrentIdentityResponse,\n GetCurrentIdentityError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/identity/current',\n ...options,\n });\n};\n\n/**\n * Delete an Incentive\n * Delete an incentive.\n *\n * `one_time` incentives that have the following status **CANNOT** be deleted:\n * * `processing`\n * * `paid`\n *\n */\nexport const deleteDeleteIncentive = <ThrowOnError extends boolean = false>(\n options: Options<DeleteDeleteIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).delete<\n DeleteDeleteIncentiveResponse,\n DeleteDeleteIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/{id}',\n ...options,\n });\n};\n\n/**\n * Show Incentive\n * Show an Incentive's details\n */\nexport const getShowIncentive = <ThrowOnError extends boolean = false>(\n options: Options<GetShowIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowIncentiveResponse,\n GetShowIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/{id}',\n ...options,\n });\n};\n\n/**\n * Update Incentive\n * Updates an Incentive.\n *\n * Incentives use the currency of the employment specified provided in the `employment_id` field.\n *\n * The API doesn't support updating paid incentives.\n *\n */\nexport const patchUpdateIncentive2 = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateIncentive2Data, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).patch<\n PatchUpdateIncentive2Response,\n PatchUpdateIncentive2Error,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Update Incentive\n * Updates an Incentive.\n *\n * Incentives use the currency of the employment specified provided in the `employment_id` field.\n *\n * The API doesn't support updating paid incentives.\n *\n */\nexport const patchUpdateIncentive = <ThrowOnError extends boolean = false>(\n options: Options<PatchUpdateIncentiveData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PatchUpdateIncentiveResponse,\n PatchUpdateIncentiveError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/incentives/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List work authorization requests\n * List work authorization requests.\n */\nexport const getIndexWorkAuthorizationRequest = <\n ThrowOnError extends boolean = false,\n>(\n options?: Options<GetIndexWorkAuthorizationRequestData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexWorkAuthorizationRequestResponse,\n GetIndexWorkAuthorizationRequestError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/work-authorization-requests',\n ...options,\n });\n};\n\n/**\n * List Benefit Offers\n * List benefit offers for each country.\n *\n */\nexport const getIndexBenefitOffersCountrySummary = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetIndexBenefitOffersCountrySummaryData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexBenefitOffersCountrySummaryResponse,\n GetIndexBenefitOffersCountrySummaryError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/benefit-offers/country-summaries',\n ...options,\n });\n};\n\n/**\n * List Benefit Offers By Employment\n * List benefit offers by employment.\n *\n */\nexport const getIndexBenefitOffersByEmployment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetIndexBenefitOffersByEmploymentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexBenefitOffersByEmploymentResponse,\n GetIndexBenefitOffersByEmploymentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/benefit-offers',\n ...options,\n });\n};\n\n/**\n * Cancel Contract Amendment\n * Use this endpoint to cancel an existing contract amendment request.\n *\n * This endpoint is only available in Sandbox, otherwise it will respond with a 404.\n *\n */\nexport const putCancelContractAmendment = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PutCancelContractAmendmentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).put<\n PutCancelContractAmendmentResponse,\n PutCancelContractAmendmentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/sandbox/contract-amendments/{contract_amendment_request_id}/cancel',\n ...options,\n });\n};\n\n/**\n * Show Probation Extension\n * Shows a Probation Extension Request.\n *\n */\nexport const getShowProbationExtension = <ThrowOnError extends boolean = false>(\n options: Options<GetShowProbationExtensionData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowProbationExtensionResponse,\n GetShowProbationExtensionError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/probation-extensions/{id}',\n ...options,\n });\n};\n\n/**\n * List payslips\n * Lists all payslips belonging to a company. Can also filter for a single employment belonging\n * to that company.\n *\n */\nexport const getIndexPayslip = <ThrowOnError extends boolean = false>(\n options?: Options<GetIndexPayslipData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexPayslipResponse,\n GetIndexPayslipError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/payslips',\n ...options,\n });\n};\n\n/**\n * Download a receipt by id\n * Download a receipt by id.\n */\nexport const getDownloadByIdExpenseReceipt = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetDownloadByIdExpenseReceiptData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetDownloadByIdExpenseReceiptResponse,\n GetDownloadByIdExpenseReceiptError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/expenses/{expense_id}/receipts/{receipt_id}',\n ...options,\n });\n};\n\n/**\n * Token\n * Endpoint to exchange tokens in the Authorization Code, Client Credentials and Refresh Token flows\n */\nexport const postTokenOAuth2Token = <ThrowOnError extends boolean = false>(\n options: Options<PostTokenOAuth2TokenData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostTokenOAuth2TokenResponse,\n PostTokenOAuth2TokenError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/auth/oauth2/token',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List Time Off\n * Lists all Time Off records.\n */\nexport const getIndexTimeoff = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexTimeoffData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexTimeoffResponse,\n GetIndexTimeoffError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff',\n ...options,\n });\n};\n\n/**\n * Create Time Off\n * Creates a Time Off record\n */\nexport const postCreateTimeoff = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateTimeoffData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateTimeoffResponse,\n PostCreateTimeoffError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timeoff',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * List Employment Contract.\n * Get the employment contract history (list of all contracts active or not) for a given employment.\n */\nexport const getIndexEmploymentContract = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetIndexEmploymentContractData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexEmploymentContractResponse,\n GetIndexEmploymentContractError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/employment-contracts',\n ...options,\n });\n};\n\n/**\n * List all companies\n * 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.\n */\nexport const getIndexCompany = <ThrowOnError extends boolean = false>(\n options: Options<GetIndexCompanyData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetIndexCompanyResponse,\n GetIndexCompanyError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/companies',\n ...options,\n });\n};\n\n/**\n * Create a company\n * Creates 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 */\nexport const postCreateCompany = <ThrowOnError extends boolean = false>(\n options: Options<PostCreateCompanyData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostCreateCompanyResponse,\n PostCreateCompanyError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/companies',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Send back a timesheet for review or modification\n * Sends the given timesheet back to the employee for review or modification.\n */\nexport const postSendBackTimesheet = <ThrowOnError extends boolean = false>(\n options: Options<PostSendBackTimesheetData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostSendBackTimesheetResponse,\n PostSendBackTimesheetError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/timesheets/{timesheet_id}/send-back',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Deletes a Company Manager user\n * Deletes a Company Manager user\n */\nexport const deleteDeleteCompanyManager = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<DeleteDeleteCompanyManagerData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).delete<\n DeleteDeleteCompanyManagerResponse,\n DeleteDeleteCompanyManagerError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-managers/{user_id}',\n ...options,\n });\n};\n\n/**\n * Show company manager user\n * Shows a single company manager user\n */\nexport const getShowCompanyManager = <ThrowOnError extends boolean = false>(\n options: Options<GetShowCompanyManagerData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetShowCompanyManagerResponse,\n GetShowCompanyManagerError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/company-managers/{user_id}',\n ...options,\n });\n};\n\n/**\n * List Contractor Invoice Schedules\n * Lists Contractor Invoice Schedule records.\n */\nexport const getIndexScheduledContractorInvoice = <\n ThrowOnError extends boolean = false,\n>(\n options?: Options<GetIndexScheduledContractorInvoiceData, ThrowOnError>,\n) => {\n return (options?.client ?? _heyApiClient).get<\n GetIndexScheduledContractorInvoiceResponse,\n GetIndexScheduledContractorInvoiceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoice-schedules',\n ...options,\n });\n};\n\n/**\n * Create Contractor Invoice Schedules\n * Creates many invoice schedules records.\n * It's supposed to return two lists: one containing created records, and another one containing the schedules that failed to be inserted.\n *\n */\nexport const postBulkCreateScheduledContractorInvoice = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostBulkCreateScheduledContractorInvoiceData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostBulkCreateScheduledContractorInvoiceResponse,\n PostBulkCreateScheduledContractorInvoiceError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/contractor-invoice-schedules',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers,\n },\n });\n};\n\n/**\n * Get Billing Document Breakdown\n * Get billing document breakdown\n */\nexport const getGetBreakdownBillingDocument = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetGetBreakdownBillingDocumentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetGetBreakdownBillingDocumentResponse,\n GetGetBreakdownBillingDocumentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/billing-documents/{billing_document_id}/breakdown',\n ...options,\n });\n};\n\n/**\n * Verify Employment Identity\n * Endpoint to confirms the employment profile is from the actual employee\n *\n */\nexport const postVerifyIdentityVerification = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<PostVerifyIdentityVerificationData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).post<\n PostVerifyIdentityVerificationResponse,\n PostVerifyIdentityVerificationError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/identity-verification/{employment_id}/verify',\n ...options,\n });\n};\n\n/**\n * Download a billing document PDF\n * Downloads a billing document PDF\n */\nexport const getDownloadPdfBillingDocument = <\n ThrowOnError extends boolean = false,\n>(\n options: Options<GetDownloadPdfBillingDocumentData, ThrowOnError>,\n) => {\n return (options.client ?? _heyApiClient).get<\n GetDownloadPdfBillingDocumentResponse,\n GetDownloadPdfBillingDocumentError,\n ThrowOnError\n >({\n security: [\n {\n scheme: 'bearer',\n type: 'http',\n },\n ],\n url: '/v1/billing-documents/{billing_document_id}/pdf',\n ...options,\n });\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ClientOptions } from './types.gen';\nimport {\n type Config,\n type ClientOptions as DefaultClientOptions,\n createClient,\n createConfig,\n} from '@hey-api/client-fetch';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> =\n (\n override?: Config<DefaultClientOptions & T>,\n ) => Config<Required<DefaultClientOptions> & T>;\n\nexport const client = createClient(\n createConfig<ClientOptions>({\n baseUrl: 'https://gateway.remote.com/',\n }),\n);\n","import { Client, createClient } from '@hey-api/client-fetch';\nimport {\n QueryClient,\n QueryClientProvider,\n useQuery,\n} from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React, { createContext, useContext, useRef } from 'react';\n\nimport { client } from './client/client.gen';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { ENVIROMENTS } from '@/src/environments';\nimport { ThemeProvider } from '@/src/theme';\n\nconst queryClient = new QueryClient();\n\nconst RemoteFlowContext = createContext<{ client: Client | null }>({\n client: null,\n});\n\nexport const useClient = () => useContext(RemoteFlowContext);\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n isTestingMode?: RemoteFlowsSDKProps['isTestingMode'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n isTestingMode,\n}: RemoteFlowContextWrapperProps) {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth'],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = isTestingMode\n ? ENVIROMENTS.partners\n : process.env.REMOTE_GATEWAY_URL;\n\n const remoteApiClient = useRef(\n createClient({\n ...client.getConfig(),\n baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n children,\n isTestingMode = false,\n theme,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <RemoteFlowContextWrapper isTestingMode={isTestingMode} auth={auth}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </QueryClientProvider>\n );\n}\n","export const ENVIROMENTS = {\n staging: 'https://gateway.niceremote.com',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n};\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport React, { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","import {\n CostCalculatorEstimateParams,\n CostCalculatorEstimateResponse,\n getIndexCompanyCurrency,\n getIndexCountry,\n getShowRegionField,\n MinimalRegion,\n postCreateEstimation,\n postCreateEstimationPdf,\n} from '@/src/client';\nimport type {\n CostCalculatorEstimationFormValues,\n CostCalculatorEstimationOptions,\n Field,\n} from '@/src/flows/CostCalculator/types';\nimport type { Result } from '@/src/flows/types';\n\nimport { useClient } from '@/src/RemoteFlowsProvider';\nimport { Client } from '@hey-api/client-fetch';\nimport { $TSFixMe, createHeadlessForm } from '@remoteoss/json-schema-form';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { useState } from 'react';\nimport { string, ValidationError } from 'yup';\nimport { fields } from './fields';\nimport { buildPayload, buildValidationSchema } from './utils';\n\ntype CostCalculatorCountry = {\n value: string;\n label: string;\n childRegions: MinimalRegion[];\n hasAdditionalFields: boolean | undefined;\n regionSlug: string;\n};\n\n/**\n * Hook to fetch the countries for the cost calculator.\n * @returns\n */\nconst useCostCalculatorCountries = () => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['cost-calculator-countries'],\n queryFn: () => {\n return getIndexCountry({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n });\n },\n select: (data) =>\n data.data?.data.map((country) => ({\n value: country.region_slug,\n label: country.name,\n childRegions: country.child_regions,\n hasAdditionalFields: country.has_additional_fields,\n regionSlug: country.region_slug,\n })),\n });\n};\n\n/**\n * Hook to fetch the company currencies.\n * @returns\n */\nconst useCompanyCurrencies = () => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['company-currencies'],\n queryFn: () => {\n return getIndexCompanyCurrency({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n });\n },\n select: (data) =>\n data.data?.data?.company_currencies.map((currency) => ({\n value: currency.slug,\n label: currency.code,\n })),\n });\n};\n\n/**\n * Hook to create an estimation.\n * @returns\n */\nconst useCostCalculatorEstimation = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimation({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n });\n },\n });\n};\n\n/**\n * Custom hook to create a PDF estimation.\n *\n * @returns\n */\nexport const useCostCalculatorEstimationPdf = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimationPdf({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n });\n },\n });\n};\n\n/**\n * Hook to fetch the region fields.\n * @param region\n * @returns\n */\nconst useRegionFields = (region: string | undefined) => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['cost-calculator-region-fields', region],\n queryFn: () => {\n return getShowRegionField({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: { slug: region as string },\n });\n },\n enabled: !!region,\n select: ({ data }) =>\n createHeadlessForm(data?.data?.schema || {}, {\n strictInputType: false,\n }),\n });\n};\n\nexport const defaultEstimationOptions = {\n title: 'Estimation',\n includeBenefits: false,\n includeCostBreakdowns: false,\n};\n\ntype UseCostCalculatorParams = {\n defaultRegion?: string;\n estimationOptions: CostCalculatorEstimationOptions;\n};\n\n/**\n * Hook to use the cost calculator.\n */\nexport const useCostCalculator = (\n { defaultRegion, estimationOptions }: UseCostCalculatorParams = {\n estimationOptions: defaultEstimationOptions,\n },\n) => {\n const [selectedRegion, setSelectedRegion] = useState<string | undefined>(\n defaultRegion,\n );\n const [selectedCountry, setSelectedCountry] =\n useState<CostCalculatorCountry>();\n const { data: countries } = useCostCalculatorCountries();\n const { data: currencies } = useCompanyCurrencies();\n\n const jsonSchemaRegionSlug = selectedRegion || selectedCountry?.value;\n\n const { data: jsonSchemaRegionFields } =\n useRegionFields(jsonSchemaRegionSlug);\n const costCalculatorEstimationMutation = useCostCalculatorEstimation();\n\n /**\n * Submit the estimation form with the given values.\n * @param values\n */\n async function onSubmit(\n values: CostCalculatorEstimationFormValues,\n ): Promise<Result<CostCalculatorEstimateResponse, Error | ValidationError>> {\n try {\n await validationSchema.validate(values, { abortEarly: false });\n } catch (err) {\n return {\n data: null,\n error: err as ValidationError,\n };\n }\n\n try {\n const response = await costCalculatorEstimationMutation.mutateAsync(\n buildPayload(values, estimationOptions),\n );\n\n if (response.data) {\n return {\n data: response.data,\n error: null,\n };\n }\n\n return {\n data: null,\n error: response.error as $TSFixMe,\n };\n } catch (error) {\n return {\n data: null,\n error: error as Error,\n };\n }\n }\n\n /**\n * If the selected country has no child regions and has additional fields,\n * set the current region to the country's region slug and fetch the region fields.\n * @param country\n */\n function onCountryChange(country: string) {\n const currentCountry = countries?.find(({ value }) => value === country);\n\n if (\n currentCountry &&\n currentCountry.childRegions.length === 0 &&\n currentCountry.hasAdditionalFields\n ) {\n setSelectedRegion(currentCountry.regionSlug);\n } else {\n setSelectedRegion(undefined);\n }\n setSelectedCountry(currentCountry);\n }\n\n /**\n * Update the selected region and fetch the region fields.\n * @param region\n */\n function onRegionChange(region: string) {\n setSelectedRegion(region);\n }\n\n const regionField = fields.find((field) => field.name === 'region');\n if (regionField) {\n const regions =\n selectedCountry?.childRegions.map((region) => ({\n value: region.slug,\n label: region.name,\n })) ?? [];\n regionField.options = regions;\n regionField.isVisible = regions.length > 0;\n regionField.required = regions.length > 0;\n regionField.onChange = onRegionChange;\n regionField.schema =\n regions.length > 0 ? string().required('Currency is required') : string();\n }\n\n if (currencies) {\n const currencyField = fields.find((field) => field.name === 'currency');\n if (currencyField) {\n currencyField.options = currencies;\n }\n }\n\n if (countries) {\n const countryField = fields.find((field) => field.name === 'country');\n if (countryField) {\n countryField.options = countries;\n countryField.onChange = onCountryChange;\n }\n }\n\n const allFields = [\n ...fields,\n ...(jsonSchemaRegionFields?.fields || []),\n ] as Field[];\n\n const validationSchema = buildValidationSchema(allFields);\n\n return {\n stepState: {\n current: 0,\n total: 1,\n isLastStep: true,\n },\n fields: allFields,\n validationSchema,\n handleValidation: jsonSchemaRegionFields?.handleValidation,\n onSubmit,\n };\n};\n\n/**\n * Custom hook to fetch disclaimer information.\n *\n * This hooks returns the disclaimer html content.\n *\n * @returns {object} - The query object containing the disclaimer data.\n */\nexport const useCostCalculatorDisclaimer = () => {\n const disclaimerData = {\n data: {\n id: 4668194326797,\n title: 'Disclaimer information on Cost of Employment calculations',\n body: '<h3 id=\"h_01HHJFVR5Q4F8A52F06EVG289R\">Remote disclaimer</h3>\\n<p>The estimate provides a transparent detailed breakdown for in-country statutory social contributions, statutory benefits, and other benefits that may be required. Estimates do not take into account additional costs that may be incurred for relocation, visa, right-to-work requirements, or other activities. </p>\\n<p><strong>See also:</strong> <a href=\"https://support.remote.com/hc/en-us/articles/22329255813133\">What other type of costs does the Cost Calculator not include?</a></p>\\n<h3 id=\"h_01HHJFVYRAAGDKJ36EZS8W6P5N\">EOR services</h3>\\n<p>Our EOR services allow you to retain ownership of your employees\\' IP and inventions. Compliance, taxes, and payroll are handled by our local teams for a seamless end-to-end experience.</p>\\n<h3 id=\"h_01HHJFW4FQPGPK14FSM4XCY5MR\">Pricing and payroll</h3>\\n<p>When it comes to payroll, legal and operational complexities are reduced to a single invoice for all of your Remote employees across every country you hire in – no hidden costs and no long-term commitments needed. Just a simple pricing structure that includes a fixed hiring fee for each EOR employee.</p>\\n<h3 id=\"01JMCR2YZ0GVTCXNPY88TADWQ1\">Currency conversions</h3>\\n<p>When the employee currency differs from the billing currency, we use market rates to convert. The rate figures on this quote are a rough estimate. When the employee currency differs from the billing currency, we use market rates to convert. The rate figures on this quote are a rough estimated.</p>\\n<h3 id=\"h_01HHJFWD1TFB5DQ6B4WD5F1GY6\">Employee off-boarding related costs</h3>\\n<p>The estimate here does not include any costs related to off-boarding of employees. Whilst we do not charge any processing fees when you want to off-board an employee, any other costs such as severance pay, covering remaining vacation days and etc will be charged back to you.<br><strong>See also: </strong><a href=\"https://support.remote.com/hc/en-us/articles/22329371247885\">Are the costs of employee off-boarding included in the Cost Calculator?</a></p>\\n<p>Please note the ‘employee net income estimate’ section (if available for the country) is intended for informational purposes only and should not be used as a substitute for professional financial advice.</p>\\n<p>Additionally, tax laws and rates can vary by location and are subject to change, which may not be immediately reflected in the calculator.</p>\\n<p>For a detailed and accurate assessment of your take-home pay, please consult with a qualified tax professional or financial advisor.</p>\\n<p><strong>See also</strong>: <a href=\"https://support.remote.com/hc/en-us/articles/25196498469773\">How to use the ‘employee net income estimate’ section in the Cost Calculator?</a></p>\\n<p><!-- notionvc: 04d0e276-e0d7-4793-93ee-d4ad14600217 --></p>\\n<h3 id=\"h_01HHJFWTHJ58YAZ87M3E090H4J\">Note</h3>\\n<p>This estimate is for guidance only and may not constitute accurate financial advice. Information contained in this document is subject to changes in laws in different jurisdictions, which can change without notice. This document is the property of Remote, is confidential, cannot be reproduced without permission, and cannot be disclosed to any third parties.</p>\\n<p><!-- notionvc: 09e777b4-c10c-438e-bb95-ce1f3fb86c9a --></p>',\n html_url:\n 'https://support.remote.com/hc/en-us/articles/4668194326797-Disclaimer-information-on-Cost-of-Employment-calculations',\n },\n };\n return useQuery({\n queryKey: ['cost-calculator-disclaimer'],\n queryFn: () => {\n return Promise.resolve(disclaimerData);\n },\n });\n};\n"],"mappings":"wHAAA,OAA0B,UAAAA,OAAc,MCExC,OAIE,0BAAAC,OACK,wBCJP,OAGE,gBAAAC,EACA,gBAAAC,MACK,wBAeA,IAAMC,EAASF,EACpBC,EAA4B,CAC1B,QAAS,6BACX,CAAC,CACH,ED8wBO,IAAME,EAAuBC,EAClCC,IAEQA,EAAQ,QAAUC,GAAe,KAIvC,CACA,SAAU,CACR,CACE,OAAQ,SACR,KAAM,MACR,CACF,EACA,IAAK,iCACL,GAAGD,EACH,QAAS,CACP,eAAgB,mBAChB,GAAGA,GAAS,OACd,CACF,CAAC,EApBiC,wBAwqB7B,IAAME,EAA0BC,EACrCC,IAEQA,GAAS,QAAUC,GAAe,KAIxC,CACA,SAAU,CACR,CACE,OAAQ,SACR,KAAM,MACR,CACF,EACA,IAAK,qCACL,GAAGD,EACH,QAAS,CACP,eAAgB,mBAChB,GAAGA,GAAS,OACd,CACF,CAAC,EApBoC,2BAinBhC,IAAME,EAAkBC,EAC7BC,IAEQA,EAAQ,QAAUC,GAAe,IAIvC,CACA,SAAU,CACR,CACE,OAAQ,SACR,KAAM,MACR,CACF,EACA,IAAK,gCACL,GAAGD,CACL,CAAC,EAhB4B,mBA2jBxB,IAAME,EAAqBC,EAChCC,IAEQA,EAAQ,QAAUC,GAAe,IAIvC,CACA,SAAU,CACR,CACE,OAAQ,SACR,KAAM,MACR,CACF,EACA,IAAK,4CACL,GAAGD,CACL,CAAC,EAhB+B,sBA0c3B,IAAME,EAA0BC,EACrCC,IAEQA,GAAS,QAAUC,GAAe,IAIxC,CACA,SAAU,CACR,CACE,OAAQ,SACR,KAAM,MACR,CACF,EACA,IAAK,yBACL,GAAGD,CACL,CAAC,EAhBoC,2BEvkGvC,OAAiB,gBAAAE,OAAoB,wBACrC,OACE,eAAAC,GACA,uBAAAC,GACA,YAAAC,OACK,wBAEP,OAAOC,GAAS,iBAAAC,GAAe,cAAAC,GAAY,UAAAC,MAAc,QCPlD,IAAMC,EAAc,CACzB,QAAS,iCACT,SAAU,8CACV,WAAY,4BACd,ECMA,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,EAAeC,EAAqC,CAC3D,IAAMC,EAAyB,CAAC,EAChC,cAAO,KAAKD,CAAM,EAAE,QAASE,GAAQ,CACnCD,EAAO,KAAKC,CAAG,EAA0B,EACvCF,EAAOE,CAAwB,CACnC,CAAC,EACMD,CACT,CAPSH,EAAAC,EAAA,kBAST,SAASI,EAAgBC,EAAkC,CACzD,MAAO,CACL,YAAaA,CACf,CACF,CAJSN,EAAAK,EAAA,mBAMT,SAASE,EAAqBC,EAAsC,CAClE,MAAO,CACL,WAAYA,CACd,CACF,CAJSR,EAAAO,EAAA,wBAMT,SAASE,EAAaC,EAA+B,CACnD,MAAO,CACL,iBAAkBA,EAAK,YACzB,CACF,CAJSV,EAAAS,EAAA,gBAMF,SAASE,EAAWC,EAAoC,CACzDA,GAAO,QACTjB,EAAiBM,EAAeW,EAAM,MAAM,CAAC,EAG3CA,GAAO,SACTjB,EAAiBU,EAAgBO,EAAM,OAAO,CAAC,EAG7CA,GAAO,cACTjB,EAAiBY,EAAqBK,EAAM,YAAY,CAAC,EAGvDA,GAAO,MACTjB,EAAiBc,EAAaG,EAAM,IAAI,CAAC,CAE7C,CAhBgBZ,EAAAW,EAAA,cC9ChB,OAAOE,GAAS,iBAAAC,EAAe,aAAAC,EAAW,WAAAC,MAAe,QAGzD,IAAMC,GAAeC,EAAoD,CACvE,MAAO,CAAC,CACV,CAAC,EAEM,SAASC,EAAcC,EAA2B,CACvDC,EAAU,IAAM,CACVD,EAAM,OAAS,OAAO,KAAKA,EAAM,KAAK,EAAE,OAAS,GACnDE,EAAWF,EAAM,KAAK,CAE1B,EAAG,CAACA,EAAM,KAAK,CAAC,EAEhB,IAAMG,EAAQC,EAAQ,KACb,CAAE,MAAOJ,EAAM,KAAM,GAC3B,CAACA,EAAM,KAAK,CAAC,EAEhB,OACEK,EAAA,cAACR,GAAa,SAAb,CAAsB,MAAOM,GAC3BH,EAAM,QACT,CAEJ,CAhBgBM,EAAAP,EAAA,iBHMhB,IAAMQ,GAAc,IAAIC,GAElBC,EAAoBC,GAAyC,CACjE,OAAQ,IACV,CAAC,EAEYC,EAAYC,EAAA,IAAMC,GAAWJ,CAAiB,EAAlC,aAQzB,SAASK,GAAyB,CAChC,SAAAC,EACA,KAAAC,EACA,cAAAC,CACF,EAAkC,CAChC,IAAMC,EAAUC,EACd,IACF,EACM,CAAE,QAAAC,CAAQ,EAAIC,GAAS,CAC3B,SAAU,CAAC,MAAM,EACjB,QAASL,EACT,QAAS,EACX,CAAC,EAEKM,EAAUL,EACZM,EAAY,SACZ,6BAEEC,EAAkBL,EACtBM,GAAa,CACX,GAAGC,EAAO,UAAU,EACpB,QAAAJ,EACA,KAAMV,EAAA,SAAY,CAChB,SAASe,EAAgBC,EAA+B,CACtD,MAAO,CAACA,GAAa,KAAK,IAAI,EAAI,IAAQA,CAC5C,CACA,GAHShB,EAAAe,EAAA,mBAGL,CAACT,EAAQ,SAAWS,EAAgBT,EAAQ,QAAQ,SAAS,EAAG,CAClE,GAAM,CAAE,KAAAW,CAAK,EAAI,MAAMT,EAAQ,EAC3BS,IACFX,EAAQ,QAAU,CAChB,YAAaW,EAAK,YAClB,UAAW,KAAK,IAAI,EAAIA,EAAK,UAAY,GAC3C,EAEJ,CACA,OAAOX,EAAQ,SAAS,WAC1B,EAdM,OAeR,CAAC,CACH,EACA,OACEY,EAAA,cAACrB,EAAkB,SAAlB,CAA2B,MAAO,CAAE,OAAQe,EAAgB,OAAQ,GAClET,CACH,CAEJ,CA5CSH,EAAAE,GAAA,4BA8CF,SAASiB,GAAY,CAC1B,KAAAf,EACA,SAAAD,EACA,cAAAE,EAAgB,GAChB,MAAAe,CACF,EAA2C,CACzC,OACEF,EAAA,cAACG,GAAA,CAAoB,OAAQ1B,IAC3BuB,EAAA,cAAChB,GAAA,CAAyB,cAAeG,EAAe,KAAMD,GAC5Dc,EAAA,cAACI,EAAA,CAAc,MAAOF,GAAQjB,CAAS,CACzC,CACF,CAEJ,CAbgBH,EAAAmB,GAAA,eIvDhB,OAAmB,sBAAAI,OAA0B,8BAC7C,OAAS,eAAAC,EAAa,YAAAC,MAAgB,wBACtC,OAAS,YAAAC,MAAgB,QACzB,OAAS,UAAAC,MAA+B,MAgBxC,IAAMC,GAA6BC,EAAA,IAAM,CACvC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,2BAA2B,EACtC,QAASH,EAAA,IACAI,EAAgB,CACrB,OAAQH,EACR,QAAS,CACP,cAAe,EACjB,CACF,CAAC,EANM,WAQT,OAAQD,EAACK,GACPA,EAAK,MAAM,KAAK,IAAKC,IAAa,CAChC,MAAOA,EAAQ,YACf,MAAOA,EAAQ,KACf,aAAcA,EAAQ,cACtB,oBAAqBA,EAAQ,sBAC7B,WAAYA,EAAQ,WACtB,EAAE,EAPI,SAQV,CAAC,CACH,EArBmC,8BA2B7BC,GAAuBP,EAAA,IAAM,CACjC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,oBAAoB,EAC/B,QAASH,EAAA,IACAQ,EAAwB,CAC7B,OAAQP,EACR,QAAS,CACP,cAAe,EACjB,CACF,CAAC,EANM,WAQT,OAAQD,EAACK,GACPA,EAAK,MAAM,MAAM,mBAAmB,IAAKI,IAAc,CACrD,MAAOA,EAAS,KAChB,MAAOA,EAAS,IAClB,EAAE,EAJI,SAKV,CAAC,CACH,EAnB6B,wBAyBvBC,GAA8BV,EAAA,IAAM,CACxC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAE7B,OAAOS,EAAY,CACjB,WAAYX,EAACY,GACJC,EAAqB,CAC1B,OAAQZ,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAMW,CACR,CAAC,EAPS,aASd,CAAC,CACH,EAdoC,+BAqBvBE,GAAiCd,EAAA,IAAM,CAClD,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAE7B,OAAOS,EAAY,CACjB,WAAYX,EAACY,GACJG,EAAwB,CAC7B,OAAQd,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAMW,CACR,CAAC,EAPS,aASd,CAAC,CACH,EAd8C,kCAqBxCI,GAAkBhB,EAACiB,GAA+B,CACtD,GAAM,CAAE,OAAAhB,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,gCAAiCc,CAAM,EAClD,QAASjB,EAAA,IACAkB,EAAmB,CACxB,OAAQjB,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CAAE,KAAMgB,CAAiB,CACjC,CAAC,EAPM,WAST,QAAS,CAAC,CAACA,EACX,OAAQjB,EAAA,CAAC,CAAE,KAAAK,CAAK,IACdc,GAAmBd,GAAM,MAAM,QAAU,CAAC,EAAG,CAC3C,gBAAiB,EACnB,CAAC,EAHK,SAIV,CAAC,CACH,EApBwB,mBAsBXe,EAA2B,CACtC,MAAO,aACP,gBAAiB,GACjB,sBAAuB,EACzB,EAUaC,GAAoBrB,EAAA,CAC/B,CAAE,cAAAsB,EAAe,kBAAAC,CAAkB,EAA6B,CAC9D,kBAAmBH,CACrB,IACG,CACH,GAAM,CAACI,EAAgBC,CAAiB,EAAIC,EAC1CJ,CACF,EACM,CAACK,EAAiBC,CAAkB,EACxCF,EAAgC,EAC5B,CAAE,KAAMG,CAAU,EAAI9B,GAA2B,EACjD,CAAE,KAAM+B,CAAW,EAAIvB,GAAqB,EAE5CwB,EAAuBP,GAAkBG,GAAiB,MAE1D,CAAE,KAAMK,CAAuB,EACnChB,GAAgBe,CAAoB,EAChCE,EAAmCvB,GAA4B,EAMrE,eAAewB,EACbC,EAC0E,CAC1E,GAAI,CACF,MAAMC,EAAiB,SAASD,EAAQ,CAAE,WAAY,EAAM,CAAC,CAC/D,OAASE,EAAK,CACZ,MAAO,CACL,KAAM,KACN,MAAOA,CACT,CACF,CAEA,GAAI,CACF,IAAMC,EAAW,MAAML,EAAiC,YACtDM,EAAaJ,EAAQZ,CAAiB,CACxC,EAEA,OAAIe,EAAS,KACJ,CACL,KAAMA,EAAS,KACf,MAAO,IACT,EAGK,CACL,KAAM,KACN,MAAOA,EAAS,KAClB,CACF,OAASE,EAAO,CACd,MAAO,CACL,KAAM,KACN,MAAOA,CACT,CACF,CACF,CAlCexC,EAAAkC,EAAA,YAyCf,SAASO,EAAgBnC,EAAiB,CACxC,IAAMoC,EAAiBb,GAAW,KAAK,CAAC,CAAE,MAAAc,CAAM,IAAMA,IAAUrC,CAAO,EAGrEoC,GACAA,EAAe,aAAa,SAAW,GACvCA,EAAe,oBAEfjB,EAAkBiB,EAAe,UAAU,EAE3CjB,EAAkB,MAAS,EAE7BG,EAAmBc,CAAc,CACnC,CAbS1C,EAAAyC,EAAA,mBAmBT,SAASG,EAAe3B,EAAgB,CACtCQ,EAAkBR,CAAM,CAC1B,CAFSjB,EAAA4C,EAAA,kBAIT,IAAMC,EAAcC,EAAO,KAAMC,GAAUA,EAAM,OAAS,QAAQ,EAClE,GAAIF,EAAa,CACf,IAAMG,EACJrB,GAAiB,aAAa,IAAKV,IAAY,CAC7C,MAAOA,EAAO,KACd,MAAOA,EAAO,IAChB,EAAE,GAAK,CAAC,EACV4B,EAAY,QAAUG,EACtBH,EAAY,UAAYG,EAAQ,OAAS,EACzCH,EAAY,SAAWG,EAAQ,OAAS,EACxCH,EAAY,SAAWD,EACvBC,EAAY,OACVG,EAAQ,OAAS,EAAIC,EAAO,EAAE,SAAS,sBAAsB,EAAIA,EAAO,CAC5E,CAEA,GAAInB,EAAY,CACd,IAAMoB,EAAgBJ,EAAO,KAAMC,GAAUA,EAAM,OAAS,UAAU,EAClEG,IACFA,EAAc,QAAUpB,EAE5B,CAEA,GAAID,EAAW,CACb,IAAMsB,EAAeL,EAAO,KAAMC,GAAUA,EAAM,OAAS,SAAS,EAChEI,IACFA,EAAa,QAAUtB,EACvBsB,EAAa,SAAWV,EAE5B,CAEA,IAAMW,EAAY,CAChB,GAAGN,EACH,GAAId,GAAwB,QAAU,CAAC,CACzC,EAEMI,EAAmBiB,EAAsBD,CAAS,EAExD,MAAO,CACL,UAAW,CACT,QAAS,EACT,MAAO,EACP,WAAY,EACd,EACA,OAAQA,EACR,iBAAAhB,EACA,iBAAkBJ,GAAwB,iBAC1C,SAAAE,CACF,CACF,EAvIiC,qBAgJpBoB,GAA8BtD,EAAA,IAAM,CAC/C,IAAMuD,EAAiB,CACrB,KAAM,CACJ,GAAI,cACJ,MAAO,4DACP,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gEACN,SACE,sHACJ,CACF,EACA,OAAOpD,EAAS,CACd,SAAU,CAAC,4BAA4B,EACvC,QAASH,EAAA,IACA,QAAQ,QAAQuD,CAAc,EAD9B,UAGX,CAAC,CACH,EAhB2C,+BPzSpC,SAASC,EAAsBC,EAAiB,CACrD,IAAMC,EAAeD,EAAO,OAC1B,CAACE,EAAiBC,KAChBD,EAAgBC,EAAM,IAAI,EAAIA,EAAM,OAC7BD,GAET,CAAC,CACH,EACA,OAAOE,GAAOH,CAAY,CAC5B,CATgBI,EAAAN,EAAA,yBAiBT,SAASO,EACdC,EACAC,EAAqDC,EACvB,CAC9B,MAAO,CACL,uBAAwBF,EAAO,SAC/B,iBAAkBC,EAAkB,gBACpC,wBAAyBA,EAAkB,sBAC3C,YAAa,CACX,CACE,YAAaD,EAAO,QAAUA,EAAO,QACrC,oBAAqBG,EAAeH,EAAO,MAAM,EACjD,yCAA0CG,EAAeH,EAAO,MAAM,EACtE,gBAAiBA,EAAO,wBAA0B,QAClD,MAAOC,EAAkB,MACzB,mCAAoC,IACpC,IAAKD,EAAO,KAAO,MACrB,CACF,CACF,CACF,CApBgBF,EAAAC,EAAA","names":["object","formDataBodySerializer","createClient","createConfig","client","postCreateEstimation","__name","options","client","postCreateEstimationPdf","__name","options","client","getIndexCountry","__name","options","client","getShowRegionField","__name","options","client","getIndexCompanyCurrency","__name","options","client","createClient","QueryClient","QueryClientProvider","useQuery","React","createContext","useContext","useRef","ENVIROMENTS","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","React","createContext","useEffect","useMemo","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","React","__name","queryClient","QueryClient","RemoteFlowContext","createContext","useClient","__name","useContext","RemoteFlowContextWrapper","children","auth","isTestingMode","session","useRef","refetch","useQuery","baseUrl","ENVIROMENTS","remoteApiClient","createClient","client","hasTokenExpired","expiresAt","data","React","RemoteFlows","theme","QueryClientProvider","ThemeProvider","createHeadlessForm","useMutation","useQuery","useState","string","useCostCalculatorCountries","__name","client","useClient","useQuery","getIndexCountry","data","country","useCompanyCurrencies","getIndexCompanyCurrency","currency","useCostCalculatorEstimation","useMutation","payload","postCreateEstimation","useCostCalculatorEstimationPdf","postCreateEstimationPdf","useRegionFields","region","getShowRegionField","createHeadlessForm","defaultEstimationOptions","useCostCalculator","defaultRegion","estimationOptions","selectedRegion","setSelectedRegion","useState","selectedCountry","setSelectedCountry","countries","currencies","jsonSchemaRegionSlug","jsonSchemaRegionFields","costCalculatorEstimationMutation","onSubmit","values","validationSchema","err","response","buildPayload","error","onCountryChange","currentCountry","value","onRegionChange","regionField","fields","field","regions","string","currencyField","countryField","allFields","buildValidationSchema","useCostCalculatorDisclaimer","disclaimerData","buildValidationSchema","fields","fieldsSchema","fieldsSchemaAcc","field","object","__name","buildPayload","values","estimationOptions","defaultEstimationOptions","convertToCents"]}
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-ATKR5HCM.js";import{a as t}from"./chunk-AYDF3IFZ.js";import*as o from"react";import{Slot as d}from"@radix-ui/react-slot";import{cva as u}from"class-variance-authority";var p=u("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-link-button-primary underline-offset-4 hover:underline button-link"},size:{default:"h-9 px-4 py-7 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9",link:"px-0"}},defaultVariants:{variant:"default",size:"default"}});function h({className:r,variant:n,size:a,asChild:s=!1,...i}){return o.createElement(s?d:"button",{"data-slot":"button",className:e(p({variant:n,size:a,className:r}),"Button__Wrapper"),...i})}t(h,"Button");export{h as a};
2
- //# sourceMappingURL=chunk-J2GLSJLO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/ui/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/src/lib/utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-link-button-primary underline-offset-4 hover:underline button-link',\n },\n size: {\n default: 'h-9 px-4 py-7 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n link: 'px-0',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(\n buttonVariants({ variant, size, className }),\n 'Button__Wrapper',\n )}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n"],"mappings":"gFAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BAIvC,IAAMC,EAAiBC,EACrB,yVACA,CACE,SAAU,CACR,QAAS,CACP,QACE,mEACF,YACE,8DACF,QACE,2FACF,UACE,yEACF,MAAO,+CACP,KAAM,yEACR,EACA,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,SACN,KAAM,MACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAEA,SAASC,EAAO,CACd,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,GAAGC,CACL,EAGK,CAGH,OACE,gBAHWD,EAAUE,EAAO,SAG3B,CACC,YAAU,SACV,UAAWC,EACTT,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,EAC3C,iBACF,EACC,GAAGI,EACN,CAEJ,CAtBSG,EAAAR,EAAA","names":["React","Slot","cva","buttonVariants","cva","Button","className","variant","size","asChild","props","Slot","cn","__name"]}
@@ -1,2 +0,0 @@
1
- import{a as B}from"./chunk-7ZBXCVHC.js";import{a as D}from"./chunk-J2GLSJLO.js";import{e as M,f as O}from"./chunk-7EZH5DCX.js";import{a as n}from"./chunk-ATKR5HCM.js";import{a as o}from"./chunk-AYDF3IFZ.js";import v from"react";import{useForm as he}from"react-hook-form";import*as m from"react";import{Slot as me}from"@radix-ui/react-slot";import{Controller as ce,FormProvider as de,useFormContext as pe,useFormState as ue}from"react-hook-form";import*as k from"react";import*as z from"@radix-ui/react-label";function j({className:e,...t}){return k.createElement(z.Root,{"data-slot":"label",className:n("flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",e),...t})}o(j,"Label");var A=de,$=m.createContext({}),C=o(({...e})=>m.createElement($.Provider,{value:{name:e.name}},m.createElement(ce,{...e})),"FormField"),w=o(()=>{let e=m.useContext($),t=m.useContext(U),{getFieldState:r}=pe(),i=ue({name:e.name}),s=r(e.name,i);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:d}=t;return{id:d,name:e.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...s}},"useFormField"),U=m.createContext({});function S({className:e,...t}){let r=m.useId();return m.createElement(U.Provider,{value:{id:r}},m.createElement("div",{"data-slot":"form-item",className:n("grid gap-2",e),...t}))}o(S,"FormItem");function b({className:e,...t}){let{error:r,formItemId:i}=w();return m.createElement(j,{"data-slot":"form-label","data-error":!!r,className:n("text-base-color mb-1 data-[error=true]:text-destructive",e),htmlFor:i,...t})}o(b,"FormLabel");function x({...e}){let{error:t,formItemId:r,formDescriptionId:i,formMessageId:s}=w();return m.createElement(me,{"data-slot":"form-control",id:r,"aria-describedby":t?`${i} ${s}`:`${i}`,"aria-invalid":!!t,...e})}o(x,"FormControl");function P({className:e,...t}){let{formDescriptionId:r}=w();return m.createElement("p",{"data-slot":"form-description",id:r,className:n("text-base-color text-sm",e),...t})}o(P,"FormDescription");function R({className:e,...t}){let{error:r,formMessageId:i}=w(),s=r?String(r?.message??""):t.children;return s?m.createElement("p",{"data-slot":"form-message",id:i,className:n("text-destructive text-sm",e),...t},s):null}o(R,"FormMessage");import V from"react";import*as I from"react";function J({legend:e,name:t,fields:r}){return I.createElement("fieldset",{className:"border-1 border-input p-4 rounded-xl RemoteFlows__FieldSetField"},I.createElement("legend",{className:"text-sm font-semibold px-2"},e),I.createElement("div",{className:"grid gap-4"},r.map(i=>{let s=T[i.type];return I.createElement(s,{...i,key:i.name,name:`${t}.${i.name}`})})))}o(J,"FieldSetField");import*as _ from"@radix-ui/react-radio-group";import{CircleIcon as fe}from"lucide-react";import*as N from"react";function W({className:e,...t}){return N.createElement(_.Root,{"data-slot":"radio-group",className:n("grid gap-3",e),...t})}o(W,"RadioGroup");function H({className:e,...t}){return N.createElement(_.Item,{"data-slot":"radio-group-item",className:n("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t},N.createElement(_.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center"},N.createElement(fe,{className:"fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})))}o(H,"RadioGroupItem");import*as p from"react";import{useFormContext as Fe}from"react-hook-form";function q({name:e,defaultValue:t,description:r,label:i,options:s}){let{control:d}=Fe();return p.createElement(C,{control:d,name:e,defaultValue:t,render:({field:y,fieldState:F})=>p.createElement(S,{className:"space-y-3 RemoteFlows__RadioGroupField__Item"},p.createElement(b,null,i),p.createElement(x,null,p.createElement(W,{onValueChange:y.onChange,defaultValue:y.value,className:"flex flex-col space-y-1"},s.map(u=>p.createElement(S,{key:u.value,className:"flex items-center space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item"},p.createElement(x,null,p.createElement(H,{value:u.value,className:"RemoteFlows__RadioField__Input"})),p.createElement(b,{className:"font-normal mb-0 RemoteFlows__RadioField__Label"},u.label))))),r&&p.createElement(P,null,r),F.error&&p.createElement(R,null))})}o(q,"RadioGroupField");import*as c from"react";import*as l from"react";import*as a from"@radix-ui/react-select";import{CheckIcon as ge,ChevronDownIcon as Y,ChevronUpIcon as ve}from"lucide-react";function K({...e}){return l.createElement(a.Root,{"data-slot":"select",...e})}o(K,"Select");function Q({...e}){return l.createElement(a.Group,{"data-slot":"select-group",...e})}o(Q,"SelectGroup");function X({...e}){return l.createElement(a.Value,{"data-slot":"select-value",...e})}o(X,"SelectValue");function Z({className:e,children:t,...r}){return l.createElement(a.Trigger,{"data-slot":"select-trigger",className:n("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",e),...r},t,l.createElement(a.Icon,{asChild:!0,className:"absolute right-4"},l.createElement(Y,{className:"size-4"})))}o(Z,"SelectTrigger");function ee({className:e,children:t,position:r="popper",...i}){return l.createElement(a.Portal,null,l.createElement(a.Content,{"data-slot":"select-content",className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i},l.createElement(ye,null),l.createElement(a.Viewport,{className:n(r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},t),l.createElement(Se,null)))}o(ee,"SelectContent");function te({className:e,children:t,...r}){return l.createElement(a.Item,{"data-slot":"select-item",className:n("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r},l.createElement(a.ItemText,null,t),l.createElement("span",{className:"flex size-3.5 items-center justify-center"},l.createElement(a.ItemIndicator,null,l.createElement(ge,{className:"size-4"}))))}o(te,"SelectItem");function ye({className:e,...t}){return l.createElement(a.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:n("flex cursor-default items-center justify-center py-1",e),...t},l.createElement(ve,{className:"size-4"}))}o(ye,"SelectScrollUpButton");function Se({className:e,...t}){return l.createElement(a.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:n("flex cursor-default items-center justify-center py-1",e),...t},l.createElement(Y,{className:"size-4"}))}o(Se,"SelectScrollDownButton");import{useFormContext as be}from"react-hook-form";function oe({label:e,name:t,options:r,defaultValue:i,description:s,onChange:d}){let{control:y}=be();return c.createElement(C,{defaultValue:i,control:y,name:t,render:({field:F,fieldState:u})=>c.createElement(S,{className:"RemoteFlows__SelectField__Item"},c.createElement(b,{className:"RemoteFlows__SelectField__Label"},e),c.createElement(x,null,c.createElement("div",{className:"relative"},c.createElement(K,{value:F.value,onValueChange:f=>{F.onChange(f),d?.(f)}},c.createElement(Z,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error},c.createElement("span",{className:"absolute"},c.createElement(X,null))),c.createElement(ee,{className:"RemoteFlows__SelectField__Content"},c.createElement(Q,{className:"RemoteFlows__SelectField__Group"},r.map(f=>c.createElement(te,{key:f.value,value:f.value,className:"RemoteFlows__SelectField__SelectItem"},f.label))))))),s&&c.createElement(P,null,s),u.error&&c.createElement(R,null))})}o(oe,"SelectField");import*as g from"react";import{useFormContext as xe}from"react-hook-form";import*as re from"react";function ie({className:e,type:t,...r}){return re.createElement("input",{type:t,"data-slot":"input",className:n("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}o(ie,"Input");var Ce={type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"};function E({name:e,description:t,label:r,type:i,onChange:s}){let{control:d}=xe(),F=i==="number"?Ce:{type:i};return g.createElement(C,{control:d,name:e,render:({field:u,fieldState:f})=>g.createElement(S,{className:"RemoteFlows__TextField__Item"},g.createElement(b,{className:"RemoteFlows__TextField__Label"},r),g.createElement(x,null,g.createElement(ie,{...u,onChange:h=>{u.onChange(h),s?.(h)},...F,className:"TextField__Input"})),t&&g.createElement(P,{className:"RemoteFlows__TextField__Description"},t),f.error&&g.createElement(R,{className:"RemoteFlows__TextField__Error"}))})}o(E,"TextField");import Pe from"react";var T={text:E,select:oe,radio:q,number:o(e=>Pe.createElement(E,{...e,type:"text"}),"number"),fieldset:J};var ae=o(({fields:e})=>!e||e.length===0?null:V.createElement(V.Fragment,null,e.map(t=>{if(t.isVisible===!1||t.deprecated)return null;let r=T[t.inputType];return r?V.createElement(r,{key:t.name,...t}):V.createElement("p",{className:"error"},"Field type ",t.inputType," not supported")})),"JSONSchemaFormFields");import{useCallback as se}from"react";var Re=o(e=>se(async t=>await e.validate(t,{abortEarly:!1}),[e]),"useValidationYupResolver");function _e(e){return e.inner.reduce((r,i)=>({...r,[i.path]:{type:i.type??"validation",message:i.message}}),{})}o(_e,"iterateErrors");var le=o(e=>{let t=Re(e);return se(async r=>{let i,s={};try{i=await t(r)}catch(d){s=_e(d)}return Object.keys(s).length>0?{values:{},errors:s}:{values:i,errors:{}}},[e])},"useValidationFormResolver");function Mt({estimationOptions:e=M,defaultValues:t={countryRegionSlug:"",currencySlug:"",salary:""},options:r,onSubmit:i,onError:s,onSuccess:d}){let{onSubmit:y,fields:F,validationSchema:u}=O({defaultRegion:t.countryRegionSlug,estimationOptions:e}),f=le(u),h=he({resolver:f,defaultValues:{country:t?.countryRegionSlug,currency:t?.currencySlug,region:"",salary:t?.salary},mode:"onBlur"}),ne=o(async L=>{await i?.(L);let G=await y(L);G.error?s?.(G.error):d?.(G.data)},"handleSubmit");return v.createElement(v.Fragment,null,v.createElement(A,{...h},v.createElement("form",{onSubmit:h.handleSubmit(ne),className:"space-y-4 RemoteFlows__CostCalculatorForm"},v.createElement(ae,{fields:F}),v.createElement(D,{type:"submit",className:"w-full bg-gray-900 hover:bg-gray-800 text-white"},"Save"))),v.createElement("div",{className:"RemoteFlows__CostCalculator__Disclaimer"},v.createElement(B,{label:r?.disclaimer?.label})))}o(Mt,"CostCalculator");export{Mt as a};
2
- //# sourceMappingURL=chunk-V7QTPQZS.js.map