Skip to content

Commit c23ff63

Browse files
authored
Merge pull request #767 from remoteoss/feat/handle-employment-onbording-status
feat: handle employment onboarding status
2 parents caeafe9 + 7d0f783 commit c23ff63

10 files changed

Lines changed: 648 additions & 12 deletions

File tree

example/package-lock.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/sdk.gen.ts

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ import type {
214214
GetSchemaBenefitRenewalRequestData,
215215
GetSchemaBenefitRenewalRequestErrors,
216216
GetSchemaBenefitRenewalRequestResponses,
217+
GetShowBackgroundCheckData,
218+
GetShowBackgroundCheckErrors,
219+
GetShowBackgroundCheckResponses,
217220
GetShowBenefitRenewalRequestData,
218221
GetShowBenefitRenewalRequestErrors,
219222
GetShowBenefitRenewalRequestResponses,
@@ -224,6 +227,9 @@ import type {
224227
GetShowCompanyComplianceProfileErrors,
225228
GetShowCompanyComplianceProfileResponses,
226229
GetShowCompanyData,
230+
GetShowCompanyEmploymentOnboardingReservesStatusData,
231+
GetShowCompanyEmploymentOnboardingReservesStatusErrors,
232+
GetShowCompanyEmploymentOnboardingReservesStatusResponses,
227233
GetShowCompanyErrors,
228234
GetShowCompanyManagerData,
229235
GetShowCompanyManagerErrors,
@@ -567,6 +573,9 @@ import type {
567573
PostUpdateCancelOnboardingData,
568574
PostUpdateCancelOnboardingErrors,
569575
PostUpdateCancelOnboardingResponses,
576+
PostUpdateEmploymentFederalTaxesData,
577+
PostUpdateEmploymentFederalTaxesErrors,
578+
PostUpdateEmploymentFederalTaxesResponses,
570579
PostUploadEmployeeFileFileData,
571580
PostUploadEmployeeFileFileErrors,
572581
PostUploadEmployeeFileFileResponses,
@@ -788,7 +797,10 @@ export const getIndexCompanyPricingPlan = <
788797
GetIndexCompanyPricingPlanErrors,
789798
ThrowOnError
790799
>({
791-
security: [{ scheme: 'bearer', type: 'http' }],
800+
security: [
801+
{ scheme: 'bearer', type: 'http' },
802+
{ scheme: 'bearer', type: 'http' },
803+
],
792804
url: '/v1/companies/{company_id}/pricing-plans',
793805
...options,
794806
});
@@ -1007,6 +1019,35 @@ export const postCreateEmployment2 = <ThrowOnError extends boolean = false>(
10071019
},
10081020
});
10091021

1022+
/**
1023+
* Get Onboarding Reserves Status for Employment
1024+
*
1025+
* Returns the onboarding reserves status for a specific employment.
1026+
*
1027+
* The status is the same as the credit risk status but takes the onboarding reserves policies into account.
1028+
*
1029+
*/
1030+
export const getShowCompanyEmploymentOnboardingReservesStatus = <
1031+
ThrowOnError extends boolean = false,
1032+
>(
1033+
options: Options<
1034+
GetShowCompanyEmploymentOnboardingReservesStatusData,
1035+
ThrowOnError
1036+
>,
1037+
) =>
1038+
(options.client ?? client).get<
1039+
GetShowCompanyEmploymentOnboardingReservesStatusResponses,
1040+
GetShowCompanyEmploymentOnboardingReservesStatusErrors,
1041+
ThrowOnError
1042+
>({
1043+
security: [
1044+
{ scheme: 'bearer', type: 'http' },
1045+
{ scheme: 'bearer', type: 'http' },
1046+
],
1047+
url: '/v1/companies/{company_id}/employments/{employment_id}/onboarding-reserves-status',
1048+
...options,
1049+
});
1050+
10101051
/**
10111052
* Get Help Center Article
10121053
*
@@ -1698,8 +1739,9 @@ export const putApproveContractAmendment = <
16981739
});
16991740

17001741
/**
1701-
* List all currencies for the contractor, in the following order:
1742+
* List all currencies for the contractor
17021743
*
1744+
* The currencies are listed in the following order:
17031745
* 1. billing currency of the company
17041746
* 2. currencies of contractor’s existing withdrawal methods
17051747
* 3. currency of the contractor’s country
@@ -1746,6 +1788,24 @@ export const postReplayWebhookEvent = <ThrowOnError extends boolean = false>(
17461788
},
17471789
});
17481790

1791+
/**
1792+
* Show Background Check
1793+
*
1794+
* Show Background Check details for a given employment and background check request.
1795+
*/
1796+
export const getShowBackgroundCheck = <ThrowOnError extends boolean = false>(
1797+
options: Options<GetShowBackgroundCheckData, ThrowOnError>,
1798+
) =>
1799+
(options.client ?? client).get<
1800+
GetShowBackgroundCheckResponses,
1801+
GetShowBackgroundCheckErrors,
1802+
ThrowOnError
1803+
>({
1804+
security: [{ scheme: 'bearer', type: 'http' }],
1805+
url: '/v1/employments/{employment_id}/background-checks/{background_check_id}',
1806+
...options,
1807+
});
1808+
17491809
/**
17501810
* Show benefit renewal request schema
17511811
*
@@ -2322,6 +2382,56 @@ export const getDownloadResignationLetter = <
23222382
...options,
23232383
});
23242384

2385+
/**
2386+
* Update federal taxes
2387+
*
2388+
* Updates employment's federal taxes.
2389+
*
2390+
* Requirements to update federal taxes successfully:
2391+
* * Employment should be Global Payroll
2392+
* * Employment should be in the post-enrollment state
2393+
* * Employment should belong to USA
2394+
*
2395+
* This endpoint requires and returns country-specific data. The exact required and returned fields will
2396+
* vary depending on which country the employment is in. To see the list of parameters for each country,
2397+
* see the **Show form schema** endpoint under the [Countries](#tag/Countries) category.
2398+
*
2399+
* Please note that the compliance requirements for each country are subject to change according to local
2400+
* laws. Given its continual updates, using Remote's [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) should be considered in order to avoid
2401+
* compliance issues and to have the latest version of a country requirements.
2402+
*
2403+
* If you are using this endpoint to build an integration, make sure you are dynamically collecting or
2404+
* displaying the latest parameters for each country by querying the _"Show form schema"_ endpoint.
2405+
*
2406+
* For more information on JSON Schemas, see the **How JSON Schemas work** documentation.
2407+
*
2408+
* To learn how you can dynamically generate forms to display in your UI, see the documentation for
2409+
* the [json-schema-form](https://developer.remote.com/docs/how-json-schemas-work) tool.
2410+
*
2411+
*
2412+
*/
2413+
export const postUpdateEmploymentFederalTaxes = <
2414+
ThrowOnError extends boolean = false,
2415+
>(
2416+
options: Options<PostUpdateEmploymentFederalTaxesData, ThrowOnError>,
2417+
) =>
2418+
(options.client ?? client).post<
2419+
PostUpdateEmploymentFederalTaxesResponses,
2420+
PostUpdateEmploymentFederalTaxesErrors,
2421+
ThrowOnError
2422+
>({
2423+
security: [
2424+
{ scheme: 'bearer', type: 'http' },
2425+
{ scheme: 'bearer', type: 'http' },
2426+
],
2427+
url: '/v1/employments/{employment_id}/federal-taxes',
2428+
...options,
2429+
headers: {
2430+
'Content-Type': 'application/json',
2431+
...options.headers,
2432+
},
2433+
});
2434+
23252435
/**
23262436
* List Contract Amendment
23272437
*
@@ -3576,7 +3686,12 @@ export const getIndexLeavePoliciesDetails = <
35763686
/**
35773687
* List Time Off Types
35783688
*
3579-
* Lists all time off types that can be used for the `timeoff_type` parameter
3689+
* Lists all time off types that can be used for the `timeoff_type` parameter.
3690+
*
3691+
* **Backward compatibility:** Calling this endpoint without the `type` query parameter returns the same response as before (time off types for full-time employments). Existing integrations do not need to change.
3692+
*
3693+
* Optionally, pass `type=contractor` to get time off types for contractor employments, or `type=full_time` for full-time employments (same as omitting the parameter).
3694+
*
35803695
*/
35813696
export const getTimeoffTypesTimeoff = <ThrowOnError extends boolean = false>(
35823697
options: Options<GetTimeoffTypesTimeoffData, ThrowOnError>,

0 commit comments

Comments
 (0)