From bc274064cc19f2552451ac45bf8660a51833f7b1 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 1 Oct 2025 00:17:34 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.631.5 --- .speakeasy/workflow.lock | 14 +- gusto_embedded/.speakeasy/gen.lock | 25 +- gusto_embedded/.speakeasy/gen.yaml | 2 +- gusto_embedded/README.md | 2 +- gusto_embedded/RELEASES.md | 12 +- .../docs/models/components/amounttype.md | 4 +- .../docs/models/components/deductions.md | 16 +- .../components/employeecompensations.md | 4 +- .../docs/models/components/onboardingstep.md | 17 +- .../docs/models/components/payroll.md | 1 + .../payrollemployeecompensationstype.md | 3 +- .../docs/models/components/payrollshow.md | 1 + .../components/payrollshowamounttype.md | 15 ++ .../components/payrollshowdeductions.md | 18 ++ .../models/components/payrolltaxestype.md | 17 ++ ...getv1companiescompanyidemployeesrequest.md | 4 + ...paniescompanyidpayrollspayrollidrequest.md | 5 +- .../getv1contractordocumentpdfrequest.md | 2 +- .../getv1contractordocumentrequest.md | 2 +- .../operations/postv1employeesrequestbody.md | 1 + .../putv1contractordocumentsignrequest.md | 2 +- .../operations/putv1employeesrequest.md | 2 +- .../operations/putv1employeesrequestbody.md | 6 +- .../docs/models/operations/sortby.md | 17 ++ .../docs/sdks/contractors/README.md | 22 +- gusto_embedded/docs/sdks/employees/README.md | 4 +- gusto_embedded/docs/sdks/payrolls/README.md | 7 +- gusto_embedded/examples/package-lock.json | 2 +- gusto_embedded/jsr.json | 2 +- gusto_embedded/package-lock.json | 4 +- gusto_embedded/package.json | 2 +- ...aniesCompanyIdContractorsPaymentDetails.ts | 22 +- gusto_embedded/src/funcs/employeesList.ts | 4 + gusto_embedded/src/funcs/payrollsGet.ts | 15 +- .../src/funcs/payrollsGetPayStub.ts | 10 +- gusto_embedded/src/lib/config.ts | 6 +- .../companybenefitwithemployeebenefits.ts | 20 +- .../components/companyonboardingstatus.ts | 17 +- .../src/models/components/employeebenefit.ts | 16 +- .../employeebenefitforcompanybenefit.ts | 18 +- .../src/models/components/payroll.ts | 15 ++ .../payrollemployeecompensationstype.ts | 124 +++++++++ .../src/models/components/payrollshow.ts | 235 ++++++++++-------- .../src/models/components/payrolltaxestype.ts | 83 +++++++ .../getv1companiescompanyidemployees.ts | 36 +++ ...etv1companiescompanyidpayrollspayrollid.ts | 54 ++++ .../operations/getv1contractordocument.ts | 2 +- .../operations/getv1contractordocumentpdf.ts | 2 +- .../src/models/operations/postv1employees.ts | 9 + .../operations/putv1contractordocumentsign.ts | 2 +- .../src/models/operations/putv1employees.ts | 12 +- ...aniesCompanyIdContractorsPaymentDetails.ts | 44 +++- .../src/react-query/employeesList.ts | 16 ++ gusto_embedded/src/react-query/payrollsGet.ts | 13 + gusto_embedded/src/sdk/contractors.ts | 22 +- 55 files changed, 815 insertions(+), 217 deletions(-) create mode 100644 gusto_embedded/docs/models/components/payrollshowamounttype.md create mode 100644 gusto_embedded/docs/models/components/payrollshowdeductions.md create mode 100644 gusto_embedded/docs/models/components/payrolltaxestype.md create mode 100644 gusto_embedded/docs/models/operations/sortby.md create mode 100644 gusto_embedded/src/models/components/payrolltaxestype.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1adeda7b..4af82add 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.625.0 +speakeasyVersion: 1.631.5 sources: GustoEmbedded-OAS: sourceNamespace: gusto-embedded-oas - sourceRevisionDigest: sha256:ba2e4cb80c8e43d6ed8f1120a2d35f87df1ecaa5cd5ac14ad15fa7b6be410d3d - sourceBlobDigest: sha256:d781c54e58569318974df73862133c8ada242502b22e3e0b90ac59c4ce299cd4 + sourceRevisionDigest: sha256:3f8b0fedc1493feb3c1816a2f090175b5984b8019e0430dc2d8689a1655b5156 + sourceBlobDigest: sha256:011ff1444fda8dbeb55be81e01279f6050555d28c9e8c3a325f9ed29bdfe4025 tags: - latest - - speakeasy-sdk-regen-1758327195 + - speakeasy-sdk-regen-1758845608 - "2024-04-01" targets: gusto-embedded: source: GustoEmbedded-OAS sourceNamespace: gusto-embedded-oas - sourceRevisionDigest: sha256:ba2e4cb80c8e43d6ed8f1120a2d35f87df1ecaa5cd5ac14ad15fa7b6be410d3d - sourceBlobDigest: sha256:d781c54e58569318974df73862133c8ada242502b22e3e0b90ac59c4ce299cd4 + sourceRevisionDigest: sha256:3f8b0fedc1493feb3c1816a2f090175b5984b8019e0430dc2d8689a1655b5156 + sourceBlobDigest: sha256:011ff1444fda8dbeb55be81e01279f6050555d28c9e8c3a325f9ed29bdfe4025 codeSamplesNamespace: gusto-embedded-oas-typescript-code-samples - codeSamplesRevisionDigest: sha256:9ce832088b483dc7c8c9f525ead585721566723b84254f76a2e892f95c01e314 + codeSamplesRevisionDigest: sha256:cbfcfde44aaabf94b1d894fd2392f697c436b283a80591ff1d5688a3679d22c2 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/gusto_embedded/.speakeasy/gen.lock b/gusto_embedded/.speakeasy/gen.lock index aabc2c50..7db31163 100644 --- a/gusto_embedded/.speakeasy/gen.lock +++ b/gusto_embedded/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f0264e24-cbe2-4074-b157-7a6ba8979508 management: - docChecksum: bf6982b8447b19879159d06ed77b3252 + docChecksum: 60065968053490c2692c2b6b0861775b docVersion: "2024-04-01" - speakeasyVersion: 1.625.0 - generationVersion: 2.715.0 - releaseVersion: 0.7.0 - configChecksum: 9346f7ccdea3ffb5dc607e3c7342f044 + speakeasyVersion: 1.631.5 + generationVersion: 2.716.16 + releaseVersion: 0.7.1 + configChecksum: 78b3c210a41c40e3bccbc138c03b97c0 repoURL: https://github.com/Gusto/gusto-typescript-client.git repoSubDirectory: gusto_embedded installationURL: https://gitpkg.now.sh/Gusto/gusto-typescript-client/gusto_embedded @@ -38,7 +38,7 @@ features: retries: 2.83.0 sdkHooks: 0.3.0 serverIDs: 2.81.2 - unions: 2.85.11 + unions: 2.85.12 uploadStreams: 0.1.0 generatedFiles: - .devcontainer/README.md @@ -351,7 +351,9 @@ generatedFiles: - docs/models/components/payrollreceiptpaymentmethod.md - docs/models/components/payrollreversal.md - docs/models/components/payrollshow.md + - docs/models/components/payrollshowamounttype.md - docs/models/components/payrollshowbenefits.md + - docs/models/components/payrollshowdeductions.md - docs/models/components/payrollshowfixedcompensations.md - docs/models/components/payrollshowhourlycompensations.md - docs/models/components/payrollshowpaidtimeoff.md @@ -360,6 +362,7 @@ generatedFiles: - docs/models/components/payrollsubmissionblockerstype.md - docs/models/components/payrollsubmissionblockerstypemetadata.md - docs/models/components/payrollsubmissionblockerstypestatus.md + - docs/models/components/payrolltaxestype.md - docs/models/components/payrolltotalstype.md - docs/models/components/payrolltype.md - docs/models/components/payrollupdate.md @@ -1298,6 +1301,7 @@ generatedFiles: - docs/models/operations/resource.md - docs/models/operations/resourceowner.md - docs/models/operations/responsebody.md + - docs/models/operations/sortby.md - docs/models/operations/sortorder.md - docs/models/operations/splitby.md - docs/models/operations/splits.md @@ -1782,6 +1786,7 @@ generatedFiles: - src/models/components/payrollreversal.ts - src/models/components/payrollshow.ts - src/models/components/payrollsubmissionblockerstype.ts + - src/models/components/payrolltaxestype.ts - src/models/components/payrolltotalstype.ts - src/models/components/payrollupdate.ts - src/models/components/payrollwithholdingpayperiodtype.ts @@ -2749,7 +2754,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "c44d66dc-c41b-4a60-9e25-5e93ff8583f2", "onboarding_completed": false, "onboarding_steps": [{"title": "Add Your Company's Addresses", "id": "add_addresses", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Enter Your Federal Tax Information", "id": "federal_tax_setup", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Select Industry", "id": "select_industry", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Add Your Bank Account", "id": "add_bank_info", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Add Your Employees", "id": "add_employees", "required": true, "completed": true, "skippable": true, "requirements": ["add_addresses"]}, {"title": "Enter Your State Tax Information", "id": "state_setup", "required": true, "completed": false, "skippable": false, "requirements": ["add_addresses", "add_employees"]}, {"title": "Select a Pay Schedule", "id": "payroll_schedule", "required": true, "completed": false, "skippable": false, "requirements": []}, {"title": "Sign Documents", "id": "sign_all_forms", "required": true, "completed": false, "skippable": false, "requirements": ["add_employees", "federal_tax_setup", "state_setup", "add_bank_info", "payroll_schedule"]}, {"title": "Verify Your Bank Account", "id": "verify_bank_info", "required": true, "completed": false, "skippable": false, "requirements": ["add_bank_info"]}]} + application/json: {"uuid": "c44d66dc-c41b-4a60-9e25-5e93ff8583f2", "onboarding_completed": false, "onboarding_steps": [{"title": "Add Your Company's Addresses", "id": "add_addresses", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Enter Your Federal Tax Information", "id": "federal_tax_setup", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Select Industry", "id": "select_industry", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Add Your Bank Account", "id": "add_bank_info", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Add Your Employees", "id": "add_employees", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": true, "requirements": ["add_addresses"]}, {"title": "Enter Your State Tax Information", "id": "state_setup", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": ["add_addresses", "add_employees"]}, {"title": "Select a Pay Schedule", "id": "payroll_schedule", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": []}, {"title": "Sign Documents", "id": "sign_all_forms", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": ["add_employees", "federal_tax_setup", "state_setup", "add_bank_info", "payroll_schedule"]}, {"title": "Verify Your Bank Account", "id": "verify_bank_info", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": ["add_bank_info"]}]} get-v1-company-finish-onboarding: Example: parameters: @@ -4357,7 +4362,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "date_of_birth": "1991-01-31", "ssn": "824920233", "work_email": "new.partner.work@example.com"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "work_email": "new.partner.work@example.com", "date_of_birth": "1991-01-31", "ssn": "824920233"} responses: "200": application/json: {"uuid": "2953c680-3178-4466-8441-8947dce42145", "first_name": "Pearl", "last_name": "Volkman", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} @@ -7322,7 +7327,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10", "metadata": {}}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} + application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "payroll_taxes": [{"name": "Federal Income Tax", "employer": false, "amount": 3546.72}, {"name": "Social Security", "employer": true, "amount": 786}, {"name": "Social Security", "employer": false, "amount": 786}, {"name": "CA State Income Tax", "employer": false, "amount": 132.51}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10", "metadata": {}}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} Basic: parameters: path: @@ -7364,6 +7369,8 @@ examples: responses: "200": application/pdf: "x-file: example.file" + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-employees-employee_uuid-pay_stubs: test_example: parameters: diff --git a/gusto_embedded/.speakeasy/gen.yaml b/gusto_embedded/.speakeasy/gen.yaml index 1466c4ca..b41a8197 100644 --- a/gusto_embedded/.speakeasy/gen.yaml +++ b/gusto_embedded/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.7.0 + version: 0.7.1 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/gusto_embedded/README.md b/gusto_embedded/README.md index 5715ed9f..edcbe3f3 100644 --- a/gusto_embedded/README.md +++ b/gusto_embedded/README.md @@ -1351,7 +1351,7 @@ run(); **Inherit from [`GustoEmbeddedError`](./src/models/errors/gustoembeddederror.ts)**: -* [`UnprocessableEntityErrorObject`](./src/models/errors/unprocessableentityerrorobject.ts): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Applicable to 139 of 261 methods.* +* [`UnprocessableEntityErrorObject`](./src/models/errors/unprocessableentityerrorobject.ts): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Applicable to 140 of 261 methods.* * [`NotFoundErrorObject`](./src/models/errors/notfounderrorobject.ts): Not Found The requested resource does not exist. Make sure the provided ID/UUID is valid. Status code `404`. Applicable to 4 of 261 methods.* * [`UnprocessableEntityErrorObject1`](./src/models/errors/unprocessableentityerrorobject1.ts): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Status code `422`. Applicable to 4 of 261 methods.* * [`PayrollBlockersError`](./src/models/errors/payrollblockerserror.ts): Payroll Blockers Error For detailed information, see the [Payroll Blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers). Status code `422`. Applicable to 4 of 261 methods.* diff --git a/gusto_embedded/RELEASES.md b/gusto_embedded/RELEASES.md index 788bf06c..1a60273a 100644 --- a/gusto_embedded/RELEASES.md +++ b/gusto_embedded/RELEASES.md @@ -368,4 +368,14 @@ Based on: ### Generated - [typescript v0.7.0] gusto_embedded ### Releases -- [NPM v0.7.0] https://www.npmjs.com/package/@gusto/embedded-api/v/0.7.0 - gusto_embedded \ No newline at end of file +- [NPM v0.7.0] https://www.npmjs.com/package/@gusto/embedded-api/v/0.7.0 - gusto_embedded + +## 2025-10-01 00:15:33 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.631.5 (2.716.16) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.7.1] gusto_embedded +### Releases +- [NPM v0.7.1] https://www.npmjs.com/package/@gusto/embedded-api/v/0.7.1 - gusto_embedded \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/amounttype.md b/gusto_embedded/docs/models/components/amounttype.md index f7d24d1c..bd3c03cc 100644 --- a/gusto_embedded/docs/models/components/amounttype.md +++ b/gusto_embedded/docs/models/components/amounttype.md @@ -1,9 +1,11 @@ # AmountType +The amount type of the deduction for the pay period. + ## Example Usage ```typescript -import { AmountType } from "@gusto/embedded-api/models/components/payrollshow.js"; +import { AmountType } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype.js"; let value: AmountType = "percent"; ``` diff --git a/gusto_embedded/docs/models/components/deductions.md b/gusto_embedded/docs/models/components/deductions.md index 2a14f485..dd5fef83 100644 --- a/gusto_embedded/docs/models/components/deductions.md +++ b/gusto_embedded/docs/models/components/deductions.md @@ -1,18 +1,20 @@ # Deductions +An array of deductions for the employee. + ## Example Usage ```typescript -import { Deductions } from "@gusto/embedded-api/models/components/payrollshow.js"; +import { Deductions } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype.js"; let value: Deductions = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `amount` | *number* | :heavy_minus_sign: | N/A | -| `amountType` | [components.AmountType](../../models/components/amounttype.md) | :heavy_minus_sign: | N/A | -| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the deduction. | +| `amount` | *number* | :heavy_minus_sign: | The amount of the deduction for the pay period. | +| `amountType` | [components.AmountType](../../models/components/amounttype.md) | :heavy_minus_sign: | The amount type of the deduction for the pay period. | +| `uuid` | *string* | :heavy_minus_sign: | The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/employeecompensations.md b/gusto_embedded/docs/models/components/employeecompensations.md index fe33ef5e..eb579324 100644 --- a/gusto_embedded/docs/models/components/employeecompensations.md +++ b/gusto_embedded/docs/models/components/employeecompensations.md @@ -26,6 +26,6 @@ let value: EmployeeCompensations = {}; | `fixedCompensations` | [components.PayrollShowFixedCompensations](../../models/components/payrollshowfixedcompensations.md)[] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | | `hourlyCompensations` | [components.PayrollShowHourlyCompensations](../../models/components/payrollshowhourlycompensations.md)[] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | | `paidTimeOff` | [components.PayrollShowPaidTimeOff](../../models/components/payrollshowpaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | +| `deductions` | [components.PayrollShowDeductions](../../models/components/payrollshowdeductions.md)[] | :heavy_minus_sign: | An array of employee deductions for the pay period. | | `taxes` | [components.PayrollShowTaxes](../../models/components/payrollshowtaxes.md)[] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | -| `benefits` | [components.PayrollShowBenefits](../../models/components/payrollshowbenefits.md)[] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | -| `deductions` | [components.Deductions](../../models/components/deductions.md)[] | :heavy_minus_sign: | An array of employee deductions for the pay period. | \ No newline at end of file +| `benefits` | [components.PayrollShowBenefits](../../models/components/payrollshowbenefits.md)[] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/onboardingstep.md b/gusto_embedded/docs/models/components/onboardingstep.md index 0f54b76c..43b26955 100644 --- a/gusto_embedded/docs/models/components/onboardingstep.md +++ b/gusto_embedded/docs/models/components/onboardingstep.md @@ -10,11 +10,12 @@ let value: OnboardingStep = {}; ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `title` | *string* | :heavy_minus_sign: | The display name of the onboarding step | -| `id` | [components.Id](../../models/components/id.md) | :heavy_minus_sign: | The string identifier for each onboarding step | -| `required` | *boolean* | :heavy_minus_sign: | The boolean flag indicating whether the step is required or optional | -| `completed` | *boolean* | :heavy_minus_sign: | The boolean flag indicating whether the step is completed or not. | -| `skippable` | *boolean* | :heavy_minus_sign: | The boolean flag indicating whether the step can be skipped or not. | -| `requirements` | [components.Requirements](../../models/components/requirements.md)[] | :heavy_minus_sign: | A list of onboarding step that are required to be completed in order to proceed with the current onboarding step. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `title` | *string* | :heavy_minus_sign: | The display name of the onboarding step | +| `id` | [components.Id](../../models/components/id.md) | :heavy_minus_sign: | The string identifier for each onboarding step | +| `required` | *boolean* | :heavy_minus_sign: | The boolean flag indicating whether the step is required or optional | +| `completed` | *boolean* | :heavy_minus_sign: | The boolean flag indicating whether the step is completed or not. | +| `completedAt` | *string* | :heavy_minus_sign: | The ISO 8601 timestamp indicating when the onboarding step was completed. Returns null for incomplete steps. | +| `skippable` | *boolean* | :heavy_minus_sign: | The boolean flag indicating whether the step can be skipped or not. | +| `requirements` | [components.Requirements](../../models/components/requirements.md)[] | :heavy_minus_sign: | A list of onboarding steps that are required to be completed in order to proceed with the current onboarding step. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payroll.md b/gusto_embedded/docs/models/components/payroll.md index 828eb73a..0008a403 100644 --- a/gusto_embedded/docs/models/components/payroll.md +++ b/gusto_embedded/docs/models/components/payroll.md @@ -32,6 +32,7 @@ let value: Payroll = {}; | `payrollStatusMeta` | [components.PayrollPayrollStatusMetaType](../../models/components/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [components.PayrollTotalsType](../../models/components/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | | `companyTaxes` | [components.PayrollCompanyTaxesType](../../models/components/payrollcompanytaxestype.md)[] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `payrollTaxes` | [components.PayrollTaxesType](../../models/components/payrolltaxestype.md)[] | :heavy_minus_sign: | An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. | | `paymentSpeedChanged` | [components.PayrollPaymentSpeedChangedType](../../models/components/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Datetime for when the resource was created. | | `submissionBlockers` | [components.PayrollSubmissionBlockersType](../../models/components/payrollsubmissionblockerstype.md)[] | :heavy_minus_sign: | Only included for processed or calculated payrolls | diff --git a/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md b/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md index 2e3f2e9f..d3976430 100644 --- a/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md +++ b/gusto_embedded/docs/models/components/payrollemployeecompensationstype.md @@ -25,4 +25,5 @@ let value: PayrollEmployeeCompensationsType = {}; | `memo` | *string* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | | `fixedCompensations` | [components.FixedCompensations](../../models/components/fixedcompensations.md)[] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | | `hourlyCompensations` | [components.HourlyCompensations](../../models/components/hourlycompensations.md)[] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | -| `paidTimeOff` | [components.PayrollEmployeeCompensationsTypePaidTimeOff](../../models/components/payrollemployeecompensationstypepaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | \ No newline at end of file +| `paidTimeOff` | [components.PayrollEmployeeCompensationsTypePaidTimeOff](../../models/components/payrollemployeecompensationstypepaidtimeoff.md)[] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | +| `deductions` | [components.Deductions](../../models/components/deductions.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshow.md b/gusto_embedded/docs/models/components/payrollshow.md index 6084b221..41197b6f 100644 --- a/gusto_embedded/docs/models/components/payrollshow.md +++ b/gusto_embedded/docs/models/components/payrollshow.md @@ -32,6 +32,7 @@ let value: PayrollShow = {}; | `payrollStatusMeta` | [components.PayrollPayrollStatusMetaType](../../models/components/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [components.PayrollTotalsType](../../models/components/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | | `companyTaxes` | [components.PayrollCompanyTaxesType](../../models/components/payrollcompanytaxestype.md)[] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `payrollTaxes` | [components.PayrollTaxesType](../../models/components/payrolltaxestype.md)[] | :heavy_minus_sign: | An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. | | `paymentSpeedChanged` | [components.PayrollPaymentSpeedChangedType](../../models/components/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Datetime for when the resource was created. | | `submissionBlockers` | [components.PayrollSubmissionBlockersType](../../models/components/payrollsubmissionblockerstype.md)[] | :heavy_minus_sign: | Only included for processed or calculated payrolls | diff --git a/gusto_embedded/docs/models/components/payrollshowamounttype.md b/gusto_embedded/docs/models/components/payrollshowamounttype.md new file mode 100644 index 00000000..88559c06 --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowamounttype.md @@ -0,0 +1,15 @@ +# PayrollShowAmountType + +## Example Usage + +```typescript +import { PayrollShowAmountType } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowAmountType = "percent"; +``` + +## Values + +```typescript +"fixed" | "percent" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrollshowdeductions.md b/gusto_embedded/docs/models/components/payrollshowdeductions.md new file mode 100644 index 00000000..d50bdf1f --- /dev/null +++ b/gusto_embedded/docs/models/components/payrollshowdeductions.md @@ -0,0 +1,18 @@ +# PayrollShowDeductions + +## Example Usage + +```typescript +import { PayrollShowDeductions } from "@gusto/embedded-api/models/components/payrollshow.js"; + +let value: PayrollShowDeductions = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `amount` | *number* | :heavy_minus_sign: | N/A | +| `amountType` | [components.PayrollShowAmountType](../../models/components/payrollshowamounttype.md) | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/payrolltaxestype.md b/gusto_embedded/docs/models/components/payrolltaxestype.md new file mode 100644 index 00000000..e8ce6f53 --- /dev/null +++ b/gusto_embedded/docs/models/components/payrolltaxestype.md @@ -0,0 +1,17 @@ +# PayrollTaxesType + +## Example Usage + +```typescript +import { PayrollTaxesType } from "@gusto/embedded-api/models/components/payrolltaxestype.js"; + +let value: PayrollTaxesType = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The tax name | +| `employer` | *boolean* | :heavy_minus_sign: | Whether this tax is an employer or employee tax | +| `amount` | *number* | :heavy_minus_sign: | The total tax for the payroll | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md index d3138280..9b6f80df 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidemployeesrequest.md @@ -16,9 +16,13 @@ let value: GetV1CompaniesCompanyIdEmployeesRequest = { | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `xGustoAPIVersion` | [operations.GetV1CompaniesCompanyIdEmployeesHeaderXGustoAPIVersion](../../models/operations/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `companyId` | *string* | :heavy_check_mark: | The UUID of the company | +| `locationUuid` | *string* | :heavy_minus_sign: | Filter employees by a specific primary work location | +| `payrollUuid` | *string* | :heavy_minus_sign: | Filter employees by a specific payroll | | `searchTerm` | *string* | :heavy_minus_sign: | A string to search for in the object's names | +| `sortBy` | *string* | :heavy_minus_sign: | Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status | | `include` | [operations.Include](../../models/operations/include.md)[] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | | `onboarded` | *boolean* | :heavy_minus_sign: | Filters employees by those who have completed onboarding | +| `onboardedActive` | *boolean* | :heavy_minus_sign: | Filters employees who are ready to work (onboarded AND active today) | | `terminated` | *boolean* | :heavy_minus_sign: | Filters employees by those who have been or are scheduled to be terminated | | `terminatedToday` | *boolean* | :heavy_minus_sign: | Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) | | `uuids` | *string*[] | :heavy_minus_sign: | Optional subset of employees to fetch. | diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidrequest.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidrequest.md index 4beaa94f..ebf3bbe2 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidrequest.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidpayrollspayrollidrequest.md @@ -18,4 +18,7 @@ let value: GetV1CompaniesCompanyIdPayrollsPayrollIdRequest = { | `companyId` | *string* | :heavy_check_mark: | The UUID of the company | | `payrollId` | *string* | :heavy_check_mark: | The UUID of the payroll | | `xGustoAPIVersion` | [operations.GetV1CompaniesCompanyIdPayrollsPayrollIdHeaderXGustoAPIVersion](../../models/operations/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `include` | [operations.GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude](../../models/operations/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md)[] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | \ No newline at end of file +| `include` | [operations.GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude](../../models/operations/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md)[] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | +| `page` | *number* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *number* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sortBy` | [operations.SortBy](../../models/operations/sortby.md) | :heavy_minus_sign: | Field to sort employee compensations by | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1contractordocumentpdfrequest.md b/gusto_embedded/docs/models/operations/getv1contractordocumentpdfrequest.md index 284127cf..ca990fe5 100644 --- a/gusto_embedded/docs/models/operations/getv1contractordocumentpdfrequest.md +++ b/gusto_embedded/docs/models/operations/getv1contractordocumentpdfrequest.md @@ -14,5 +14,5 @@ let value: GetV1ContractorDocumentPdfRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `documentUuid` | *string* | :heavy_check_mark: | The ID or UUID of the document | +| `documentUuid` | *string* | :heavy_check_mark: | The UUID of the document | | `xGustoAPIVersion` | [components.VersionHeader](../../models/components/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1contractordocumentrequest.md b/gusto_embedded/docs/models/operations/getv1contractordocumentrequest.md index 224cceb1..c1009863 100644 --- a/gusto_embedded/docs/models/operations/getv1contractordocumentrequest.md +++ b/gusto_embedded/docs/models/operations/getv1contractordocumentrequest.md @@ -14,5 +14,5 @@ let value: GetV1ContractorDocumentRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `documentUuid` | *string* | :heavy_check_mark: | The ID or UUID of the document | +| `documentUuid` | *string* | :heavy_check_mark: | The UUID of the document | | `xGustoAPIVersion` | [components.VersionHeader](../../models/components/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1employeesrequestbody.md b/gusto_embedded/docs/models/operations/postv1employeesrequestbody.md index 7e54f664..353f90a2 100644 --- a/gusto_embedded/docs/models/operations/postv1employeesrequestbody.md +++ b/gusto_embedded/docs/models/operations/postv1employeesrequestbody.md @@ -19,6 +19,7 @@ let value: PostV1EmployeesRequestBody = { | `middleInitial` | *string* | :heavy_minus_sign: | N/A | | `lastName` | *string* | :heavy_check_mark: | N/A | | `email` | *string* | :heavy_minus_sign: | The employee's personal email address. | +| `workEmail` | *string* | :heavy_minus_sign: | The employee's work email address. | | `dateOfBirth` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | N/A | | `ssn` | *string* | :heavy_minus_sign: | N/A | | `preferredFirstName` | *string* | :heavy_minus_sign: | N/A | diff --git a/gusto_embedded/docs/models/operations/putv1contractordocumentsignrequest.md b/gusto_embedded/docs/models/operations/putv1contractordocumentsignrequest.md index 3f679fc3..46b7ee71 100644 --- a/gusto_embedded/docs/models/operations/putv1contractordocumentsignrequest.md +++ b/gusto_embedded/docs/models/operations/putv1contractordocumentsignrequest.md @@ -20,7 +20,7 @@ let value: PutV1ContractorDocumentSignRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `documentUuid` | *string* | :heavy_check_mark: | The ID or UUID of the document | +| `documentUuid` | *string* | :heavy_check_mark: | The UUID of the document | | `xGustoClientIp` | *string* | :heavy_minus_sign: | Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter. | | `xGustoAPIVersion` | [components.VersionHeader](../../models/components/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `requestBody` | [operations.PutV1ContractorDocumentSignRequestBody](../../models/operations/putv1contractordocumentsignrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/putv1employeesrequest.md b/gusto_embedded/docs/models/operations/putv1employeesrequest.md index 24e704fa..031ecaa5 100644 --- a/gusto_embedded/docs/models/operations/putv1employeesrequest.md +++ b/gusto_embedded/docs/models/operations/putv1employeesrequest.md @@ -13,9 +13,9 @@ let value: PutV1EmployeesRequest = { middleInitial: "F", lastName: "Baby", email: "tunechi@cashmoneyrecords.com", + workEmail: "new.partner.work@example.com", dateOfBirth: "1991-01-31", ssn: "824920233", - workEmail: "new.partner.work@example.com", }, }; ``` diff --git a/gusto_embedded/docs/models/operations/putv1employeesrequestbody.md b/gusto_embedded/docs/models/operations/putv1employeesrequestbody.md index 7261dade..862fbf07 100644 --- a/gusto_embedded/docs/models/operations/putv1employeesrequestbody.md +++ b/gusto_embedded/docs/models/operations/putv1employeesrequestbody.md @@ -11,9 +11,9 @@ let value: PutV1EmployeesRequestBody = { middleInitial: "F", lastName: "Baby", email: "tunechi@cashmoneyrecords.com", + workEmail: "new.partner.work@example.com", dateOfBirth: "1991-01-31", ssn: "824920233", - workEmail: "new.partner.work@example.com", }; ``` @@ -26,8 +26,8 @@ let value: PutV1EmployeesRequestBody = { | `middleInitial` | *string* | :heavy_minus_sign: | N/A | F | | `lastName` | *string* | :heavy_minus_sign: | N/A | Baby | | `email` | *string* | :heavy_minus_sign: | N/A | tunechi@cashmoneyrecords.com | +| `workEmail` | *string* | :heavy_minus_sign: | N/A | new.partner.work@example.com | | `dateOfBirth` | *string* | :heavy_minus_sign: | N/A | 1991-01-31 | | `ssn` | *string* | :heavy_minus_sign: | N/A | 824920233 | | `preferredFirstName` | *string* | :heavy_minus_sign: | N/A | | -| `twoPercentShareholder` | *boolean* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | -| `workEmail` | *string* | :heavy_minus_sign: | N/A | new.partner.work@example.com | \ No newline at end of file +| `twoPercentShareholder` | *boolean* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/sortby.md b/gusto_embedded/docs/models/operations/sortby.md new file mode 100644 index 00000000..27944ed3 --- /dev/null +++ b/gusto_embedded/docs/models/operations/sortby.md @@ -0,0 +1,17 @@ +# SortBy + +Field to sort employee compensations by + +## Example Usage + +```typescript +import { SortBy } from "@gusto/embedded-api/models/operations/getv1companiescompanyidpayrollspayrollid.js"; + +let value: SortBy = "last_name"; +``` + +## Values + +```typescript +"first_name" | "last_name" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractors/README.md b/gusto_embedded/docs/sdks/contractors/README.md index b3d1f901..73a76262 100644 --- a/gusto_embedded/docs/sdks/contractors/README.md +++ b/gusto_embedded/docs/sdks/contractors/README.md @@ -995,12 +995,30 @@ import { ## getV1CompaniesCompanyIdContractorsPaymentDetails -Get payment details for contractors in a company. This endpoint returns a list of all contractors associated with the specified company, including their payment methods and bank account details if they are paid via direct deposit. +Get payment details for contractors in a company. This endpoint returns a list of all contractors +associated with the specified company, including their payment methods and bank account details +if they are paid via direct deposit. -For contractors paid by direct deposit, the response includes their bank account information. +For contractors paid by direct deposit, the response includes their bank account information +with sensitive data masked for security. The payment details also include information about +how their payments are split if they have multiple bank accounts configured. For contractors paid by check, only the basic payment method information is returned. +### Response Details +- For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types +- For check payments: + - Basic payment method designation + +### Common Use Cases +- Fetching contractor payment information for payroll processing +- Verifying contractor payment methods +- Reviewing payment split configurations + `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. scope: `contractor_payment_methods:read` diff --git a/gusto_embedded/docs/sdks/employees/README.md b/gusto_embedded/docs/sdks/employees/README.md index fd19cb07..bd05ddaf 100644 --- a/gusto_embedded/docs/sdks/employees/README.md +++ b/gusto_embedded/docs/sdks/employees/README.md @@ -617,9 +617,9 @@ async function run() { middleInitial: "F", lastName: "Baby", email: "tunechi@cashmoneyrecords.com", + workEmail: "new.partner.work@example.com", dateOfBirth: "1991-01-31", ssn: "824920233", - workEmail: "new.partner.work@example.com", }, }); @@ -652,9 +652,9 @@ async function run() { middleInitial: "F", lastName: "Baby", email: "tunechi@cashmoneyrecords.com", + workEmail: "new.partner.work@example.com", dateOfBirth: "1991-01-31", ssn: "824920233", - workEmail: "new.partner.work@example.com", }, }); if (res.ok) { diff --git a/gusto_embedded/docs/sdks/payrolls/README.md b/gusto_embedded/docs/sdks/payrolls/README.md index e7c96610..12a16072 100644 --- a/gusto_embedded/docs/sdks/payrolls/README.md +++ b/gusto_embedded/docs/sdks/payrolls/README.md @@ -1611,9 +1611,10 @@ import { ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UnprocessableEntityErrorObject | 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## getPayStubs diff --git a/gusto_embedded/examples/package-lock.json b/gusto_embedded/examples/package-lock.json index ed712295..80a9a4af 100644 --- a/gusto_embedded/examples/package-lock.json +++ b/gusto_embedded/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gusto/embedded-api", - "version": "0.7.0", + "version": "0.7.1", "dependencies": { "zod": "^3.20.0" }, diff --git a/gusto_embedded/jsr.json b/gusto_embedded/jsr.json index aa7656e1..1351f2b6 100644 --- a/gusto_embedded/jsr.json +++ b/gusto_embedded/jsr.json @@ -2,7 +2,7 @@ { "name": "@gusto/embedded-api", - "version": "0.7.0", + "version": "0.7.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/gusto_embedded/package-lock.json b/gusto_embedded/package-lock.json index 36c561ef..beea7e89 100644 --- a/gusto_embedded/package-lock.json +++ b/gusto_embedded/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gusto/embedded-api", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gusto/embedded-api", - "version": "0.7.0", + "version": "0.7.1", "dependencies": { "zod": "^3.20.0" }, diff --git a/gusto_embedded/package.json b/gusto_embedded/package.json index 72314167..19663db6 100644 --- a/gusto_embedded/package.json +++ b/gusto_embedded/package.json @@ -1,6 +1,6 @@ { "name": "@gusto/embedded-api", - "version": "0.7.0", + "version": "0.7.1", "author": "Speakeasy", "type": "module", "main": "./esm/index.js", diff --git a/gusto_embedded/src/funcs/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts b/gusto_embedded/src/funcs/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts index b31c1b11..fc2b6e9a 100644 --- a/gusto_embedded/src/funcs/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts +++ b/gusto_embedded/src/funcs/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts @@ -37,12 +37,30 @@ import { Result } from "../types/fp.js"; * List contractor payment details * * @remarks - * Get payment details for contractors in a company. This endpoint returns a list of all contractors associated with the specified company, including their payment methods and bank account details if they are paid via direct deposit. + * Get payment details for contractors in a company. This endpoint returns a list of all contractors + * associated with the specified company, including their payment methods and bank account details + * if they are paid via direct deposit. * - * For contractors paid by direct deposit, the response includes their bank account information. + * For contractors paid by direct deposit, the response includes their bank account information + * with sensitive data masked for security. The payment details also include information about + * how their payments are split if they have multiple bank accounts configured. * * For contractors paid by check, only the basic payment method information is returned. * + * ### Response Details + * - For direct deposit contractors: + * - Bank account details (masked) + * - Payment splits configuration + * - Routing numbers + * - Account types + * - For check payments: + * - Basic payment method designation + * + * ### Common Use Cases + * - Fetching contractor payment information for payroll processing + * - Verifying contractor payment methods + * - Reviewing payment split configurations + * * `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. * * scope: `contractor_payment_methods:read` diff --git a/gusto_embedded/src/funcs/employeesList.ts b/gusto_embedded/src/funcs/employeesList.ts index 96b9bd49..e4c8e6f3 100644 --- a/gusto_embedded/src/funcs/employeesList.ts +++ b/gusto_embedded/src/funcs/employeesList.ts @@ -114,10 +114,14 @@ async function $do( "uuids": payload.uuids, }, { explode: false }), encodeFormQuery({ + "location_uuid": payload.location_uuid, "onboarded": payload.onboarded, + "onboarded_active": payload.onboarded_active, "page": payload.page, + "payroll_uuid": payload.payroll_uuid, "per": payload.per, "search_term": payload.search_term, + "sort_by": payload.sort_by, "terminated": payload.terminated, "terminated_today": payload.terminated_today, }), diff --git a/gusto_embedded/src/funcs/payrollsGet.ts b/gusto_embedded/src/funcs/payrollsGet.ts index 3a2c8b60..3720454a 100644 --- a/gusto_embedded/src/funcs/payrollsGet.ts +++ b/gusto_embedded/src/funcs/payrollsGet.ts @@ -3,7 +3,7 @@ */ import { GustoEmbeddedCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -123,9 +123,16 @@ async function $do( pathParams, ); - const query = encodeFormQuery({ - "include": payload.include, - }, { explode: false }); + const query = queryJoin( + encodeFormQuery({ + "include": payload.include, + }, { explode: false }), + encodeFormQuery({ + "page": payload.page, + "per": payload.per, + "sort_by": payload.sort_by, + }), + ); const headers = new Headers(compactMap({ Accept: "application/json", diff --git a/gusto_embedded/src/funcs/payrollsGetPayStub.ts b/gusto_embedded/src/funcs/payrollsGetPayStub.ts index 5cffcf02..92fb0b94 100644 --- a/gusto_embedded/src/funcs/payrollsGetPayStub.ts +++ b/gusto_embedded/src/funcs/payrollsGetPayStub.ts @@ -20,6 +20,10 @@ import { } from "../models/errors/httpclienterrors.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + UnprocessableEntityErrorObject, + UnprocessableEntityErrorObject$inboundSchema, +} from "../models/errors/unprocessableentityerrorobject.js"; import { GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest, GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubRequest$outboundSchema, @@ -44,6 +48,7 @@ export function payrollsGetPayStub( ): APIPromise< Result< GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -69,6 +74,7 @@ async function $do( [ Result< GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -172,6 +178,7 @@ async function $do( const [result] = await M.match< GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -186,7 +193,8 @@ async function $do( GetV1PayrollsPayrollUuidEmployeesEmployeeUuidPayStubResponse$inboundSchema, { ctype: "application/pdf", key: "response-stream" }, ), - M.fail([404, "4XX"]), + M.jsonErr(404, UnprocessableEntityErrorObject$inboundSchema), + M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/gusto_embedded/src/lib/config.ts b/gusto_embedded/src/lib/config.ts index ed825e80..0bc89126 100644 --- a/gusto_embedded/src/lib/config.ts +++ b/gusto_embedded/src/lib/config.ts @@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "2024-04-01", - sdkVersion: "0.7.0", - genVersion: "2.715.0", + sdkVersion: "0.7.1", + genVersion: "2.716.16", userAgent: - "speakeasy-sdk/typescript 0.7.0 2.715.0 2024-04-01 @gusto/embedded-api", + "speakeasy-sdk/typescript 0.7.1 2.716.16 2024-04-01 @gusto/embedded-api", } as const; diff --git a/gusto_embedded/src/models/components/companybenefitwithemployeebenefits.ts b/gusto_embedded/src/models/components/companybenefitwithemployeebenefits.ts index 0d33cde4..0c97c3a7 100644 --- a/gusto_embedded/src/models/components/companybenefitwithemployeebenefits.ts +++ b/gusto_embedded/src/models/components/companybenefitwithemployeebenefits.ts @@ -64,8 +64,8 @@ export type CompanyBenefitWithEmployeeBenefitsValue2 = { * For the `tiered` contribution type, an array of tiers. */ export type CompanyBenefitWithEmployeeBenefitsValue = - | CompanyBenefitWithEmployeeBenefitsValue2 - | string; + | string + | CompanyBenefitWithEmployeeBenefitsValue2; /** * An object representing the type and value of the company contribution. @@ -90,7 +90,7 @@ export type CompanyBenefitWithEmployeeBenefitsContribution = { * * For the `tiered` contribution type, an array of tiers. */ - value?: CompanyBenefitWithEmployeeBenefitsValue2 | string | undefined; + value?: string | CompanyBenefitWithEmployeeBenefitsValue2 | undefined; }; export type EmployeeBenefits = { @@ -361,14 +361,14 @@ export const CompanyBenefitWithEmployeeBenefitsValue$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([ - z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$inboundSchema), z.string(), + z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$inboundSchema), ]); /** @internal */ export type CompanyBenefitWithEmployeeBenefitsValue$Outbound = - | CompanyBenefitWithEmployeeBenefitsValue2$Outbound - | string; + | string + | CompanyBenefitWithEmployeeBenefitsValue2$Outbound; /** @internal */ export const CompanyBenefitWithEmployeeBenefitsValue$outboundSchema: z.ZodType< @@ -376,8 +376,8 @@ export const CompanyBenefitWithEmployeeBenefitsValue$outboundSchema: z.ZodType< z.ZodTypeDef, CompanyBenefitWithEmployeeBenefitsValue > = z.union([ - z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$outboundSchema), z.string(), + z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$outboundSchema), ]); /** @@ -431,8 +431,8 @@ export const CompanyBenefitWithEmployeeBenefitsContribution$inboundSchema: > = z.object({ type: z.string().optional(), value: z.union([ - z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$inboundSchema), z.string(), + z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$inboundSchema), ]).optional(), }); @@ -440,8 +440,8 @@ export const CompanyBenefitWithEmployeeBenefitsContribution$inboundSchema: export type CompanyBenefitWithEmployeeBenefitsContribution$Outbound = { type?: string | undefined; value?: - | CompanyBenefitWithEmployeeBenefitsValue2$Outbound | string + | CompanyBenefitWithEmployeeBenefitsValue2$Outbound | undefined; }; @@ -454,8 +454,8 @@ export const CompanyBenefitWithEmployeeBenefitsContribution$outboundSchema: > = z.object({ type: z.string().optional(), value: z.union([ - z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$outboundSchema), z.string(), + z.lazy(() => CompanyBenefitWithEmployeeBenefitsValue2$outboundSchema), ]).optional(), }); diff --git a/gusto_embedded/src/models/components/companyonboardingstatus.ts b/gusto_embedded/src/models/components/companyonboardingstatus.ts index b4c09289..adaeb24b 100644 --- a/gusto_embedded/src/models/components/companyonboardingstatus.ts +++ b/gusto_embedded/src/models/components/companyonboardingstatus.ts @@ -60,12 +60,16 @@ export type OnboardingStep = { * The boolean flag indicating whether the step is completed or not. */ completed?: boolean | undefined; + /** + * The ISO 8601 timestamp indicating when the onboarding step was completed. Returns null for incomplete steps. + */ + completedAt?: string | null | undefined; /** * The boolean flag indicating whether the step can be skipped or not. */ skippable?: boolean | undefined; /** - * A list of onboarding step that are required to be completed in order to proceed with the current onboarding step. + * A list of onboarding steps that are required to be completed in order to proceed with the current onboarding step. */ requirements?: Array | undefined; }; @@ -134,8 +138,13 @@ export const OnboardingStep$inboundSchema: z.ZodType< id: Id$inboundSchema.optional(), required: z.boolean().optional(), completed: z.boolean().optional(), + completed_at: z.nullable(z.string()).optional(), skippable: z.boolean().optional(), requirements: z.array(Requirements$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "completed_at": "completedAt", + }); }); /** @internal */ @@ -144,6 +153,7 @@ export type OnboardingStep$Outbound = { id?: string | undefined; required?: boolean | undefined; completed?: boolean | undefined; + completed_at?: string | null | undefined; skippable?: boolean | undefined; requirements?: Array | undefined; }; @@ -158,8 +168,13 @@ export const OnboardingStep$outboundSchema: z.ZodType< id: Id$outboundSchema.optional(), required: z.boolean().optional(), completed: z.boolean().optional(), + completedAt: z.nullable(z.string()).optional(), skippable: z.boolean().optional(), requirements: z.array(Requirements$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + completedAt: "completed_at", + }); }); /** diff --git a/gusto_embedded/src/models/components/employeebenefit.ts b/gusto_embedded/src/models/components/employeebenefit.ts index bfb75aed..56aeec1f 100644 --- a/gusto_embedded/src/models/components/employeebenefit.ts +++ b/gusto_embedded/src/models/components/employeebenefit.ts @@ -48,7 +48,7 @@ export type Two = { * * For the `tiered` contribution type, an array of tiers. */ -export type EmployeeBenefitValue = Two | string; +export type EmployeeBenefitValue = string | Two; /** * An object representing the type and value of the company contribution. @@ -73,7 +73,7 @@ export type Contribution = { * * For the `tiered` contribution type, an array of tiers. */ - value?: Two | string | undefined; + value?: string | Two | undefined; }; /** @@ -296,17 +296,17 @@ export const EmployeeBenefitValue$inboundSchema: z.ZodType< EmployeeBenefitValue, z.ZodTypeDef, unknown -> = z.union([z.lazy(() => Two$inboundSchema), z.string()]); +> = z.union([z.string(), z.lazy(() => Two$inboundSchema)]); /** @internal */ -export type EmployeeBenefitValue$Outbound = Two$Outbound | string; +export type EmployeeBenefitValue$Outbound = string | Two$Outbound; /** @internal */ export const EmployeeBenefitValue$outboundSchema: z.ZodType< EmployeeBenefitValue$Outbound, z.ZodTypeDef, EmployeeBenefitValue -> = z.union([z.lazy(() => Two$outboundSchema), z.string()]); +> = z.union([z.string(), z.lazy(() => Two$outboundSchema)]); /** * @internal @@ -346,13 +346,13 @@ export const Contribution$inboundSchema: z.ZodType< unknown > = z.object({ type: z.string().optional(), - value: z.union([z.lazy(() => Two$inboundSchema), z.string()]).optional(), + value: z.union([z.string(), z.lazy(() => Two$inboundSchema)]).optional(), }); /** @internal */ export type Contribution$Outbound = { type?: string | undefined; - value?: Two$Outbound | string | undefined; + value?: string | Two$Outbound | undefined; }; /** @internal */ @@ -362,7 +362,7 @@ export const Contribution$outboundSchema: z.ZodType< Contribution > = z.object({ type: z.string().optional(), - value: z.union([z.lazy(() => Two$outboundSchema), z.string()]).optional(), + value: z.union([z.string(), z.lazy(() => Two$outboundSchema)]).optional(), }); /** diff --git a/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts b/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts index 0c7c8bf0..c3de221f 100644 --- a/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts +++ b/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts @@ -48,7 +48,7 @@ export type Value2 = { * * For the `tiered` contribution type, an array of tiers. */ -export type EmployeeBenefitForCompanyBenefitValue = Value2 | string; +export type EmployeeBenefitForCompanyBenefitValue = string | Value2; /** * An object representing the type and value of the company contribution. @@ -73,7 +73,7 @@ export type EmployeeBenefitForCompanyBenefitContribution = { * * For the `tiered` contribution type, an array of tiers. */ - value?: Value2 | string | undefined; + value?: string | Value2 | undefined; }; /** @@ -295,19 +295,19 @@ export const EmployeeBenefitForCompanyBenefitValue$inboundSchema: z.ZodType< EmployeeBenefitForCompanyBenefitValue, z.ZodTypeDef, unknown -> = z.union([z.lazy(() => Value2$inboundSchema), z.string()]); +> = z.union([z.string(), z.lazy(() => Value2$inboundSchema)]); /** @internal */ export type EmployeeBenefitForCompanyBenefitValue$Outbound = - | Value2$Outbound - | string; + | string + | Value2$Outbound; /** @internal */ export const EmployeeBenefitForCompanyBenefitValue$outboundSchema: z.ZodType< EmployeeBenefitForCompanyBenefitValue$Outbound, z.ZodTypeDef, EmployeeBenefitForCompanyBenefitValue -> = z.union([z.lazy(() => Value2$outboundSchema), z.string()]); +> = z.union([z.string(), z.lazy(() => Value2$outboundSchema)]); /** * @internal @@ -353,13 +353,13 @@ export const EmployeeBenefitForCompanyBenefitContribution$inboundSchema: unknown > = z.object({ type: z.string().optional(), - value: z.union([z.lazy(() => Value2$inboundSchema), z.string()]).optional(), + value: z.union([z.string(), z.lazy(() => Value2$inboundSchema)]).optional(), }); /** @internal */ export type EmployeeBenefitForCompanyBenefitContribution$Outbound = { type?: string | undefined; - value?: Value2$Outbound | string | undefined; + value?: string | Value2$Outbound | undefined; }; /** @internal */ @@ -370,7 +370,7 @@ export const EmployeeBenefitForCompanyBenefitContribution$outboundSchema: EmployeeBenefitForCompanyBenefitContribution > = z.object({ type: z.string().optional(), - value: z.union([z.lazy(() => Value2$outboundSchema), z.string()]) + value: z.union([z.string(), z.lazy(() => Value2$outboundSchema)]) .optional(), }); diff --git a/gusto_embedded/src/models/components/payroll.ts b/gusto_embedded/src/models/components/payroll.ts index 8327b593..e2caacde 100644 --- a/gusto_embedded/src/models/components/payroll.ts +++ b/gusto_embedded/src/models/components/payroll.ts @@ -54,6 +54,12 @@ import { PayrollSubmissionBlockersType$Outbound, PayrollSubmissionBlockersType$outboundSchema, } from "./payrollsubmissionblockerstype.js"; +import { + PayrollTaxesType, + PayrollTaxesType$inboundSchema, + PayrollTaxesType$Outbound, + PayrollTaxesType$outboundSchema, +} from "./payrolltaxestype.js"; import { PayrollTotalsType, PayrollTotalsType$inboundSchema, @@ -144,6 +150,10 @@ export type Payroll = { * An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. */ companyTaxes?: Array | undefined; + /** + * An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. + */ + payrollTaxes?: Array | undefined; /** * Only applicable when a payroll is moved to four day processing instead of fast ach. */ @@ -195,6 +205,7 @@ export const Payroll$inboundSchema: z.ZodType = payroll_status_meta: PayrollPayrollStatusMetaType$inboundSchema.optional(), totals: PayrollTotalsType$inboundSchema.optional(), company_taxes: z.array(PayrollCompanyTaxesType$inboundSchema).optional(), + payroll_taxes: z.array(PayrollTaxesType$inboundSchema).optional(), payment_speed_changed: PayrollPaymentSpeedChangedType$inboundSchema .optional(), created_at: z.string().datetime({ offset: true }).transform(v => @@ -225,6 +236,7 @@ export const Payroll$inboundSchema: z.ZodType = "pay_period": "payPeriod", "payroll_status_meta": "payrollStatusMeta", "company_taxes": "companyTaxes", + "payroll_taxes": "payrollTaxes", "payment_speed_changed": "paymentSpeedChanged", "created_at": "createdAt", "submission_blockers": "submissionBlockers", @@ -256,6 +268,7 @@ export type Payroll$Outbound = { payroll_status_meta?: PayrollPayrollStatusMetaType$Outbound | undefined; totals?: PayrollTotalsType$Outbound | undefined; company_taxes?: Array | undefined; + payroll_taxes?: Array | undefined; payment_speed_changed?: PayrollPaymentSpeedChangedType$Outbound | undefined; created_at?: string | undefined; submission_blockers?: @@ -293,6 +306,7 @@ export const Payroll$outboundSchema: z.ZodType< payrollStatusMeta: PayrollPayrollStatusMetaType$outboundSchema.optional(), totals: PayrollTotalsType$outboundSchema.optional(), companyTaxes: z.array(PayrollCompanyTaxesType$outboundSchema).optional(), + payrollTaxes: z.array(PayrollTaxesType$outboundSchema).optional(), paymentSpeedChanged: PayrollPaymentSpeedChangedType$outboundSchema.optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), submissionBlockers: z.array(PayrollSubmissionBlockersType$outboundSchema) @@ -319,6 +333,7 @@ export const Payroll$outboundSchema: z.ZodType< payPeriod: "pay_period", payrollStatusMeta: "payroll_status_meta", companyTaxes: "company_taxes", + payrollTaxes: "payroll_taxes", paymentSpeedChanged: "payment_speed_changed", createdAt: "created_at", submissionBlockers: "submission_blockers", diff --git a/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts b/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts index 00e54487..34aaa469 100644 --- a/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts +++ b/gusto_embedded/src/models/components/payrollemployeecompensationstype.ts @@ -81,6 +81,40 @@ export type PayrollEmployeeCompensationsTypePaidTimeOff = { finalPayoutUnusedHoursInput?: string | undefined; }; +/** + * The amount type of the deduction for the pay period. + */ +export const AmountType = { + Fixed: "fixed", + Percent: "percent", +} as const; +/** + * The amount type of the deduction for the pay period. + */ +export type AmountType = ClosedEnum; + +/** + * An array of deductions for the employee. + */ +export type Deductions = { + /** + * The name of the deduction. + */ + name?: string | undefined; + /** + * The amount of the deduction for the pay period. + */ + amount?: number | undefined; + /** + * The amount type of the deduction for the pay period. + */ + amountType?: AmountType | undefined; + /** + * The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction. + */ + uuid?: string | undefined; +}; + export type PayrollEmployeeCompensationsType = { /** * The UUID of the employee. @@ -141,6 +175,7 @@ export type PayrollEmployeeCompensationsType = { * An array of all paid time off the employee is eligible for this pay period. */ paidTimeOff?: Array | undefined; + deductions?: Array | undefined; }; /** @internal */ @@ -396,6 +431,92 @@ export function payrollEmployeeCompensationsTypePaidTimeOffFromJSON( ); } +/** @internal */ +export const AmountType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(AmountType); + +/** @internal */ +export const AmountType$outboundSchema: z.ZodNativeEnum = + AmountType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AmountType$ { + /** @deprecated use `AmountType$inboundSchema` instead. */ + export const inboundSchema = AmountType$inboundSchema; + /** @deprecated use `AmountType$outboundSchema` instead. */ + export const outboundSchema = AmountType$outboundSchema; +} + +/** @internal */ +export const Deductions$inboundSchema: z.ZodType< + Deductions, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + amount: z.number().optional(), + amount_type: AmountType$inboundSchema.optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "amount_type": "amountType", + }); +}); + +/** @internal */ +export type Deductions$Outbound = { + name?: string | undefined; + amount?: number | undefined; + amount_type?: string | undefined; + uuid?: string | undefined; +}; + +/** @internal */ +export const Deductions$outboundSchema: z.ZodType< + Deductions$Outbound, + z.ZodTypeDef, + Deductions +> = z.object({ + name: z.string().optional(), + amount: z.number().optional(), + amountType: AmountType$outboundSchema.optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + amountType: "amount_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Deductions$ { + /** @deprecated use `Deductions$inboundSchema` instead. */ + export const inboundSchema = Deductions$inboundSchema; + /** @deprecated use `Deductions$outboundSchema` instead. */ + export const outboundSchema = Deductions$outboundSchema; + /** @deprecated use `Deductions$Outbound` instead. */ + export type Outbound = Deductions$Outbound; +} + +export function deductionsToJSON(deductions: Deductions): string { + return JSON.stringify(Deductions$outboundSchema.parse(deductions)); +} + +export function deductionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Deductions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Deductions' from JSON`, + ); +} + /** @internal */ export const PayrollEmployeeCompensationsType$inboundSchema: z.ZodType< PayrollEmployeeCompensationsType, @@ -422,6 +543,7 @@ export const PayrollEmployeeCompensationsType$inboundSchema: z.ZodType< paid_time_off: z.array( z.lazy(() => PayrollEmployeeCompensationsTypePaidTimeOff$inboundSchema), ).optional(), + deductions: z.array(z.lazy(() => Deductions$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "employee_uuid": "employeeUuid", @@ -456,6 +578,7 @@ export type PayrollEmployeeCompensationsType$Outbound = { paid_time_off?: | Array | undefined; + deductions?: Array | undefined; }; /** @internal */ @@ -484,6 +607,7 @@ export const PayrollEmployeeCompensationsType$outboundSchema: z.ZodType< paidTimeOff: z.array( z.lazy(() => PayrollEmployeeCompensationsTypePaidTimeOff$outboundSchema), ).optional(), + deductions: z.array(z.lazy(() => Deductions$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { employeeUuid: "employee_uuid", diff --git a/gusto_embedded/src/models/components/payrollshow.ts b/gusto_embedded/src/models/components/payrollshow.ts index 20041c7d..fb2ba8ff 100644 --- a/gusto_embedded/src/models/components/payrollshow.ts +++ b/gusto_embedded/src/models/components/payrollshow.ts @@ -55,6 +55,12 @@ import { PayrollSubmissionBlockersType$Outbound, PayrollSubmissionBlockersType$outboundSchema, } from "./payrollsubmissionblockerstype.js"; +import { + PayrollTaxesType, + PayrollTaxesType$inboundSchema, + PayrollTaxesType$Outbound, + PayrollTaxesType$outboundSchema, +} from "./payrolltaxestype.js"; import { PayrollTotalsType, PayrollTotalsType$inboundSchema, @@ -139,6 +145,19 @@ export type PayrollShowPaidTimeOff = { finalPayoutUnusedHoursInput?: string | undefined; }; +export const PayrollShowAmountType = { + Fixed: "fixed", + Percent: "percent", +} as const; +export type PayrollShowAmountType = ClosedEnum; + +export type PayrollShowDeductions = { + name?: string | undefined; + amount?: number | undefined; + amountType?: PayrollShowAmountType | undefined; + uuid?: string | undefined; +}; + export type PayrollShowTaxes = { name: string; employer: boolean; @@ -152,19 +171,6 @@ export type PayrollShowBenefits = { imputed?: boolean | undefined; }; -export const AmountType = { - Fixed: "fixed", - Percent: "percent", -} as const; -export type AmountType = ClosedEnum; - -export type Deductions = { - name?: string | undefined; - amount?: number | undefined; - amountType?: AmountType | undefined; - uuid?: string | undefined; -}; - export type EmployeeCompensations = { /** * The UUID of the employee. @@ -222,6 +228,10 @@ export type EmployeeCompensations = { * An array of all paid time off the employee is eligible for this pay period. */ paidTimeOff?: Array | undefined; + /** + * An array of employee deductions for the pay period. + */ + deductions?: Array | undefined; /** * An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. */ @@ -230,10 +240,6 @@ export type EmployeeCompensations = { * An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. */ benefits?: Array | undefined; - /** - * An array of employee deductions for the pay period. - */ - deductions?: Array | undefined; }; export type PayrollShow = { @@ -314,6 +320,10 @@ export type PayrollShow = { * An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. */ companyTaxes?: Array | undefined; + /** + * An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. + */ + payrollTaxes?: Array | undefined; /** * Only applicable when a payroll is moved to four day processing instead of fast ach. */ @@ -580,6 +590,98 @@ export function payrollShowPaidTimeOffFromJSON( ); } +/** @internal */ +export const PayrollShowAmountType$inboundSchema: z.ZodNativeEnum< + typeof PayrollShowAmountType +> = z.nativeEnum(PayrollShowAmountType); + +/** @internal */ +export const PayrollShowAmountType$outboundSchema: z.ZodNativeEnum< + typeof PayrollShowAmountType +> = PayrollShowAmountType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowAmountType$ { + /** @deprecated use `PayrollShowAmountType$inboundSchema` instead. */ + export const inboundSchema = PayrollShowAmountType$inboundSchema; + /** @deprecated use `PayrollShowAmountType$outboundSchema` instead. */ + export const outboundSchema = PayrollShowAmountType$outboundSchema; +} + +/** @internal */ +export const PayrollShowDeductions$inboundSchema: z.ZodType< + PayrollShowDeductions, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + amount: z.number().optional(), + amount_type: PayrollShowAmountType$inboundSchema.optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "amount_type": "amountType", + }); +}); + +/** @internal */ +export type PayrollShowDeductions$Outbound = { + name?: string | undefined; + amount?: number | undefined; + amount_type?: string | undefined; + uuid?: string | undefined; +}; + +/** @internal */ +export const PayrollShowDeductions$outboundSchema: z.ZodType< + PayrollShowDeductions$Outbound, + z.ZodTypeDef, + PayrollShowDeductions +> = z.object({ + name: z.string().optional(), + amount: z.number().optional(), + amountType: PayrollShowAmountType$outboundSchema.optional(), + uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + amountType: "amount_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollShowDeductions$ { + /** @deprecated use `PayrollShowDeductions$inboundSchema` instead. */ + export const inboundSchema = PayrollShowDeductions$inboundSchema; + /** @deprecated use `PayrollShowDeductions$outboundSchema` instead. */ + export const outboundSchema = PayrollShowDeductions$outboundSchema; + /** @deprecated use `PayrollShowDeductions$Outbound` instead. */ + export type Outbound = PayrollShowDeductions$Outbound; +} + +export function payrollShowDeductionsToJSON( + payrollShowDeductions: PayrollShowDeductions, +): string { + return JSON.stringify( + PayrollShowDeductions$outboundSchema.parse(payrollShowDeductions), + ); +} + +export function payrollShowDeductionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollShowDeductions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollShowDeductions' from JSON`, + ); +} + /** @internal */ export const PayrollShowTaxes$inboundSchema: z.ZodType< PayrollShowTaxes, @@ -713,92 +815,6 @@ export function payrollShowBenefitsFromJSON( ); } -/** @internal */ -export const AmountType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(AmountType); - -/** @internal */ -export const AmountType$outboundSchema: z.ZodNativeEnum = - AmountType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AmountType$ { - /** @deprecated use `AmountType$inboundSchema` instead. */ - export const inboundSchema = AmountType$inboundSchema; - /** @deprecated use `AmountType$outboundSchema` instead. */ - export const outboundSchema = AmountType$outboundSchema; -} - -/** @internal */ -export const Deductions$inboundSchema: z.ZodType< - Deductions, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - amount: z.number().optional(), - amount_type: AmountType$inboundSchema.optional(), - uuid: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "amount_type": "amountType", - }); -}); - -/** @internal */ -export type Deductions$Outbound = { - name?: string | undefined; - amount?: number | undefined; - amount_type?: string | undefined; - uuid?: string | undefined; -}; - -/** @internal */ -export const Deductions$outboundSchema: z.ZodType< - Deductions$Outbound, - z.ZodTypeDef, - Deductions -> = z.object({ - name: z.string().optional(), - amount: z.number().optional(), - amountType: AmountType$outboundSchema.optional(), - uuid: z.string().optional(), -}).transform((v) => { - return remap$(v, { - amountType: "amount_type", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Deductions$ { - /** @deprecated use `Deductions$inboundSchema` instead. */ - export const inboundSchema = Deductions$inboundSchema; - /** @deprecated use `Deductions$outboundSchema` instead. */ - export const outboundSchema = Deductions$outboundSchema; - /** @deprecated use `Deductions$Outbound` instead. */ - export type Outbound = Deductions$Outbound; -} - -export function deductionsToJSON(deductions: Deductions): string { - return JSON.stringify(Deductions$outboundSchema.parse(deductions)); -} - -export function deductionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Deductions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Deductions' from JSON`, - ); -} - /** @internal */ export const EmployeeCompensations$inboundSchema: z.ZodType< EmployeeCompensations, @@ -824,9 +840,10 @@ export const EmployeeCompensations$inboundSchema: z.ZodType< ).optional(), paid_time_off: z.array(z.lazy(() => PayrollShowPaidTimeOff$inboundSchema)) .optional(), + deductions: z.array(z.lazy(() => PayrollShowDeductions$inboundSchema)) + .optional(), taxes: z.array(z.lazy(() => PayrollShowTaxes$inboundSchema)).optional(), benefits: z.array(z.lazy(() => PayrollShowBenefits$inboundSchema)).optional(), - deductions: z.array(z.lazy(() => Deductions$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "employee_uuid": "employeeUuid", @@ -863,9 +880,9 @@ export type EmployeeCompensations$Outbound = { | Array | undefined; paid_time_off?: Array | undefined; + deductions?: Array | undefined; taxes?: Array | undefined; benefits?: Array | undefined; - deductions?: Array | undefined; }; /** @internal */ @@ -893,10 +910,11 @@ export const EmployeeCompensations$outboundSchema: z.ZodType< ).optional(), paidTimeOff: z.array(z.lazy(() => PayrollShowPaidTimeOff$outboundSchema)) .optional(), + deductions: z.array(z.lazy(() => PayrollShowDeductions$outboundSchema)) + .optional(), taxes: z.array(z.lazy(() => PayrollShowTaxes$outboundSchema)).optional(), benefits: z.array(z.lazy(() => PayrollShowBenefits$outboundSchema)) .optional(), - deductions: z.array(z.lazy(() => Deductions$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { employeeUuid: "employee_uuid", @@ -975,6 +993,7 @@ export const PayrollShow$inboundSchema: z.ZodType< payroll_status_meta: PayrollPayrollStatusMetaType$inboundSchema.optional(), totals: PayrollTotalsType$inboundSchema.optional(), company_taxes: z.array(PayrollCompanyTaxesType$inboundSchema).optional(), + payroll_taxes: z.array(PayrollTaxesType$inboundSchema).optional(), payment_speed_changed: PayrollPaymentSpeedChangedType$inboundSchema .optional(), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) @@ -1006,6 +1025,7 @@ export const PayrollShow$inboundSchema: z.ZodType< "pay_period": "payPeriod", "payroll_status_meta": "payrollStatusMeta", "company_taxes": "companyTaxes", + "payroll_taxes": "payrollTaxes", "payment_speed_changed": "paymentSpeedChanged", "created_at": "createdAt", "submission_blockers": "submissionBlockers", @@ -1038,6 +1058,7 @@ export type PayrollShow$Outbound = { payroll_status_meta?: PayrollPayrollStatusMetaType$Outbound | undefined; totals?: PayrollTotalsType$Outbound | undefined; company_taxes?: Array | undefined; + payroll_taxes?: Array | undefined; payment_speed_changed?: PayrollPaymentSpeedChangedType$Outbound | undefined; created_at?: string | undefined; submission_blockers?: @@ -1076,6 +1097,7 @@ export const PayrollShow$outboundSchema: z.ZodType< payrollStatusMeta: PayrollPayrollStatusMetaType$outboundSchema.optional(), totals: PayrollTotalsType$outboundSchema.optional(), companyTaxes: z.array(PayrollCompanyTaxesType$outboundSchema).optional(), + payrollTaxes: z.array(PayrollTaxesType$outboundSchema).optional(), paymentSpeedChanged: PayrollPaymentSpeedChangedType$outboundSchema.optional(), createdAt: z.date().transform(v => v.toISOString()).optional(), submissionBlockers: z.array(PayrollSubmissionBlockersType$outboundSchema) @@ -1105,6 +1127,7 @@ export const PayrollShow$outboundSchema: z.ZodType< payPeriod: "pay_period", payrollStatusMeta: "payroll_status_meta", companyTaxes: "company_taxes", + payrollTaxes: "payroll_taxes", paymentSpeedChanged: "payment_speed_changed", createdAt: "created_at", submissionBlockers: "submission_blockers", diff --git a/gusto_embedded/src/models/components/payrolltaxestype.ts b/gusto_embedded/src/models/components/payrolltaxestype.ts new file mode 100644 index 00000000..f5d0aaf6 --- /dev/null +++ b/gusto_embedded/src/models/components/payrolltaxestype.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PayrollTaxesType = { + /** + * The tax name + */ + name?: string | undefined; + /** + * Whether this tax is an employer or employee tax + */ + employer?: boolean | undefined; + /** + * The total tax for the payroll + */ + amount?: number | undefined; +}; + +/** @internal */ +export const PayrollTaxesType$inboundSchema: z.ZodType< + PayrollTaxesType, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + employer: z.boolean().optional(), + amount: z.number().optional(), +}); + +/** @internal */ +export type PayrollTaxesType$Outbound = { + name?: string | undefined; + employer?: boolean | undefined; + amount?: number | undefined; +}; + +/** @internal */ +export const PayrollTaxesType$outboundSchema: z.ZodType< + PayrollTaxesType$Outbound, + z.ZodTypeDef, + PayrollTaxesType +> = z.object({ + name: z.string().optional(), + employer: z.boolean().optional(), + amount: z.number().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PayrollTaxesType$ { + /** @deprecated use `PayrollTaxesType$inboundSchema` instead. */ + export const inboundSchema = PayrollTaxesType$inboundSchema; + /** @deprecated use `PayrollTaxesType$outboundSchema` instead. */ + export const outboundSchema = PayrollTaxesType$outboundSchema; + /** @deprecated use `PayrollTaxesType$Outbound` instead. */ + export type Outbound = PayrollTaxesType$Outbound; +} + +export function payrollTaxesTypeToJSON( + payrollTaxesType: PayrollTaxesType, +): string { + return JSON.stringify( + PayrollTaxesType$outboundSchema.parse(payrollTaxesType), + ); +} + +export function payrollTaxesTypeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PayrollTaxesType$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PayrollTaxesType' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts index fe2ef8f8..0c03ee3f 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidemployees.ts @@ -55,10 +55,22 @@ export type GetV1CompaniesCompanyIdEmployeesRequest = { * The UUID of the company */ companyId: string; + /** + * Filter employees by a specific primary work location + */ + locationUuid?: string | undefined; + /** + * Filter employees by a specific payroll + */ + payrollUuid?: string | undefined; /** * A string to search for in the object's names */ searchTerm?: string | undefined; + /** + * Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status + */ + sortBy?: string | undefined; /** * Include the requested attribute(s) in each employee response. Multiple options are comma separated. */ @@ -67,6 +79,10 @@ export type GetV1CompaniesCompanyIdEmployeesRequest = { * Filters employees by those who have completed onboarding */ onboarded?: boolean | undefined; + /** + * Filters employees who are ready to work (onboarded AND active today) + */ + onboardedActive?: boolean | undefined; /** * Filters employees by those who have been or are scheduled to be terminated */ @@ -151,9 +167,13 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$inboundSchema: z.ZodType< GetV1CompaniesCompanyIdEmployeesHeaderXGustoAPIVersion$inboundSchema .default("2024-04-01"), company_id: z.string(), + location_uuid: z.string().optional(), + payroll_uuid: z.string().optional(), search_term: z.string().optional(), + sort_by: z.string().optional(), include: z.array(Include$inboundSchema).optional(), onboarded: z.boolean().optional(), + onboarded_active: z.boolean().optional(), terminated: z.boolean().optional(), terminated_today: z.boolean().optional(), uuids: z.array(z.string()).optional(), @@ -163,7 +183,11 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$inboundSchema: z.ZodType< return remap$(v, { "X-Gusto-API-Version": "xGustoAPIVersion", "company_id": "companyId", + "location_uuid": "locationUuid", + "payroll_uuid": "payrollUuid", "search_term": "searchTerm", + "sort_by": "sortBy", + "onboarded_active": "onboardedActive", "terminated_today": "terminatedToday", }); }); @@ -172,9 +196,13 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$inboundSchema: z.ZodType< export type GetV1CompaniesCompanyIdEmployeesRequest$Outbound = { "X-Gusto-API-Version": string; company_id: string; + location_uuid?: string | undefined; + payroll_uuid?: string | undefined; search_term?: string | undefined; + sort_by?: string | undefined; include?: Array | undefined; onboarded?: boolean | undefined; + onboarded_active?: boolean | undefined; terminated?: boolean | undefined; terminated_today?: boolean | undefined; uuids?: Array | undefined; @@ -192,9 +220,13 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$outboundSchema: z.ZodType< GetV1CompaniesCompanyIdEmployeesHeaderXGustoAPIVersion$outboundSchema .default("2024-04-01"), companyId: z.string(), + locationUuid: z.string().optional(), + payrollUuid: z.string().optional(), searchTerm: z.string().optional(), + sortBy: z.string().optional(), include: z.array(Include$outboundSchema).optional(), onboarded: z.boolean().optional(), + onboardedActive: z.boolean().optional(), terminated: z.boolean().optional(), terminatedToday: z.boolean().optional(), uuids: z.array(z.string()).optional(), @@ -204,7 +236,11 @@ export const GetV1CompaniesCompanyIdEmployeesRequest$outboundSchema: z.ZodType< return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyId: "company_id", + locationUuid: "location_uuid", + payrollUuid: "payroll_uuid", searchTerm: "search_term", + sortBy: "sort_by", + onboardedActive: "onboarded_active", terminatedToday: "terminated_today", }); }); diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts index 70ee8881..2f22d3a5 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidpayrollspayrollid.ts @@ -48,6 +48,18 @@ export const GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude = { export type GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude = ClosedEnum; +/** + * Field to sort employee compensations by + */ +export const SortBy = { + FirstName: "first_name", + LastName: "last_name", +} as const; +/** + * Field to sort employee compensations by + */ +export type SortBy = ClosedEnum; + export type GetV1CompaniesCompanyIdPayrollsPayrollIdRequest = { /** * The UUID of the company @@ -69,6 +81,18 @@ export type GetV1CompaniesCompanyIdPayrollsPayrollIdRequest = { include?: | Array | undefined; + /** + * The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + */ + page?: number | undefined; + /** + * Number of objects per page. For majority of endpoints will default to 25 + */ + per?: number | undefined; + /** + * Field to sort employee compensations by + */ + sortBy?: SortBy | undefined; }; export type GetV1CompaniesCompanyIdPayrollsPayrollIdResponse = { @@ -132,6 +156,25 @@ export namespace GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude$ { GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude$outboundSchema; } +/** @internal */ +export const SortBy$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(SortBy); + +/** @internal */ +export const SortBy$outboundSchema: z.ZodNativeEnum = + SortBy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SortBy$ { + /** @deprecated use `SortBy$inboundSchema` instead. */ + export const inboundSchema = SortBy$inboundSchema; + /** @deprecated use `SortBy$outboundSchema` instead. */ + export const outboundSchema = SortBy$outboundSchema; +} + /** @internal */ export const GetV1CompaniesCompanyIdPayrollsPayrollIdRequest$inboundSchema: z.ZodType< @@ -147,11 +190,15 @@ export const GetV1CompaniesCompanyIdPayrollsPayrollIdRequest$inboundSchema: include: z.array( GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude$inboundSchema, ).optional(), + page: z.number().int().optional(), + per: z.number().int().optional(), + sort_by: SortBy$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "company_id": "companyId", "payroll_id": "payrollId", "X-Gusto-API-Version": "xGustoAPIVersion", + "sort_by": "sortBy", }); }); @@ -161,6 +208,9 @@ export type GetV1CompaniesCompanyIdPayrollsPayrollIdRequest$Outbound = { payroll_id: string; "X-Gusto-API-Version": string; include?: Array | undefined; + page?: number | undefined; + per?: number | undefined; + sort_by?: string | undefined; }; /** @internal */ @@ -178,11 +228,15 @@ export const GetV1CompaniesCompanyIdPayrollsPayrollIdRequest$outboundSchema: include: z.array( GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude$outboundSchema, ).optional(), + page: z.number().int().optional(), + per: z.number().int().optional(), + sortBy: SortBy$outboundSchema.optional(), }).transform((v) => { return remap$(v, { companyId: "company_id", payrollId: "payroll_id", xGustoAPIVersion: "X-Gusto-API-Version", + sortBy: "sort_by", }); }); diff --git a/gusto_embedded/src/models/operations/getv1contractordocument.ts b/gusto_embedded/src/models/operations/getv1contractordocument.ts index e68ce761..99e542ac 100644 --- a/gusto_embedded/src/models/operations/getv1contractordocument.ts +++ b/gusto_embedded/src/models/operations/getv1contractordocument.ts @@ -27,7 +27,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetV1ContractorDocumentRequest = { /** - * The ID or UUID of the document + * The UUID of the document */ documentUuid: string; /** diff --git a/gusto_embedded/src/models/operations/getv1contractordocumentpdf.ts b/gusto_embedded/src/models/operations/getv1contractordocumentpdf.ts index 010d11f8..ded6d75e 100644 --- a/gusto_embedded/src/models/operations/getv1contractordocumentpdf.ts +++ b/gusto_embedded/src/models/operations/getv1contractordocumentpdf.ts @@ -27,7 +27,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetV1ContractorDocumentPdfRequest = { /** - * The ID or UUID of the document + * The UUID of the document */ documentUuid: string; /** diff --git a/gusto_embedded/src/models/operations/postv1employees.ts b/gusto_embedded/src/models/operations/postv1employees.ts index b93e51d9..deaec155 100644 --- a/gusto_embedded/src/models/operations/postv1employees.ts +++ b/gusto_embedded/src/models/operations/postv1employees.ts @@ -43,6 +43,10 @@ export type PostV1EmployeesRequestBody = { * The employee's personal email address. */ email?: string | undefined; + /** + * The employee's work email address. + */ + workEmail?: string | undefined; dateOfBirth?: RFCDate | undefined; ssn?: string | undefined; preferredFirstName?: string | undefined; @@ -106,6 +110,7 @@ export const PostV1EmployeesRequestBody$inboundSchema: z.ZodType< middle_initial: z.string().optional(), last_name: z.string(), email: z.string().optional(), + work_email: z.string().optional(), date_of_birth: z.string().transform(v => new RFCDate(v)).optional(), ssn: z.string().optional(), preferred_first_name: z.string().optional(), @@ -115,6 +120,7 @@ export const PostV1EmployeesRequestBody$inboundSchema: z.ZodType< "first_name": "firstName", "middle_initial": "middleInitial", "last_name": "lastName", + "work_email": "workEmail", "date_of_birth": "dateOfBirth", "preferred_first_name": "preferredFirstName", "self_onboarding": "selfOnboarding", @@ -127,6 +133,7 @@ export type PostV1EmployeesRequestBody$Outbound = { middle_initial?: string | undefined; last_name: string; email?: string | undefined; + work_email?: string | undefined; date_of_birth?: string | undefined; ssn?: string | undefined; preferred_first_name?: string | undefined; @@ -143,6 +150,7 @@ export const PostV1EmployeesRequestBody$outboundSchema: z.ZodType< middleInitial: z.string().optional(), lastName: z.string(), email: z.string().optional(), + workEmail: z.string().optional(), dateOfBirth: z.instanceof(RFCDate).transform(v => v.toString()).optional(), ssn: z.string().optional(), preferredFirstName: z.string().optional(), @@ -152,6 +160,7 @@ export const PostV1EmployeesRequestBody$outboundSchema: z.ZodType< firstName: "first_name", middleInitial: "middle_initial", lastName: "last_name", + workEmail: "work_email", dateOfBirth: "date_of_birth", preferredFirstName: "preferred_first_name", selfOnboarding: "self_onboarding", diff --git a/gusto_embedded/src/models/operations/putv1contractordocumentsign.ts b/gusto_embedded/src/models/operations/putv1contractordocumentsign.ts index 09016e0e..eb5a608d 100644 --- a/gusto_embedded/src/models/operations/putv1contractordocumentsign.ts +++ b/gusto_embedded/src/models/operations/putv1contractordocumentsign.ts @@ -53,7 +53,7 @@ export type PutV1ContractorDocumentSignRequestBody = { export type PutV1ContractorDocumentSignRequest = { /** - * The ID or UUID of the document + * The UUID of the document */ documentUuid: string; /** diff --git a/gusto_embedded/src/models/operations/putv1employees.ts b/gusto_embedded/src/models/operations/putv1employees.ts index 6fcdc7a3..d8977145 100644 --- a/gusto_embedded/src/models/operations/putv1employees.ts +++ b/gusto_embedded/src/models/operations/putv1employees.ts @@ -43,6 +43,7 @@ export type PutV1EmployeesRequestBody = { middleInitial?: string | null | undefined; lastName?: string | undefined; email?: string | undefined; + workEmail?: string | undefined; dateOfBirth?: string | undefined; ssn?: string | undefined; preferredFirstName?: string | null | undefined; @@ -50,7 +51,6 @@ export type PutV1EmployeesRequestBody = { * Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. */ twoPercentShareholder?: boolean | undefined; - workEmail?: string | undefined; }; export type PutV1EmployeesRequest = { @@ -108,20 +108,20 @@ export const PutV1EmployeesRequestBody$inboundSchema: z.ZodType< middle_initial: z.nullable(z.string()).optional(), last_name: z.string().optional(), email: z.string().optional(), + work_email: z.string().optional(), date_of_birth: z.string().optional(), ssn: z.string().optional(), preferred_first_name: z.nullable(z.string()).optional(), two_percent_shareholder: z.boolean().optional(), - work_email: z.string().optional(), }).transform((v) => { return remap$(v, { "first_name": "firstName", "middle_initial": "middleInitial", "last_name": "lastName", + "work_email": "workEmail", "date_of_birth": "dateOfBirth", "preferred_first_name": "preferredFirstName", "two_percent_shareholder": "twoPercentShareholder", - "work_email": "workEmail", }); }); @@ -132,11 +132,11 @@ export type PutV1EmployeesRequestBody$Outbound = { middle_initial?: string | null | undefined; last_name?: string | undefined; email?: string | undefined; + work_email?: string | undefined; date_of_birth?: string | undefined; ssn?: string | undefined; preferred_first_name?: string | null | undefined; two_percent_shareholder?: boolean | undefined; - work_email?: string | undefined; }; /** @internal */ @@ -150,20 +150,20 @@ export const PutV1EmployeesRequestBody$outboundSchema: z.ZodType< middleInitial: z.nullable(z.string()).optional(), lastName: z.string().optional(), email: z.string().optional(), + workEmail: z.string().optional(), dateOfBirth: z.string().optional(), ssn: z.string().optional(), preferredFirstName: z.nullable(z.string()).optional(), twoPercentShareholder: z.boolean().optional(), - workEmail: z.string().optional(), }).transform((v) => { return remap$(v, { firstName: "first_name", middleInitial: "middle_initial", lastName: "last_name", + workEmail: "work_email", dateOfBirth: "date_of_birth", preferredFirstName: "preferred_first_name", twoPercentShareholder: "two_percent_shareholder", - workEmail: "work_email", }); }); diff --git a/gusto_embedded/src/react-query/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts b/gusto_embedded/src/react-query/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts index da5014ae..e36d93a2 100644 --- a/gusto_embedded/src/react-query/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts +++ b/gusto_embedded/src/react-query/contractorsGetV1CompaniesCompanyIdContractorsPaymentDetails.ts @@ -36,12 +36,30 @@ export type ContractorsGetV1CompaniesCompanyIdContractorsPaymentDetailsQueryData * List contractor payment details * * @remarks - * Get payment details for contractors in a company. This endpoint returns a list of all contractors associated with the specified company, including their payment methods and bank account details if they are paid via direct deposit. + * Get payment details for contractors in a company. This endpoint returns a list of all contractors + * associated with the specified company, including their payment methods and bank account details + * if they are paid via direct deposit. * - * For contractors paid by direct deposit, the response includes their bank account information. + * For contractors paid by direct deposit, the response includes their bank account information + * with sensitive data masked for security. The payment details also include information about + * how their payments are split if they have multiple bank accounts configured. * * For contractors paid by check, only the basic payment method information is returned. * + * ### Response Details + * - For direct deposit contractors: + * - Bank account details (masked) + * - Payment splits configuration + * - Routing numbers + * - Account types + * - For check payments: + * - Basic payment method designation + * + * ### Common Use Cases + * - Fetching contractor payment information for payroll processing + * - Verifying contractor payment methods + * - Reviewing payment split configurations + * * `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. * * scope: `contractor_payment_methods:read` @@ -70,12 +88,30 @@ export function useContractorsGetV1CompaniesCompanyIdContractorsPaymentDetails( * List contractor payment details * * @remarks - * Get payment details for contractors in a company. This endpoint returns a list of all contractors associated with the specified company, including their payment methods and bank account details if they are paid via direct deposit. + * Get payment details for contractors in a company. This endpoint returns a list of all contractors + * associated with the specified company, including their payment methods and bank account details + * if they are paid via direct deposit. * - * For contractors paid by direct deposit, the response includes their bank account information. + * For contractors paid by direct deposit, the response includes their bank account information + * with sensitive data masked for security. The payment details also include information about + * how their payments are split if they have multiple bank accounts configured. * * For contractors paid by check, only the basic payment method information is returned. * + * ### Response Details + * - For direct deposit contractors: + * - Bank account details (masked) + * - Payment splits configuration + * - Routing numbers + * - Account types + * - For check payments: + * - Basic payment method designation + * + * ### Common Use Cases + * - Fetching contractor payment information for payroll processing + * - Verifying contractor payment methods + * - Reviewing payment split configurations + * * `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. * * scope: `contractor_payment_methods:read` diff --git a/gusto_embedded/src/react-query/employeesList.ts b/gusto_embedded/src/react-query/employeesList.ts index b6291bb8..733c3a47 100644 --- a/gusto_embedded/src/react-query/employeesList.ts +++ b/gusto_embedded/src/react-query/employeesList.ts @@ -99,9 +99,13 @@ export function setEmployeesListData( xGustoAPIVersion?: | GetV1CompaniesCompanyIdEmployeesHeaderXGustoAPIVersion | undefined; + locationUuid?: string | undefined; + payrollUuid?: string | undefined; searchTerm?: string | undefined; + sortBy?: string | undefined; include?: Array | undefined; onboarded?: boolean | undefined; + onboardedActive?: boolean | undefined; terminated?: boolean | undefined; terminatedToday?: boolean | undefined; uuids?: Array | undefined; @@ -125,9 +129,13 @@ export function invalidateEmployeesList( xGustoAPIVersion?: | GetV1CompaniesCompanyIdEmployeesHeaderXGustoAPIVersion | undefined; + locationUuid?: string | undefined; + payrollUuid?: string | undefined; searchTerm?: string | undefined; + sortBy?: string | undefined; include?: Array | undefined; onboarded?: boolean | undefined; + onboardedActive?: boolean | undefined; terminated?: boolean | undefined; terminatedToday?: boolean | undefined; uuids?: Array | undefined; @@ -165,9 +173,13 @@ export function buildEmployeesListQuery( return { queryKey: queryKeyEmployeesList(request.companyId, { xGustoAPIVersion: request.xGustoAPIVersion, + locationUuid: request.locationUuid, + payrollUuid: request.payrollUuid, searchTerm: request.searchTerm, + sortBy: request.sortBy, include: request.include, onboarded: request.onboarded, + onboardedActive: request.onboardedActive, terminated: request.terminated, terminatedToday: request.terminatedToday, uuids: request.uuids, @@ -198,9 +210,13 @@ export function queryKeyEmployeesList( xGustoAPIVersion?: | GetV1CompaniesCompanyIdEmployeesHeaderXGustoAPIVersion | undefined; + locationUuid?: string | undefined; + payrollUuid?: string | undefined; searchTerm?: string | undefined; + sortBy?: string | undefined; include?: Array | undefined; onboarded?: boolean | undefined; + onboardedActive?: boolean | undefined; terminated?: boolean | undefined; terminatedToday?: boolean | undefined; uuids?: Array | undefined; diff --git a/gusto_embedded/src/react-query/payrollsGet.ts b/gusto_embedded/src/react-query/payrollsGet.ts index e7af3151..e8dfb8cf 100644 --- a/gusto_embedded/src/react-query/payrollsGet.ts +++ b/gusto_embedded/src/react-query/payrollsGet.ts @@ -21,6 +21,7 @@ import { GetV1CompaniesCompanyIdPayrollsPayrollIdQueryParamInclude, GetV1CompaniesCompanyIdPayrollsPayrollIdRequest, GetV1CompaniesCompanyIdPayrollsPayrollIdResponse, + SortBy, } from "../models/operations/getv1companiescompanyidpayrollspayrollid.js"; import { unwrapAsync } from "../types/fp.js"; import { useGustoEmbeddedContext } from "./_context.js"; @@ -118,6 +119,9 @@ export function setPayrollsGetData( include?: | Array | undefined; + page?: number | undefined; + per?: number | undefined; + sortBy?: SortBy | undefined; }, ], data: PayrollsGetQueryData, @@ -140,6 +144,9 @@ export function invalidatePayrollsGet( include?: | Array | undefined; + page?: number | undefined; + per?: number | undefined; + sortBy?: SortBy | undefined; }, ] >, @@ -173,6 +180,9 @@ export function buildPayrollsGetQuery( queryKey: queryKeyPayrollsGet(request.companyId, request.payrollId, { xGustoAPIVersion: request.xGustoAPIVersion, include: request.include, + page: request.page, + per: request.per, + sortBy: request.sortBy, }), queryFn: async function payrollsGetQueryFn( ctx, @@ -202,6 +212,9 @@ export function queryKeyPayrollsGet( include?: | Array | undefined; + page?: number | undefined; + per?: number | undefined; + sortBy?: SortBy | undefined; }, ): QueryKey { return [ diff --git a/gusto_embedded/src/sdk/contractors.ts b/gusto_embedded/src/sdk/contractors.ts index f323c6a4..a675f259 100644 --- a/gusto_embedded/src/sdk/contractors.ts +++ b/gusto_embedded/src/sdk/contractors.ts @@ -276,12 +276,30 @@ export class Contractors extends ClientSDK { * List contractor payment details * * @remarks - * Get payment details for contractors in a company. This endpoint returns a list of all contractors associated with the specified company, including their payment methods and bank account details if they are paid via direct deposit. + * Get payment details for contractors in a company. This endpoint returns a list of all contractors + * associated with the specified company, including their payment methods and bank account details + * if they are paid via direct deposit. * - * For contractors paid by direct deposit, the response includes their bank account information. + * For contractors paid by direct deposit, the response includes their bank account information + * with sensitive data masked for security. The payment details also include information about + * how their payments are split if they have multiple bank accounts configured. * * For contractors paid by check, only the basic payment method information is returned. * + * ### Response Details + * - For direct deposit contractors: + * - Bank account details (masked) + * - Payment splits configuration + * - Routing numbers + * - Account types + * - For check payments: + * - Basic payment method designation + * + * ### Common Use Cases + * - Fetching contractor payment information for payroll processing + * - Verifying contractor payment methods + * - Reviewing payment split configurations + * * `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. * * scope: `contractor_payment_methods:read`