From 6f70e357746ae2f9eea9f6f65791bcf88ac1ede7 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 29 Aug 2025 15:44:19 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.606.9 --- .speakeasy/workflow.lock | 14 +- gusto_embedded/.speakeasy/gen.lock | 116 +++++- gusto_embedded/.speakeasy/gen.yaml | 2 +- gusto_embedded/README.md | 13 +- gusto_embedded/RELEASES.md | 12 +- .../contractorpaymentforgrouppreview.md | 28 ++ ...ctorpaymentforgrouppreviewpaymentmethod.md | 17 + .../contractorpaymentforgrouppreviewstatus.md | 17 + ...ontractorpaymentforgrouppreviewwagetype.md | 17 + .../components/contractorpaymentgroup.md | 3 + ...al.md => contractorpaymentgrouppreview.md} | 16 +- ...=> contractorpaymentgrouppreviewstatus.md} | 6 +- ...=> contractorpaymentgrouppreviewtotals.md} | 9 +- .../contractorpaymentgrouptotals.md | 3 +- .../docs/models/components/employeebenefit.md | 4 +- .../employeebenefitforcompanybenefit.md | 4 +- .../docs/models/components/payroll.md | 4 +- .../docs/models/components/payrollprepared.md | 4 +- .../docs/models/components/payrollshow.md | 4 +- .../docs/models/errors/notfounderrorobject.md | 19 + ...torpaymentgroupidheaderxgustoapiversion.md | 19 + ...ntgroupscontractorpaymentgroupidrequest.md | 2 +- ...ctorpaymentgroupsheaderxgustoapiversion.md | 19 + ...companyidcontractorpaymentgroupsrequest.md | 2 +- ...ompanyidcontractorpaymentgroupsresponse.md | 8 +- ...torpaymentgroupidheaderxgustoapiversion.md | 19 + ...ntgroupscontractorpaymentgroupidrequest.md | 2 +- ...tgroupscontractorpaymentgroupidresponse.md | 2 +- .../docs/models/operations/leavingfor.md | 2 +- ...paniescompanyuuidsuspensionsrequestbody.md | 4 +- ...ctorpaymentgroupsheaderxgustoapiversion.md | 19 + ...rpaymentgroupspreviewcontractorpayments.md | 21 +- ...mentgroupspreviewheaderxgustoapiversion.md | 19 + ...ractorpaymentgroupspreviewpaymentmethod.md | 6 +- ...idcontractorpaymentgroupspreviewrequest.md | 5 +- ...ntractorpaymentgroupspreviewrequestbody.md | 12 +- ...dcontractorpaymentgroupspreviewresponse.md | 8 +- ...companyidcontractorpaymentgroupsrequest.md | 2 +- ...anyidcontractorpaymentgroupsrequestbody.md | 10 +- ...aymentgroupidfundheaderxgustoapiversion.md | 19 + ...oupscontractorpaymentgroupidfundrequest.md | 2 +- .../sdks/contractorpaymentgroups/README.md | 184 +++++----- gusto_embedded/examples/package-lock.json | 2 +- gusto_embedded/jsr.json | 2 +- gusto_embedded/package-lock.json | 4 +- gusto_embedded/package.json | 2 +- .../funcs/contractorPaymentGroupsCreate.ts | 6 +- .../funcs/contractorPaymentGroupsDelete.ts | 4 +- .../src/funcs/contractorPaymentGroupsFund.ts | 11 +- .../src/funcs/contractorPaymentGroupsGet.ts | 12 +- .../funcs/contractorPaymentGroupsGetList.ts | 14 +- ...ctorPaymentGroupsIdPartnerDisbursements.ts | 10 +- .../funcs/contractorPaymentGroupsPreview.ts | 16 +- gusto_embedded/src/lib/config.ts | 6 +- .../src/models/components/achtransaction.ts | 10 +- .../models/components/companycustomfield.ts | 8 +- .../contractorpaymentforgrouppreview.ts | 287 +++++++++++++++ .../components/contractorpaymentgroup.ts | 58 +++ .../contractorpaymentgroupminimal.ts | 267 -------------- .../contractorpaymentgrouppreview.ts | 341 ++++++++++++++++++ .../src/models/components/createreport.ts | 8 +- .../src/models/components/employeebenefit.ts | 20 +- .../employeebenefitforcompanybenefit.ts | 20 +- .../components/employmenthistorylist.ts | 8 +- .../src/models/components/externalpayroll.ts | 14 +- .../models/components/informationrequest.ts | 8 +- .../src/models/components/paymentconfigs.ts | 8 +- .../src/models/components/payroll.ts | 18 +- .../src/models/components/payrollcheck.ts | 8 +- .../src/models/components/payrollprepared.ts | 18 +- .../src/models/components/payrollshow.ts | 18 +- .../src/models/components/recoverycase.ts | 8 +- .../src/models/components/timeoffpolicy.ts | 24 +- .../src/models/components/wireinrequest.ts | 8 +- .../src/models/errors/notfounderrorobject.ts | 99 +++++ ...orpaymentgroupscontractorpaymentgroupid.ts | 61 +++- ...mpaniescompanyidcontractorpaymentgroups.ts | 91 +++-- ...orpaymentgroupscontractorpaymentgroupid.ts | 63 +++- .../postcompaniescompanyuuidsuspensions.ts | 8 +- ...mpaniescompanyidcontractorpaymentgroups.ts | 74 +++- ...companyidcontractorpaymentgroupspreview.ts | 161 +++++---- ...ymentgroupscontractorpaymentgroupidfund.ts | 61 +++- .../contractorPaymentGroupsFund.ts | 1 - .../react-query/contractorPaymentGroupsGet.ts | 24 +- .../contractorPaymentGroupsGetList.ts | 18 +- .../contractorPaymentGroupsPreview.ts | 4 +- .../src/sdk/contractorpaymentgroups.ts | 35 +- 87 files changed, 1900 insertions(+), 746 deletions(-) create mode 100644 gusto_embedded/docs/models/components/contractorpaymentforgrouppreview.md create mode 100644 gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewpaymentmethod.md create mode 100644 gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewstatus.md create mode 100644 gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewwagetype.md rename gusto_embedded/docs/models/components/{contractorpaymentgroupminimal.md => contractorpaymentgrouppreview.md} (66%) rename gusto_embedded/docs/models/components/{contractorpaymentgroupminimalstatus.md => contractorpaymentgrouppreviewstatus.md} (63%) rename gusto_embedded/docs/models/components/{contractorpaymentgroupminimaltotals.md => contractorpaymentgrouppreviewtotals.md} (79%) create mode 100644 gusto_embedded/docs/models/errors/notfounderrorobject.md create mode 100644 gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md create mode 100644 gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md create mode 100644 gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md create mode 100644 gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md create mode 100644 gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md create mode 100644 gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md create mode 100644 gusto_embedded/src/models/components/contractorpaymentforgrouppreview.ts delete mode 100644 gusto_embedded/src/models/components/contractorpaymentgroupminimal.ts create mode 100644 gusto_embedded/src/models/components/contractorpaymentgrouppreview.ts create mode 100644 gusto_embedded/src/models/errors/notfounderrorobject.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b6eba70d..36261aeb 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.606.0 +speakeasyVersion: 1.606.9 sources: GustoEmbedded-OAS: sourceNamespace: gusto-embedded-oas - sourceRevisionDigest: sha256:0000bad55bafaa796da9ceeff36d112ffd38d3090a970abf930d88f478249761 - sourceBlobDigest: sha256:0516e0cee805a53e52dc209683c9630036e6d3d498d6c61ecb800807fbb29ad6 + sourceRevisionDigest: sha256:8eb457d73d01b63a51eb6c6d70c682badf64409923dfce24e3b88edeb7c4cfb0 + sourceBlobDigest: sha256:b6488b78ea3b44a7696c87e3695fcaa332fbcf06aaa1c26277d72406bd777e76 tags: - latest - - speakeasy-sdk-regen-1755808091 + - speakeasy-sdk-regen-1755908026 - "2024-04-01" targets: gusto-embedded: source: GustoEmbedded-OAS sourceNamespace: gusto-embedded-oas - sourceRevisionDigest: sha256:0000bad55bafaa796da9ceeff36d112ffd38d3090a970abf930d88f478249761 - sourceBlobDigest: sha256:0516e0cee805a53e52dc209683c9630036e6d3d498d6c61ecb800807fbb29ad6 + sourceRevisionDigest: sha256:8eb457d73d01b63a51eb6c6d70c682badf64409923dfce24e3b88edeb7c4cfb0 + sourceBlobDigest: sha256:b6488b78ea3b44a7696c87e3695fcaa332fbcf06aaa1c26277d72406bd777e76 codeSamplesNamespace: gusto-embedded-oas-typescript-code-samples - codeSamplesRevisionDigest: sha256:82ff559ff03dcfa6f533c9200b9b23cecf55f34daf0e7f95759def15d61dd32c + codeSamplesRevisionDigest: sha256:fa622181e74824e0c66da6aff2ca577a977788c95d6d17e4ca2bcb4eef175f1b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/gusto_embedded/.speakeasy/gen.lock b/gusto_embedded/.speakeasy/gen.lock index 5ceebe6c..a3791581 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: 1aa2b3a9922d07e143048108250bb0e4 + docChecksum: cc112940a7ab93d201ca23598487942e docVersion: "2024-04-01" - speakeasyVersion: 1.606.0 - generationVersion: 2.686.7 - releaseVersion: 0.6.8 - configChecksum: 257ec5663fafc2f24bf2ce2cdef8a11c + speakeasyVersion: 1.606.9 + generationVersion: 2.687.13 + releaseVersion: 0.6.9 + configChecksum: 63e32a66eaa728802ae630c1f3608b4c repoURL: https://github.com/Gusto/gusto-typescript-client.git repoSubDirectory: gusto_embedded installationURL: https://gitpkg.now.sh/Gusto/gusto-typescript-client/gusto_embedded @@ -122,15 +122,19 @@ generatedFiles: - docs/models/components/contractorpaymentdetailslistsplitby.md - docs/models/components/contractorpaymentforgroup.md - docs/models/components/contractorpaymentforgrouppaymentmethod.md + - docs/models/components/contractorpaymentforgrouppreview.md + - docs/models/components/contractorpaymentforgrouppreviewpaymentmethod.md + - docs/models/components/contractorpaymentforgrouppreviewstatus.md + - docs/models/components/contractorpaymentforgrouppreviewwagetype.md - docs/models/components/contractorpaymentforgroupstatus.md - docs/models/components/contractorpaymentforgroupwagetype.md - docs/models/components/contractorpaymentgroup.md - - docs/models/components/contractorpaymentgroupminimal.md - - docs/models/components/contractorpaymentgroupminimalstatus.md - - docs/models/components/contractorpaymentgroupminimaltotals.md - docs/models/components/contractorpaymentgrouppartnerdisbursements.md - docs/models/components/contractorpaymentgrouppartnerdisbursementspaymentmethod.md - docs/models/components/contractorpaymentgrouppartnerdisbursementspaymentstatus.md + - docs/models/components/contractorpaymentgrouppreview.md + - docs/models/components/contractorpaymentgrouppreviewstatus.md + - docs/models/components/contractorpaymentgrouppreviewtotals.md - docs/models/components/contractorpaymentgroupstatus.md - docs/models/components/contractorpaymentgrouptotals.md - docs/models/components/contractorpaymentmethod.md @@ -461,6 +465,7 @@ generatedFiles: - docs/models/errors/deletev1companybenefitscompanybenefitidresponsebody.md - docs/models/errors/errors.md - docs/models/errors/metadata.md + - docs/models/errors/notfounderrorobject.md - docs/models/errors/payrollblockerserror.md - docs/models/errors/postcompaniespayrollskipcompanyuuidresponsebody.md - docs/models/errors/postpayrollsgrossuppayrolluuidresponsebody.md @@ -502,6 +507,7 @@ generatedFiles: - docs/models/operations/deletev1companybenefitscompanybenefitidresponse.md - docs/models/operations/deletev1compensationscompensationidrequest.md - docs/models/operations/deletev1compensationscompensationidresponse.md + - docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md - docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md - docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidresponse.md - docs/models/operations/deletev1contractorscontractoruuidrequest.md @@ -612,6 +618,7 @@ generatedFiles: - docs/models/operations/getv1companiescompanyidcompanybenefitsresponse.md - docs/models/operations/getv1companiescompanyidcontractorpaymentcontractorpaymentrequest.md - docs/models/operations/getv1companiescompanyidcontractorpaymentcontractorpaymentresponse.md + - docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md - docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md - docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsresponse.md - docs/models/operations/getv1companiescompanyidcontractorpaymentsrequest.md @@ -707,6 +714,7 @@ generatedFiles: - docs/models/operations/getv1contractorformresponse.md - docs/models/operations/getv1contractorformsrequest.md - docs/models/operations/getv1contractorformsresponse.md + - docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md - docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md - docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidresponse.md - docs/models/operations/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md @@ -921,8 +929,10 @@ generatedFiles: - docs/models/operations/postv1companiescompanyidcompanybenefitsrequest.md - docs/models/operations/postv1companiescompanyidcompanybenefitsrequestbody.md - docs/models/operations/postv1companiescompanyidcompanybenefitsresponse.md + - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspaymentmethod.md - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md + - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md - docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md @@ -1133,6 +1143,7 @@ generatedFiles: - docs/models/operations/putv1contractordocumentsignrequest.md - docs/models/operations/putv1contractordocumentsignrequestbody.md - docs/models/operations/putv1contractordocumentsignresponse.md + - docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md - docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md - docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundresponse.md - docs/models/operations/putv1contractorscontractoridpaymentmethodrequest.md @@ -1661,9 +1672,10 @@ generatedFiles: - src/models/components/contractorpayment.ts - src/models/components/contractorpaymentdetailslist.ts - src/models/components/contractorpaymentforgroup.ts + - src/models/components/contractorpaymentforgrouppreview.ts - src/models/components/contractorpaymentgroup.ts - - src/models/components/contractorpaymentgroupminimal.ts - src/models/components/contractorpaymentgrouppartnerdisbursements.ts + - src/models/components/contractorpaymentgrouppreview.ts - src/models/components/contractorpaymentmethod.ts - src/models/components/contractorpaymentreceipt.ts - src/models/components/contractorpaymentsummary.ts @@ -1800,6 +1812,7 @@ generatedFiles: - src/models/errors/deletev1companybenefitscompanybenefitid.ts - src/models/errors/gustoembeddederror.ts - src/models/errors/httpclienterrors.ts + - src/models/errors/notfounderrorobject.ts - src/models/errors/payrollblockerserror.ts - src/models/errors/postcompaniespayrollskipcompanyuuid.ts - src/models/errors/postpayrollsgrossuppayrolluuid.ts @@ -7456,7 +7469,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 673837, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]} + application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": null, "accrual_rate_unit": null, "paid_out_on_termination": false, "accrual_waiting_period_days": null, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]} Fixed Policy: parameters: path: @@ -7465,7 +7478,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": "", "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37"}]} + application/json: {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": null, "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37"}]} Hourly Policy: parameters: path: @@ -7553,7 +7566,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 977877, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]}, {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": "", "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37"}]}, {"uuid": "bd5f354f-12e0-4a5e-ad1f-953bb2685ad4", "company_uuid": "6767445f-5075-4ea4-a7f5-d5b5b93d4d60", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "1ea2764d-0f1a-4f09-b1d9-3006aecf63c4"}, {"uuid": "a0db19a2-7c8f-42b4-9d4c-2e6246c3d6e8"}]}] + application/json: [{"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": null, "accrual_rate_unit": null, "paid_out_on_termination": false, "accrual_waiting_period_days": null, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]}, {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": null, "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37"}]}, {"uuid": "bd5f354f-12e0-4a5e-ad1f-953bb2685ad4", "company_uuid": "6767445f-5075-4ea4-a7f5-d5b5b93d4d60", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "1ea2764d-0f1a-4f09-b1d9-3006aecf63c4"}, {"uuid": "a0db19a2-7c8f-42b4-9d4c-2e6246c3d6e8"}]}] post-companies-company_uuid-time_off_policies: Unlimited Policy: parameters: @@ -8042,6 +8055,19 @@ examples: responses: "422": application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + speakeasy-default-post-v1-companies-company-id-contractor-payment-groups: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": []} + responses: + "201": + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-companies-company_id-contractor_payment_groups: Example: parameters: @@ -8055,6 +8081,20 @@ examples: responses: "200": application/json: [{"uuid": "7f2337f9-9b78-44b9-aeed-be4777b833a8", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-03-15", "debit_date": "2024-03-11", "status": "Funded", "creation_token": "a51a3500-3200-43af-a738-169d4b66a9db", "totals": {"debit_amount": "740.00", "wage_amount": "720.00", "reimbursement_amount": "20.00"}}, {"uuid": "56260b3d-c375-415c-b77a-75d99f717193", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-02", "debit_date": "2024-04-26", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"debit_amount": "2365.00", "wage_amount": "2270.00", "reimbursement_amount": "95.00"}}] + speakeasy-default-get-v1-companies-company-id-contractor-payment-groups: + parameters: + path: + company_id: "" + query: + start_date: "2020-01-01" + end_date: "2020-12-31" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-companies-company_id-contractor_payment_groups-preview: Example: parameters: @@ -8100,6 +8140,21 @@ examples: responses: "422": application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + speakeasy-default-post-v1-companies-company-id-contractor-payment-groups-preview: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contractor_payments": []} + responses: + "200": + application/json: {} + "404": + application/json: {"errors": []} + "422": + application/json: {"errors": []} get-v1-contractor_payment_groups-contractor_payment_group_id: Example: parameters: @@ -8110,6 +8165,17 @@ examples: responses: "200": application/json: {"uuid": "f693e034-d833-46e3-88d4-2c820c383c57", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07", "debit_date": "2024-05-01", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "630dc982-f498-4ebc-a6dc-4d76711027ce", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "12f51eba-d653-4357-8c05-1f1f8d0fd5e3", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} + speakeasy-default-get-v1-contractor-payment-groups-contractor-payment-group-id: + parameters: + path: + contractor_payment_group_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {} + "404": + application/json: {"errors": []} delete-v1-contractor_payment_groups-contractor_payment_group_id: Basic: parameters: @@ -8138,6 +8204,15 @@ examples: responses: "422": application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + speakeasy-default-delete-v1-contractor-payment-groups-contractor-payment-group-id: + parameters: + path: + contractor_payment_group_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "404": + application/json: {"errors": []} put-v1-contractor_payment_groups-contractor_payment_group_id-fund: Example: parameters: @@ -8175,6 +8250,19 @@ examples: responses: "422": application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + speakeasy-default-put-v1-contractor-payment-groups-contractor-payment-group-id-fund: + parameters: + path: + contractor_payment_group_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {} + "404": + application/json: {"errors": []} + "422": + application/json: {"errors": []} get-v1-company-forms: Example: parameters: @@ -9486,7 +9574,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "e83d273e-4ae9-4b61-9c71-4030c2f73093", "company_uuid": "c5e3e3e9-732f-4762-849e-20b5cec9036f", "status": "open", "latest_error_code": "R01", "original_debit_date": "2023-10-11", "check_date": "2023-10-13", "payroll_uuid": "210f2034-fb4a-4059-b109-6c3b5efe499d", "contractor_payment_uuids": ["", "", ""], "amount_outstanding": "10499.43", "event_total_amount": "5912.07"}] + application/json: [{"uuid": "e83d273e-4ae9-4b61-9c71-4030c2f73093", "company_uuid": "c5e3e3e9-732f-4762-849e-20b5cec9036f", "status": "open", "latest_error_code": "R01", "original_debit_date": "2023-10-11", "check_date": "2023-10-13", "payroll_uuid": "210f2034-fb4a-4059-b109-6c3b5efe499d", "contractor_payment_uuids": null, "amount_outstanding": "10499.43", "event_total_amount": "5912.07"}] redebit-recovery-case: Basic: parameters: @@ -9718,6 +9806,8 @@ examples: application/json: {} "404": application/json: {"errors": [{"error_key": "", "category": ""}]} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} delete-v1-companies-company_id-bank-accounts-bank_account_id: speakeasy-default-delete-v1-companies-company-id-bank-accounts-bank-account-id: parameters: diff --git a/gusto_embedded/.speakeasy/gen.yaml b/gusto_embedded/.speakeasy/gen.yaml index b0c8f72b..a28d52b8 100644 --- a/gusto_embedded/.speakeasy/gen.yaml +++ b/gusto_embedded/.speakeasy/gen.yaml @@ -24,7 +24,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.6.8 + version: 0.6.9 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/gusto_embedded/README.md b/gusto_embedded/README.md index 969616b1..aa6b28b1 100644 --- a/gusto_embedded/README.md +++ b/gusto_embedded/README.md @@ -268,10 +268,10 @@ run(); ### [contractorPaymentGroups](docs/sdks/contractorpaymentgroups/README.md) -* [create](docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group * [getList](docs/sdks/contractorpaymentgroups/README.md#getlist) - Get contractor payment groups for a company +* [create](docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group * [preview](docs/sdks/contractorpaymentgroups/README.md#preview) - Preview a contractor payment group -* [get](docs/sdks/contractorpaymentgroups/README.md#get) - Fetch a contractor payment group +* [get](docs/sdks/contractorpaymentgroups/README.md#get) - Get a contractor payment group * [delete](docs/sdks/contractorpaymentgroups/README.md#delete) - Cancel a contractor payment group * [fund](docs/sdks/contractorpaymentgroups/README.md#fund) - Fund a contractor payment group [DEMO] * [getV1ContractorPaymentGroupsIdPartnerDisbursements](docs/sdks/contractorpaymentgroups/README.md#getv1contractorpaymentgroupsidpartnerdisbursements) - Get partner disbursements for a contractor payment group @@ -671,7 +671,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`contractorPaymentGroupsCreate`](docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group - [`contractorPaymentGroupsDelete`](docs/sdks/contractorpaymentgroups/README.md#delete) - Cancel a contractor payment group - [`contractorPaymentGroupsFund`](docs/sdks/contractorpaymentgroups/README.md#fund) - Fund a contractor payment group [DEMO] -- [`contractorPaymentGroupsGet`](docs/sdks/contractorpaymentgroups/README.md#get) - Fetch a contractor payment group +- [`contractorPaymentGroupsGet`](docs/sdks/contractorpaymentgroups/README.md#get) - Get a contractor payment group - [`contractorPaymentGroupsGetList`](docs/sdks/contractorpaymentgroups/README.md#getlist) - Get contractor payment groups for a company - [`contractorPaymentGroupsGetV1ContractorPaymentGroupsIdPartnerDisbursements`](docs/sdks/contractorpaymentgroups/README.md#getv1contractorpaymentgroupsidpartnerdisbursements) - Get partner disbursements for a contractor payment group - [`contractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDisbursements`](docs/sdks/contractorpaymentgroups/README.md#patchv1contractorpaymentgroupsidpartnerdisbursements) - Update partner disbursements for a contractor payment group @@ -957,7 +957,7 @@ To learn about this feature and how to get started, check - [`useContractorPaymentGroupsCreateMutation`](docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group - [`useContractorPaymentGroupsDeleteMutation`](docs/sdks/contractorpaymentgroups/README.md#delete) - Cancel a contractor payment group - [`useContractorPaymentGroupsFundMutation`](docs/sdks/contractorpaymentgroups/README.md#fund) - Fund a contractor payment group [DEMO] -- [`useContractorPaymentGroupsGet`](docs/sdks/contractorpaymentgroups/README.md#get) - Fetch a contractor payment group +- [`useContractorPaymentGroupsGet`](docs/sdks/contractorpaymentgroups/README.md#get) - Get a contractor payment group - [`useContractorPaymentGroupsGetList`](docs/sdks/contractorpaymentgroups/README.md#getlist) - Get contractor payment groups for a company - [`useContractorPaymentGroupsGetV1ContractorPaymentGroupsIdPartnerDisbursements`](docs/sdks/contractorpaymentgroups/README.md#getv1contractorpaymentgroupsidpartnerdisbursements) - Get partner disbursements for a contractor payment group - [`useContractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDisbursementsMutation`](docs/sdks/contractorpaymentgroups/README.md#patchv1contractorpaymentgroupsidpartnerdisbursements) - Update partner disbursements for a contractor payment group @@ -1338,7 +1338,7 @@ run(); **Primary error:** * [`GustoEmbeddedError`](./src/models/errors/gustoembeddederror.ts): The base class for HTTP error responses. -
Less common errors (11) +
Less common errors (12)
@@ -1351,7 +1351,8 @@ 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 138 of 260 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 139 of 260 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 260 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 260 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 260 methods.* * [`DeleteV1CompanyBenefitsCompanyBenefitIdResponseBody`](./src/models/errors/deletev1companybenefitscompanybenefitidresponsebody.ts): Unprocessable Entity. Status code `422`. Applicable to 1 of 260 methods.* diff --git a/gusto_embedded/RELEASES.md b/gusto_embedded/RELEASES.md index 77536f47..33977f6f 100644 --- a/gusto_embedded/RELEASES.md +++ b/gusto_embedded/RELEASES.md @@ -328,4 +328,14 @@ Based on: ### Generated - [typescript v0.6.8] gusto_embedded ### Releases -- [NPM v0.6.8] https://www.npmjs.com/package/@gusto/embedded-api/v/0.6.8 - gusto_embedded \ No newline at end of file +- [NPM v0.6.8] https://www.npmjs.com/package/@gusto/embedded-api/v/0.6.8 - gusto_embedded + +## 2025-08-29 15:42:20 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.606.9 (2.687.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.6.9] gusto_embedded +### Releases +- [NPM v0.6.9] https://www.npmjs.com/package/@gusto/embedded-api/v/0.6.9 - gusto_embedded \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentforgrouppreview.md b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreview.md new file mode 100644 index 00000000..c5a51971 --- /dev/null +++ b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreview.md @@ -0,0 +1,28 @@ +# ContractorPaymentForGroupPreview + +Preview representation of a single contractor payment with nullable uuid. + +## Example Usage + +```typescript +import { ContractorPaymentForGroupPreview } from "@gusto/embedded-api/models/components/contractorpaymentforgrouppreview.js"; + +let value: ContractorPaymentForGroupPreview = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_minus_sign: | The unique identifier of the contractor payment in Gusto. | +| `contractorUuid` | *string* | :heavy_minus_sign: | The UUID of the contractor. | +| `bonus` | *string* | :heavy_minus_sign: | The bonus amount in the payment. | +| `hours` | *string* | :heavy_minus_sign: | The number of hours worked for the payment. | +| `paymentMethod` | [components.ContractorPaymentForGroupPreviewPaymentMethod](../../models/components/contractorpaymentforgrouppreviewpaymentmethod.md) | :heavy_minus_sign: | The payment method. | +| `reimbursement` | *string* | :heavy_minus_sign: | The reimbursement amount in the payment. | +| `status` | [components.ContractorPaymentForGroupPreviewStatus](../../models/components/contractorpaymentforgrouppreviewstatus.md) | :heavy_minus_sign: | The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. | +| `hourlyRate` | *string* | :heavy_minus_sign: | The rate per hour worked for the payment. | +| `mayCancel` | *boolean* | :heavy_minus_sign: | Determine if the contractor payment can be cancelled. | +| `wage` | *string* | :heavy_minus_sign: | The fixed wage of the payment, regardless of hours worked. | +| `wageType` | [components.ContractorPaymentForGroupPreviewWageType](../../models/components/contractorpaymentforgrouppreviewwagetype.md) | :heavy_minus_sign: | The wage type for the payment. | +| `wageTotal` | *string* | :heavy_minus_sign: | (hours * hourly_rate) + wage + bonus | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewpaymentmethod.md b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewpaymentmethod.md new file mode 100644 index 00000000..fa21d7fc --- /dev/null +++ b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewpaymentmethod.md @@ -0,0 +1,17 @@ +# ContractorPaymentForGroupPreviewPaymentMethod + +The payment method. + +## Example Usage + +```typescript +import { ContractorPaymentForGroupPreviewPaymentMethod } from "@gusto/embedded-api/models/components/contractorpaymentforgrouppreview.js"; + +let value: ContractorPaymentForGroupPreviewPaymentMethod = "Historical Payment"; +``` + +## Values + +```typescript +"Direct Deposit" | "Check" | "Historical Payment" | "Correction Payment" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewstatus.md b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewstatus.md new file mode 100644 index 00000000..d6f70077 --- /dev/null +++ b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewstatus.md @@ -0,0 +1,17 @@ +# ContractorPaymentForGroupPreviewStatus + +The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. + +## Example Usage + +```typescript +import { ContractorPaymentForGroupPreviewStatus } from "@gusto/embedded-api/models/components/contractorpaymentforgrouppreview.js"; + +let value: ContractorPaymentForGroupPreviewStatus = "Unfunded"; +``` + +## Values + +```typescript +"Funded" | "Unfunded" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewwagetype.md b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewwagetype.md new file mode 100644 index 00000000..6fb6c57e --- /dev/null +++ b/gusto_embedded/docs/models/components/contractorpaymentforgrouppreviewwagetype.md @@ -0,0 +1,17 @@ +# ContractorPaymentForGroupPreviewWageType + +The wage type for the payment. + +## Example Usage + +```typescript +import { ContractorPaymentForGroupPreviewWageType } from "@gusto/embedded-api/models/components/contractorpaymentforgrouppreview.js"; + +let value: ContractorPaymentForGroupPreviewWageType = "Fixed"; +``` + +## Values + +```typescript +"Hourly" | "Fixed" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentgroup.md b/gusto_embedded/docs/models/components/contractorpaymentgroup.md index ca093bf4..62e52c4e 100644 --- a/gusto_embedded/docs/models/components/contractorpaymentgroup.md +++ b/gusto_embedded/docs/models/components/contractorpaymentgroup.md @@ -20,5 +20,8 @@ let value: ContractorPaymentGroup = {}; | `debitDate` | *string* | :heavy_minus_sign: | The debit date of the contractor payment group. | | `status` | [components.ContractorPaymentGroupStatus](../../models/components/contractorpaymentgroupstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | | `creationToken` | *string* | :heavy_minus_sign: | Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. | +| `partnerOwnedDisbursement` | *boolean* | :heavy_minus_sign: | Whether the disbursement is partner owned. | +| `submissionBlockers` | [components.PayrollSubmissionBlockersType](../../models/components/payrollsubmissionblockerstype.md)[][] | :heavy_minus_sign: | List of submission blockers for the contractor payment group. | +| `creditBlockers` | [components.PayrollCreditBlockersType](../../models/components/payrollcreditblockerstype.md)[][] | :heavy_minus_sign: | List of credit blockers for the contractor payment group. | | `totals` | [components.ContractorPaymentGroupTotals](../../models/components/contractorpaymentgrouptotals.md) | :heavy_minus_sign: | N/A | | `contractorPayments` | [components.ContractorPaymentForGroup](../../models/components/contractorpaymentforgroup.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentgroupminimal.md b/gusto_embedded/docs/models/components/contractorpaymentgrouppreview.md similarity index 66% rename from gusto_embedded/docs/models/components/contractorpaymentgroupminimal.md rename to gusto_embedded/docs/models/components/contractorpaymentgrouppreview.md index d625e6d5..e60268c1 100644 --- a/gusto_embedded/docs/models/components/contractorpaymentgroupminimal.md +++ b/gusto_embedded/docs/models/components/contractorpaymentgrouppreview.md @@ -1,13 +1,13 @@ -# ContractorPaymentGroupMinimal +# ContractorPaymentGroupPreview -The summary of a contractor payment group. +Preview of a contractor payment group ## Example Usage ```typescript -import { ContractorPaymentGroupMinimal } from "@gusto/embedded-api/models/components/contractorpaymentgroupminimal.js"; +import { ContractorPaymentGroupPreview } from "@gusto/embedded-api/models/components/contractorpaymentgrouppreview.js"; -let value: ContractorPaymentGroupMinimal = {}; +let value: ContractorPaymentGroupPreview = {}; ``` ## Fields @@ -18,6 +18,10 @@ let value: ContractorPaymentGroupMinimal = {}; | `companyUuid` | *string* | :heavy_minus_sign: | The UUID of the company. | | `checkDate` | *string* | :heavy_minus_sign: | The check date of the contractor payment group. | | `debitDate` | *string* | :heavy_minus_sign: | The debit date of the contractor payment group. | -| `status` | [components.ContractorPaymentGroupMinimalStatus](../../models/components/contractorpaymentgroupminimalstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | +| `status` | [components.ContractorPaymentGroupPreviewStatus](../../models/components/contractorpaymentgrouppreviewstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | | `creationToken` | *string* | :heavy_minus_sign: | Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. | -| `totals` | [components.ContractorPaymentGroupMinimalTotals](../../models/components/contractorpaymentgroupminimaltotals.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `partnerOwnedDisbursement` | *boolean* | :heavy_minus_sign: | Whether the disbursement is partner owned. | +| `submissionBlockers` | [components.PayrollSubmissionBlockersType](../../models/components/payrollsubmissionblockerstype.md)[][] | :heavy_minus_sign: | List of submission blockers for the contractor payment group. | +| `creditBlockers` | [components.PayrollCreditBlockersType](../../models/components/payrollcreditblockerstype.md)[][] | :heavy_minus_sign: | List of credit blockers for the contractor payment group. | +| `totals` | [components.ContractorPaymentGroupPreviewTotals](../../models/components/contractorpaymentgrouppreviewtotals.md) | :heavy_minus_sign: | N/A | +| `contractorPayments` | [components.ContractorPaymentForGroupPreview](../../models/components/contractorpaymentforgrouppreview.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentgroupminimalstatus.md b/gusto_embedded/docs/models/components/contractorpaymentgrouppreviewstatus.md similarity index 63% rename from gusto_embedded/docs/models/components/contractorpaymentgroupminimalstatus.md rename to gusto_embedded/docs/models/components/contractorpaymentgrouppreviewstatus.md index 4acc127f..76741ac5 100644 --- a/gusto_embedded/docs/models/components/contractorpaymentgroupminimalstatus.md +++ b/gusto_embedded/docs/models/components/contractorpaymentgrouppreviewstatus.md @@ -1,13 +1,13 @@ -# ContractorPaymentGroupMinimalStatus +# ContractorPaymentGroupPreviewStatus The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. ## Example Usage ```typescript -import { ContractorPaymentGroupMinimalStatus } from "@gusto/embedded-api/models/components/contractorpaymentgroupminimal.js"; +import { ContractorPaymentGroupPreviewStatus } from "@gusto/embedded-api/models/components/contractorpaymentgrouppreview.js"; -let value: ContractorPaymentGroupMinimalStatus = "Funded"; +let value: ContractorPaymentGroupPreviewStatus = "Unfunded"; ``` ## Values diff --git a/gusto_embedded/docs/models/components/contractorpaymentgroupminimaltotals.md b/gusto_embedded/docs/models/components/contractorpaymentgrouppreviewtotals.md similarity index 79% rename from gusto_embedded/docs/models/components/contractorpaymentgroupminimaltotals.md rename to gusto_embedded/docs/models/components/contractorpaymentgrouppreviewtotals.md index d559f09f..4757ff09 100644 --- a/gusto_embedded/docs/models/components/contractorpaymentgroupminimaltotals.md +++ b/gusto_embedded/docs/models/components/contractorpaymentgrouppreviewtotals.md @@ -1,11 +1,11 @@ -# ContractorPaymentGroupMinimalTotals +# ContractorPaymentGroupPreviewTotals ## Example Usage ```typescript -import { ContractorPaymentGroupMinimalTotals } from "@gusto/embedded-api/models/components/contractorpaymentgroupminimal.js"; +import { ContractorPaymentGroupPreviewTotals } from "@gusto/embedded-api/models/components/contractorpaymentgrouppreview.js"; -let value: ContractorPaymentGroupMinimalTotals = {}; +let value: ContractorPaymentGroupPreviewTotals = {}; ``` ## Fields @@ -15,4 +15,5 @@ let value: ContractorPaymentGroupMinimalTotals = {}; | `amount` | *string* | :heavy_minus_sign: | The total amount for the group of contractor payments. | | `debitAmount` | *string* | :heavy_minus_sign: | The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. | | `wageAmount` | *string* | :heavy_minus_sign: | The total wage amount for the group of contractor payments. | -| `reimbursementAmount` | *string* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | \ No newline at end of file +| `reimbursementAmount` | *string* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | +| `checkAmount` | *string* | :heavy_minus_sign: | The total check amount for the group of contractor payments. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/contractorpaymentgrouptotals.md b/gusto_embedded/docs/models/components/contractorpaymentgrouptotals.md index 7ca15935..eadbcc15 100644 --- a/gusto_embedded/docs/models/components/contractorpaymentgrouptotals.md +++ b/gusto_embedded/docs/models/components/contractorpaymentgrouptotals.md @@ -15,4 +15,5 @@ let value: ContractorPaymentGroupTotals = {}; | `amount` | *string* | :heavy_minus_sign: | The total amount for the group of contractor payments. | | `debitAmount` | *string* | :heavy_minus_sign: | The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. | | `wageAmount` | *string* | :heavy_minus_sign: | The total wage amount for the group of contractor payments. | -| `reimbursementAmount` | *string* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | \ No newline at end of file +| `reimbursementAmount` | *string* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | +| `checkAmount` | *string* | :heavy_minus_sign: | The total check amount for the group of contractor payments. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/components/employeebenefit.md b/gusto_embedded/docs/models/components/employeebenefit.md index efc4ea93..c2f8426a 100644 --- a/gusto_embedded/docs/models/components/employeebenefit.md +++ b/gusto_embedded/docs/models/components/employeebenefit.md @@ -25,11 +25,11 @@ let value: EmployeeBenefit = { | `elective` | *boolean* | :heavy_minus_sign: | Whether the company contribution is elective (aka matching). For "tiered" contribution types, this is always true. | | `companyContributionAnnualMaximum` | *string* | :heavy_minus_sign: | The maximum company contribution amount per year. A null value signifies no limit. | | `limitOption` | *string* | :heavy_minus_sign: | Some benefits require additional information to determine their limit.

`Family` and `Individual` are applicable to HSA benefit.

`Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. | -| `catchUp` | *boolean* | :heavy_minus_sign: | Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | +| `catchUp` | *boolean* | :heavy_minus_sign: | Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | | `retirementLoanIdentifier` | *string* | :heavy_minus_sign: | Identifier for a 401(k) loan assigned by the 401(k) provider | | `coverageAmount` | *string* | :heavy_minus_sign: | The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set. | | `deductionReducesTaxableIncome` | [components.DeductionReducesTaxableIncome](../../models/components/deductionreducestaxableincome.md) | :heavy_minus_sign: | Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored. | -| `coverageSalaryMultiplier` | *string* | :heavy_minus_sign: | The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | +| `coverageSalaryMultiplier` | *string* | :heavy_minus_sign: | The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | | ~~`companyContribution`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. | | ~~`contributeAsPercentage`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the company_contribution value should be treated as a percentage to be added to each payroll. This field will not appear for tiered contribution types. | | `employeeUuid` | *string* | :heavy_minus_sign: | The UUID of the employee to which the benefit belongs. | diff --git a/gusto_embedded/docs/models/components/employeebenefitforcompanybenefit.md b/gusto_embedded/docs/models/components/employeebenefitforcompanybenefit.md index d37c0af6..4f20c073 100644 --- a/gusto_embedded/docs/models/components/employeebenefitforcompanybenefit.md +++ b/gusto_embedded/docs/models/components/employeebenefitforcompanybenefit.md @@ -25,11 +25,11 @@ let value: EmployeeBenefitForCompanyBenefit = { | `elective` | *boolean* | :heavy_minus_sign: | Whether the company contribution is elective (aka matching). For "tiered" contribution types, this is always true. | | `companyContributionAnnualMaximum` | *string* | :heavy_minus_sign: | The maximum company contribution amount per year. A null value signifies no limit. | | `limitOption` | *string* | :heavy_minus_sign: | Some benefits require additional information to determine their limit.

`Family` and `Individual` are applicable to HSA benefit.

`Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. | -| `catchUp` | *boolean* | :heavy_minus_sign: | Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | +| `catchUp` | *boolean* | :heavy_minus_sign: | Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | | `retirementLoanIdentifier` | *string* | :heavy_minus_sign: | Identifier for a 401(k) loan assigned by the 401(k) provider | | `coverageAmount` | *string* | :heavy_minus_sign: | The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set. | | `deductionReducesTaxableIncome` | [components.EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome](../../models/components/employeebenefitforcompanybenefitdeductionreducestaxableincome.md) | :heavy_minus_sign: | Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored. | -| `coverageSalaryMultiplier` | *string* | :heavy_minus_sign: | The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | +| `coverageSalaryMultiplier` | *string* | :heavy_minus_sign: | The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | | ~~`companyContribution`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. | | ~~`contributeAsPercentage`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the company_contribution value should be treated as a percentage to be added to each payroll. This field will not appear for tiered contribution types. | | `employeeUuid` | *string* | :heavy_check_mark: | The UUID of the employee to which the benefit belongs. | \ 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 72e54f95..828eb73a 100644 --- a/gusto_embedded/docs/models/components/payroll.md +++ b/gusto_embedded/docs/models/components/payroll.md @@ -12,11 +12,11 @@ let value: Payroll = {}; | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `payrollDeadline` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | +| `payrollDeadline` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `checkDate` | *string* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *boolean* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | | `processedDate` | *string* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculatedAt` | *string* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `calculatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *string* | :heavy_minus_sign: | The UUID of the payroll. | | `payrollUuid` | *string* | :heavy_minus_sign: | The UUID of the payroll. | | `companyUuid` | *string* | :heavy_minus_sign: | The UUID of the company for the payroll. | diff --git a/gusto_embedded/docs/models/components/payrollprepared.md b/gusto_embedded/docs/models/components/payrollprepared.md index 0384d21e..107a9ac6 100644 --- a/gusto_embedded/docs/models/components/payrollprepared.md +++ b/gusto_embedded/docs/models/components/payrollprepared.md @@ -12,11 +12,11 @@ let value: PayrollPrepared = {}; | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `payrollDeadline` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | +| `payrollDeadline` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `checkDate` | *string* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *boolean* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | | `processedDate` | *string* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculatedAt` | *string* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `calculatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *string* | :heavy_minus_sign: | The UUID of the payroll. | | `payrollUuid` | *string* | :heavy_minus_sign: | The UUID of the payroll. | | `companyUuid` | *string* | :heavy_minus_sign: | The UUID of the company for the payroll. | diff --git a/gusto_embedded/docs/models/components/payrollshow.md b/gusto_embedded/docs/models/components/payrollshow.md index 7f51b68e..6084b221 100644 --- a/gusto_embedded/docs/models/components/payrollshow.md +++ b/gusto_embedded/docs/models/components/payrollshow.md @@ -12,11 +12,11 @@ let value: PayrollShow = {}; | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `payrollDeadline` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | +| `payrollDeadline` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `checkDate` | *string* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *boolean* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | | `processedDate` | *string* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculatedAt` | *string* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `calculatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *string* | :heavy_minus_sign: | The UUID of the payroll. | | `payrollUuid` | *string* | :heavy_minus_sign: | The UUID of the payroll. | | `companyUuid` | *string* | :heavy_minus_sign: | The UUID of the company for the payroll. | diff --git a/gusto_embedded/docs/models/errors/notfounderrorobject.md b/gusto_embedded/docs/models/errors/notfounderrorobject.md new file mode 100644 index 00000000..44308a4d --- /dev/null +++ b/gusto_embedded/docs/models/errors/notfounderrorobject.md @@ -0,0 +1,19 @@ +# NotFoundErrorObject + +Not Found + +The requested resource does not exist. Make sure the provided ID/UUID is valid. + +## Example Usage + +```typescript +import { NotFoundErrorObject } from "@gusto/embedded-api/models/errors/notfounderrorobject.js"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `errors` | [components.EntityErrorObject](../../models/components/entityerrorobject.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md new file mode 100644 index 00000000..75a3fd4d --- /dev/null +++ b/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + +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. + +## Example Usage + +```typescript +import { DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupid.js"; + +let value: + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md b/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md index 2e1778fc..350de27e 100644 --- a/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md +++ b/gusto_embedded/docs/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md @@ -15,4 +15,4 @@ let value: DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractorPaymentGroupUuid` | *string* | :heavy_check_mark: | The UUID of the contractor payment group | -| `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 +| `xGustoAPIVersion` | [operations.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion](../../models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.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/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md new file mode 100644 index 00000000..8cbb89cc --- /dev/null +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + +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. + +## Example Usage + +```typescript +import { GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/getv1companiescompanyidcontractorpaymentgroups.js"; + +let value: + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md index c9b57022..f168e26b 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md @@ -21,4 +21,4 @@ let value: GetV1CompaniesCompanyIdContractorPaymentGroupsRequest = { | `endDate` | *string* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to today's date. | 2020-12-31 | | `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 | | -| `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 +| `xGustoAPIVersion` | [operations.GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion](../../models/operations/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.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/getv1companiescompanyidcontractorpaymentgroupsresponse.md b/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsresponse.md index 27ddca75..546ec659 100644 --- a/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsresponse.md +++ b/gusto_embedded/docs/models/operations/getv1companiescompanyidcontractorpaymentgroupsresponse.md @@ -10,7 +10,7 @@ let value: GetV1CompaniesCompanyIdContractorPaymentGroupsResponse = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `contractorPaymentGroupList` | [components.ContractorPaymentGroupMinimal](../../models/components/contractorpaymentgroupminimal.md)[] | :heavy_minus_sign: | List of Contractor Payment Groups | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `contractorPaymentGroups` | [components.ContractorPaymentGroup](../../models/components/contractorpaymentgroup.md)[] | :heavy_minus_sign: | List of Contractor Payment Groups | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md new file mode 100644 index 00000000..dfacf1d7 --- /dev/null +++ b/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + +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. + +## Example Usage + +```typescript +import { GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupid.js"; + +let value: + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md b/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md index a0500cbb..851e5e3f 100644 --- a/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md +++ b/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md @@ -15,4 +15,4 @@ let value: GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractorPaymentGroupUuid` | *string* | :heavy_check_mark: | The UUID of the contractor payment group | -| `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 +| `xGustoAPIVersion` | [operations.GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion](../../models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.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/getv1contractorpaymentgroupscontractorpaymentgroupidresponse.md b/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidresponse.md index 9a9289bd..fb448472 100644 --- a/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidresponse.md +++ b/gusto_embedded/docs/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupidresponse.md @@ -13,4 +13,4 @@ let value: GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `contractorPaymentGroup` | [components.ContractorPaymentGroup](../../models/components/contractorpaymentgroup.md) | :heavy_minus_sign: | Full contractor payment group object | \ No newline at end of file +| `contractorPaymentGroup` | [components.ContractorPaymentGroup](../../models/components/contractorpaymentgroup.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/leavingfor.md b/gusto_embedded/docs/models/operations/leavingfor.md index 2ba62318..250c3085 100644 --- a/gusto_embedded/docs/models/operations/leavingfor.md +++ b/gusto_embedded/docs/models/operations/leavingfor.md @@ -3,7 +3,7 @@ The competitor the company is switching to. Required if `reason` is `'switching_provider'`. > 🚧 Switching to Gusto requires Customer Support -> If `'gusto_com'` is provided, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. +> If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. ## Example Usage diff --git a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md index d3438b07..4ec83cef 100644 --- a/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md +++ b/gusto_embedded/docs/models/operations/postcompaniescompanyuuidsuspensionsrequestbody.md @@ -20,6 +20,6 @@ let value: PostCompaniesCompanyUuidSuspensionsRequestBody = { | `fileQuarterlyForms` | *boolean* | :heavy_check_mark: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | | `fileYearlyForms` | *boolean* | :heavy_check_mark: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | | `reconcileTaxMethod` | [operations.ReconcileTaxMethod](../../models/operations/reconciletaxmethod.md) | :heavy_check_mark: | How Gusto will handle taxes already collected. | -| `comments` | *string* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. | +| `comments` | *string* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects "other" instead of a defined provider. | | `reason` | [operations.Reason](../../models/operations/reason.md) | :heavy_check_mark: | Explanation for why the company is suspending their account.

> 🚧 FEIN or entity type changes require Customer Support
> If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
| -| `leavingFor` | [operations.LeavingFor](../../models/operations/leavingfor.md) | :heavy_minus_sign: | The competitor the company is switching to. Required if `reason` is `'switching_provider'`.

> 🚧 Switching to Gusto requires Customer Support
> If `'gusto_com'` is provided, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case.
| \ No newline at end of file +| `leavingFor` | [operations.LeavingFor](../../models/operations/leavingfor.md) | :heavy_minus_sign: | The competitor the company is switching to. Required if `reason` is `'switching_provider'`.

> 🚧 Switching to Gusto requires Customer Support
> If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case.
| \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md new file mode 100644 index 00000000..4b161522 --- /dev/null +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + +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. + +## Example Usage + +```typescript +import { PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroups.js"; + +let value: + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md index 32b6f292..301bee83 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md @@ -6,21 +6,14 @@ import { PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments } from "@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.js"; let value: - PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments = { - wage: 5000, - hours: 40, - bonus: 500, - reimbursement: 20, - }; + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments = {}; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractorUuid` | *string* | :heavy_minus_sign: | The contractor receiving the payment | | -| `paymentMethod` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod](../../models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md) | :heavy_minus_sign: | N/A | | -| `wage` | *number* | :heavy_minus_sign: | If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked | 5000 | -| `hours` | *number* | :heavy_minus_sign: | If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment | 40 | -| `bonus` | *number* | :heavy_minus_sign: | If the contractor is on an hourly wage, this is the bonus the contractor earned | 500 | -| `reimbursement` | *number* | :heavy_minus_sign: | Reimbursed wages for the contractor | 20 | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractorUuid` | *string* | :heavy_minus_sign: | UUID of the contractor | +| `paymentMethod` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod](../../models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md) | :heavy_minus_sign: | Payment method | +| `wage` | *number* | :heavy_minus_sign: | Wage amount | +| `reimbursement` | *number* | :heavy_minus_sign: | Reimbursement amount | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md new file mode 100644 index 00000000..7f4180a9 --- /dev/null +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + +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. + +## Example Usage + +```typescript +import { PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.js"; + +let value: + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md index 52b73291..96600ddf 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md @@ -1,16 +1,18 @@ # PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod +Payment method + ## Example Usage ```typescript import { PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod } from "@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.js"; let value: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod = - "Check"; + "Direct Deposit"; ``` ## Values ```typescript -"Direct Deposit" | "Check" | "Historical Payment" +"Direct Deposit" | "Check" ``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md index 6053cbd1..a8858401 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md @@ -4,13 +4,10 @@ ```typescript import { PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest } from "@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.js"; -import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; let value: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest = { companyId: "", requestBody: { - checkDate: new RFCDate("2020-01-01"), - creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", contractorPayments: [], }, }; @@ -20,6 +17,6 @@ let value: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xGustoAPIVersion` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion](../../models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.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 | -| `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.PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody](../../models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md index ef6fa271..19b17826 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md @@ -4,19 +4,15 @@ ```typescript import { PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody } from "@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.js"; -import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; let value: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody = { - checkDate: new RFCDate("2020-01-01"), - creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", contractorPayments: [], }; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `checkDate` | [RFCDate](../../types/rfcdate.md) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `creationToken` | *string* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | -| `contractorPayments` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments](../../models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractorPayments` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments](../../models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)[] | :heavy_check_mark: | N/A | +| `checkDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | Date when payments should be processed | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewresponse.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewresponse.md index 3812719a..d25a0e67 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewresponse.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupspreviewresponse.md @@ -10,7 +10,7 @@ let value: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse = {}; ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `contractorPaymentGroup` | [components.ContractorPaymentGroup](../../models/components/contractorpaymentgroup.md) | :heavy_minus_sign: | Full contractor payment group object with null uuid | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `httpMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `contractorPaymentGroupPreview` | [components.ContractorPaymentGroupPreview](../../models/components/contractorpaymentgrouppreview.md) | :heavy_minus_sign: | Full contractor payment group object with null uuid | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequest.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequest.md index dc42f596..b383a707 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequest.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequest.md @@ -20,6 +20,6 @@ let value: PostV1CompaniesCompanyIdContractorPaymentGroupsRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `xGustoAPIVersion` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion](../../models/operations/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.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 | -| `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.PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody](../../models/operations/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md index b3d1b463..7c040316 100644 --- a/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md +++ b/gusto_embedded/docs/models/operations/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md @@ -22,8 +22,8 @@ let value: PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `checkDate` | [RFCDate](../../types/rfcdate.md) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `creationToken` | *string* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | -| `contractorPayments` | [operations.ContractorPayments](../../models/operations/contractorpayments.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `checkDate` | [RFCDate](../../types/rfcdate.md) | :heavy_check_mark: | The payment check date | 2020-01-01 | +| `creationToken` | *string* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | +| `contractorPayments` | [operations.ContractorPayments](../../models/operations/contractorpayments.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md b/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md new file mode 100644 index 00000000..9d16e94a --- /dev/null +++ b/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md @@ -0,0 +1,19 @@ +# PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion + +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. + +## Example Usage + +```typescript +import { PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion } from "@gusto/embedded-api/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfund.js"; + +let value: + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion = + "2024-04-01"; +``` + +## Values + +```typescript +"2024-04-01" +``` \ No newline at end of file diff --git a/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md b/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md index bfc70285..3be20290 100644 --- a/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md +++ b/gusto_embedded/docs/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md @@ -15,4 +15,4 @@ let value: PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractorPaymentGroupUuid` | *string* | :heavy_check_mark: | The UUID of the contractor payment group | -| `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 +| `xGustoAPIVersion` | [operations.PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion](../../models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.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/sdks/contractorpaymentgroups/README.md b/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md index c3f3198c..3b69c77c 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md @@ -5,47 +5,37 @@ ### Available Operations -* [create](#create) - Create a contractor payment group * [getList](#getlist) - Get contractor payment groups for a company +* [create](#create) - Create a contractor payment group * [preview](#preview) - Preview a contractor payment group -* [get](#get) - Fetch a contractor payment group +* [get](#get) - Get a contractor payment group * [delete](#delete) - Cancel a contractor payment group * [fund](#fund) - Fund a contractor payment group [DEMO] * [getV1ContractorPaymentGroupsIdPartnerDisbursements](#getv1contractorpaymentgroupsidpartnerdisbursements) - Get partner disbursements for a contractor payment group * [patchV1ContractorPaymentGroupsIdPartnerDisbursements](#patchv1contractorpaymentgroupsidpartnerdisbursements) - Update partner disbursements for a contractor payment group -## create +## getList -Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) +Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + + scope: `payrolls:read` -scope: `payrolls:run` ### Example Usage - + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; -import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; const gustoEmbedded = new GustoEmbedded({ companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", }); async function run() { - const result = await gustoEmbedded.contractorPaymentGroups.create({ + const result = await gustoEmbedded.contractorPaymentGroups.getList({ companyId: "", - requestBody: { - checkDate: new RFCDate("2020-01-01"), - creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", - contractorPayments: [ - { - wage: 5000, - hours: 40, - bonus: 500, - reimbursement: 20, - }, - ], - }, + startDate: "2020-01-01", + endDate: "2020-12-31", }); console.log(result); @@ -60,8 +50,7 @@ The standalone function version of this method: ```typescript import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; -import { contractorPaymentGroupsCreate } from "@gusto/embedded-api/funcs/contractorPaymentGroupsCreate.js"; -import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; +import { contractorPaymentGroupsGetList } from "@gusto/embedded-api/funcs/contractorPaymentGroupsGetList.js"; // Use `GustoEmbeddedCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -70,26 +59,16 @@ const gustoEmbedded = new GustoEmbeddedCore({ }); async function run() { - const res = await contractorPaymentGroupsCreate(gustoEmbedded, { + const res = await contractorPaymentGroupsGetList(gustoEmbedded, { companyId: "", - requestBody: { - checkDate: new RFCDate("2020-01-01"), - creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", - contractorPayments: [ - { - wage: 5000, - hours: 40, - bonus: 500, - reimbursement: 20, - }, - ], - }, + startDate: "2020-01-01", + endDate: "2020-12-31", }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("contractorPaymentGroupsCreate failed:", res.error); + console.log("contractorPaymentGroupsGetList failed:", res.error); } } @@ -108,52 +87,75 @@ associated utilities. ```tsx import { - // Mutation hook for triggering the API call. - useContractorPaymentGroupsCreateMutation -} from "@gusto/embedded-api/react-query/contractorPaymentGroupsCreate.js"; + // Query hooks for fetching data. + useContractorPaymentGroupsGetList, + useContractorPaymentGroupsGetListSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchContractorPaymentGroupsGetList, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateContractorPaymentGroupsGetList, + invalidateAllContractorPaymentGroupsGetList, +} from "@gusto/embedded-api/react-query/contractorPaymentGroupsGetList.js"; ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsRequest](../../models/operations/postv1companiescompanyidcontractorpaymentgroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetV1CompaniesCompanyIdContractorPaymentGroupsRequest](../../models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.PostV1CompaniesCompanyIdContractorPaymentGroupsResponse](../../models/operations/postv1companiescompanyidcontractorpaymentgroupsresponse.md)\>** +**Promise\<[operations.GetV1CompaniesCompanyIdContractorPaymentGroupsResponse](../../models/operations/getv1companiescompanyidcontractorpaymentgroupsresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UnprocessableEntityErrorObject | 422 | application/json | +| errors.UnprocessableEntityErrorObject | 404 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | -## getList +## create -Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. +Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + +scope: `payrolls:run` -scope: `payrolls:read` ### Example Usage - + ```typescript import { GustoEmbedded } from "@gusto/embedded-api"; +import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; const gustoEmbedded = new GustoEmbedded({ companyAccessAuth: process.env["GUSTOEMBEDDED_COMPANY_ACCESS_AUTH"] ?? "", }); async function run() { - const result = await gustoEmbedded.contractorPaymentGroups.getList({ + const result = await gustoEmbedded.contractorPaymentGroups.create({ companyId: "", - startDate: "2020-01-01", - endDate: "2020-12-31", + requestBody: { + checkDate: new RFCDate("2020-01-01"), + creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", + contractorPayments: [ + { + wage: 5000, + hours: 40, + bonus: 500, + reimbursement: 20, + }, + ], + }, }); console.log(result); @@ -168,7 +170,8 @@ The standalone function version of this method: ```typescript import { GustoEmbeddedCore } from "@gusto/embedded-api/core.js"; -import { contractorPaymentGroupsGetList } from "@gusto/embedded-api/funcs/contractorPaymentGroupsGetList.js"; +import { contractorPaymentGroupsCreate } from "@gusto/embedded-api/funcs/contractorPaymentGroupsCreate.js"; +import { RFCDate } from "@gusto/embedded-api/types/rfcdate.js"; // Use `GustoEmbeddedCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -177,16 +180,26 @@ const gustoEmbedded = new GustoEmbeddedCore({ }); async function run() { - const res = await contractorPaymentGroupsGetList(gustoEmbedded, { + const res = await contractorPaymentGroupsCreate(gustoEmbedded, { companyId: "", - startDate: "2020-01-01", - endDate: "2020-12-31", + requestBody: { + checkDate: new RFCDate("2020-01-01"), + creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", + contractorPayments: [ + { + wage: 5000, + hours: 40, + bonus: 500, + reimbursement: 20, + }, + ], + }, }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("contractorPaymentGroupsGetList failed:", res.error); + console.log("contractorPaymentGroupsCreate failed:", res.error); } } @@ -205,46 +218,37 @@ associated utilities. ```tsx import { - // Query hooks for fetching data. - useContractorPaymentGroupsGetList, - useContractorPaymentGroupsGetListSuspense, - - // Utility for prefetching data during server-side rendering and in React - // Server Components that will be immediately available to client components - // using the hooks. - prefetchContractorPaymentGroupsGetList, - - // Utilities to invalidate the query cache for this query in response to - // mutations and other user actions. - invalidateContractorPaymentGroupsGetList, - invalidateAllContractorPaymentGroupsGetList, -} from "@gusto/embedded-api/react-query/contractorPaymentGroupsGetList.js"; + // Mutation hook for triggering the API call. + useContractorPaymentGroupsCreateMutation +} from "@gusto/embedded-api/react-query/contractorPaymentGroupsCreate.js"; ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetV1CompaniesCompanyIdContractorPaymentGroupsRequest](../../models/operations/getv1companiescompanyidcontractorpaymentgroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.PostV1CompaniesCompanyIdContractorPaymentGroupsRequest](../../models/operations/postv1companiescompanyidcontractorpaymentgroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetV1CompaniesCompanyIdContractorPaymentGroupsResponse](../../models/operations/getv1companiescompanyidcontractorpaymentgroupsresponse.md)\>** +**Promise\<[operations.PostV1CompaniesCompanyIdContractorPaymentGroupsResponse](../../models/operations/postv1companiescompanyidcontractorpaymentgroupsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UnprocessableEntityErrorObject | 404, 422 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## preview -Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. +Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. + +scope: `contractor_payment_groups:write` -scope: `payrolls:read` ### Example Usage @@ -261,16 +265,14 @@ async function run() { const result = await gustoEmbedded.contractorPaymentGroups.preview({ companyId: "", requestBody: { - checkDate: new RFCDate("2020-01-01"), - creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", contractorPayments: [ { + paymentMethod: "Direct Deposit", wage: 5000, - hours: 40, - bonus: 500, reimbursement: 20, }, ], + checkDate: new RFCDate("2020-01-01"), }, }); @@ -299,16 +301,14 @@ async function run() { const res = await contractorPaymentGroupsPreview(gustoEmbedded, { companyId: "", requestBody: { - checkDate: new RFCDate("2020-01-01"), - creationToken: "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", contractorPayments: [ { + paymentMethod: "Direct Deposit", wage: 5000, - hours: 40, - bonus: 500, reimbursement: 20, }, ], + checkDate: new RFCDate("2020-01-01"), }, }); if (res.ok) { @@ -356,6 +356,7 @@ import { | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.NotFoundErrorObject | 404 | application/json | | errors.UnprocessableEntityErrorObject | 422 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | @@ -365,6 +366,7 @@ Returns a contractor payment group with all associated contractor payments. scope: `payrolls:read` + ### Example Usage @@ -458,9 +460,10 @@ import { ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.NotFoundErrorObject | 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## delete @@ -468,6 +471,7 @@ Cancels a contractor payment group and all associated contractor payments. All c scope: `payrolls:run` + ### Example Usage @@ -552,19 +556,19 @@ import { | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UnprocessableEntityErrorObject | 422 | application/json | +| errors.UnprocessableEntityErrorObject | 404, 422 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | ## fund > 🚧 Demo action -> > This action is only available in the Demo environment Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. scope: `payrolls:run` + ### Example Usage @@ -649,6 +653,7 @@ import { | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.NotFoundErrorObject | 404 | application/json | | errors.UnprocessableEntityErrorObject | 422 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | @@ -862,5 +867,6 @@ import { | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.UnprocessableEntityErrorObject | 404, 422 | application/json | +| errors.NotFoundErrorObject | 404 | application/json | +| errors.UnprocessableEntityErrorObject | 422 | application/json | | errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/examples/package-lock.json b/gusto_embedded/examples/package-lock.json index dfd8d6be..d59bd974 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.6.8", + "version": "0.6.9", "dependencies": { "zod": "^3.20.0" }, diff --git a/gusto_embedded/jsr.json b/gusto_embedded/jsr.json index 9e82bbec..a6ad393d 100644 --- a/gusto_embedded/jsr.json +++ b/gusto_embedded/jsr.json @@ -2,7 +2,7 @@ { "name": "@gusto/embedded-api", - "version": "0.6.8", + "version": "0.6.9", "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 16429b12..9fe0d9f3 100644 --- a/gusto_embedded/package-lock.json +++ b/gusto_embedded/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gusto/embedded-api", - "version": "0.6.8", + "version": "0.6.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gusto/embedded-api", - "version": "0.6.8", + "version": "0.6.9", "dependencies": { "zod": "^3.20.0" }, diff --git a/gusto_embedded/package.json b/gusto_embedded/package.json index 9fa3a5e9..0c73f8be 100644 --- a/gusto_embedded/package.json +++ b/gusto_embedded/package.json @@ -1,6 +1,6 @@ { "name": "@gusto/embedded-api", - "version": "0.6.8", + "version": "0.6.9", "author": "Speakeasy", "type": "module", "main": "./esm/index.js", diff --git a/gusto_embedded/src/funcs/contractorPaymentGroupsCreate.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsCreate.ts index c98d2ae4..ddcd7a91 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsCreate.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsCreate.ts @@ -185,12 +185,12 @@ async function $do( | SDKValidationError >( M.json( - 200, + 201, PostV1CompaniesCompanyIdContractorPaymentGroupsResponse$inboundSchema, { key: "Contractor-Payment-Group" }, ), - M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), - M.fail([404, "4XX"]), + M.jsonErr([404, 422], UnprocessableEntityErrorObject$inboundSchema), + M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/gusto_embedded/src/funcs/contractorPaymentGroupsDelete.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsDelete.ts index c12fc927..3e20a7de 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsDelete.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsDelete.ts @@ -189,8 +189,8 @@ async function $do( 204, DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdResponse$inboundSchema, ), - M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), - M.fail([404, "4XX"]), + M.jsonErr([404, 422], UnprocessableEntityErrorObject$inboundSchema), + M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/gusto_embedded/src/funcs/contractorPaymentGroupsFund.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsFund.ts index 93fce4c4..607dfe2f 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsFund.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsFund.ts @@ -18,6 +18,10 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { + NotFoundErrorObject, + NotFoundErrorObject$inboundSchema, +} from "../models/errors/notfounderrorobject.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { @@ -38,7 +42,6 @@ import { Result } from "../types/fp.js"; * * @remarks * > 🚧 Demo action - * > * > This action is only available in the Demo environment * * Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. @@ -52,6 +55,7 @@ export function contractorPaymentGroupsFund( ): APIPromise< Result< PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -78,6 +82,7 @@ async function $do( [ Result< PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -179,6 +184,7 @@ async function $do( const [result] = await M.match< PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -194,8 +200,9 @@ async function $do( PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundResponse$inboundSchema, { key: "Contractor-Payment-Group" }, ), + M.jsonErr(404, NotFoundErrorObject$inboundSchema), M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), - M.fail([404, "4XX"]), + M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/gusto_embedded/src/funcs/contractorPaymentGroupsGet.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsGet.ts index 66ca3a7e..17e87c52 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsGet.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsGet.ts @@ -18,6 +18,10 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { + NotFoundErrorObject, + NotFoundErrorObject$inboundSchema, +} from "../models/errors/notfounderrorobject.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { @@ -30,7 +34,7 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Fetch a contractor payment group + * Get a contractor payment group * * @remarks * Returns a contractor payment group with all associated contractor payments. @@ -44,6 +48,7 @@ export function contractorPaymentGroupsGet( ): APIPromise< Result< GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse, + | NotFoundErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -69,6 +74,7 @@ async function $do( [ Result< GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse, + | NotFoundErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -168,6 +174,7 @@ async function $do( const [result] = await M.match< GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse, + | NotFoundErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -182,7 +189,8 @@ async function $do( GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse$inboundSchema, { key: "Contractor-Payment-Group" }, ), - M.fail([404, "4XX"]), + M.jsonErr(404, NotFoundErrorObject$inboundSchema), + M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); if (!result.ok) { diff --git a/gusto_embedded/src/funcs/contractorPaymentGroupsGetList.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsGetList.ts index 67745a6f..7eacf30a 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsGetList.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsGetList.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 { GetV1CompaniesCompanyIdContractorPaymentGroupsRequest, GetV1CompaniesCompanyIdContractorPaymentGroupsRequest$outboundSchema, @@ -35,7 +39,7 @@ import { Result } from "../types/fp.js"; * @remarks * Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. * - * scope: `payrolls:read` + * scope: `payrolls:read` */ export function contractorPaymentGroupsGetList( client: GustoEmbeddedCore, @@ -44,6 +48,7 @@ export function contractorPaymentGroupsGetList( ): APIPromise< Result< GetV1CompaniesCompanyIdContractorPaymentGroupsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -69,6 +74,7 @@ async function $do( [ Result< GetV1CompaniesCompanyIdContractorPaymentGroupsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -175,6 +181,7 @@ async function $do( const [result] = await M.match< GetV1CompaniesCompanyIdContractorPaymentGroupsResponse, + | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError | ConnectionError @@ -187,9 +194,10 @@ async function $do( M.json( 200, GetV1CompaniesCompanyIdContractorPaymentGroupsResponse$inboundSchema, - { key: "Contractor-Payment-Group-List" }, + { key: "Contractor-Payment-Groups" }, ), - 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/funcs/contractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDisbursements.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDisbursements.ts index f96aad3c..b24f6568 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDisbursements.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDisbursements.ts @@ -18,6 +18,10 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { + NotFoundErrorObject, + NotFoundErrorObject$inboundSchema, +} from "../models/errors/notfounderrorobject.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { @@ -48,6 +52,7 @@ export function contractorPaymentGroupsPatchV1ContractorPaymentGroupsIdPartnerDi ): APIPromise< Result< PatchV1ContractorPaymentGroupsIdPartnerDisbursementsResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -74,6 +79,7 @@ async function $do( [ Result< PatchV1ContractorPaymentGroupsIdPartnerDisbursementsResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -174,6 +180,7 @@ async function $do( const [result] = await M.match< PatchV1ContractorPaymentGroupsIdPartnerDisbursementsResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -189,7 +196,8 @@ async function $do( PatchV1ContractorPaymentGroupsIdPartnerDisbursementsResponse$inboundSchema, { key: "Contractor-Payment-Group-Partner-Disbursements" }, ), - M.jsonErr([404, 422], UnprocessableEntityErrorObject$inboundSchema), + M.jsonErr(404, NotFoundErrorObject$inboundSchema), + M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/gusto_embedded/src/funcs/contractorPaymentGroupsPreview.ts b/gusto_embedded/src/funcs/contractorPaymentGroupsPreview.ts index b1afd09b..ec52dd3f 100644 --- a/gusto_embedded/src/funcs/contractorPaymentGroupsPreview.ts +++ b/gusto_embedded/src/funcs/contractorPaymentGroupsPreview.ts @@ -18,6 +18,10 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { + NotFoundErrorObject, + NotFoundErrorObject$inboundSchema, +} from "../models/errors/notfounderrorobject.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { @@ -37,9 +41,9 @@ import { Result } from "../types/fp.js"; * Preview a contractor payment group * * @remarks - * Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. + * Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. * - * scope: `payrolls:read` + * scope: `contractor_payment_groups:write` */ export function contractorPaymentGroupsPreview( client: GustoEmbeddedCore, @@ -48,6 +52,7 @@ export function contractorPaymentGroupsPreview( ): APIPromise< Result< PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -74,6 +79,7 @@ async function $do( [ Result< PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -175,6 +181,7 @@ async function $do( const [result] = await M.match< PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse, + | NotFoundErrorObject | UnprocessableEntityErrorObject | GustoEmbeddedError | ResponseValidationError @@ -188,10 +195,11 @@ async function $do( M.json( 200, PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse$inboundSchema, - { key: "Contractor-Payment-Group" }, + { key: "Contractor-Payment-Group-Preview" }, ), + M.jsonErr(404, NotFoundErrorObject$inboundSchema), M.jsonErr(422, UnprocessableEntityErrorObject$inboundSchema), - M.fail([404, "4XX"]), + 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 fe0d40a0..1c6b51c1 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.6.8", - genVersion: "2.686.7", + sdkVersion: "0.6.9", + genVersion: "2.687.13", userAgent: - "speakeasy-sdk/typescript 0.6.8 2.686.7 2024-04-01 @gusto/embedded-api", + "speakeasy-sdk/typescript 0.6.9 2.687.13 2024-04-01 @gusto/embedded-api", } as const; diff --git a/gusto_embedded/src/models/components/achtransaction.ts b/gusto_embedded/src/models/components/achtransaction.ts index b191148d..b0c7a5d4 100644 --- a/gusto_embedded/src/models/components/achtransaction.ts +++ b/gusto_embedded/src/models/components/achtransaction.ts @@ -84,7 +84,7 @@ export type AchTransaction = { /** * The type of recipient associated with the ACH transaction */ - recipientType?: AchTransactionRecipientType | undefined; + recipientType?: AchTransactionRecipientType | null | undefined; /** * Unique identifier for the recipient associated with the ACH transaction */ @@ -217,7 +217,8 @@ export const AchTransaction$inboundSchema: z.ZodType< company_uuid: z.string().optional(), payment_event_type: PaymentEventType$inboundSchema.optional(), payment_event_uuid: z.string().optional(), - recipient_type: AchTransactionRecipientType$inboundSchema.optional(), + recipient_type: z.nullable(AchTransactionRecipientType$inboundSchema) + .optional(), recipient_uuid: z.string().optional(), error_code: z.string().optional(), transaction_type: z.string().optional(), @@ -249,7 +250,7 @@ export type AchTransaction$Outbound = { company_uuid?: string | undefined; payment_event_type?: string | undefined; payment_event_uuid?: string | undefined; - recipient_type?: string | undefined; + recipient_type?: string | null | undefined; recipient_uuid?: string | undefined; error_code?: string | undefined; transaction_type?: string | undefined; @@ -271,7 +272,8 @@ export const AchTransaction$outboundSchema: z.ZodType< companyUuid: z.string().optional(), paymentEventType: PaymentEventType$outboundSchema.optional(), paymentEventUuid: z.string().optional(), - recipientType: AchTransactionRecipientType$outboundSchema.optional(), + recipientType: z.nullable(AchTransactionRecipientType$outboundSchema) + .optional(), recipientUuid: z.string().optional(), errorCode: z.string().optional(), transactionType: z.string().optional(), diff --git a/gusto_embedded/src/models/components/companycustomfield.ts b/gusto_embedded/src/models/components/companycustomfield.ts index bbad9617..35d5b38d 100644 --- a/gusto_embedded/src/models/components/companycustomfield.ts +++ b/gusto_embedded/src/models/components/companycustomfield.ts @@ -32,7 +32,7 @@ export type CompanyCustomField = { /** * Description of the company custom field */ - description?: string | undefined; + description?: string | null | undefined; /** * An array of options for fields of type radio. Otherwise, null. */ @@ -48,7 +48,7 @@ export const CompanyCustomField$inboundSchema: z.ZodType< uuid: z.string(), name: z.string(), type: CustomFieldType$inboundSchema, - description: z.string().optional(), + description: z.nullable(z.string()).optional(), selection_options: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { @@ -61,7 +61,7 @@ export type CompanyCustomField$Outbound = { uuid: string; name: string; type: string; - description?: string | undefined; + description?: string | null | undefined; selection_options?: Array | null | undefined; }; @@ -74,7 +74,7 @@ export const CompanyCustomField$outboundSchema: z.ZodType< uuid: z.string(), name: z.string(), type: CustomFieldType$outboundSchema, - description: z.string().optional(), + description: z.nullable(z.string()).optional(), selectionOptions: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { diff --git a/gusto_embedded/src/models/components/contractorpaymentforgrouppreview.ts b/gusto_embedded/src/models/components/contractorpaymentforgrouppreview.ts new file mode 100644 index 00000000..79039457 --- /dev/null +++ b/gusto_embedded/src/models/components/contractorpaymentforgrouppreview.ts @@ -0,0 +1,287 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The payment method. + */ +export const ContractorPaymentForGroupPreviewPaymentMethod = { + DirectDeposit: "Direct Deposit", + Check: "Check", + HistoricalPayment: "Historical Payment", + CorrectionPayment: "Correction Payment", +} as const; +/** + * The payment method. + */ +export type ContractorPaymentForGroupPreviewPaymentMethod = ClosedEnum< + typeof ContractorPaymentForGroupPreviewPaymentMethod +>; + +/** + * The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. + */ +export const ContractorPaymentForGroupPreviewStatus = { + Funded: "Funded", + Unfunded: "Unfunded", +} as const; +/** + * The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. + */ +export type ContractorPaymentForGroupPreviewStatus = ClosedEnum< + typeof ContractorPaymentForGroupPreviewStatus +>; + +/** + * The wage type for the payment. + */ +export const ContractorPaymentForGroupPreviewWageType = { + Hourly: "Hourly", + Fixed: "Fixed", +} as const; +/** + * The wage type for the payment. + */ +export type ContractorPaymentForGroupPreviewWageType = ClosedEnum< + typeof ContractorPaymentForGroupPreviewWageType +>; + +/** + * Preview representation of a single contractor payment with nullable uuid. + */ +export type ContractorPaymentForGroupPreview = { + /** + * The unique identifier of the contractor payment in Gusto. + */ + uuid?: string | null | undefined; + /** + * The UUID of the contractor. + */ + contractorUuid?: string | undefined; + /** + * The bonus amount in the payment. + */ + bonus?: string | undefined; + /** + * The number of hours worked for the payment. + */ + hours?: string | undefined; + /** + * The payment method. + */ + paymentMethod?: ContractorPaymentForGroupPreviewPaymentMethod | undefined; + /** + * The reimbursement amount in the payment. + */ + reimbursement?: string | undefined; + /** + * The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. + */ + status?: ContractorPaymentForGroupPreviewStatus | undefined; + /** + * The rate per hour worked for the payment. + */ + hourlyRate?: string | undefined; + /** + * Determine if the contractor payment can be cancelled. + */ + mayCancel?: boolean | undefined; + /** + * The fixed wage of the payment, regardless of hours worked. + */ + wage?: string | undefined; + /** + * The wage type for the payment. + */ + wageType?: ContractorPaymentForGroupPreviewWageType | undefined; + /** + * (hours * hourly_rate) + wage + bonus + */ + wageTotal?: string | undefined; +}; + +/** @internal */ +export const ContractorPaymentForGroupPreviewPaymentMethod$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(ContractorPaymentForGroupPreviewPaymentMethod); + +/** @internal */ +export const ContractorPaymentForGroupPreviewPaymentMethod$outboundSchema: + z.ZodNativeEnum = + ContractorPaymentForGroupPreviewPaymentMethod$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentForGroupPreviewPaymentMethod$ { + /** @deprecated use `ContractorPaymentForGroupPreviewPaymentMethod$inboundSchema` instead. */ + export const inboundSchema = + ContractorPaymentForGroupPreviewPaymentMethod$inboundSchema; + /** @deprecated use `ContractorPaymentForGroupPreviewPaymentMethod$outboundSchema` instead. */ + export const outboundSchema = + ContractorPaymentForGroupPreviewPaymentMethod$outboundSchema; +} + +/** @internal */ +export const ContractorPaymentForGroupPreviewStatus$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + ContractorPaymentForGroupPreviewStatus, + ); + +/** @internal */ +export const ContractorPaymentForGroupPreviewStatus$outboundSchema: + z.ZodNativeEnum = + ContractorPaymentForGroupPreviewStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentForGroupPreviewStatus$ { + /** @deprecated use `ContractorPaymentForGroupPreviewStatus$inboundSchema` instead. */ + export const inboundSchema = + ContractorPaymentForGroupPreviewStatus$inboundSchema; + /** @deprecated use `ContractorPaymentForGroupPreviewStatus$outboundSchema` instead. */ + export const outboundSchema = + ContractorPaymentForGroupPreviewStatus$outboundSchema; +} + +/** @internal */ +export const ContractorPaymentForGroupPreviewWageType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(ContractorPaymentForGroupPreviewWageType); + +/** @internal */ +export const ContractorPaymentForGroupPreviewWageType$outboundSchema: + z.ZodNativeEnum = + ContractorPaymentForGroupPreviewWageType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentForGroupPreviewWageType$ { + /** @deprecated use `ContractorPaymentForGroupPreviewWageType$inboundSchema` instead. */ + export const inboundSchema = + ContractorPaymentForGroupPreviewWageType$inboundSchema; + /** @deprecated use `ContractorPaymentForGroupPreviewWageType$outboundSchema` instead. */ + export const outboundSchema = + ContractorPaymentForGroupPreviewWageType$outboundSchema; +} + +/** @internal */ +export const ContractorPaymentForGroupPreview$inboundSchema: z.ZodType< + ContractorPaymentForGroupPreview, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.nullable(z.string()).optional(), + contractor_uuid: z.string().optional(), + bonus: z.string().optional(), + hours: z.string().optional(), + payment_method: ContractorPaymentForGroupPreviewPaymentMethod$inboundSchema + .optional(), + reimbursement: z.string().optional(), + status: ContractorPaymentForGroupPreviewStatus$inboundSchema.optional(), + hourly_rate: z.string().optional(), + may_cancel: z.boolean().optional(), + wage: z.string().optional(), + wage_type: ContractorPaymentForGroupPreviewWageType$inboundSchema.optional(), + wage_total: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "contractor_uuid": "contractorUuid", + "payment_method": "paymentMethod", + "hourly_rate": "hourlyRate", + "may_cancel": "mayCancel", + "wage_type": "wageType", + "wage_total": "wageTotal", + }); +}); + +/** @internal */ +export type ContractorPaymentForGroupPreview$Outbound = { + uuid?: string | null | undefined; + contractor_uuid?: string | undefined; + bonus?: string | undefined; + hours?: string | undefined; + payment_method?: string | undefined; + reimbursement?: string | undefined; + status?: string | undefined; + hourly_rate?: string | undefined; + may_cancel?: boolean | undefined; + wage?: string | undefined; + wage_type?: string | undefined; + wage_total?: string | undefined; +}; + +/** @internal */ +export const ContractorPaymentForGroupPreview$outboundSchema: z.ZodType< + ContractorPaymentForGroupPreview$Outbound, + z.ZodTypeDef, + ContractorPaymentForGroupPreview +> = z.object({ + uuid: z.nullable(z.string()).optional(), + contractorUuid: z.string().optional(), + bonus: z.string().optional(), + hours: z.string().optional(), + paymentMethod: ContractorPaymentForGroupPreviewPaymentMethod$outboundSchema + .optional(), + reimbursement: z.string().optional(), + status: ContractorPaymentForGroupPreviewStatus$outboundSchema.optional(), + hourlyRate: z.string().optional(), + mayCancel: z.boolean().optional(), + wage: z.string().optional(), + wageType: ContractorPaymentForGroupPreviewWageType$outboundSchema.optional(), + wageTotal: z.string().optional(), +}).transform((v) => { + return remap$(v, { + contractorUuid: "contractor_uuid", + paymentMethod: "payment_method", + hourlyRate: "hourly_rate", + mayCancel: "may_cancel", + wageType: "wage_type", + wageTotal: "wage_total", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentForGroupPreview$ { + /** @deprecated use `ContractorPaymentForGroupPreview$inboundSchema` instead. */ + export const inboundSchema = ContractorPaymentForGroupPreview$inboundSchema; + /** @deprecated use `ContractorPaymentForGroupPreview$outboundSchema` instead. */ + export const outboundSchema = ContractorPaymentForGroupPreview$outboundSchema; + /** @deprecated use `ContractorPaymentForGroupPreview$Outbound` instead. */ + export type Outbound = ContractorPaymentForGroupPreview$Outbound; +} + +export function contractorPaymentForGroupPreviewToJSON( + contractorPaymentForGroupPreview: ContractorPaymentForGroupPreview, +): string { + return JSON.stringify( + ContractorPaymentForGroupPreview$outboundSchema.parse( + contractorPaymentForGroupPreview, + ), + ); +} + +export function contractorPaymentForGroupPreviewFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ContractorPaymentForGroupPreview$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ContractorPaymentForGroupPreview' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/components/contractorpaymentgroup.ts b/gusto_embedded/src/models/components/contractorpaymentgroup.ts index c906fb7d..f6f443f6 100644 --- a/gusto_embedded/src/models/components/contractorpaymentgroup.ts +++ b/gusto_embedded/src/models/components/contractorpaymentgroup.ts @@ -14,6 +14,18 @@ import { ContractorPaymentForGroup$Outbound, ContractorPaymentForGroup$outboundSchema, } from "./contractorpaymentforgroup.js"; +import { + PayrollCreditBlockersType, + PayrollCreditBlockersType$inboundSchema, + PayrollCreditBlockersType$Outbound, + PayrollCreditBlockersType$outboundSchema, +} from "./payrollcreditblockerstype.js"; +import { + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersType$inboundSchema, + PayrollSubmissionBlockersType$Outbound, + PayrollSubmissionBlockersType$outboundSchema, +} from "./payrollsubmissionblockerstype.js"; /** * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. @@ -46,6 +58,10 @@ export type ContractorPaymentGroupTotals = { * The total reimbursement amount for the group of contractor payments. */ reimbursementAmount?: string | undefined; + /** + * The total check amount for the group of contractor payments. + */ + checkAmount?: string | undefined; }; /** @@ -76,6 +92,18 @@ export type ContractorPaymentGroup = { * Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. */ creationToken?: string | null | undefined; + /** + * Whether the disbursement is partner owned. + */ + partnerOwnedDisbursement?: boolean | null | undefined; + /** + * List of submission blockers for the contractor payment group. + */ + submissionBlockers?: Array> | undefined; + /** + * List of credit blockers for the contractor payment group. + */ + creditBlockers?: Array> | undefined; totals?: ContractorPaymentGroupTotals | undefined; contractorPayments?: Array | undefined; }; @@ -111,11 +139,13 @@ export const ContractorPaymentGroupTotals$inboundSchema: z.ZodType< debit_amount: z.string().optional(), wage_amount: z.string().optional(), reimbursement_amount: z.string().optional(), + check_amount: z.string().optional(), }).transform((v) => { return remap$(v, { "debit_amount": "debitAmount", "wage_amount": "wageAmount", "reimbursement_amount": "reimbursementAmount", + "check_amount": "checkAmount", }); }); @@ -125,6 +155,7 @@ export type ContractorPaymentGroupTotals$Outbound = { debit_amount?: string | undefined; wage_amount?: string | undefined; reimbursement_amount?: string | undefined; + check_amount?: string | undefined; }; /** @internal */ @@ -137,11 +168,13 @@ export const ContractorPaymentGroupTotals$outboundSchema: z.ZodType< debitAmount: z.string().optional(), wageAmount: z.string().optional(), reimbursementAmount: z.string().optional(), + checkAmount: z.string().optional(), }).transform((v) => { return remap$(v, { debitAmount: "debit_amount", wageAmount: "wage_amount", reimbursementAmount: "reimbursement_amount", + checkAmount: "check_amount", }); }); @@ -190,6 +223,12 @@ export const ContractorPaymentGroup$inboundSchema: z.ZodType< debit_date: z.string().optional(), status: ContractorPaymentGroupStatus$inboundSchema.optional(), creation_token: z.nullable(z.string()).optional(), + partner_owned_disbursement: z.nullable(z.boolean()).optional(), + submission_blockers: z.array( + z.array(PayrollSubmissionBlockersType$inboundSchema), + ).optional(), + credit_blockers: z.array(z.array(PayrollCreditBlockersType$inboundSchema)) + .optional(), totals: z.lazy(() => ContractorPaymentGroupTotals$inboundSchema).optional(), contractor_payments: z.array(ContractorPaymentForGroup$inboundSchema) .optional(), @@ -199,6 +238,9 @@ export const ContractorPaymentGroup$inboundSchema: z.ZodType< "check_date": "checkDate", "debit_date": "debitDate", "creation_token": "creationToken", + "partner_owned_disbursement": "partnerOwnedDisbursement", + "submission_blockers": "submissionBlockers", + "credit_blockers": "creditBlockers", "contractor_payments": "contractorPayments", }); }); @@ -211,6 +253,13 @@ export type ContractorPaymentGroup$Outbound = { debit_date?: string | undefined; status?: string | undefined; creation_token?: string | null | undefined; + partner_owned_disbursement?: boolean | null | undefined; + submission_blockers?: + | Array> + | undefined; + credit_blockers?: + | Array> + | undefined; totals?: ContractorPaymentGroupTotals$Outbound | undefined; contractor_payments?: Array | undefined; }; @@ -227,6 +276,12 @@ export const ContractorPaymentGroup$outboundSchema: z.ZodType< debitDate: z.string().optional(), status: ContractorPaymentGroupStatus$outboundSchema.optional(), creationToken: z.nullable(z.string()).optional(), + partnerOwnedDisbursement: z.nullable(z.boolean()).optional(), + submissionBlockers: z.array( + z.array(PayrollSubmissionBlockersType$outboundSchema), + ).optional(), + creditBlockers: z.array(z.array(PayrollCreditBlockersType$outboundSchema)) + .optional(), totals: z.lazy(() => ContractorPaymentGroupTotals$outboundSchema).optional(), contractorPayments: z.array(ContractorPaymentForGroup$outboundSchema) .optional(), @@ -236,6 +291,9 @@ export const ContractorPaymentGroup$outboundSchema: z.ZodType< checkDate: "check_date", debitDate: "debit_date", creationToken: "creation_token", + partnerOwnedDisbursement: "partner_owned_disbursement", + submissionBlockers: "submission_blockers", + creditBlockers: "credit_blockers", contractorPayments: "contractor_payments", }); }); diff --git a/gusto_embedded/src/models/components/contractorpaymentgroupminimal.ts b/gusto_embedded/src/models/components/contractorpaymentgroupminimal.ts deleted file mode 100644 index a562980f..00000000 --- a/gusto_embedded/src/models/components/contractorpaymentgroupminimal.ts +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. - */ -export const ContractorPaymentGroupMinimalStatus = { - Unfunded: "Unfunded", - Funded: "Funded", -} as const; -/** - * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. - */ -export type ContractorPaymentGroupMinimalStatus = ClosedEnum< - typeof ContractorPaymentGroupMinimalStatus ->; - -export type ContractorPaymentGroupMinimalTotals = { - /** - * The total amount for the group of contractor payments. - */ - amount?: string | undefined; - /** - * The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. - */ - debitAmount?: string | undefined; - /** - * The total wage amount for the group of contractor payments. - */ - wageAmount?: string | undefined; - /** - * The total reimbursement amount for the group of contractor payments. - */ - reimbursementAmount?: string | undefined; -}; - -/** - * The summary of a contractor payment group. - */ -export type ContractorPaymentGroupMinimal = { - /** - * The unique identifier of the contractor payment group. - */ - uuid?: string | undefined; - /** - * The UUID of the company. - */ - companyUuid?: string | undefined; - /** - * The check date of the contractor payment group. - */ - checkDate?: string | undefined; - /** - * The debit date of the contractor payment group. - */ - debitDate?: string | undefined; - /** - * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. - */ - status?: ContractorPaymentGroupMinimalStatus | undefined; - /** - * Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. - */ - creationToken?: string | null | undefined; - totals?: ContractorPaymentGroupMinimalTotals | undefined; -}; - -/** @internal */ -export const ContractorPaymentGroupMinimalStatus$inboundSchema: z.ZodNativeEnum< - typeof ContractorPaymentGroupMinimalStatus -> = z.nativeEnum(ContractorPaymentGroupMinimalStatus); - -/** @internal */ -export const ContractorPaymentGroupMinimalStatus$outboundSchema: - z.ZodNativeEnum = - ContractorPaymentGroupMinimalStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ContractorPaymentGroupMinimalStatus$ { - /** @deprecated use `ContractorPaymentGroupMinimalStatus$inboundSchema` instead. */ - export const inboundSchema = - ContractorPaymentGroupMinimalStatus$inboundSchema; - /** @deprecated use `ContractorPaymentGroupMinimalStatus$outboundSchema` instead. */ - export const outboundSchema = - ContractorPaymentGroupMinimalStatus$outboundSchema; -} - -/** @internal */ -export const ContractorPaymentGroupMinimalTotals$inboundSchema: z.ZodType< - ContractorPaymentGroupMinimalTotals, - z.ZodTypeDef, - unknown -> = z.object({ - amount: z.string().optional(), - debit_amount: z.string().optional(), - wage_amount: z.string().optional(), - reimbursement_amount: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "debit_amount": "debitAmount", - "wage_amount": "wageAmount", - "reimbursement_amount": "reimbursementAmount", - }); -}); - -/** @internal */ -export type ContractorPaymentGroupMinimalTotals$Outbound = { - amount?: string | undefined; - debit_amount?: string | undefined; - wage_amount?: string | undefined; - reimbursement_amount?: string | undefined; -}; - -/** @internal */ -export const ContractorPaymentGroupMinimalTotals$outboundSchema: z.ZodType< - ContractorPaymentGroupMinimalTotals$Outbound, - z.ZodTypeDef, - ContractorPaymentGroupMinimalTotals -> = z.object({ - amount: z.string().optional(), - debitAmount: z.string().optional(), - wageAmount: z.string().optional(), - reimbursementAmount: z.string().optional(), -}).transform((v) => { - return remap$(v, { - debitAmount: "debit_amount", - wageAmount: "wage_amount", - reimbursementAmount: "reimbursement_amount", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ContractorPaymentGroupMinimalTotals$ { - /** @deprecated use `ContractorPaymentGroupMinimalTotals$inboundSchema` instead. */ - export const inboundSchema = - ContractorPaymentGroupMinimalTotals$inboundSchema; - /** @deprecated use `ContractorPaymentGroupMinimalTotals$outboundSchema` instead. */ - export const outboundSchema = - ContractorPaymentGroupMinimalTotals$outboundSchema; - /** @deprecated use `ContractorPaymentGroupMinimalTotals$Outbound` instead. */ - export type Outbound = ContractorPaymentGroupMinimalTotals$Outbound; -} - -export function contractorPaymentGroupMinimalTotalsToJSON( - contractorPaymentGroupMinimalTotals: ContractorPaymentGroupMinimalTotals, -): string { - return JSON.stringify( - ContractorPaymentGroupMinimalTotals$outboundSchema.parse( - contractorPaymentGroupMinimalTotals, - ), - ); -} - -export function contractorPaymentGroupMinimalTotalsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ContractorPaymentGroupMinimalTotals$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ContractorPaymentGroupMinimalTotals' from JSON`, - ); -} - -/** @internal */ -export const ContractorPaymentGroupMinimal$inboundSchema: z.ZodType< - ContractorPaymentGroupMinimal, - z.ZodTypeDef, - unknown -> = z.object({ - uuid: z.string().optional(), - company_uuid: z.string().optional(), - check_date: z.string().optional(), - debit_date: z.string().optional(), - status: ContractorPaymentGroupMinimalStatus$inboundSchema.optional(), - creation_token: z.nullable(z.string()).optional(), - totals: z.lazy(() => ContractorPaymentGroupMinimalTotals$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "company_uuid": "companyUuid", - "check_date": "checkDate", - "debit_date": "debitDate", - "creation_token": "creationToken", - }); -}); - -/** @internal */ -export type ContractorPaymentGroupMinimal$Outbound = { - uuid?: string | undefined; - company_uuid?: string | undefined; - check_date?: string | undefined; - debit_date?: string | undefined; - status?: string | undefined; - creation_token?: string | null | undefined; - totals?: ContractorPaymentGroupMinimalTotals$Outbound | undefined; -}; - -/** @internal */ -export const ContractorPaymentGroupMinimal$outboundSchema: z.ZodType< - ContractorPaymentGroupMinimal$Outbound, - z.ZodTypeDef, - ContractorPaymentGroupMinimal -> = z.object({ - uuid: z.string().optional(), - companyUuid: z.string().optional(), - checkDate: z.string().optional(), - debitDate: z.string().optional(), - status: ContractorPaymentGroupMinimalStatus$outboundSchema.optional(), - creationToken: z.nullable(z.string()).optional(), - totals: z.lazy(() => ContractorPaymentGroupMinimalTotals$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - companyUuid: "company_uuid", - checkDate: "check_date", - debitDate: "debit_date", - creationToken: "creation_token", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ContractorPaymentGroupMinimal$ { - /** @deprecated use `ContractorPaymentGroupMinimal$inboundSchema` instead. */ - export const inboundSchema = ContractorPaymentGroupMinimal$inboundSchema; - /** @deprecated use `ContractorPaymentGroupMinimal$outboundSchema` instead. */ - export const outboundSchema = ContractorPaymentGroupMinimal$outboundSchema; - /** @deprecated use `ContractorPaymentGroupMinimal$Outbound` instead. */ - export type Outbound = ContractorPaymentGroupMinimal$Outbound; -} - -export function contractorPaymentGroupMinimalToJSON( - contractorPaymentGroupMinimal: ContractorPaymentGroupMinimal, -): string { - return JSON.stringify( - ContractorPaymentGroupMinimal$outboundSchema.parse( - contractorPaymentGroupMinimal, - ), - ); -} - -export function contractorPaymentGroupMinimalFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ContractorPaymentGroupMinimal$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ContractorPaymentGroupMinimal' from JSON`, - ); -} diff --git a/gusto_embedded/src/models/components/contractorpaymentgrouppreview.ts b/gusto_embedded/src/models/components/contractorpaymentgrouppreview.ts new file mode 100644 index 00000000..0f3cedae --- /dev/null +++ b/gusto_embedded/src/models/components/contractorpaymentgrouppreview.ts @@ -0,0 +1,341 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ContractorPaymentForGroupPreview, + ContractorPaymentForGroupPreview$inboundSchema, + ContractorPaymentForGroupPreview$Outbound, + ContractorPaymentForGroupPreview$outboundSchema, +} from "./contractorpaymentforgrouppreview.js"; +import { + PayrollCreditBlockersType, + PayrollCreditBlockersType$inboundSchema, + PayrollCreditBlockersType$Outbound, + PayrollCreditBlockersType$outboundSchema, +} from "./payrollcreditblockerstype.js"; +import { + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersType$inboundSchema, + PayrollSubmissionBlockersType$Outbound, + PayrollSubmissionBlockersType$outboundSchema, +} from "./payrollsubmissionblockerstype.js"; + +/** + * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. + */ +export const ContractorPaymentGroupPreviewStatus = { + Unfunded: "Unfunded", + Funded: "Funded", +} as const; +/** + * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. + */ +export type ContractorPaymentGroupPreviewStatus = ClosedEnum< + typeof ContractorPaymentGroupPreviewStatus +>; + +export type ContractorPaymentGroupPreviewTotals = { + /** + * The total amount for the group of contractor payments. + */ + amount?: string | undefined; + /** + * The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. + */ + debitAmount?: string | undefined; + /** + * The total wage amount for the group of contractor payments. + */ + wageAmount?: string | undefined; + /** + * The total reimbursement amount for the group of contractor payments. + */ + reimbursementAmount?: string | undefined; + /** + * The total check amount for the group of contractor payments. + */ + checkAmount?: string | undefined; +}; + +/** + * Preview of a contractor payment group + */ +export type ContractorPaymentGroupPreview = { + /** + * The unique identifier of the contractor payment group. + */ + uuid?: string | null | undefined; + /** + * The UUID of the company. + */ + companyUuid?: string | undefined; + /** + * The check date of the contractor payment group. + */ + checkDate?: string | undefined; + /** + * The debit date of the contractor payment group. + */ + debitDate?: string | undefined; + /** + * The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. + */ + status?: ContractorPaymentGroupPreviewStatus | undefined; + /** + * Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. + */ + creationToken?: string | null | undefined; + /** + * Whether the disbursement is partner owned. + */ + partnerOwnedDisbursement?: boolean | null | undefined; + /** + * List of submission blockers for the contractor payment group. + */ + submissionBlockers?: Array> | undefined; + /** + * List of credit blockers for the contractor payment group. + */ + creditBlockers?: Array> | undefined; + totals?: ContractorPaymentGroupPreviewTotals | undefined; + contractorPayments?: Array | undefined; +}; + +/** @internal */ +export const ContractorPaymentGroupPreviewStatus$inboundSchema: z.ZodNativeEnum< + typeof ContractorPaymentGroupPreviewStatus +> = z.nativeEnum(ContractorPaymentGroupPreviewStatus); + +/** @internal */ +export const ContractorPaymentGroupPreviewStatus$outboundSchema: + z.ZodNativeEnum = + ContractorPaymentGroupPreviewStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentGroupPreviewStatus$ { + /** @deprecated use `ContractorPaymentGroupPreviewStatus$inboundSchema` instead. */ + export const inboundSchema = + ContractorPaymentGroupPreviewStatus$inboundSchema; + /** @deprecated use `ContractorPaymentGroupPreviewStatus$outboundSchema` instead. */ + export const outboundSchema = + ContractorPaymentGroupPreviewStatus$outboundSchema; +} + +/** @internal */ +export const ContractorPaymentGroupPreviewTotals$inboundSchema: z.ZodType< + ContractorPaymentGroupPreviewTotals, + z.ZodTypeDef, + unknown +> = z.object({ + amount: z.string().optional(), + debit_amount: z.string().optional(), + wage_amount: z.string().optional(), + reimbursement_amount: z.string().optional(), + check_amount: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "debit_amount": "debitAmount", + "wage_amount": "wageAmount", + "reimbursement_amount": "reimbursementAmount", + "check_amount": "checkAmount", + }); +}); + +/** @internal */ +export type ContractorPaymentGroupPreviewTotals$Outbound = { + amount?: string | undefined; + debit_amount?: string | undefined; + wage_amount?: string | undefined; + reimbursement_amount?: string | undefined; + check_amount?: string | undefined; +}; + +/** @internal */ +export const ContractorPaymentGroupPreviewTotals$outboundSchema: z.ZodType< + ContractorPaymentGroupPreviewTotals$Outbound, + z.ZodTypeDef, + ContractorPaymentGroupPreviewTotals +> = z.object({ + amount: z.string().optional(), + debitAmount: z.string().optional(), + wageAmount: z.string().optional(), + reimbursementAmount: z.string().optional(), + checkAmount: z.string().optional(), +}).transform((v) => { + return remap$(v, { + debitAmount: "debit_amount", + wageAmount: "wage_amount", + reimbursementAmount: "reimbursement_amount", + checkAmount: "check_amount", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentGroupPreviewTotals$ { + /** @deprecated use `ContractorPaymentGroupPreviewTotals$inboundSchema` instead. */ + export const inboundSchema = + ContractorPaymentGroupPreviewTotals$inboundSchema; + /** @deprecated use `ContractorPaymentGroupPreviewTotals$outboundSchema` instead. */ + export const outboundSchema = + ContractorPaymentGroupPreviewTotals$outboundSchema; + /** @deprecated use `ContractorPaymentGroupPreviewTotals$Outbound` instead. */ + export type Outbound = ContractorPaymentGroupPreviewTotals$Outbound; +} + +export function contractorPaymentGroupPreviewTotalsToJSON( + contractorPaymentGroupPreviewTotals: ContractorPaymentGroupPreviewTotals, +): string { + return JSON.stringify( + ContractorPaymentGroupPreviewTotals$outboundSchema.parse( + contractorPaymentGroupPreviewTotals, + ), + ); +} + +export function contractorPaymentGroupPreviewTotalsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ContractorPaymentGroupPreviewTotals$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ContractorPaymentGroupPreviewTotals' from JSON`, + ); +} + +/** @internal */ +export const ContractorPaymentGroupPreview$inboundSchema: z.ZodType< + ContractorPaymentGroupPreview, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.nullable(z.string()).optional(), + company_uuid: z.string().optional(), + check_date: z.string().optional(), + debit_date: z.string().optional(), + status: ContractorPaymentGroupPreviewStatus$inboundSchema.optional(), + creation_token: z.nullable(z.string()).optional(), + partner_owned_disbursement: z.nullable(z.boolean()).optional(), + submission_blockers: z.array( + z.array(PayrollSubmissionBlockersType$inboundSchema), + ).optional(), + credit_blockers: z.array(z.array(PayrollCreditBlockersType$inboundSchema)) + .optional(), + totals: z.lazy(() => ContractorPaymentGroupPreviewTotals$inboundSchema) + .optional(), + contractor_payments: z.array(ContractorPaymentForGroupPreview$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "company_uuid": "companyUuid", + "check_date": "checkDate", + "debit_date": "debitDate", + "creation_token": "creationToken", + "partner_owned_disbursement": "partnerOwnedDisbursement", + "submission_blockers": "submissionBlockers", + "credit_blockers": "creditBlockers", + "contractor_payments": "contractorPayments", + }); +}); + +/** @internal */ +export type ContractorPaymentGroupPreview$Outbound = { + uuid?: string | null | undefined; + company_uuid?: string | undefined; + check_date?: string | undefined; + debit_date?: string | undefined; + status?: string | undefined; + creation_token?: string | null | undefined; + partner_owned_disbursement?: boolean | null | undefined; + submission_blockers?: + | Array> + | undefined; + credit_blockers?: + | Array> + | undefined; + totals?: ContractorPaymentGroupPreviewTotals$Outbound | undefined; + contractor_payments?: + | Array + | undefined; +}; + +/** @internal */ +export const ContractorPaymentGroupPreview$outboundSchema: z.ZodType< + ContractorPaymentGroupPreview$Outbound, + z.ZodTypeDef, + ContractorPaymentGroupPreview +> = z.object({ + uuid: z.nullable(z.string()).optional(), + companyUuid: z.string().optional(), + checkDate: z.string().optional(), + debitDate: z.string().optional(), + status: ContractorPaymentGroupPreviewStatus$outboundSchema.optional(), + creationToken: z.nullable(z.string()).optional(), + partnerOwnedDisbursement: z.nullable(z.boolean()).optional(), + submissionBlockers: z.array( + z.array(PayrollSubmissionBlockersType$outboundSchema), + ).optional(), + creditBlockers: z.array(z.array(PayrollCreditBlockersType$outboundSchema)) + .optional(), + totals: z.lazy(() => ContractorPaymentGroupPreviewTotals$outboundSchema) + .optional(), + contractorPayments: z.array(ContractorPaymentForGroupPreview$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + companyUuid: "company_uuid", + checkDate: "check_date", + debitDate: "debit_date", + creationToken: "creation_token", + partnerOwnedDisbursement: "partner_owned_disbursement", + submissionBlockers: "submission_blockers", + creditBlockers: "credit_blockers", + contractorPayments: "contractor_payments", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ContractorPaymentGroupPreview$ { + /** @deprecated use `ContractorPaymentGroupPreview$inboundSchema` instead. */ + export const inboundSchema = ContractorPaymentGroupPreview$inboundSchema; + /** @deprecated use `ContractorPaymentGroupPreview$outboundSchema` instead. */ + export const outboundSchema = ContractorPaymentGroupPreview$outboundSchema; + /** @deprecated use `ContractorPaymentGroupPreview$Outbound` instead. */ + export type Outbound = ContractorPaymentGroupPreview$Outbound; +} + +export function contractorPaymentGroupPreviewToJSON( + contractorPaymentGroupPreview: ContractorPaymentGroupPreview, +): string { + return JSON.stringify( + ContractorPaymentGroupPreview$outboundSchema.parse( + contractorPaymentGroupPreview, + ), + ); +} + +export function contractorPaymentGroupPreviewFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ContractorPaymentGroupPreview$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ContractorPaymentGroupPreview' from JSON`, + ); +} diff --git a/gusto_embedded/src/models/components/createreport.ts b/gusto_embedded/src/models/components/createreport.ts index d08590f2..fa32d911 100644 --- a/gusto_embedded/src/models/components/createreport.ts +++ b/gusto_embedded/src/models/components/createreport.ts @@ -23,7 +23,7 @@ export type CreateReport = { /** * Title of the report */ - customName?: string | undefined; + customName?: string | null | undefined; /** * File type */ @@ -38,7 +38,7 @@ export const CreateReport$inboundSchema: z.ZodType< > = z.object({ request_uuid: z.string().optional(), company_uuid: z.string().optional(), - custom_name: z.string().optional(), + custom_name: z.nullable(z.string()).optional(), file_type: z.string().optional(), }).transform((v) => { return remap$(v, { @@ -53,7 +53,7 @@ export const CreateReport$inboundSchema: z.ZodType< export type CreateReport$Outbound = { request_uuid?: string | undefined; company_uuid?: string | undefined; - custom_name?: string | undefined; + custom_name?: string | null | undefined; file_type?: string | undefined; }; @@ -65,7 +65,7 @@ export const CreateReport$outboundSchema: z.ZodType< > = z.object({ requestUuid: z.string().optional(), companyUuid: z.string().optional(), - customName: z.string().optional(), + customName: z.nullable(z.string()).optional(), fileType: z.string().optional(), }).transform((v) => { return remap$(v, { diff --git a/gusto_embedded/src/models/components/employeebenefit.ts b/gusto_embedded/src/models/components/employeebenefit.ts index 819f0a13..bfb75aed 100644 --- a/gusto_embedded/src/models/components/employeebenefit.ts +++ b/gusto_embedded/src/models/components/employeebenefit.ts @@ -138,9 +138,9 @@ export type EmployeeBenefit = { */ limitOption?: string | null | undefined; /** - * Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. + * Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. */ - catchUp?: boolean | undefined; + catchUp?: boolean | null | undefined; /** * Identifier for a 401(k) loan assigned by the 401(k) provider */ @@ -157,9 +157,9 @@ export type EmployeeBenefit = { | null | undefined; /** - * The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. + * The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. */ - coverageSalaryMultiplier?: string | undefined; + coverageSalaryMultiplier?: string | null | undefined; /** * The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. * @@ -428,13 +428,13 @@ export const EmployeeBenefit$inboundSchema: z.ZodType< elective: z.boolean().default(false), company_contribution_annual_maximum: z.nullable(z.string()).optional(), limit_option: z.nullable(z.string()).optional(), - catch_up: z.boolean().default(false), + catch_up: z.nullable(z.boolean().default(false)), retirement_loan_identifier: z.string().optional(), coverage_amount: z.nullable(z.string()).optional(), deduction_reduces_taxable_income: z.nullable( DeductionReducesTaxableIncome$inboundSchema.default("unset"), ), - coverage_salary_multiplier: z.string().default("0.00"), + coverage_salary_multiplier: z.nullable(z.string().default("0.00")), company_contribution: z.string().default("0.00"), contribute_as_percentage: z.boolean().default(false), employee_uuid: z.string().optional(), @@ -470,11 +470,11 @@ export type EmployeeBenefit$Outbound = { elective: boolean; company_contribution_annual_maximum?: string | null | undefined; limit_option?: string | null | undefined; - catch_up: boolean; + catch_up: boolean | null; retirement_loan_identifier?: string | undefined; coverage_amount?: string | null | undefined; deduction_reduces_taxable_income: string | null; - coverage_salary_multiplier: string; + coverage_salary_multiplier: string | null; company_contribution: string; contribute_as_percentage: boolean; employee_uuid?: string | undefined; @@ -497,13 +497,13 @@ export const EmployeeBenefit$outboundSchema: z.ZodType< elective: z.boolean().default(false), companyContributionAnnualMaximum: z.nullable(z.string()).optional(), limitOption: z.nullable(z.string()).optional(), - catchUp: z.boolean().default(false), + catchUp: z.nullable(z.boolean().default(false)), retirementLoanIdentifier: z.string().optional(), coverageAmount: z.nullable(z.string()).optional(), deductionReducesTaxableIncome: z.nullable( DeductionReducesTaxableIncome$outboundSchema.default("unset"), ), - coverageSalaryMultiplier: z.string().default("0.00"), + coverageSalaryMultiplier: z.nullable(z.string().default("0.00")), companyContribution: z.string().default("0.00"), contributeAsPercentage: z.boolean().default(false), employeeUuid: z.string().optional(), diff --git a/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts b/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts index 32e02433..0c7c8bf0 100644 --- a/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts +++ b/gusto_embedded/src/models/components/employeebenefitforcompanybenefit.ts @@ -139,9 +139,9 @@ export type EmployeeBenefitForCompanyBenefit = { */ limitOption?: string | null | undefined; /** - * Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. + * Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. */ - catchUp?: boolean | undefined; + catchUp?: boolean | null | undefined; /** * Identifier for a 401(k) loan assigned by the 401(k) provider */ @@ -158,9 +158,9 @@ export type EmployeeBenefitForCompanyBenefit = { | null | undefined; /** - * The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. + * The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. */ - coverageSalaryMultiplier?: string | undefined; + coverageSalaryMultiplier?: string | null | undefined; /** * The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. * @@ -461,14 +461,14 @@ export const EmployeeBenefitForCompanyBenefit$inboundSchema: z.ZodType< elective: z.boolean().default(false), company_contribution_annual_maximum: z.nullable(z.string()).optional(), limit_option: z.nullable(z.string()).optional(), - catch_up: z.boolean().default(false), + catch_up: z.nullable(z.boolean().default(false)), retirement_loan_identifier: z.string().optional(), coverage_amount: z.nullable(z.string()).optional(), deduction_reduces_taxable_income: z.nullable( EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome$inboundSchema .default("unset"), ), - coverage_salary_multiplier: z.string().default("0.00"), + coverage_salary_multiplier: z.nullable(z.string().default("0.00")), company_contribution: z.string().default("0.00"), contribute_as_percentage: z.boolean().default(false), employee_uuid: z.string(), @@ -503,11 +503,11 @@ export type EmployeeBenefitForCompanyBenefit$Outbound = { elective: boolean; company_contribution_annual_maximum?: string | null | undefined; limit_option?: string | null | undefined; - catch_up: boolean; + catch_up: boolean | null; retirement_loan_identifier?: string | undefined; coverage_amount?: string | null | undefined; deduction_reduces_taxable_income: string | null; - coverage_salary_multiplier: string; + coverage_salary_multiplier: string | null; company_contribution: string; contribute_as_percentage: boolean; employee_uuid: string; @@ -530,14 +530,14 @@ export const EmployeeBenefitForCompanyBenefit$outboundSchema: z.ZodType< elective: z.boolean().default(false), companyContributionAnnualMaximum: z.nullable(z.string()).optional(), limitOption: z.nullable(z.string()).optional(), - catchUp: z.boolean().default(false), + catchUp: z.nullable(z.boolean().default(false)), retirementLoanIdentifier: z.string().optional(), coverageAmount: z.nullable(z.string()).optional(), deductionReducesTaxableIncome: z.nullable( EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome$outboundSchema .default("unset"), ), - coverageSalaryMultiplier: z.string().default("0.00"), + coverageSalaryMultiplier: z.nullable(z.string().default("0.00")), companyContribution: z.string().default("0.00"), contributeAsPercentage: z.boolean().default(false), employeeUuid: z.string(), diff --git a/gusto_embedded/src/models/components/employmenthistorylist.ts b/gusto_embedded/src/models/components/employmenthistorylist.ts index ea00cdfc..7e90d38a 100644 --- a/gusto_embedded/src/models/components/employmenthistorylist.ts +++ b/gusto_embedded/src/models/components/employmenthistorylist.ts @@ -37,7 +37,7 @@ export type EmploymentHistoryList = { /** * The employee's last day of work for an employment. */ - terminationDate?: string | undefined; + terminationDate?: string | null | undefined; /** * The boolean flag indicating whether Gusto will file a new hire report for the employee. */ @@ -83,7 +83,7 @@ export const EmploymentHistoryList$inboundSchema: z.ZodType< unknown > = z.object({ hire_date: z.string().optional(), - termination_date: z.string().optional(), + termination_date: z.nullable(z.string()).optional(), file_new_hire_report: z.boolean().optional(), two_percent_shareholder: z.boolean().optional(), employment_status: EmploymentHistoryListEmploymentStatus$inboundSchema @@ -101,7 +101,7 @@ export const EmploymentHistoryList$inboundSchema: z.ZodType< /** @internal */ export type EmploymentHistoryList$Outbound = { hire_date?: string | undefined; - termination_date?: string | undefined; + termination_date?: string | null | undefined; file_new_hire_report?: boolean | undefined; two_percent_shareholder?: boolean | undefined; employment_status?: string | undefined; @@ -114,7 +114,7 @@ export const EmploymentHistoryList$outboundSchema: z.ZodType< EmploymentHistoryList > = z.object({ hireDate: z.string().optional(), - terminationDate: z.string().optional(), + terminationDate: z.nullable(z.string()).optional(), fileNewHireReport: z.boolean().optional(), twoPercentShareholder: z.boolean().optional(), employmentStatus: EmploymentHistoryListEmploymentStatus$outboundSchema diff --git a/gusto_embedded/src/models/components/externalpayroll.ts b/gusto_embedded/src/models/components/externalpayroll.ts index 1cc5ea8f..89f14178 100644 --- a/gusto_embedded/src/models/components/externalpayroll.ts +++ b/gusto_embedded/src/models/components/externalpayroll.ts @@ -122,7 +122,7 @@ export type ExternalPayroll = { /** * Applicable benefits based on company provisioning. */ - applicableBenefits?: Array | undefined; + applicableBenefits?: Array | null | undefined; /** * Applicable taxes based on company provisioning. */ @@ -705,8 +705,9 @@ export const ExternalPayroll$inboundSchema: z.ZodType< ).optional(), applicable_earnings: z.array(z.lazy(() => ApplicableEarnings$inboundSchema)) .optional(), - applicable_benefits: z.array(z.lazy(() => ApplicableBenefits$inboundSchema)) - .optional(), + applicable_benefits: z.nullable( + z.array(z.lazy(() => ApplicableBenefits$inboundSchema)), + ).optional(), applicable_taxes: z.array(z.lazy(() => ApplicableTaxes$inboundSchema)) .optional(), metadata: z.lazy(() => ExternalPayrollMetadata$inboundSchema).optional(), @@ -733,7 +734,7 @@ export type ExternalPayroll$Outbound = { status?: string | undefined; external_payroll_items?: Array | undefined; applicable_earnings?: Array | undefined; - applicable_benefits?: Array | undefined; + applicable_benefits?: Array | null | undefined; applicable_taxes?: Array | undefined; metadata?: ExternalPayrollMetadata$Outbound | undefined; }; @@ -755,8 +756,9 @@ export const ExternalPayroll$outboundSchema: z.ZodType< ).optional(), applicableEarnings: z.array(z.lazy(() => ApplicableEarnings$outboundSchema)) .optional(), - applicableBenefits: z.array(z.lazy(() => ApplicableBenefits$outboundSchema)) - .optional(), + applicableBenefits: z.nullable( + z.array(z.lazy(() => ApplicableBenefits$outboundSchema)), + ).optional(), applicableTaxes: z.array(z.lazy(() => ApplicableTaxes$outboundSchema)) .optional(), metadata: z.lazy(() => ExternalPayrollMetadata$outboundSchema).optional(), diff --git a/gusto_embedded/src/models/components/informationrequest.ts b/gusto_embedded/src/models/components/informationrequest.ts index f9bd0d3d..0caa1451 100644 --- a/gusto_embedded/src/models/components/informationrequest.ts +++ b/gusto_embedded/src/models/components/informationrequest.ts @@ -53,7 +53,7 @@ export type InformationRequest = { /** * The type of information request */ - type?: InformationRequestType | undefined; + type?: InformationRequestType | null | undefined; /** * The status of the information request */ @@ -114,7 +114,7 @@ export const InformationRequest$inboundSchema: z.ZodType< > = z.object({ uuid: z.string().optional(), company_uuid: z.string().optional(), - type: InformationRequestType$inboundSchema.optional(), + type: z.nullable(InformationRequestType$inboundSchema).optional(), status: InformationRequestStatus$inboundSchema.optional(), blocking_payroll: z.boolean().optional(), }).transform((v) => { @@ -128,7 +128,7 @@ export const InformationRequest$inboundSchema: z.ZodType< export type InformationRequest$Outbound = { uuid?: string | undefined; company_uuid?: string | undefined; - type?: string | undefined; + type?: string | null | undefined; status?: string | undefined; blocking_payroll?: boolean | undefined; }; @@ -141,7 +141,7 @@ export const InformationRequest$outboundSchema: z.ZodType< > = z.object({ uuid: z.string().optional(), companyUuid: z.string().optional(), - type: InformationRequestType$outboundSchema.optional(), + type: z.nullable(InformationRequestType$outboundSchema).optional(), status: InformationRequestStatus$outboundSchema.optional(), blockingPayroll: z.boolean().optional(), }).transform((v) => { diff --git a/gusto_embedded/src/models/components/paymentconfigs.ts b/gusto_embedded/src/models/components/paymentconfigs.ts index 45afe9e5..a6e8111a 100644 --- a/gusto_embedded/src/models/components/paymentconfigs.ts +++ b/gusto_embedded/src/models/components/paymentconfigs.ts @@ -47,7 +47,7 @@ export type PaymentConfigs = { /** * Payment limit for 1-day or 2-day payroll */ - fastPaymentLimit?: string | undefined; + fastPaymentLimit?: string | null | undefined; /** * Payment speed for 1-day, 2-day, 4-day */ @@ -154,7 +154,7 @@ export const PaymentConfigs$inboundSchema: z.ZodType< > = z.object({ company_uuid: z.string().optional(), partner_uuid: z.string().optional(), - fast_payment_limit: z.string().optional(), + fast_payment_limit: z.nullable(z.string()).optional(), payment_speed: z.string().optional(), partner_owned_disbursement: z.boolean().optional(), earned_fast_ach_blockers: z.array( @@ -175,7 +175,7 @@ export const PaymentConfigs$inboundSchema: z.ZodType< export type PaymentConfigs$Outbound = { company_uuid?: string | undefined; partner_uuid?: string | undefined; - fast_payment_limit?: string | undefined; + fast_payment_limit?: string | null | undefined; payment_speed?: string | undefined; partner_owned_disbursement?: boolean | undefined; earned_fast_ach_blockers?: Array | undefined; @@ -189,7 +189,7 @@ export const PaymentConfigs$outboundSchema: z.ZodType< > = z.object({ companyUuid: z.string().optional(), partnerUuid: z.string().optional(), - fastPaymentLimit: z.string().optional(), + fastPaymentLimit: z.nullable(z.string()).optional(), paymentSpeed: z.string().optional(), partnerOwnedDisbursement: z.boolean().optional(), earnedFastAchBlockers: z.array( diff --git a/gusto_embedded/src/models/components/payroll.ts b/gusto_embedded/src/models/components/payroll.ts index 4945007d..8327b593 100644 --- a/gusto_embedded/src/models/components/payroll.ts +++ b/gusto_embedded/src/models/components/payroll.ts @@ -6,7 +6,6 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; -import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { OffCycleReasonType, @@ -71,7 +70,7 @@ export type Payroll = { /** * A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. */ - payrollDeadline?: RFCDate | undefined; + payrollDeadline?: Date | undefined; /** * The date on which employees will be paid for the payroll. */ @@ -87,7 +86,7 @@ export type Payroll = { /** * A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. */ - calculatedAt?: string | null | undefined; + calculatedAt?: Date | null | undefined; /** * The UUID of the payroll. */ @@ -171,11 +170,15 @@ export type Payroll = { /** @internal */ export const Payroll$inboundSchema: z.ZodType = z.object({ - payroll_deadline: z.string().transform(v => new RFCDate(v)).optional(), + payroll_deadline: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), check_date: z.string().optional(), processed: z.boolean().optional(), processed_date: z.nullable(z.string()).optional(), - calculated_at: z.nullable(z.string()).optional(), + calculated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), uuid: z.string().optional(), payroll_uuid: z.string().optional(), company_uuid: z.string().optional(), @@ -269,12 +272,11 @@ export const Payroll$outboundSchema: z.ZodType< z.ZodTypeDef, Payroll > = z.object({ - payrollDeadline: z.instanceof(RFCDate).transform(v => v.toString()) - .optional(), + payrollDeadline: z.date().transform(v => v.toISOString()).optional(), checkDate: z.string().optional(), processed: z.boolean().optional(), processedDate: z.nullable(z.string()).optional(), - calculatedAt: z.nullable(z.string()).optional(), + calculatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), uuid: z.string().optional(), payrollUuid: z.string().optional(), companyUuid: z.string().optional(), diff --git a/gusto_embedded/src/models/components/payrollcheck.ts b/gusto_embedded/src/models/components/payrollcheck.ts index 3edd5538..d3a0b7d7 100644 --- a/gusto_embedded/src/models/components/payrollcheck.ts +++ b/gusto_embedded/src/models/components/payrollcheck.ts @@ -34,7 +34,7 @@ export type PayrollCheck = { /** * The starting check number for the checks being printed. */ - startingCheckNumber?: string | undefined; + startingCheckNumber?: string | null | undefined; /** * A unique identifier of the Generated Document request */ @@ -124,7 +124,7 @@ export const PayrollCheck$inboundSchema: z.ZodType< > = z.object({ payroll_uuid: z.string().optional(), printing_format: z.string().optional(), - starting_check_number: z.string().optional(), + starting_check_number: z.nullable(z.string()).optional(), request_uuid: z.string().optional(), status: z.string().optional(), employee_check_number_mapping: z.array( @@ -144,7 +144,7 @@ export const PayrollCheck$inboundSchema: z.ZodType< export type PayrollCheck$Outbound = { payroll_uuid?: string | undefined; printing_format?: string | undefined; - starting_check_number?: string | undefined; + starting_check_number?: string | null | undefined; request_uuid?: string | undefined; status?: string | undefined; employee_check_number_mapping?: @@ -160,7 +160,7 @@ export const PayrollCheck$outboundSchema: z.ZodType< > = z.object({ payrollUuid: z.string().optional(), printingFormat: z.string().optional(), - startingCheckNumber: z.string().optional(), + startingCheckNumber: z.nullable(z.string()).optional(), requestUuid: z.string().optional(), status: z.string().optional(), employeeCheckNumberMapping: z.array( diff --git a/gusto_embedded/src/models/components/payrollprepared.ts b/gusto_embedded/src/models/components/payrollprepared.ts index 5061faa0..77fc8a7b 100644 --- a/gusto_embedded/src/models/components/payrollprepared.ts +++ b/gusto_embedded/src/models/components/payrollprepared.ts @@ -6,7 +6,6 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; -import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { OffCycleReasonType, @@ -59,7 +58,7 @@ export type PayrollPrepared = { /** * A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. */ - payrollDeadline?: RFCDate | undefined; + payrollDeadline?: Date | undefined; /** * The date on which employees will be paid for the payroll. */ @@ -75,7 +74,7 @@ export type PayrollPrepared = { /** * A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. */ - calculatedAt?: string | null | undefined; + calculatedAt?: Date | null | undefined; /** * The UUID of the payroll. */ @@ -148,11 +147,15 @@ export const PayrollPrepared$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - payroll_deadline: z.string().transform(v => new RFCDate(v)).optional(), + payroll_deadline: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), check_date: z.string().optional(), processed: z.boolean().optional(), processed_date: z.nullable(z.string()).optional(), - calculated_at: z.nullable(z.string()).optional(), + calculated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), uuid: z.string().optional(), payroll_uuid: z.string().optional(), company_uuid: z.string().optional(), @@ -244,12 +247,11 @@ export const PayrollPrepared$outboundSchema: z.ZodType< z.ZodTypeDef, PayrollPrepared > = z.object({ - payrollDeadline: z.instanceof(RFCDate).transform(v => v.toString()) - .optional(), + payrollDeadline: z.date().transform(v => v.toISOString()).optional(), checkDate: z.string().optional(), processed: z.boolean().optional(), processedDate: z.nullable(z.string()).optional(), - calculatedAt: z.nullable(z.string()).optional(), + calculatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), uuid: z.string().optional(), payrollUuid: z.string().optional(), companyUuid: z.string().optional(), diff --git a/gusto_embedded/src/models/components/payrollshow.ts b/gusto_embedded/src/models/components/payrollshow.ts index 33bf2b4e..efb79723 100644 --- a/gusto_embedded/src/models/components/payrollshow.ts +++ b/gusto_embedded/src/models/components/payrollshow.ts @@ -7,7 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; -import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { OffCycleReasonType, @@ -221,7 +220,7 @@ export type PayrollShow = { /** * A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. */ - payrollDeadline?: RFCDate | undefined; + payrollDeadline?: Date | undefined; /** * The date on which employees will be paid for the payroll. */ @@ -237,7 +236,7 @@ export type PayrollShow = { /** * A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. */ - calculatedAt?: string | null | undefined; + calculatedAt?: Date | null | undefined; /** * The UUID of the payroll. */ @@ -883,11 +882,15 @@ export const PayrollShow$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - payroll_deadline: z.string().transform(v => new RFCDate(v)).optional(), + payroll_deadline: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), check_date: z.string().optional(), processed: z.boolean().optional(), processed_date: z.nullable(z.string()).optional(), - calculated_at: z.nullable(z.string()).optional(), + calculated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), uuid: z.string().optional(), payroll_uuid: z.string().optional(), company_uuid: z.string().optional(), @@ -984,12 +987,11 @@ export const PayrollShow$outboundSchema: z.ZodType< z.ZodTypeDef, PayrollShow > = z.object({ - payrollDeadline: z.instanceof(RFCDate).transform(v => v.toString()) - .optional(), + payrollDeadline: z.date().transform(v => v.toISOString()).optional(), checkDate: z.string().optional(), processed: z.boolean().optional(), processedDate: z.nullable(z.string()).optional(), - calculatedAt: z.nullable(z.string()).optional(), + calculatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), uuid: z.string().optional(), payrollUuid: z.string().optional(), companyUuid: z.string().optional(), diff --git a/gusto_embedded/src/models/components/recoverycase.ts b/gusto_embedded/src/models/components/recoverycase.ts index c3c6349e..9b708763 100644 --- a/gusto_embedded/src/models/components/recoverycase.ts +++ b/gusto_embedded/src/models/components/recoverycase.ts @@ -59,7 +59,7 @@ export type RecoveryCase = { /** * The uuids of the associated contractor payments for which the recovery case was created. If the recovery case was created for a payroll, this field will be null. */ - contractorPaymentUuids?: Array | undefined; + contractorPaymentUuids?: Array | null | undefined; /** * Amount outstanding for the recovery case */ @@ -104,7 +104,7 @@ export const RecoveryCase$inboundSchema: z.ZodType< original_debit_date: z.string().optional(), check_date: z.string().optional(), payroll_uuid: z.string().optional(), - contractor_payment_uuids: z.array(z.string()).optional(), + contractor_payment_uuids: z.nullable(z.array(z.string())).optional(), amount_outstanding: z.string().optional(), event_total_amount: z.string().optional(), }).transform((v) => { @@ -129,7 +129,7 @@ export type RecoveryCase$Outbound = { original_debit_date?: string | undefined; check_date?: string | undefined; payroll_uuid?: string | undefined; - contractor_payment_uuids?: Array | undefined; + contractor_payment_uuids?: Array | null | undefined; amount_outstanding?: string | undefined; event_total_amount?: string | undefined; }; @@ -147,7 +147,7 @@ export const RecoveryCase$outboundSchema: z.ZodType< originalDebitDate: z.string().optional(), checkDate: z.string().optional(), payrollUuid: z.string().optional(), - contractorPaymentUuids: z.array(z.string()).optional(), + contractorPaymentUuids: z.nullable(z.array(z.string())).optional(), amountOutstanding: z.string().optional(), eventTotalAmount: z.string().optional(), }).transform((v) => { diff --git a/gusto_embedded/src/models/components/timeoffpolicy.ts b/gusto_embedded/src/models/components/timeoffpolicy.ts index ee5fb32e..a575dff9 100644 --- a/gusto_embedded/src/models/components/timeoffpolicy.ts +++ b/gusto_embedded/src/models/components/timeoffpolicy.ts @@ -52,11 +52,11 @@ export type TimeOffPolicy = { /** * The rate at which the time off hours will accrue for an employee on the policy. Represented as a float, e.g. "40.0". */ - accrualRate?: string | undefined; + accrualRate?: string | null | undefined; /** * The number of hours an employee has to work or be paid for to accrue the number of hours set in the accrual rate. Only used for hourly policies (per_hour_paid, per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime). Represented as a float, e.g. "40.0". */ - accrualRateUnit?: string | undefined; + accrualRateUnit?: string | null | undefined; /** * Boolean representing if an employee's accrued time off hours will be paid out on termination */ @@ -64,7 +64,7 @@ export type TimeOffPolicy = { /** * Number of days before an employee on the policy will begin accruing time off hours */ - accrualWaitingPeriodDays?: number | undefined; + accrualWaitingPeriodDays?: number | null | undefined; /** * The max number of hours an employee can carryover from one year to the next */ @@ -179,10 +179,10 @@ export const TimeOffPolicy$inboundSchema: z.ZodType< name: z.string(), policy_type: PolicyType$inboundSchema, accrual_method: z.string(), - accrual_rate: z.string().optional(), - accrual_rate_unit: z.string().optional(), + accrual_rate: z.nullable(z.string()).optional(), + accrual_rate_unit: z.nullable(z.string()).optional(), paid_out_on_termination: z.boolean().optional(), - accrual_waiting_period_days: z.number().int().optional(), + accrual_waiting_period_days: z.nullable(z.number().int()).optional(), carryover_limit_hours: z.string().optional(), max_accrual_hours_per_year: z.string().optional(), max_hours: z.string().optional(), @@ -213,10 +213,10 @@ export type TimeOffPolicy$Outbound = { name: string; policy_type: string; accrual_method: string; - accrual_rate?: string | undefined; - accrual_rate_unit?: string | undefined; + accrual_rate?: string | null | undefined; + accrual_rate_unit?: string | null | undefined; paid_out_on_termination?: boolean | undefined; - accrual_waiting_period_days?: number | undefined; + accrual_waiting_period_days?: number | null | undefined; carryover_limit_hours?: string | undefined; max_accrual_hours_per_year?: string | undefined; max_hours?: string | undefined; @@ -237,10 +237,10 @@ export const TimeOffPolicy$outboundSchema: z.ZodType< name: z.string(), policyType: PolicyType$outboundSchema, accrualMethod: z.string(), - accrualRate: z.string().optional(), - accrualRateUnit: z.string().optional(), + accrualRate: z.nullable(z.string()).optional(), + accrualRateUnit: z.nullable(z.string()).optional(), paidOutOnTermination: z.boolean().optional(), - accrualWaitingPeriodDays: z.number().int().optional(), + accrualWaitingPeriodDays: z.nullable(z.number().int()).optional(), carryoverLimitHours: z.string().optional(), maxAccrualHoursPerYear: z.string().optional(), maxHours: z.string().optional(), diff --git a/gusto_embedded/src/models/components/wireinrequest.ts b/gusto_embedded/src/models/components/wireinrequest.ts index f886b95a..13c29ad5 100644 --- a/gusto_embedded/src/models/components/wireinrequest.ts +++ b/gusto_embedded/src/models/components/wireinrequest.ts @@ -73,7 +73,7 @@ export type WireInRequest = { /** * Notes for the wire in request */ - additionalNotes?: string | undefined; + additionalNotes?: string | null | undefined; /** * Name of the bank initiating the wire in */ @@ -162,7 +162,7 @@ export const WireInRequest$inboundSchema: z.ZodType< recipient_address: z.string().optional(), recipient_account_number: z.string().optional(), recipient_routing_number: z.string().optional(), - additional_notes: z.string().optional(), + additional_notes: z.nullable(z.string()).optional(), bank_name: z.string().optional(), date_sent: z.string().optional(), unique_tracking_code: z.string().optional(), @@ -201,7 +201,7 @@ export type WireInRequest$Outbound = { recipient_address?: string | undefined; recipient_account_number?: string | undefined; recipient_routing_number?: string | undefined; - additional_notes?: string | undefined; + additional_notes?: string | null | undefined; bank_name?: string | undefined; date_sent?: string | undefined; unique_tracking_code?: string | undefined; @@ -226,7 +226,7 @@ export const WireInRequest$outboundSchema: z.ZodType< recipientAddress: z.string().optional(), recipientAccountNumber: z.string().optional(), recipientRoutingNumber: z.string().optional(), - additionalNotes: z.string().optional(), + additionalNotes: z.nullable(z.string()).optional(), bankName: z.string().optional(), dateSent: z.string().optional(), uniqueTrackingCode: z.string().optional(), diff --git a/gusto_embedded/src/models/errors/notfounderrorobject.ts b/gusto_embedded/src/models/errors/notfounderrorobject.ts new file mode 100644 index 00000000..0636d8ac --- /dev/null +++ b/gusto_embedded/src/models/errors/notfounderrorobject.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + EntityErrorObject, + EntityErrorObject$inboundSchema, + EntityErrorObject$Outbound, + EntityErrorObject$outboundSchema, +} from "../components/entityerrorobject.js"; +import { GustoEmbeddedError } from "./gustoembeddederror.js"; + +/** + * Not Found + * + * @remarks + * + * The requested resource does not exist. Make sure the provided ID/UUID is valid. + */ +export type NotFoundErrorObjectData = { + errors: Array; +}; + +/** + * Not Found + * + * @remarks + * + * The requested resource does not exist. Make sure the provided ID/UUID is valid. + */ +export class NotFoundErrorObject extends GustoEmbeddedError { + errors: Array; + + /** The original data that was passed to this error instance. */ + data$: NotFoundErrorObjectData; + + constructor( + err: NotFoundErrorObjectData, + httpMeta: { response: Response; request: Request; body: string }, + ) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message, httpMeta); + this.data$ = err; + this.errors = err.errors; + + this.name = "NotFoundErrorObject"; + } +} + +/** @internal */ +export const NotFoundErrorObject$inboundSchema: z.ZodType< + NotFoundErrorObject, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(EntityErrorObject$inboundSchema), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), +}) + .transform((v) => { + return new NotFoundErrorObject(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); + }); + +/** @internal */ +export type NotFoundErrorObject$Outbound = { + errors: Array; +}; + +/** @internal */ +export const NotFoundErrorObject$outboundSchema: z.ZodType< + NotFoundErrorObject$Outbound, + z.ZodTypeDef, + NotFoundErrorObject +> = z.instanceof(NotFoundErrorObject) + .transform(v => v.data$) + .pipe(z.object({ + errors: z.array(EntityErrorObject$outboundSchema), + })); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotFoundErrorObject$ { + /** @deprecated use `NotFoundErrorObject$inboundSchema` instead. */ + export const inboundSchema = NotFoundErrorObject$inboundSchema; + /** @deprecated use `NotFoundErrorObject$outboundSchema` instead. */ + export const outboundSchema = NotFoundErrorObject$outboundSchema; + /** @deprecated use `NotFoundErrorObject$Outbound` instead. */ + export type Outbound = NotFoundErrorObject$Outbound; +} diff --git a/gusto_embedded/src/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupid.ts b/gusto_embedded/src/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupid.ts index 34989ef9..74756815 100644 --- a/gusto_embedded/src/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupid.ts +++ b/gusto_embedded/src/models/operations/deletev1contractorpaymentgroupscontractorpaymentgroupid.ts @@ -5,6 +5,7 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { HTTPMetadata, @@ -12,13 +13,23 @@ import { HTTPMetadata$Outbound, HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; -import { - VersionHeader, - VersionHeader$inboundSchema, - VersionHeader$outboundSchema, -} from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * 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. + */ +export const DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion = + { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", + } as const; +/** + * 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. + */ +export type DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion = + ClosedEnum< + typeof DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + >; + export type DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest = { /** * The UUID of the contractor payment group @@ -27,13 +38,43 @@ export type DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest = { /** * 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. */ - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + | undefined; }; export type DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdResponse = { httpMeta: HTTPMetadata; }; +/** @internal */ +export const DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + > = z.nativeEnum( + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + > = + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$ { + /** @deprecated use `DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest$inboundSchema: z.ZodType< @@ -42,7 +83,9 @@ export const DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest$inbo unknown > = z.object({ contractor_payment_group_uuid: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + "X-Gusto-API-Version": + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { "contractor_payment_group_uuid": "contractorPaymentGroupUuid", @@ -65,7 +108,9 @@ export const DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest$outb DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdRequest > = z.object({ contractorPaymentGroupUuid: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + xGustoAPIVersion: + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { contractorPaymentGroupUuid: "contractor_payment_group_uuid", diff --git a/gusto_embedded/src/models/operations/getv1companiescompanyidcontractorpaymentgroups.ts b/gusto_embedded/src/models/operations/getv1companiescompanyidcontractorpaymentgroups.ts index a302cb4a..15b7b4e1 100644 --- a/gusto_embedded/src/models/operations/getv1companiescompanyidcontractorpaymentgroups.ts +++ b/gusto_embedded/src/models/operations/getv1companiescompanyidcontractorpaymentgroups.ts @@ -5,26 +5,37 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { - ContractorPaymentGroupMinimal, - ContractorPaymentGroupMinimal$inboundSchema, - ContractorPaymentGroupMinimal$Outbound, - ContractorPaymentGroupMinimal$outboundSchema, -} from "../components/contractorpaymentgroupminimal.js"; + ContractorPaymentGroup, + ContractorPaymentGroup$inboundSchema, + ContractorPaymentGroup$Outbound, + ContractorPaymentGroup$outboundSchema, +} from "../components/contractorpaymentgroup.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, HTTPMetadata$Outbound, HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; -import { - VersionHeader, - VersionHeader$inboundSchema, - VersionHeader$outboundSchema, -} from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * 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. + */ +export const GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion = + { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", + } as const; +/** + * 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. + */ +export type GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion = + ClosedEnum< + typeof GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + >; + export type GetV1CompaniesCompanyIdContractorPaymentGroupsRequest = { /** * The UUID of the company @@ -49,7 +60,9 @@ export type GetV1CompaniesCompanyIdContractorPaymentGroupsRequest = { /** * 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. */ - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + | undefined; }; export type GetV1CompaniesCompanyIdContractorPaymentGroupsResponse = { @@ -57,9 +70,37 @@ export type GetV1CompaniesCompanyIdContractorPaymentGroupsResponse = { /** * List of Contractor Payment Groups */ - contractorPaymentGroupList?: Array | undefined; + contractorPaymentGroups?: Array | undefined; }; +/** @internal */ +export const GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + > = z.nativeEnum( + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + > = + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$ { + /** @deprecated use `GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const GetV1CompaniesCompanyIdContractorPaymentGroupsRequest$inboundSchema: z.ZodType< @@ -72,7 +113,9 @@ export const GetV1CompaniesCompanyIdContractorPaymentGroupsRequest$inboundSchema end_date: z.string().optional(), page: z.number().int().optional(), per: z.number().int().optional(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + "X-Gusto-API-Version": + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { "company_id": "companyId", @@ -104,7 +147,9 @@ export const GetV1CompaniesCompanyIdContractorPaymentGroupsRequest$outboundSchem endDate: z.string().optional(), page: z.number().int().optional(), per: z.number().int().optional(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + xGustoAPIVersion: + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { companyId: "company_id", @@ -165,21 +210,20 @@ export const GetV1CompaniesCompanyIdContractorPaymentGroupsResponse$inboundSchem unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, - "Contractor-Payment-Group-List": z.array( - ContractorPaymentGroupMinimal$inboundSchema, - ).optional(), + "Contractor-Payment-Groups": z.array(ContractorPaymentGroup$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", - "Contractor-Payment-Group-List": "contractorPaymentGroupList", + "Contractor-Payment-Groups": "contractorPaymentGroups", }); }); /** @internal */ export type GetV1CompaniesCompanyIdContractorPaymentGroupsResponse$Outbound = { HttpMeta: HTTPMetadata$Outbound; - "Contractor-Payment-Group-List"?: - | Array + "Contractor-Payment-Groups"?: + | Array | undefined; }; @@ -191,13 +235,12 @@ export const GetV1CompaniesCompanyIdContractorPaymentGroupsResponse$outboundSche GetV1CompaniesCompanyIdContractorPaymentGroupsResponse > = z.object({ httpMeta: HTTPMetadata$outboundSchema, - contractorPaymentGroupList: z.array( - ContractorPaymentGroupMinimal$outboundSchema, - ).optional(), + contractorPaymentGroups: z.array(ContractorPaymentGroup$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", - contractorPaymentGroupList: "Contractor-Payment-Group-List", + contractorPaymentGroups: "Contractor-Payment-Groups", }); }); diff --git a/gusto_embedded/src/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupid.ts b/gusto_embedded/src/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupid.ts index 8f9ab5c2..5598a995 100644 --- a/gusto_embedded/src/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupid.ts +++ b/gusto_embedded/src/models/operations/getv1contractorpaymentgroupscontractorpaymentgroupid.ts @@ -5,6 +5,7 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { ContractorPaymentGroup, @@ -18,13 +19,23 @@ import { HTTPMetadata$Outbound, HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; -import { - VersionHeader, - VersionHeader$inboundSchema, - VersionHeader$outboundSchema, -} from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * 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. + */ +export const GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion = + { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", + } as const; +/** + * 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. + */ +export type GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion = + ClosedEnum< + typeof GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + >; + export type GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest = { /** * The UUID of the contractor payment group @@ -33,17 +44,47 @@ export type GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest = { /** * 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. */ - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + | undefined; }; export type GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse = { httpMeta: HTTPMetadata; /** - * Full contractor payment group object + * Successful response */ contractorPaymentGroup?: ContractorPaymentGroup | undefined; }; +/** @internal */ +export const GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + > = z.nativeEnum( + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + > = + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$ { + /** @deprecated use `GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest$inboundSchema: z.ZodType< @@ -52,7 +93,9 @@ export const GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest$inbound unknown > = z.object({ contractor_payment_group_uuid: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + "X-Gusto-API-Version": + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { "contractor_payment_group_uuid": "contractorPaymentGroupUuid", @@ -75,7 +118,9 @@ export const GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest$outboun GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest > = z.object({ contractorPaymentGroupUuid: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + xGustoAPIVersion: + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { contractorPaymentGroupUuid: "contractor_payment_group_uuid", diff --git a/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts b/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts index a66efe81..fa064a50 100644 --- a/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts +++ b/gusto_embedded/src/models/operations/postcompaniescompanyuuidsuspensions.ts @@ -76,7 +76,7 @@ export type Reason = ClosedEnum; * @remarks * * > 🚧 Switching to Gusto requires Customer Support - * > If `'gusto_com'` is provided, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + * > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. */ export const LeavingFor = { Accountant: "accountant", @@ -110,7 +110,7 @@ export const LeavingFor = { * @remarks * * > 🚧 Switching to Gusto requires Customer Support - * > If `'gusto_com'` is provided, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + * > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. */ export type LeavingFor = ClosedEnum; @@ -128,7 +128,7 @@ export type PostCompaniesCompanyUuidSuspensionsRequestBody = { */ reconcileTaxMethod: ReconcileTaxMethod; /** - * User-supplied comments describing why they are suspending their account. + * User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects "other" instead of a defined provider. */ comments?: string | undefined; /** @@ -146,7 +146,7 @@ export type PostCompaniesCompanyUuidSuspensionsRequestBody = { * @remarks * * > 🚧 Switching to Gusto requires Customer Support - * > If `'gusto_com'` is provided, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + * > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. */ leavingFor?: LeavingFor | undefined; }; diff --git a/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroups.ts b/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroups.ts index 292d30b1..b86a96fc 100644 --- a/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroups.ts +++ b/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroups.ts @@ -20,13 +20,23 @@ import { HTTPMetadata$Outbound, HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; -import { - VersionHeader, - VersionHeader$inboundSchema, - VersionHeader$outboundSchema, -} from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * 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. + */ +export const PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion = + { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", + } as const; +/** + * 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. + */ +export type PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion = + ClosedEnum< + typeof PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + >; + export const PostV1CompaniesCompanyIdContractorPaymentGroupsPaymentMethod = { DirectDeposit: "Direct Deposit", Check: "Check", @@ -69,7 +79,7 @@ export type PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody = { */ checkDate: RFCDate; /** - * Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. + * Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. */ creationToken?: string | undefined; contractorPayments: Array; @@ -77,13 +87,15 @@ export type PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody = { export type PostV1CompaniesCompanyIdContractorPaymentGroupsRequest = { /** - * The UUID of the company + * 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; + xGustoAPIVersion?: + | PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + | undefined; /** - * 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. + * The UUID of the company */ - xGustoAPIVersion?: VersionHeader | undefined; + companyId: string; requestBody: PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody; }; @@ -95,6 +107,34 @@ export type PostV1CompaniesCompanyIdContractorPaymentGroupsResponse = { contractorPaymentGroup?: ContractorPaymentGroup | undefined; }; +/** @internal */ +export const PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + > = z.nativeEnum( + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + > = + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$ { + /** @deprecated use `PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPaymentMethod$inboundSchema: z.ZodNativeEnum< @@ -302,23 +342,25 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsRequest$inboundSchem z.ZodTypeDef, unknown > = z.object({ + "X-Gusto-API-Version": + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), company_id: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), RequestBody: z.lazy(() => PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody$inboundSchema ), }).transform((v) => { return remap$(v, { - "company_id": "companyId", "X-Gusto-API-Version": "xGustoAPIVersion", + "company_id": "companyId", "RequestBody": "requestBody", }); }); /** @internal */ export type PostV1CompaniesCompanyIdContractorPaymentGroupsRequest$Outbound = { - company_id: string; "X-Gusto-API-Version": string; + company_id: string; RequestBody: PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody$Outbound; }; @@ -330,15 +372,17 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsRequest$outboundSche z.ZodTypeDef, PostV1CompaniesCompanyIdContractorPaymentGroupsRequest > = z.object({ + xGustoAPIVersion: + PostV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), companyId: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), requestBody: z.lazy(() => PostV1CompaniesCompanyIdContractorPaymentGroupsRequestBody$outboundSchema ), }).transform((v) => { return remap$(v, { - companyId: "company_id", xGustoAPIVersion: "X-Gusto-API-Version", + companyId: "company_id", requestBody: "RequestBody", }); }); diff --git a/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.ts b/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.ts index 8c945e94..045cd9ac 100644 --- a/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.ts +++ b/gusto_embedded/src/models/operations/postv1companiescompanyidcontractorpaymentgroupspreview.ts @@ -9,30 +9,45 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { - ContractorPaymentGroup, - ContractorPaymentGroup$inboundSchema, - ContractorPaymentGroup$Outbound, - ContractorPaymentGroup$outboundSchema, -} from "../components/contractorpaymentgroup.js"; + ContractorPaymentGroupPreview, + ContractorPaymentGroupPreview$inboundSchema, + ContractorPaymentGroupPreview$Outbound, + ContractorPaymentGroupPreview$outboundSchema, +} from "../components/contractorpaymentgrouppreview.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, HTTPMetadata$Outbound, HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; -import { - VersionHeader, - VersionHeader$inboundSchema, - VersionHeader$outboundSchema, -} from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * 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. + */ +export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion = + { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", + } as const; +/** + * 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. + */ +export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion = + ClosedEnum< + typeof PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + >; + +/** + * Payment method + */ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod = { DirectDeposit: "Direct Deposit", Check: "Check", - HistoricalPayment: "Historical Payment", } as const; +/** + * Payment method + */ export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod = ClosedEnum< typeof PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod @@ -41,54 +56,47 @@ export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments = { /** - * The contractor receiving the payment + * UUID of the contractor */ contractorUuid?: string | undefined; + /** + * Payment method + */ paymentMethod?: | PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod | undefined; /** - * If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked + * Wage amount */ wage?: number | undefined; /** - * If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment - */ - hours?: number | undefined; - /** - * If the contractor is on an hourly wage, this is the bonus the contractor earned - */ - bonus?: number | undefined; - /** - * Reimbursed wages for the contractor + * Reimbursement amount */ reimbursement?: number | undefined; }; export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody = { - /** - * The payment check date - */ - checkDate: RFCDate; - /** - * Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. - */ - creationToken?: string | undefined; contractorPayments: Array< PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments >; + /** + * Date when payments should be processed + */ + checkDate?: RFCDate | undefined; }; export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest = { /** - * The UUID of the company + * 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; + xGustoAPIVersion?: + | PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + | undefined; /** - * 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. + * The UUID of the company */ - xGustoAPIVersion?: VersionHeader | undefined; + companyId: string; requestBody: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody; }; @@ -98,9 +106,37 @@ export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse = { /** * Full contractor payment group object with null uuid */ - contractorPaymentGroup?: ContractorPaymentGroup | undefined; + contractorPaymentGroupPreview?: ContractorPaymentGroupPreview | undefined; }; +/** @internal */ +export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + > = z.nativeEnum( + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + > = + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$ { + /** @deprecated use `PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod$inboundSchema: z.ZodNativeEnum< @@ -139,10 +175,8 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPay contractor_uuid: z.string().optional(), payment_method: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod$inboundSchema - .default("Direct Deposit"), + .optional(), wage: z.number().optional(), - hours: z.number().optional(), - bonus: z.number().optional(), reimbursement: z.number().optional(), }).transform((v) => { return remap$(v, { @@ -155,10 +189,8 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPay export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments$Outbound = { contractor_uuid?: string | undefined; - payment_method: string; + payment_method?: string | undefined; wage?: number | undefined; - hours?: number | undefined; - bonus?: number | undefined; reimbursement?: number | undefined; }; @@ -172,10 +204,8 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPay contractorUuid: z.string().optional(), paymentMethod: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewPaymentMethod$outboundSchema - .default("Direct Deposit"), + .optional(), wage: z.number().optional(), - hours: z.number().optional(), - bonus: z.number().optional(), reimbursement: z.number().optional(), }).transform((v) => { return remap$(v, { @@ -234,29 +264,26 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody$i z.ZodTypeDef, unknown > = z.object({ - check_date: z.string().transform(v => new RFCDate(v)), - creation_token: z.string().optional(), contractor_payments: z.array( z.lazy(() => PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments$inboundSchema ), ), + check_date: z.string().transform(v => new RFCDate(v)).optional(), }).transform((v) => { return remap$(v, { - "check_date": "checkDate", - "creation_token": "creationToken", "contractor_payments": "contractorPayments", + "check_date": "checkDate", }); }); /** @internal */ export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody$Outbound = { - check_date: string; - creation_token?: string | undefined; contractor_payments: Array< PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments$Outbound >; + check_date?: string | undefined; }; /** @internal */ @@ -266,18 +293,16 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody$o z.ZodTypeDef, PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody > = z.object({ - checkDate: z.instanceof(RFCDate).transform(v => v.toString()), - creationToken: z.string().optional(), contractorPayments: z.array( z.lazy(() => PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewContractorPayments$outboundSchema ), ), + checkDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), }).transform((v) => { return remap$(v, { - checkDate: "check_date", - creationToken: "creation_token", contractorPayments: "contractor_payments", + checkDate: "check_date", }); }); @@ -329,15 +354,17 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest$inbou z.ZodTypeDef, unknown > = z.object({ + "X-Gusto-API-Version": + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), company_id: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), RequestBody: z.lazy(() => PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody$inboundSchema ), }).transform((v) => { return remap$(v, { - "company_id": "companyId", "X-Gusto-API-Version": "xGustoAPIVersion", + "company_id": "companyId", "RequestBody": "requestBody", }); }); @@ -345,8 +372,8 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest$inbou /** @internal */ export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest$Outbound = { - company_id: string; "X-Gusto-API-Version": string; + company_id: string; RequestBody: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody$Outbound; }; @@ -358,15 +385,17 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest$outbo z.ZodTypeDef, PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest > = z.object({ + xGustoAPIVersion: + PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), companyId: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), requestBody: z.lazy(() => PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequestBody$outboundSchema ), }).transform((v) => { return remap$(v, { - companyId: "company_id", xGustoAPIVersion: "X-Gusto-API-Version", + companyId: "company_id", requestBody: "RequestBody", }); }); @@ -420,11 +449,12 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse$inbo unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, - "Contractor-Payment-Group": ContractorPaymentGroup$inboundSchema.optional(), + "Contractor-Payment-Group-Preview": + ContractorPaymentGroupPreview$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", - "Contractor-Payment-Group": "contractorPaymentGroup", + "Contractor-Payment-Group-Preview": "contractorPaymentGroupPreview", }); }); @@ -432,7 +462,9 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse$inbo export type PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse$Outbound = { HttpMeta: HTTPMetadata$Outbound; - "Contractor-Payment-Group"?: ContractorPaymentGroup$Outbound | undefined; + "Contractor-Payment-Group-Preview"?: + | ContractorPaymentGroupPreview$Outbound + | undefined; }; /** @internal */ @@ -443,11 +475,12 @@ export const PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse$outb PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewResponse > = z.object({ httpMeta: HTTPMetadata$outboundSchema, - contractorPaymentGroup: ContractorPaymentGroup$outboundSchema.optional(), + contractorPaymentGroupPreview: ContractorPaymentGroupPreview$outboundSchema + .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", - contractorPaymentGroup: "Contractor-Payment-Group", + contractorPaymentGroupPreview: "Contractor-Payment-Group-Preview", }); }); diff --git a/gusto_embedded/src/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfund.ts b/gusto_embedded/src/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfund.ts index fcd10f06..baf416ee 100644 --- a/gusto_embedded/src/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfund.ts +++ b/gusto_embedded/src/models/operations/putv1contractorpaymentgroupscontractorpaymentgroupidfund.ts @@ -5,6 +5,7 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { ContractorPaymentGroup, @@ -18,13 +19,23 @@ import { HTTPMetadata$Outbound, HTTPMetadata$outboundSchema, } from "../components/httpmetadata.js"; -import { - VersionHeader, - VersionHeader$inboundSchema, - VersionHeader$outboundSchema, -} from "../components/versionheader.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * 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. + */ +export const PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion = + { + TwoThousandAndTwentyFourMinus04Minus01: "2024-04-01", + } as const; +/** + * 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. + */ +export type PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion = + ClosedEnum< + typeof PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion + >; + export type PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest = { /** * The UUID of the contractor payment group @@ -33,7 +44,9 @@ export type PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest = { /** * 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. */ - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion + | undefined; }; export type PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundResponse = { @@ -44,6 +57,34 @@ export type PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundResponse = { contractorPaymentGroup?: ContractorPaymentGroup | undefined; }; +/** @internal */ +export const PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$inboundSchema: + z.ZodNativeEnum< + typeof PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion + > = z.nativeEnum( + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion, + ); + +/** @internal */ +export const PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$outboundSchema: + z.ZodNativeEnum< + typeof PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion + > = + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$ { + /** @deprecated use `PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$inboundSchema` instead. */ + export const inboundSchema = + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$inboundSchema; + /** @deprecated use `PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$outboundSchema` instead. */ + export const outboundSchema = + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$outboundSchema; +} + /** @internal */ export const PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest$inboundSchema: z.ZodType< @@ -52,7 +93,9 @@ export const PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest$inb unknown > = z.object({ contractor_payment_group_uuid: z.string(), - "X-Gusto-API-Version": VersionHeader$inboundSchema.default("2024-04-01"), + "X-Gusto-API-Version": + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$inboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { "contractor_payment_group_uuid": "contractorPaymentGroupUuid", @@ -75,7 +118,9 @@ export const PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest$out PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundRequest > = z.object({ contractorPaymentGroupUuid: z.string(), - xGustoAPIVersion: VersionHeader$outboundSchema.default("2024-04-01"), + xGustoAPIVersion: + PutV1ContractorPaymentGroupsContractorPaymentGroupIdFundHeaderXGustoAPIVersion$outboundSchema + .default("2024-04-01"), }).transform((v) => { return remap$(v, { contractorPaymentGroupUuid: "contractor_payment_group_uuid", diff --git a/gusto_embedded/src/react-query/contractorPaymentGroupsFund.ts b/gusto_embedded/src/react-query/contractorPaymentGroupsFund.ts index c25f46ec..25974037 100644 --- a/gusto_embedded/src/react-query/contractorPaymentGroupsFund.ts +++ b/gusto_embedded/src/react-query/contractorPaymentGroupsFund.ts @@ -32,7 +32,6 @@ export type ContractorPaymentGroupsFundMutationData = * * @remarks * > 🚧 Demo action - * > * > This action is only available in the Demo environment * * Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. diff --git a/gusto_embedded/src/react-query/contractorPaymentGroupsGet.ts b/gusto_embedded/src/react-query/contractorPaymentGroupsGet.ts index 2a275f67..2381ce28 100644 --- a/gusto_embedded/src/react-query/contractorPaymentGroupsGet.ts +++ b/gusto_embedded/src/react-query/contractorPaymentGroupsGet.ts @@ -16,8 +16,8 @@ import { GustoEmbeddedCore } from "../core.js"; import { contractorPaymentGroupsGet } from "../funcs/contractorPaymentGroupsGet.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; -import { VersionHeader } from "../models/components/versionheader.js"; import { + GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion, GetV1ContractorPaymentGroupsContractorPaymentGroupIdRequest, GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse, } from "../models/operations/getv1contractorpaymentgroupscontractorpaymentgroupid.js"; @@ -33,7 +33,7 @@ export type ContractorPaymentGroupsGetQueryData = GetV1ContractorPaymentGroupsContractorPaymentGroupIdResponse; /** - * Fetch a contractor payment group + * Get a contractor payment group * * @remarks * Returns a contractor payment group with all associated contractor payments. @@ -56,7 +56,7 @@ export function useContractorPaymentGroupsGet( } /** - * Fetch a contractor payment group + * Get a contractor payment group * * @remarks * Returns a contractor payment group with all associated contractor payments. @@ -95,7 +95,11 @@ export function setContractorPaymentGroupsGetData( client: QueryClient, queryKeyBase: [ contractorPaymentGroupUuid: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + | undefined; + }, ], data: ContractorPaymentGroupsGetQueryData, ): ContractorPaymentGroupsGetQueryData | undefined { @@ -109,7 +113,11 @@ export function invalidateContractorPaymentGroupsGet( queryKeyBase: TupleToPrefixes< [ contractorPaymentGroupUuid: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + | undefined; + }, ] >, filters?: Omit, @@ -170,7 +178,11 @@ export function buildContractorPaymentGroupsGetQuery( export function queryKeyContractorPaymentGroupsGet( contractorPaymentGroupUuid: string, - parameters: { xGustoAPIVersion?: VersionHeader | undefined }, + parameters: { + xGustoAPIVersion?: + | GetV1ContractorPaymentGroupsContractorPaymentGroupIdHeaderXGustoAPIVersion + | undefined; + }, ): QueryKey { return [ "@gusto/embedded-api", diff --git a/gusto_embedded/src/react-query/contractorPaymentGroupsGetList.ts b/gusto_embedded/src/react-query/contractorPaymentGroupsGetList.ts index bfbcf86e..c2238553 100644 --- a/gusto_embedded/src/react-query/contractorPaymentGroupsGetList.ts +++ b/gusto_embedded/src/react-query/contractorPaymentGroupsGetList.ts @@ -16,8 +16,8 @@ import { GustoEmbeddedCore } from "../core.js"; import { contractorPaymentGroupsGetList } from "../funcs/contractorPaymentGroupsGetList.js"; import { combineSignals } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; -import { VersionHeader } from "../models/components/versionheader.js"; import { + GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion, GetV1CompaniesCompanyIdContractorPaymentGroupsRequest, GetV1CompaniesCompanyIdContractorPaymentGroupsResponse, } from "../models/operations/getv1companiescompanyidcontractorpaymentgroups.js"; @@ -38,7 +38,7 @@ export type ContractorPaymentGroupsGetListQueryData = * @remarks * Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. * - * scope: `payrolls:read` + * scope: `payrolls:read` */ export function useContractorPaymentGroupsGetList( request: GetV1CompaniesCompanyIdContractorPaymentGroupsRequest, @@ -61,7 +61,7 @@ export function useContractorPaymentGroupsGetList( * @remarks * Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. * - * scope: `payrolls:read` + * scope: `payrolls:read` */ export function useContractorPaymentGroupsGetListSuspense( request: GetV1CompaniesCompanyIdContractorPaymentGroupsRequest, @@ -100,7 +100,9 @@ export function setContractorPaymentGroupsGetListData( endDate?: string | undefined; page?: number | undefined; per?: number | undefined; - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + | undefined; }, ], data: ContractorPaymentGroupsGetListQueryData, @@ -123,7 +125,9 @@ export function invalidateContractorPaymentGroupsGetList( endDate?: string | undefined; page?: number | undefined; per?: number | undefined; - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + | undefined; }, ] >, @@ -193,7 +197,9 @@ export function queryKeyContractorPaymentGroupsGetList( endDate?: string | undefined; page?: number | undefined; per?: number | undefined; - xGustoAPIVersion?: VersionHeader | undefined; + xGustoAPIVersion?: + | GetV1CompaniesCompanyIdContractorPaymentGroupsHeaderXGustoAPIVersion + | undefined; }, ): QueryKey { return [ diff --git a/gusto_embedded/src/react-query/contractorPaymentGroupsPreview.ts b/gusto_embedded/src/react-query/contractorPaymentGroupsPreview.ts index e5446608..0b68acc2 100644 --- a/gusto_embedded/src/react-query/contractorPaymentGroupsPreview.ts +++ b/gusto_embedded/src/react-query/contractorPaymentGroupsPreview.ts @@ -31,9 +31,9 @@ export type ContractorPaymentGroupsPreviewMutationData = * Preview a contractor payment group * * @remarks - * Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. + * Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. * - * scope: `payrolls:read` + * scope: `contractor_payment_groups:write` */ export function useContractorPaymentGroupsPreviewMutation( options?: MutationHookOptions< diff --git a/gusto_embedded/src/sdk/contractorpaymentgroups.ts b/gusto_embedded/src/sdk/contractorpaymentgroups.ts index 8af479a8..c3bcfec2 100644 --- a/gusto_embedded/src/sdk/contractorpaymentgroups.ts +++ b/gusto_embedded/src/sdk/contractorpaymentgroups.ts @@ -47,18 +47,18 @@ import { unwrapAsync } from "../types/fp.js"; export class ContractorPaymentGroups extends ClientSDK { /** - * Create a contractor payment group + * Get contractor payment groups for a company * * @remarks - * Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + * Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. * - * scope: `payrolls:run` + * scope: `payrolls:read` */ - async create( - request: PostV1CompaniesCompanyIdContractorPaymentGroupsRequest, + async getList( + request: GetV1CompaniesCompanyIdContractorPaymentGroupsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(contractorPaymentGroupsCreate( + ): Promise { + return unwrapAsync(contractorPaymentGroupsGetList( this, request, options, @@ -66,18 +66,18 @@ export class ContractorPaymentGroups extends ClientSDK { } /** - * Get contractor payment groups for a company + * Create a contractor payment group * * @remarks - * Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + * Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) * - * scope: `payrolls:read` + * scope: `payrolls:run` */ - async getList( - request: GetV1CompaniesCompanyIdContractorPaymentGroupsRequest, + async create( + request: PostV1CompaniesCompanyIdContractorPaymentGroupsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(contractorPaymentGroupsGetList( + ): Promise { + return unwrapAsync(contractorPaymentGroupsCreate( this, request, options, @@ -88,9 +88,9 @@ export class ContractorPaymentGroups extends ClientSDK { * Preview a contractor payment group * * @remarks - * Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. + * Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. * - * scope: `payrolls:read` + * scope: `contractor_payment_groups:write` */ async preview( request: PostV1CompaniesCompanyIdContractorPaymentGroupsPreviewRequest, @@ -104,7 +104,7 @@ export class ContractorPaymentGroups extends ClientSDK { } /** - * Fetch a contractor payment group + * Get a contractor payment group * * @remarks * Returns a contractor payment group with all associated contractor payments. @@ -146,7 +146,6 @@ export class ContractorPaymentGroups extends ClientSDK { * * @remarks * > 🚧 Demo action - * > * > This action is only available in the Demo environment * * Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt.